generated-configure.sh revision 2548:ccfda1c4e17d
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_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935FLOCK
936TIME
937STAT
938HG
939READELF
940OTOOL
941LDD
942ZIPEXE
943UNZIP
944TAR_SUPPORTS_TRANSFORM
945TAR_INCLUDE_PARAM
946TAR_CREATE_EXTRA_PARAM
947TAR_TYPE
948FIND_DELETE
949OUTPUT_SYNC
950OUTPUT_SYNC_SUPPORTED
951CHECK_TOOLSDIR_MAKE
952CHECK_TOOLSDIR_GMAKE
953CHECK_MAKE
954CHECK_GMAKE
955MAKE
956PKGHANDLER
957CONFIGURESUPPORT_OUTPUTDIR
958OUTPUT_ROOT
959CONF_NAME
960SPEC
961SDKROOT
962XCODEBUILD
963JVM_VARIANT_MAIN
964VALID_JVM_VARIANTS
965JVM_VARIANTS
966DEBUG_LEVEL
967HOTSPOT_DEBUG_LEVEL
968JDK_VARIANT
969USERNAME
970CANONICAL_TOPDIR
971ORIGINAL_TOPDIR
972TOPDIR
973PATH_SEP
974HOTSPOT_BUILD_CPU_DEFINE
975HOTSPOT_BUILD_CPU_ARCH
976HOTSPOT_BUILD_CPU
977HOTSPOT_BUILD_OS_TYPE
978HOTSPOT_BUILD_OS
979OPENJDK_BUILD_BUNDLE_PLATFORM
980OPENJDK_BUILD_OS_EXPORT_DIR
981OPENJDK_BUILD_CPU_OSARCH
982OPENJDK_BUILD_CPU_ISADIR
983OPENJDK_BUILD_CPU_LEGACY_LIB
984OPENJDK_BUILD_CPU_LEGACY
985HOTSPOT_TARGET_CPU_DEFINE
986HOTSPOT_TARGET_CPU_ARCH
987HOTSPOT_TARGET_CPU
988HOTSPOT_TARGET_OS_TYPE
989HOTSPOT_TARGET_OS
990DEFINE_CROSS_COMPILE_ARCH
991OPENJDK_TARGET_BUNDLE_PLATFORM
992OPENJDK_TARGET_OS_EXPORT_DIR
993OPENJDK_TARGET_CPU_OSARCH
994OPENJDK_TARGET_CPU_ISADIR
995OPENJDK_TARGET_CPU_LEGACY_LIB
996OPENJDK_TARGET_CPU_LEGACY
997REQUIRED_OS_VERSION
998REQUIRED_OS_ARCH
999REQUIRED_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
1142with_cacerts_file
1143enable_unlimited_crypto
1144with_copyright_year
1145enable_keep_packaged_modules
1146with_milestone
1147with_update_version
1148with_user_release_suffix
1149with_build_number
1150with_version_string
1151with_version_pre
1152with_version_opt
1153with_version_build
1154with_version_major
1155with_version_minor
1156with_version_security
1157with_version_patch
1158with_boot_jdk
1159with_build_jdk
1160with_add_source_root
1161with_override_source_root
1162with_adds_and_overrides
1163with_override_langtools
1164with_override_corba
1165with_override_jaxp
1166with_override_jaxws
1167with_override_hotspot
1168with_override_nashorn
1169with_override_jdk
1170with_import_hotspot
1171with_import_modules
1172enable_static_build
1173with_toolchain_type
1174with_extra_cflags
1175with_extra_cxxflags
1176with_extra_ldflags
1177with_toolchain_version
1178with_build_devkit
1179with_jtreg
1180with_abi_profile
1181enable_warnings_as_errors
1182with_native_debug_symbols
1183enable_debug_symbols
1184enable_zip_debug_info
1185enable_native_coverage
1186enable_dtrace
1187enable_aot
1188enable_hotspot_gtest
1189with_stdc__lib
1190with_msvcr_dll
1191with_msvcp_dll
1192with_x
1193with_cups
1194with_cups_include
1195with_freetype
1196with_freetype_include
1197with_freetype_lib
1198with_freetype_src
1199enable_freetype_bundling
1200with_alsa
1201with_alsa_include
1202with_alsa_lib
1203with_libffi
1204with_libffi_include
1205with_libffi_lib
1206enable_libffi_bundling
1207with_libjpeg
1208with_giflib
1209with_libpng
1210with_zlib
1211with_lcms
1212with_dxsdk
1213with_dxsdk_lib
1214with_dxsdk_include
1215with_libelf
1216with_libelf_include
1217with_libelf_lib
1218with_jvm_features
1219with_jvm_interpreter
1220enable_jtreg_failure_handler
1221enable_generate_classlist
1222with_num_cores
1223with_memory_size
1224with_jobs
1225with_test_jobs
1226with_boot_jdk_jvmargs
1227with_sjavac_server_java
1228enable_sjavac
1229enable_javac_server
1230enable_icecc
1231enable_precompiled_headers
1232enable_ccache
1233with_ccache_dir
1234'
1235      ac_precious_vars='build_alias
1236host_alias
1237target_alias
1238BASENAME
1239BASH
1240CAT
1241CHMOD
1242CMP
1243COMM
1244CP
1245CUT
1246DATE
1247DIFF
1248DIRNAME
1249ECHO
1250EXPR
1251FILE
1252FIND
1253HEAD
1254GUNZIP
1255GZIP
1256LN
1257LS
1258MKDIR
1259MKTEMP
1260MV
1261NAWK
1262PRINTF
1263RM
1264RMDIR
1265SH
1266SORT
1267TAIL
1268TAR
1269TEE
1270TOUCH
1271TR
1272UNAME
1273UNIQ
1274WC
1275WHICH
1276XARGS
1277AWK
1278GREP
1279EGREP
1280FGREP
1281SED
1282CYGPATH
1283READLINK
1284DF
1285CPIO
1286NICE
1287PANDOC
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294HG
1295STAT
1296TIME
1297FLOCK
1298DTRACE
1299PATCH
1300DSYMUTIL
1301XATTR
1302CODESIGN
1303SETFILE
1304PKG_CONFIG
1305JAVA
1306JAVAC
1307JAVAH
1308JAR
1309JARSIGNER
1310CC
1311CFLAGS
1312LDFLAGS
1313LIBS
1314CPPFLAGS
1315CXX
1316CXXFLAGS
1317CCC
1318CPP
1319CXXCPP
1320AS
1321AR
1322LIPO
1323STRIP
1324NM
1325GNM
1326OBJCOPY
1327OBJDUMP
1328BUILD_CC
1329BUILD_CXX
1330BUILD_NM
1331BUILD_AR
1332BUILD_OBJCOPY
1333BUILD_STRIP
1334JTREGEXE
1335XMKMF
1336FREETYPE_CFLAGS
1337FREETYPE_LIBS
1338ALSA_CFLAGS
1339ALSA_LIBS
1340LIBFFI_CFLAGS
1341LIBFFI_LIBS
1342PNG_CFLAGS
1343PNG_LIBS
1344LCMS_CFLAGS
1345LCMS_LIBS
1346ELF_CFLAGS
1347ELF_LIBS
1348ICECC_CMD
1349ICECC_CREATE_ENV
1350ICECC_WRAPPER
1351CCACHE'
1352
1353
1354# Initialize some variables set by options.
1355ac_init_help=
1356ac_init_version=false
1357ac_unrecognized_opts=
1358ac_unrecognized_sep=
1359# The variables have the same names as the options, with
1360# dashes changed to underlines.
1361cache_file=/dev/null
1362exec_prefix=NONE
1363no_create=
1364no_recursion=
1365prefix=NONE
1366program_prefix=NONE
1367program_suffix=NONE
1368program_transform_name=s,x,x,
1369silent=
1370site=
1371srcdir=
1372verbose=
1373x_includes=NONE
1374x_libraries=NONE
1375
1376# Installation directory options.
1377# These are left unexpanded so users can "make install exec_prefix=/foo"
1378# and all the variables that are supposed to be based on exec_prefix
1379# by default will actually change.
1380# Use braces instead of parens because sh, perl, etc. also accept them.
1381# (The list follows the same order as the GNU Coding Standards.)
1382bindir='${exec_prefix}/bin'
1383sbindir='${exec_prefix}/sbin'
1384libexecdir='${exec_prefix}/libexec'
1385datarootdir='${prefix}/share'
1386datadir='${datarootdir}'
1387sysconfdir='${prefix}/etc'
1388sharedstatedir='${prefix}/com'
1389localstatedir='${prefix}/var'
1390includedir='${prefix}/include'
1391oldincludedir='/usr/include'
1392docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1393infodir='${datarootdir}/info'
1394htmldir='${docdir}'
1395dvidir='${docdir}'
1396pdfdir='${docdir}'
1397psdir='${docdir}'
1398libdir='${exec_prefix}/lib'
1399localedir='${datarootdir}/locale'
1400mandir='${datarootdir}/man'
1401
1402ac_prev=
1403ac_dashdash=
1404for ac_option
1405do
1406  # If the previous option needs an argument, assign it.
1407  if test -n "$ac_prev"; then
1408    eval $ac_prev=\$ac_option
1409    ac_prev=
1410    continue
1411  fi
1412
1413  case $ac_option in
1414  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1415  *=)   ac_optarg= ;;
1416  *)    ac_optarg=yes ;;
1417  esac
1418
1419  # Accept the important Cygnus configure options, so we can diagnose typos.
1420
1421  case $ac_dashdash$ac_option in
1422  --)
1423    ac_dashdash=yes ;;
1424
1425  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1426    ac_prev=bindir ;;
1427  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1428    bindir=$ac_optarg ;;
1429
1430  -build | --build | --buil | --bui | --bu)
1431    ac_prev=build_alias ;;
1432  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1433    build_alias=$ac_optarg ;;
1434
1435  -cache-file | --cache-file | --cache-fil | --cache-fi \
1436  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1437    ac_prev=cache_file ;;
1438  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1439  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1440    cache_file=$ac_optarg ;;
1441
1442  --config-cache | -C)
1443    cache_file=config.cache ;;
1444
1445  -datadir | --datadir | --datadi | --datad)
1446    ac_prev=datadir ;;
1447  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1448    datadir=$ac_optarg ;;
1449
1450  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1451  | --dataroo | --dataro | --datar)
1452    ac_prev=datarootdir ;;
1453  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1454  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1455    datarootdir=$ac_optarg ;;
1456
1457  -disable-* | --disable-*)
1458    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1459    # Reject names that are not valid shell variable names.
1460    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1461      as_fn_error $? "invalid feature name: $ac_useropt"
1462    ac_useropt_orig=$ac_useropt
1463    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1464    case $ac_user_opts in
1465      *"
1466"enable_$ac_useropt"
1467"*) ;;
1468      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1469	 ac_unrecognized_sep=', ';;
1470    esac
1471    eval enable_$ac_useropt=no ;;
1472
1473  -docdir | --docdir | --docdi | --doc | --do)
1474    ac_prev=docdir ;;
1475  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1476    docdir=$ac_optarg ;;
1477
1478  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1479    ac_prev=dvidir ;;
1480  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1481    dvidir=$ac_optarg ;;
1482
1483  -enable-* | --enable-*)
1484    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1485    # Reject names that are not valid shell variable names.
1486    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1487      as_fn_error $? "invalid feature name: $ac_useropt"
1488    ac_useropt_orig=$ac_useropt
1489    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1490    case $ac_user_opts in
1491      *"
1492"enable_$ac_useropt"
1493"*) ;;
1494      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1495	 ac_unrecognized_sep=', ';;
1496    esac
1497    eval enable_$ac_useropt=\$ac_optarg ;;
1498
1499  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1500  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1501  | --exec | --exe | --ex)
1502    ac_prev=exec_prefix ;;
1503  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1504  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1505  | --exec=* | --exe=* | --ex=*)
1506    exec_prefix=$ac_optarg ;;
1507
1508  -gas | --gas | --ga | --g)
1509    # Obsolete; use --with-gas.
1510    with_gas=yes ;;
1511
1512  -help | --help | --hel | --he | -h)
1513    ac_init_help=long ;;
1514  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1515    ac_init_help=recursive ;;
1516  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1517    ac_init_help=short ;;
1518
1519  -host | --host | --hos | --ho)
1520    ac_prev=host_alias ;;
1521  -host=* | --host=* | --hos=* | --ho=*)
1522    host_alias=$ac_optarg ;;
1523
1524  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1525    ac_prev=htmldir ;;
1526  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1527  | --ht=*)
1528    htmldir=$ac_optarg ;;
1529
1530  -includedir | --includedir | --includedi | --included | --include \
1531  | --includ | --inclu | --incl | --inc)
1532    ac_prev=includedir ;;
1533  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1534  | --includ=* | --inclu=* | --incl=* | --inc=*)
1535    includedir=$ac_optarg ;;
1536
1537  -infodir | --infodir | --infodi | --infod | --info | --inf)
1538    ac_prev=infodir ;;
1539  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1540    infodir=$ac_optarg ;;
1541
1542  -libdir | --libdir | --libdi | --libd)
1543    ac_prev=libdir ;;
1544  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1545    libdir=$ac_optarg ;;
1546
1547  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1548  | --libexe | --libex | --libe)
1549    ac_prev=libexecdir ;;
1550  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1551  | --libexe=* | --libex=* | --libe=*)
1552    libexecdir=$ac_optarg ;;
1553
1554  -localedir | --localedir | --localedi | --localed | --locale)
1555    ac_prev=localedir ;;
1556  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1557    localedir=$ac_optarg ;;
1558
1559  -localstatedir | --localstatedir | --localstatedi | --localstated \
1560  | --localstate | --localstat | --localsta | --localst | --locals)
1561    ac_prev=localstatedir ;;
1562  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1563  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1564    localstatedir=$ac_optarg ;;
1565
1566  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1567    ac_prev=mandir ;;
1568  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1569    mandir=$ac_optarg ;;
1570
1571  -nfp | --nfp | --nf)
1572    # Obsolete; use --without-fp.
1573    with_fp=no ;;
1574
1575  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1576  | --no-cr | --no-c | -n)
1577    no_create=yes ;;
1578
1579  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1580  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1581    no_recursion=yes ;;
1582
1583  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1584  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1585  | --oldin | --oldi | --old | --ol | --o)
1586    ac_prev=oldincludedir ;;
1587  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1588  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1589  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1590    oldincludedir=$ac_optarg ;;
1591
1592  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1593    ac_prev=prefix ;;
1594  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1595    prefix=$ac_optarg ;;
1596
1597  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1598  | --program-pre | --program-pr | --program-p)
1599    ac_prev=program_prefix ;;
1600  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1601  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1602    program_prefix=$ac_optarg ;;
1603
1604  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1605  | --program-suf | --program-su | --program-s)
1606    ac_prev=program_suffix ;;
1607  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1608  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1609    program_suffix=$ac_optarg ;;
1610
1611  -program-transform-name | --program-transform-name \
1612  | --program-transform-nam | --program-transform-na \
1613  | --program-transform-n | --program-transform- \
1614  | --program-transform | --program-transfor \
1615  | --program-transfo | --program-transf \
1616  | --program-trans | --program-tran \
1617  | --progr-tra | --program-tr | --program-t)
1618    ac_prev=program_transform_name ;;
1619  -program-transform-name=* | --program-transform-name=* \
1620  | --program-transform-nam=* | --program-transform-na=* \
1621  | --program-transform-n=* | --program-transform-=* \
1622  | --program-transform=* | --program-transfor=* \
1623  | --program-transfo=* | --program-transf=* \
1624  | --program-trans=* | --program-tran=* \
1625  | --progr-tra=* | --program-tr=* | --program-t=*)
1626    program_transform_name=$ac_optarg ;;
1627
1628  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1629    ac_prev=pdfdir ;;
1630  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1631    pdfdir=$ac_optarg ;;
1632
1633  -psdir | --psdir | --psdi | --psd | --ps)
1634    ac_prev=psdir ;;
1635  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1636    psdir=$ac_optarg ;;
1637
1638  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1639  | -silent | --silent | --silen | --sile | --sil)
1640    silent=yes ;;
1641
1642  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1643    ac_prev=sbindir ;;
1644  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1645  | --sbi=* | --sb=*)
1646    sbindir=$ac_optarg ;;
1647
1648  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1649  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1650  | --sharedst | --shareds | --shared | --share | --shar \
1651  | --sha | --sh)
1652    ac_prev=sharedstatedir ;;
1653  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1654  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1655  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1656  | --sha=* | --sh=*)
1657    sharedstatedir=$ac_optarg ;;
1658
1659  -site | --site | --sit)
1660    ac_prev=site ;;
1661  -site=* | --site=* | --sit=*)
1662    site=$ac_optarg ;;
1663
1664  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1665    ac_prev=srcdir ;;
1666  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1667    srcdir=$ac_optarg ;;
1668
1669  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1670  | --syscon | --sysco | --sysc | --sys | --sy)
1671    ac_prev=sysconfdir ;;
1672  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1673  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1674    sysconfdir=$ac_optarg ;;
1675
1676  -target | --target | --targe | --targ | --tar | --ta | --t)
1677    ac_prev=target_alias ;;
1678  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1679    target_alias=$ac_optarg ;;
1680
1681  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1682    verbose=yes ;;
1683
1684  -version | --version | --versio | --versi | --vers | -V)
1685    ac_init_version=: ;;
1686
1687  -with-* | --with-*)
1688    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1689    # Reject names that are not valid shell variable names.
1690    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1691      as_fn_error $? "invalid package name: $ac_useropt"
1692    ac_useropt_orig=$ac_useropt
1693    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1694    case $ac_user_opts in
1695      *"
1696"with_$ac_useropt"
1697"*) ;;
1698      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1699	 ac_unrecognized_sep=', ';;
1700    esac
1701    eval with_$ac_useropt=\$ac_optarg ;;
1702
1703  -without-* | --without-*)
1704    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1705    # Reject names that are not valid shell variable names.
1706    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1707      as_fn_error $? "invalid package name: $ac_useropt"
1708    ac_useropt_orig=$ac_useropt
1709    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1710    case $ac_user_opts in
1711      *"
1712"with_$ac_useropt"
1713"*) ;;
1714      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1715	 ac_unrecognized_sep=', ';;
1716    esac
1717    eval with_$ac_useropt=no ;;
1718
1719  --x)
1720    # Obsolete; use --with-x.
1721    with_x=yes ;;
1722
1723  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1724  | --x-incl | --x-inc | --x-in | --x-i)
1725    ac_prev=x_includes ;;
1726  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1727  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1728    x_includes=$ac_optarg ;;
1729
1730  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1731  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1732    ac_prev=x_libraries ;;
1733  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1734  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1735    x_libraries=$ac_optarg ;;
1736
1737  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1738Try \`$0 --help' for more information"
1739    ;;
1740
1741  *=*)
1742    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1743    # Reject names that are not valid shell variable names.
1744    case $ac_envvar in #(
1745      '' | [0-9]* | *[!_$as_cr_alnum]* )
1746      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1747    esac
1748    eval $ac_envvar=\$ac_optarg
1749    export $ac_envvar ;;
1750
1751  *)
1752    # FIXME: should be removed in autoconf 3.0.
1753    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1754    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1755      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1756    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1757    ;;
1758
1759  esac
1760done
1761
1762if test -n "$ac_prev"; then
1763  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1764  as_fn_error $? "missing argument to $ac_option"
1765fi
1766
1767if test -n "$ac_unrecognized_opts"; then
1768  case $enable_option_checking in
1769    no) ;;
1770    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1771    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1772  esac
1773fi
1774
1775# Check all directory arguments for consistency.
1776for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1777		datadir sysconfdir sharedstatedir localstatedir includedir \
1778		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1779		libdir localedir mandir
1780do
1781  eval ac_val=\$$ac_var
1782  # Remove trailing slashes.
1783  case $ac_val in
1784    */ )
1785      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1786      eval $ac_var=\$ac_val;;
1787  esac
1788  # Be sure to have absolute directory names.
1789  case $ac_val in
1790    [\\/$]* | ?:[\\/]* )  continue;;
1791    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1792  esac
1793  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1794done
1795
1796# There might be people who depend on the old broken behavior: `$host'
1797# used to hold the argument of --host etc.
1798# FIXME: To remove some day.
1799build=$build_alias
1800host=$host_alias
1801target=$target_alias
1802
1803# FIXME: To remove some day.
1804if test "x$host_alias" != x; then
1805  if test "x$build_alias" = x; then
1806    cross_compiling=maybe
1807  elif test "x$build_alias" != "x$host_alias"; then
1808    cross_compiling=yes
1809  fi
1810fi
1811
1812ac_tool_prefix=
1813test -n "$host_alias" && ac_tool_prefix=$host_alias-
1814
1815test "$silent" = yes && exec 6>/dev/null
1816
1817
1818ac_pwd=`pwd` && test -n "$ac_pwd" &&
1819ac_ls_di=`ls -di .` &&
1820ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1821  as_fn_error $? "working directory cannot be determined"
1822test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1823  as_fn_error $? "pwd does not report name of working directory"
1824
1825
1826# Find the source files, if location was not specified.
1827if test -z "$srcdir"; then
1828  ac_srcdir_defaulted=yes
1829  # Try the directory containing this script, then the parent directory.
1830  ac_confdir=`$as_dirname -- "$as_myself" ||
1831$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1832	 X"$as_myself" : 'X\(//\)[^/]' \| \
1833	 X"$as_myself" : 'X\(//\)$' \| \
1834	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1835$as_echo X"$as_myself" |
1836    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1837	    s//\1/
1838	    q
1839	  }
1840	  /^X\(\/\/\)[^/].*/{
1841	    s//\1/
1842	    q
1843	  }
1844	  /^X\(\/\/\)$/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\).*/{
1849	    s//\1/
1850	    q
1851	  }
1852	  s/.*/./; q'`
1853  srcdir=$ac_confdir
1854  if test ! -r "$srcdir/$ac_unique_file"; then
1855    srcdir=..
1856  fi
1857else
1858  ac_srcdir_defaulted=no
1859fi
1860if test ! -r "$srcdir/$ac_unique_file"; then
1861  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1862  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1863fi
1864ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1865ac_abs_confdir=`(
1866	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1867	pwd)`
1868# When building in place, set srcdir=.
1869if test "$ac_abs_confdir" = "$ac_pwd"; then
1870  srcdir=.
1871fi
1872# Remove unnecessary trailing slashes from srcdir.
1873# Double slashes in file names in object file debugging info
1874# mess up M-x gdb in Emacs.
1875case $srcdir in
1876*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1877esac
1878for ac_var in $ac_precious_vars; do
1879  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1880  eval ac_env_${ac_var}_value=\$${ac_var}
1881  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1883done
1884
1885#
1886# Report the --help message.
1887#
1888if test "$ac_init_help" = "long"; then
1889  # Omit some internal or obsolete options to make the list less imposing.
1890  # This message is too long to be a string in the A/UX 3.1 sh.
1891  cat <<_ACEOF
1892\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1893
1894Usage: $0 [OPTION]... [VAR=VALUE]...
1895
1896To assign environment variables (e.g., CC, CFLAGS...), specify them as
1897VAR=VALUE.  See below for descriptions of some of the useful variables.
1898
1899Defaults for the options are specified in brackets.
1900
1901Configuration:
1902  -h, --help              display this help and exit
1903      --help=short        display options specific to this package
1904      --help=recursive    display the short help of all the included packages
1905  -V, --version           display version information and exit
1906  -q, --quiet, --silent   do not print \`checking ...' messages
1907      --cache-file=FILE   cache test results in FILE [disabled]
1908  -C, --config-cache      alias for \`--cache-file=config.cache'
1909  -n, --no-create         do not create output files
1910      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1911
1912Installation directories:
1913  --prefix=PREFIX         install architecture-independent files in PREFIX
1914                          [$ac_default_prefix]
1915  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1916                          [PREFIX]
1917
1918By default, \`make install' will install all the files in
1919\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1920an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1921for instance \`--prefix=\$HOME'.
1922
1923For better control, use the options below.
1924
1925Fine tuning of the installation directories:
1926  --bindir=DIR            user executables [EPREFIX/bin]
1927  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1928  --libexecdir=DIR        program executables [EPREFIX/libexec]
1929  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1930  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1931  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1932  --libdir=DIR            object code libraries [EPREFIX/lib]
1933  --includedir=DIR        C header files [PREFIX/include]
1934  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1935  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1936  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1937  --infodir=DIR           info documentation [DATAROOTDIR/info]
1938  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1939  --mandir=DIR            man documentation [DATAROOTDIR/man]
1940  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1941  --htmldir=DIR           html documentation [DOCDIR]
1942  --dvidir=DIR            dvi documentation [DOCDIR]
1943  --pdfdir=DIR            pdf documentation [DOCDIR]
1944  --psdir=DIR             ps documentation [DOCDIR]
1945_ACEOF
1946
1947  cat <<\_ACEOF
1948
1949X features:
1950  --x-includes=DIR    X include files are in DIR
1951  --x-libraries=DIR   X library files are in DIR
1952
1953System types:
1954  --build=BUILD     configure for building on BUILD [guessed]
1955  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1956  --target=TARGET   configure for building compilers for TARGET [HOST]
1957_ACEOF
1958fi
1959
1960if test -n "$ac_init_help"; then
1961  case $ac_init_help in
1962     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1963   esac
1964  cat <<\_ACEOF
1965
1966Optional Features:
1967  --disable-option-checking  ignore unrecognized --enable/--with options
1968  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1969  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1970  --enable-openjdk-only   suppress building custom source even if present
1971                          [disabled]
1972  --enable-debug          set the debug level to fastdebug (shorthand for
1973                          --with-debug-level=fastdebug) [disabled]
1974  --enable-headless-only  only build headless (no GUI) support [disabled]
1975  --disable-unlimited-crypto
1976                          Disable unlimited crypto policy [enabled]
1977  --disable-keep-packaged-modules
1978                          Do not keep packaged modules in jdk image [enable]
1979  --enable-static-build   enable static library build [disabled]
1980  --disable-warnings-as-errors
1981                          do not consider native warnings to be an error
1982                          [enabled]
1983  --enable-debug-symbols  Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --enable-zip-debug-info Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-native-coverage
1988                          enable native compilation with code coverage
1989                          data[disabled]
1990  --enable-dtrace[=yes/no/auto]
1991                          enable dtrace. Default is auto, where dtrace is
1992                          enabled if all dependencies are present.
1993  --enable-aot[=yes/no/auto]
1994                          enable ahead of time compilation feature. Default is
1995                          auto, where aot is enabled if all dependencies are
1996                          present.
1997  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1998  --disable-freetype-bundling
1999                          disable bundling of the freetype library with the
2000                          build result [enabled on Windows or when using
2001                          --with-freetype, disabled otherwise]
2002  --enable-libffi-bundling
2003                          enable bundling of libffi.so to make the built JDK
2004                          runnable on more systems
2005  --enable-jtreg-failure-handler
2006                          forces build of the jtreg failure handler to be
2007                          enabled, missing dependencies become fatal errors.
2008                          Default is auto, where the failure handler is built
2009                          if all dependencies are present and otherwise just
2010                          disabled.
2011  --disable-generate-classlist
2012                          forces enabling or disabling of the generation of a
2013                          CDS classlist at build time. Default is to generate
2014                          it when either the server or client JVMs are built.
2015  --enable-sjavac         use sjavac to do fast incremental compiles
2016                          [disabled]
2017  --disable-javac-server  disable javac server [enabled]
2018  --enable-icecc          enable distribted compilation of native code using
2019                          icecc/icecream [disabled]
2020  --disable-precompiled-headers
2021                          disable using precompiled headers when compiling C++
2022                          [enabled]
2023  --enable-ccache         enable using ccache to speed up recompilations
2024                          [disabled]
2025
2026Optional Packages:
2027  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2028  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2029  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2030                          support it), e.g. --with-target-bits=32 [guessed]
2031  --with-custom-make-dir  Deprecated. Option is kept for backwards
2032                          compatibility and is ignored
2033  --with-jdk-variant      JDK variant to build (normal) [normal]
2034  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2035                          optimized) [release]
2036  --with-jvm-variants     JVM variants (separated by commas) to build
2037                          (server,client,minimal,core,zero,zeroshark,custom)
2038                          [server]
2039  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2040                          (arm64,aarch64) [aarch64]
2041  --with-devkit           use this devkit for compilers, tools and resources
2042  --with-sys-root         alias for --with-sysroot for backwards compatability
2043  --with-sysroot          use this directory as sysroot
2044  --with-tools-dir        alias for --with-toolchain-path for backwards
2045                          compatibility
2046  --with-toolchain-path   prepend these directories when searching for
2047                          toolchain binaries (compilers etc)
2048  --with-extra-path       prepend these directories to the default path
2049  --with-sdk-name         use the platform SDK of the given name. [macosx]
2050  --with-conf-name        use this as the name of the configuration [generated
2051                          from important configuration options]
2052  --with-output-sync      set make output sync type if supported by make.
2053                          [recurse]
2054  --with-default-make-target
2055                          set the default make target [exploded-image]
2056  --with-cacerts-file     specify alternative cacerts file
2057  --with-copyright-year   Set copyright year value for build [current year]
2058  --with-milestone        Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-update-version   Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-user-release-suffix
2063                          Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-build-number     Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-version-string   Set version string [calculated]
2068  --with-version-pre      Set the base part of the version 'PRE' field
2069                          (pre-release identifier) ['internal']
2070  --with-version-opt      Set version 'OPT' field (build metadata)
2071                          [<timestamp>.<user>.<dirname>]
2072  --with-version-build    Set version 'BUILD' field (build number) [not
2073                          specified]
2074  --with-version-major    Set version 'MAJOR' field (first number) [current
2075                          source value]
2076  --with-version-minor    Set version 'MINOR' field (second number) [current
2077                          source value]
2078  --with-version-security Set version 'SECURITY' field (third number) [current
2079                          source value]
2080  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2081                          specified]
2082  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2083  --with-build-jdk        path to JDK of same version as is being built[the
2084                          newly built JDK]
2085  --with-add-source-root  Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-source-root
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-adds-and-overrides
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-langtools
2094                          Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-corba   Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-jaxp    Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-jaxws   Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-hotspot Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-nashorn Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-jdk     Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-import_hotspot   Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-import-modules   import a set of prebuilt modules either as a zip
2111                          file or an exploded directory
2112  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2113                          to show possible values [platform dependent]
2114  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2115  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2116  --with-extra-ldflags    extra flags to be used when linking jdk
2117  --with-toolchain-version
2118                          the version of the toolchain to look for, use
2119                          '--help' to show possible values [platform
2120                          dependent]
2121  --with-build-devkit     Devkit to use for the build platform toolchain
2122  --with-jtreg            Regression Test Harness [probed]
2123  --with-abi-profile      specify ABI profile for ARM builds
2124                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2125                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2126                          [toolchain dependent]
2127  --with-native-debug-symbols
2128                          set the native debug symbol configuration (none,
2129                          internal, external, zipped) [varying]
2130  --with-stdc++lib=<static>,<dynamic>,<default>
2131                          force linking of the C++ runtime on Linux to either
2132                          static or dynamic, default is static with dynamic as
2133                          fallback
2134  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2135                          (Windows only) [probed]
2136  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2137                          (Windows only) [probed]
2138  --with-x                use the X Window System
2139  --with-cups             specify prefix directory for the cups package
2140                          (expecting the headers under PATH/include)
2141  --with-cups-include     specify directory for the cups include files
2142  --with-freetype         specify prefix directory for the freetype package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-freetype-include specify directory for the freetype include files
2146  --with-freetype-lib     specify directory for the freetype library
2147  --with-freetype-src     specify directory with freetype sources to
2148                          automatically build the library (experimental,
2149                          Windows-only)
2150  --with-alsa             specify prefix directory for the alsa package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-alsa-include     specify directory for the alsa include files
2154  --with-alsa-lib         specify directory for the alsa library
2155  --with-libffi           specify prefix directory for the libffi package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-libffi-include   specify directory for the libffi include files
2159  --with-libffi-lib       specify directory for the libffi library
2160  --with-libjpeg          use libjpeg from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-giflib           use giflib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-libpng           use libpng from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-zlib             use zlib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-lcms             use lcms2 from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-dxsdk            Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-include    Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-libelf           specify prefix directory for the libelf package
2177                          (expecting the libraries under PATH/lib and the
2178                          headers under PATH/include)
2179  --with-libelf-include   specify directory for the libelf include files
2180  --with-libelf-lib       specify directory for the libelf library
2181  --with-jvm-features     additional JVM features to enable (separated by
2182                          comma), use '--help' to show possible values [none]
2183  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2184                          compatibility and is ignored
2185  --with-num-cores        number of cores in the build system, e.g.
2186                          --with-num-cores=8 [probed]
2187  --with-memory-size      memory (in MB) available in the build system, e.g.
2188                          --with-memory-size=1024 [probed]
2189  --with-jobs             number of parallel jobs to let make run [calculated
2190                          based on cores and memory]
2191  --with-test-jobs        number of parallel tests jobs to run [based on build
2192                          jobs]
2193  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2194                          invocations of boot JDK, overriding the default
2195                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2196                          -enableassertions"
2197  --with-sjavac-server-java
2198                          use this java binary for running the sjavac
2199                          background server [Boot JDK java]
2200  --with-ccache-dir       where to store ccache files [~/.ccache]
2201
2202Some influential environment variables:
2203  BASENAME    Override default value for BASENAME
2204  BASH        Override default value for BASH
2205  CAT         Override default value for CAT
2206  CHMOD       Override default value for CHMOD
2207  CMP         Override default value for CMP
2208  COMM        Override default value for COMM
2209  CP          Override default value for CP
2210  CUT         Override default value for CUT
2211  DATE        Override default value for DATE
2212  DIFF        Override default value for DIFF
2213  DIRNAME     Override default value for DIRNAME
2214  ECHO        Override default value for ECHO
2215  EXPR        Override default value for EXPR
2216  FILE        Override default value for FILE
2217  FIND        Override default value for FIND
2218  HEAD        Override default value for HEAD
2219  GUNZIP      Override default value for GUNZIP
2220  GZIP        Override default value for GZIP
2221  LN          Override default value for LN
2222  LS          Override default value for LS
2223  MKDIR       Override default value for MKDIR
2224  MKTEMP      Override default value for MKTEMP
2225  MV          Override default value for MV
2226  NAWK        Override default value for NAWK
2227  PRINTF      Override default value for PRINTF
2228  RM          Override default value for RM
2229  RMDIR       Override default value for RMDIR
2230  SH          Override default value for SH
2231  SORT        Override default value for SORT
2232  TAIL        Override default value for TAIL
2233  TAR         Override default value for TAR
2234  TEE         Override default value for TEE
2235  TOUCH       Override default value for TOUCH
2236  TR          Override default value for TR
2237  UNAME       Override default value for UNAME
2238  UNIQ        Override default value for UNIQ
2239  WC          Override default value for WC
2240  WHICH       Override default value for WHICH
2241  XARGS       Override default value for XARGS
2242  AWK         Override default value for AWK
2243  GREP        Override default value for GREP
2244  EGREP       Override default value for EGREP
2245  FGREP       Override default value for FGREP
2246  SED         Override default value for SED
2247  CYGPATH     Override default value for CYGPATH
2248  READLINK    Override default value for READLINK
2249  DF          Override default value for DF
2250  CPIO        Override default value for CPIO
2251  NICE        Override default value for NICE
2252  PANDOC      Override default value for PANDOC
2253  MAKE        Override default value for MAKE
2254  UNZIP       Override default value for UNZIP
2255  ZIPEXE      Override default value for ZIPEXE
2256  LDD         Override default value for LDD
2257  OTOOL       Override default value for OTOOL
2258  READELF     Override default value for READELF
2259  HG          Override default value for HG
2260  STAT        Override default value for STAT
2261  TIME        Override default value for TIME
2262  FLOCK       Override default value for FLOCK
2263  DTRACE      Override default value for DTRACE
2264  PATCH       Override default value for PATCH
2265  DSYMUTIL    Override default value for DSYMUTIL
2266  XATTR       Override default value for XATTR
2267  CODESIGN    Override default value for CODESIGN
2268  SETFILE     Override default value for SETFILE
2269  PKG_CONFIG  path to pkg-config utility
2270  JAVA        Override default value for JAVA
2271  JAVAC       Override default value for JAVAC
2272  JAVAH       Override default value for JAVAH
2273  JAR         Override default value for JAR
2274  JARSIGNER   Override default value for JARSIGNER
2275  CC          C compiler command
2276  CFLAGS      C compiler flags
2277  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2278              nonstandard directory <lib dir>
2279  LIBS        libraries to pass to the linker, e.g. -l<library>
2280  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2281              you have headers in a nonstandard directory <include dir>
2282  CXX         C++ compiler command
2283  CXXFLAGS    C++ compiler flags
2284  CPP         C preprocessor
2285  CXXCPP      C++ preprocessor
2286  AS          Override default value for AS
2287  AR          Override default value for AR
2288  LIPO        Override default value for LIPO
2289  STRIP       Override default value for STRIP
2290  NM          Override default value for NM
2291  GNM         Override default value for GNM
2292  OBJCOPY     Override default value for OBJCOPY
2293  OBJDUMP     Override default value for OBJDUMP
2294  BUILD_CC    Override default value for BUILD_CC
2295  BUILD_CXX   Override default value for BUILD_CXX
2296  BUILD_NM    Override default value for BUILD_NM
2297  BUILD_AR    Override default value for BUILD_AR
2298  BUILD_OBJCOPY
2299              Override default value for BUILD_OBJCOPY
2300  BUILD_STRIP Override default value for BUILD_STRIP
2301  JTREGEXE    Override default value for JTREGEXE
2302  XMKMF       Path to xmkmf, Makefile generator for X Window System
2303  FREETYPE_CFLAGS
2304              C compiler flags for FREETYPE, overriding pkg-config
2305  FREETYPE_LIBS
2306              linker flags for FREETYPE, overriding pkg-config
2307  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2308  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2309  LIBFFI_CFLAGS
2310              C compiler flags for LIBFFI, overriding pkg-config
2311  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2312  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2313  PNG_LIBS    linker flags for PNG, overriding pkg-config
2314  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2315  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2316  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2317  ELF_LIBS    linker flags for ELF, overriding pkg-config
2318  ICECC_CMD   Override default value for ICECC_CMD
2319  ICECC_CREATE_ENV
2320              Override default value for ICECC_CREATE_ENV
2321  ICECC_WRAPPER
2322              Override default value for ICECC_WRAPPER
2323  CCACHE      Override default value for CCACHE
2324
2325Use these variables to override the choices made by `configure' or to help
2326it to find libraries and programs with nonstandard names/locations.
2327
2328Report bugs to <build-dev@openjdk.java.net>.
2329OpenJDK home page: <http://openjdk.java.net>.
2330_ACEOF
2331ac_status=$?
2332fi
2333
2334if test "$ac_init_help" = "recursive"; then
2335  # If there are subdirs, report their specific --help.
2336  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2337    test -d "$ac_dir" ||
2338      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2339      continue
2340    ac_builddir=.
2341
2342case "$ac_dir" in
2343.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2344*)
2345  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2346  # A ".." for each directory in $ac_dir_suffix.
2347  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2348  case $ac_top_builddir_sub in
2349  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2350  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2351  esac ;;
2352esac
2353ac_abs_top_builddir=$ac_pwd
2354ac_abs_builddir=$ac_pwd$ac_dir_suffix
2355# for backward compatibility:
2356ac_top_builddir=$ac_top_build_prefix
2357
2358case $srcdir in
2359  .)  # We are building in place.
2360    ac_srcdir=.
2361    ac_top_srcdir=$ac_top_builddir_sub
2362    ac_abs_top_srcdir=$ac_pwd ;;
2363  [\\/]* | ?:[\\/]* )  # Absolute name.
2364    ac_srcdir=$srcdir$ac_dir_suffix;
2365    ac_top_srcdir=$srcdir
2366    ac_abs_top_srcdir=$srcdir ;;
2367  *) # Relative name.
2368    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2369    ac_top_srcdir=$ac_top_build_prefix$srcdir
2370    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2371esac
2372ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2373
2374    cd "$ac_dir" || { ac_status=$?; continue; }
2375    # Check for guested configure.
2376    if test -f "$ac_srcdir/configure.gnu"; then
2377      echo &&
2378      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2379    elif test -f "$ac_srcdir/configure"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure" --help=recursive
2382    else
2383      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2384    fi || ac_status=$?
2385    cd "$ac_pwd" || { ac_status=$?; break; }
2386  done
2387fi
2388
2389test -n "$ac_init_help" && exit $ac_status
2390if $ac_init_version; then
2391  cat <<\_ACEOF
2392OpenJDK configure jdk9
2393generated by GNU Autoconf 2.69
2394
2395Copyright (C) 2012 Free Software Foundation, Inc.
2396This configure script is free software; the Free Software Foundation
2397gives unlimited permission to copy, distribute and modify it.
2398_ACEOF
2399  exit
2400fi
2401
2402## ------------------------ ##
2403## Autoconf initialization. ##
2404## ------------------------ ##
2405
2406# ac_fn_c_try_compile LINENO
2407# --------------------------
2408# Try to compile conftest.$ac_ext, and return whether this succeeded.
2409ac_fn_c_try_compile ()
2410{
2411  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412  rm -f conftest.$ac_objext
2413  if { { ac_try="$ac_compile"
2414case "(($ac_try" in
2415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2416  *) ac_try_echo=$ac_try;;
2417esac
2418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2419$as_echo "$ac_try_echo"; } >&5
2420  (eval "$ac_compile") 2>conftest.err
2421  ac_status=$?
2422  if test -s conftest.err; then
2423    grep -v '^ *+' conftest.err >conftest.er1
2424    cat conftest.er1 >&5
2425    mv -f conftest.er1 conftest.err
2426  fi
2427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2428  test $ac_status = 0; } && {
2429	 test -z "$ac_c_werror_flag" ||
2430	 test ! -s conftest.err
2431       } && test -s conftest.$ac_objext; then :
2432  ac_retval=0
2433else
2434  $as_echo "$as_me: failed program was:" >&5
2435sed 's/^/| /' conftest.$ac_ext >&5
2436
2437	ac_retval=1
2438fi
2439  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440  as_fn_set_status $ac_retval
2441
2442} # ac_fn_c_try_compile
2443
2444# ac_fn_cxx_try_compile LINENO
2445# ----------------------------
2446# Try to compile conftest.$ac_ext, and return whether this succeeded.
2447ac_fn_cxx_try_compile ()
2448{
2449  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450  rm -f conftest.$ac_objext
2451  if { { ac_try="$ac_compile"
2452case "(($ac_try" in
2453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2454  *) ac_try_echo=$ac_try;;
2455esac
2456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2457$as_echo "$ac_try_echo"; } >&5
2458  (eval "$ac_compile") 2>conftest.err
2459  ac_status=$?
2460  if test -s conftest.err; then
2461    grep -v '^ *+' conftest.err >conftest.er1
2462    cat conftest.er1 >&5
2463    mv -f conftest.er1 conftest.err
2464  fi
2465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2466  test $ac_status = 0; } && {
2467	 test -z "$ac_cxx_werror_flag" ||
2468	 test ! -s conftest.err
2469       } && test -s conftest.$ac_objext; then :
2470  ac_retval=0
2471else
2472  $as_echo "$as_me: failed program was:" >&5
2473sed 's/^/| /' conftest.$ac_ext >&5
2474
2475	ac_retval=1
2476fi
2477  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2478  as_fn_set_status $ac_retval
2479
2480} # ac_fn_cxx_try_compile
2481
2482# ac_fn_c_try_cpp LINENO
2483# ----------------------
2484# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2485ac_fn_c_try_cpp ()
2486{
2487  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2488  if { { ac_try="$ac_cpp conftest.$ac_ext"
2489case "(($ac_try" in
2490  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2491  *) ac_try_echo=$ac_try;;
2492esac
2493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2494$as_echo "$ac_try_echo"; } >&5
2495  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2496  ac_status=$?
2497  if test -s conftest.err; then
2498    grep -v '^ *+' conftest.err >conftest.er1
2499    cat conftest.er1 >&5
2500    mv -f conftest.er1 conftest.err
2501  fi
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; } > conftest.i && {
2504	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2505	 test ! -s conftest.err
2506       }; then :
2507  ac_retval=0
2508else
2509  $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512    ac_retval=1
2513fi
2514  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515  as_fn_set_status $ac_retval
2516
2517} # ac_fn_c_try_cpp
2518
2519# ac_fn_cxx_try_cpp LINENO
2520# ------------------------
2521# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2522ac_fn_cxx_try_cpp ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  if { { ac_try="$ac_cpp conftest.$ac_ext"
2526case "(($ac_try" in
2527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528  *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2533  ac_status=$?
2534  if test -s conftest.err; then
2535    grep -v '^ *+' conftest.err >conftest.er1
2536    cat conftest.er1 >&5
2537    mv -f conftest.er1 conftest.err
2538  fi
2539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540  test $ac_status = 0; } > conftest.i && {
2541	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2542	 test ! -s conftest.err
2543       }; then :
2544  ac_retval=0
2545else
2546  $as_echo "$as_me: failed program was:" >&5
2547sed 's/^/| /' conftest.$ac_ext >&5
2548
2549    ac_retval=1
2550fi
2551  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552  as_fn_set_status $ac_retval
2553
2554} # ac_fn_cxx_try_cpp
2555
2556# ac_fn_c_try_link LINENO
2557# -----------------------
2558# Try to link conftest.$ac_ext, and return whether this succeeded.
2559ac_fn_c_try_link ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  rm -f conftest.$ac_objext conftest$ac_exeext
2563  if { { ac_try="$ac_link"
2564case "(($ac_try" in
2565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2566  *) ac_try_echo=$ac_try;;
2567esac
2568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2569$as_echo "$ac_try_echo"; } >&5
2570  (eval "$ac_link") 2>conftest.err
2571  ac_status=$?
2572  if test -s conftest.err; then
2573    grep -v '^ *+' conftest.err >conftest.er1
2574    cat conftest.er1 >&5
2575    mv -f conftest.er1 conftest.err
2576  fi
2577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2578  test $ac_status = 0; } && {
2579	 test -z "$ac_c_werror_flag" ||
2580	 test ! -s conftest.err
2581       } && test -s conftest$ac_exeext && {
2582	 test "$cross_compiling" = yes ||
2583	 test -x conftest$ac_exeext
2584       }; then :
2585  ac_retval=0
2586else
2587  $as_echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
2589
2590	ac_retval=1
2591fi
2592  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2593  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2594  # interfere with the next link command; also delete a directory that is
2595  # left behind by Apple's compiler.  We do this before executing the actions.
2596  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2597  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2598  as_fn_set_status $ac_retval
2599
2600} # ac_fn_c_try_link
2601
2602# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2603# ---------------------------------------------------------
2604# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2605# the include files in INCLUDES and setting the cache variable VAR
2606# accordingly.
2607ac_fn_cxx_check_header_mongrel ()
2608{
2609  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2610  if eval \${$3+:} false; then :
2611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2612$as_echo_n "checking for $2... " >&6; }
2613if eval \${$3+:} false; then :
2614  $as_echo_n "(cached) " >&6
2615fi
2616eval ac_res=\$$3
2617	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2618$as_echo "$ac_res" >&6; }
2619else
2620  # Is the header compilable?
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2622$as_echo_n "checking $2 usability... " >&6; }
2623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h.  */
2625$4
2626#include <$2>
2627_ACEOF
2628if ac_fn_cxx_try_compile "$LINENO"; then :
2629  ac_header_compiler=yes
2630else
2631  ac_header_compiler=no
2632fi
2633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2635$as_echo "$ac_header_compiler" >&6; }
2636
2637# Is the header present?
2638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2639$as_echo_n "checking $2 presence... " >&6; }
2640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2641/* end confdefs.h.  */
2642#include <$2>
2643_ACEOF
2644if ac_fn_cxx_try_cpp "$LINENO"; then :
2645  ac_header_preproc=yes
2646else
2647  ac_header_preproc=no
2648fi
2649rm -f conftest.err conftest.i conftest.$ac_ext
2650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2651$as_echo "$ac_header_preproc" >&6; }
2652
2653# So?  What about this header?
2654case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2655  yes:no: )
2656    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2657$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2659$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2660    ;;
2661  no:yes:* )
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2663$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2665$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2667$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2669$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2671$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2672( $as_echo "## ----------------------------------------- ##
2673## Report this to build-dev@openjdk.java.net ##
2674## ----------------------------------------- ##"
2675     ) | sed "s/^/$as_me: WARNING:     /" >&2
2676    ;;
2677esac
2678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2679$as_echo_n "checking for $2... " >&6; }
2680if eval \${$3+:} false; then :
2681  $as_echo_n "(cached) " >&6
2682else
2683  eval "$3=\$ac_header_compiler"
2684fi
2685eval ac_res=\$$3
2686	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2687$as_echo "$ac_res" >&6; }
2688fi
2689  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2690
2691} # ac_fn_cxx_check_header_mongrel
2692
2693# ac_fn_cxx_try_run LINENO
2694# ------------------------
2695# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2696# that executables *can* be run.
2697ac_fn_cxx_try_run ()
2698{
2699  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2700  if { { ac_try="$ac_link"
2701case "(($ac_try" in
2702  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2703  *) ac_try_echo=$ac_try;;
2704esac
2705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2706$as_echo "$ac_try_echo"; } >&5
2707  (eval "$ac_link") 2>&5
2708  ac_status=$?
2709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2710  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2711  { { case "(($ac_try" in
2712  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2713  *) ac_try_echo=$ac_try;;
2714esac
2715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2716$as_echo "$ac_try_echo"; } >&5
2717  (eval "$ac_try") 2>&5
2718  ac_status=$?
2719  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2720  test $ac_status = 0; }; }; then :
2721  ac_retval=0
2722else
2723  $as_echo "$as_me: program exited with status $ac_status" >&5
2724       $as_echo "$as_me: failed program was:" >&5
2725sed 's/^/| /' conftest.$ac_ext >&5
2726
2727       ac_retval=$ac_status
2728fi
2729  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2730  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2731  as_fn_set_status $ac_retval
2732
2733} # ac_fn_cxx_try_run
2734
2735# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2736# ---------------------------------------------------------
2737# Tests whether HEADER exists and can be compiled using the include files in
2738# INCLUDES, setting the cache variable VAR accordingly.
2739ac_fn_cxx_check_header_compile ()
2740{
2741  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2743$as_echo_n "checking for $2... " >&6; }
2744if eval \${$3+:} false; then :
2745  $as_echo_n "(cached) " >&6
2746else
2747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748/* end confdefs.h.  */
2749$4
2750#include <$2>
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  eval "$3=yes"
2754else
2755  eval "$3=no"
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758fi
2759eval ac_res=\$$3
2760	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2761$as_echo "$ac_res" >&6; }
2762  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2763
2764} # ac_fn_cxx_check_header_compile
2765
2766# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2767# ----------------------------------------------
2768# Tries to find the compile-time value of EXPR in a program that includes
2769# INCLUDES, setting VAR accordingly. Returns whether the value could be
2770# computed
2771ac_fn_cxx_compute_int ()
2772{
2773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774  if test "$cross_compiling" = yes; then
2775    # Depending upon the size, compute the lo and hi bounds.
2776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2777/* end confdefs.h.  */
2778$4
2779int
2780main ()
2781{
2782static int test_array [1 - 2 * !(($2) >= 0)];
2783test_array [0] = 0;
2784return test_array [0];
2785
2786  ;
2787  return 0;
2788}
2789_ACEOF
2790if ac_fn_cxx_try_compile "$LINENO"; then :
2791  ac_lo=0 ac_mid=0
2792  while :; do
2793    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h.  */
2795$4
2796int
2797main ()
2798{
2799static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2800test_array [0] = 0;
2801return test_array [0];
2802
2803  ;
2804  return 0;
2805}
2806_ACEOF
2807if ac_fn_cxx_try_compile "$LINENO"; then :
2808  ac_hi=$ac_mid; break
2809else
2810  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2811			if test $ac_lo -le $ac_mid; then
2812			  ac_lo= ac_hi=
2813			  break
2814			fi
2815			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2816fi
2817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2818  done
2819else
2820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821/* end confdefs.h.  */
2822$4
2823int
2824main ()
2825{
2826static int test_array [1 - 2 * !(($2) < 0)];
2827test_array [0] = 0;
2828return test_array [0];
2829
2830  ;
2831  return 0;
2832}
2833_ACEOF
2834if ac_fn_cxx_try_compile "$LINENO"; then :
2835  ac_hi=-1 ac_mid=-1
2836  while :; do
2837    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2838/* end confdefs.h.  */
2839$4
2840int
2841main ()
2842{
2843static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2844test_array [0] = 0;
2845return test_array [0];
2846
2847  ;
2848  return 0;
2849}
2850_ACEOF
2851if ac_fn_cxx_try_compile "$LINENO"; then :
2852  ac_lo=$ac_mid; break
2853else
2854  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2855			if test $ac_mid -le $ac_hi; then
2856			  ac_lo= ac_hi=
2857			  break
2858			fi
2859			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862  done
2863else
2864  ac_lo= ac_hi=
2865fi
2866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2867fi
2868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869# Binary search between lo and hi bounds.
2870while test "x$ac_lo" != "x$ac_hi"; do
2871  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875int
2876main ()
2877{
2878static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2879test_array [0] = 0;
2880return test_array [0];
2881
2882  ;
2883  return 0;
2884}
2885_ACEOF
2886if ac_fn_cxx_try_compile "$LINENO"; then :
2887  ac_hi=$ac_mid
2888else
2889  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2890fi
2891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2892done
2893case $ac_lo in #((
2894?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2895'') ac_retval=1 ;;
2896esac
2897  else
2898    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2899/* end confdefs.h.  */
2900$4
2901static long int longval () { return $2; }
2902static unsigned long int ulongval () { return $2; }
2903#include <stdio.h>
2904#include <stdlib.h>
2905int
2906main ()
2907{
2908
2909  FILE *f = fopen ("conftest.val", "w");
2910  if (! f)
2911    return 1;
2912  if (($2) < 0)
2913    {
2914      long int i = longval ();
2915      if (i != ($2))
2916	return 1;
2917      fprintf (f, "%ld", i);
2918    }
2919  else
2920    {
2921      unsigned long int i = ulongval ();
2922      if (i != ($2))
2923	return 1;
2924      fprintf (f, "%lu", i);
2925    }
2926  /* Do not output a trailing newline, as this causes \r\n confusion
2927     on some platforms.  */
2928  return ferror (f) || fclose (f) != 0;
2929
2930  ;
2931  return 0;
2932}
2933_ACEOF
2934if ac_fn_cxx_try_run "$LINENO"; then :
2935  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2936else
2937  ac_retval=1
2938fi
2939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2940  conftest.$ac_objext conftest.beam conftest.$ac_ext
2941rm -f conftest.val
2942
2943  fi
2944  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2945  as_fn_set_status $ac_retval
2946
2947} # ac_fn_cxx_compute_int
2948
2949# ac_fn_cxx_try_link LINENO
2950# -------------------------
2951# Try to link conftest.$ac_ext, and return whether this succeeded.
2952ac_fn_cxx_try_link ()
2953{
2954  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2955  rm -f conftest.$ac_objext conftest$ac_exeext
2956  if { { ac_try="$ac_link"
2957case "(($ac_try" in
2958  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2959  *) ac_try_echo=$ac_try;;
2960esac
2961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2962$as_echo "$ac_try_echo"; } >&5
2963  (eval "$ac_link") 2>conftest.err
2964  ac_status=$?
2965  if test -s conftest.err; then
2966    grep -v '^ *+' conftest.err >conftest.er1
2967    cat conftest.er1 >&5
2968    mv -f conftest.er1 conftest.err
2969  fi
2970  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2971  test $ac_status = 0; } && {
2972	 test -z "$ac_cxx_werror_flag" ||
2973	 test ! -s conftest.err
2974       } && test -s conftest$ac_exeext && {
2975	 test "$cross_compiling" = yes ||
2976	 test -x conftest$ac_exeext
2977       }; then :
2978  ac_retval=0
2979else
2980  $as_echo "$as_me: failed program was:" >&5
2981sed 's/^/| /' conftest.$ac_ext >&5
2982
2983	ac_retval=1
2984fi
2985  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2986  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2987  # interfere with the next link command; also delete a directory that is
2988  # left behind by Apple's compiler.  We do this before executing the actions.
2989  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2990  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2991  as_fn_set_status $ac_retval
2992
2993} # ac_fn_cxx_try_link
2994
2995# ac_fn_cxx_check_func LINENO FUNC VAR
2996# ------------------------------------
2997# Tests whether FUNC exists, setting the cache variable VAR accordingly
2998ac_fn_cxx_check_func ()
2999{
3000  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3002$as_echo_n "checking for $2... " >&6; }
3003if eval \${$3+:} false; then :
3004  $as_echo_n "(cached) " >&6
3005else
3006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3007/* end confdefs.h.  */
3008/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3009   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3010#define $2 innocuous_$2
3011
3012/* System header to define __stub macros and hopefully few prototypes,
3013    which can conflict with char $2 (); below.
3014    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3015    <limits.h> exists even on freestanding compilers.  */
3016
3017#ifdef __STDC__
3018# include <limits.h>
3019#else
3020# include <assert.h>
3021#endif
3022
3023#undef $2
3024
3025/* Override any GCC internal prototype to avoid an error.
3026   Use char because int might match the return type of a GCC
3027   builtin and then its argument prototype would still apply.  */
3028#ifdef __cplusplus
3029extern "C"
3030#endif
3031char $2 ();
3032/* The GNU C library defines this for functions which it implements
3033    to always fail with ENOSYS.  Some functions are actually named
3034    something starting with __ and the normal name is an alias.  */
3035#if defined __stub_$2 || defined __stub___$2
3036choke me
3037#endif
3038
3039int
3040main ()
3041{
3042return $2 ();
3043  ;
3044  return 0;
3045}
3046_ACEOF
3047if ac_fn_cxx_try_link "$LINENO"; then :
3048  eval "$3=yes"
3049else
3050  eval "$3=no"
3051fi
3052rm -f core conftest.err conftest.$ac_objext \
3053    conftest$ac_exeext conftest.$ac_ext
3054fi
3055eval ac_res=\$$3
3056	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3057$as_echo "$ac_res" >&6; }
3058  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3059
3060} # ac_fn_cxx_check_func
3061
3062# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3063# -------------------------------------------------------
3064# Tests whether HEADER exists and can be compiled using the include files in
3065# INCLUDES, setting the cache variable VAR accordingly.
3066ac_fn_c_check_header_compile ()
3067{
3068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3070$as_echo_n "checking for $2... " >&6; }
3071if eval \${$3+:} false; then :
3072  $as_echo_n "(cached) " >&6
3073else
3074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3075/* end confdefs.h.  */
3076$4
3077#include <$2>
3078_ACEOF
3079if ac_fn_c_try_compile "$LINENO"; then :
3080  eval "$3=yes"
3081else
3082  eval "$3=no"
3083fi
3084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085fi
3086eval ac_res=\$$3
3087	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3088$as_echo "$ac_res" >&6; }
3089  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3090
3091} # ac_fn_c_check_header_compile
3092cat >config.log <<_ACEOF
3093This file contains any messages produced by compilers while
3094running configure, to aid debugging if configure makes a mistake.
3095
3096It was created by OpenJDK $as_me jdk9, which was
3097generated by GNU Autoconf 2.69.  Invocation command line was
3098
3099  $ $0 $@
3100
3101_ACEOF
3102exec 5>>config.log
3103{
3104cat <<_ASUNAME
3105## --------- ##
3106## Platform. ##
3107## --------- ##
3108
3109hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3110uname -m = `(uname -m) 2>/dev/null || echo unknown`
3111uname -r = `(uname -r) 2>/dev/null || echo unknown`
3112uname -s = `(uname -s) 2>/dev/null || echo unknown`
3113uname -v = `(uname -v) 2>/dev/null || echo unknown`
3114
3115/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3116/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3117
3118/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3119/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3120/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3121/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3122/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3123/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3124/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3125
3126_ASUNAME
3127
3128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3129for as_dir in $PATH
3130do
3131  IFS=$as_save_IFS
3132  test -z "$as_dir" && as_dir=.
3133    $as_echo "PATH: $as_dir"
3134  done
3135IFS=$as_save_IFS
3136
3137} >&5
3138
3139cat >&5 <<_ACEOF
3140
3141
3142## ----------- ##
3143## Core tests. ##
3144## ----------- ##
3145
3146_ACEOF
3147
3148
3149# Keep a trace of the command line.
3150# Strip out --no-create and --no-recursion so they do not pile up.
3151# Strip out --silent because we don't want to record it for future runs.
3152# Also quote any args containing shell meta-characters.
3153# Make two passes to allow for proper duplicate-argument suppression.
3154ac_configure_args=
3155ac_configure_args0=
3156ac_configure_args1=
3157ac_must_keep_next=false
3158for ac_pass in 1 2
3159do
3160  for ac_arg
3161  do
3162    case $ac_arg in
3163    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3164    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3165    | -silent | --silent | --silen | --sile | --sil)
3166      continue ;;
3167    *\'*)
3168      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3169    esac
3170    case $ac_pass in
3171    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3172    2)
3173      as_fn_append ac_configure_args1 " '$ac_arg'"
3174      if test $ac_must_keep_next = true; then
3175	ac_must_keep_next=false # Got value, back to normal.
3176      else
3177	case $ac_arg in
3178	  *=* | --config-cache | -C | -disable-* | --disable-* \
3179	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3180	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3181	  | -with-* | --with-* | -without-* | --without-* | --x)
3182	    case "$ac_configure_args0 " in
3183	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3184	    esac
3185	    ;;
3186	  -* ) ac_must_keep_next=true ;;
3187	esac
3188      fi
3189      as_fn_append ac_configure_args " '$ac_arg'"
3190      ;;
3191    esac
3192  done
3193done
3194{ ac_configure_args0=; unset ac_configure_args0;}
3195{ ac_configure_args1=; unset ac_configure_args1;}
3196
3197# When interrupted or exit'd, cleanup temporary files, and complete
3198# config.log.  We remove comments because anyway the quotes in there
3199# would cause problems or look ugly.
3200# WARNING: Use '\'' to represent an apostrophe within the trap.
3201# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3202trap 'exit_status=$?
3203  # Save into config.log some information that might help in debugging.
3204  {
3205    echo
3206
3207    $as_echo "## ---------------- ##
3208## Cache variables. ##
3209## ---------------- ##"
3210    echo
3211    # The following way of writing the cache mishandles newlines in values,
3212(
3213  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3214    eval ac_val=\$$ac_var
3215    case $ac_val in #(
3216    *${as_nl}*)
3217      case $ac_var in #(
3218      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3219$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3220      esac
3221      case $ac_var in #(
3222      _ | IFS | as_nl) ;; #(
3223      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3224      *) { eval $ac_var=; unset $ac_var;} ;;
3225      esac ;;
3226    esac
3227  done
3228  (set) 2>&1 |
3229    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3230    *${as_nl}ac_space=\ *)
3231      sed -n \
3232	"s/'\''/'\''\\\\'\'''\''/g;
3233	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3234      ;; #(
3235    *)
3236      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3237      ;;
3238    esac |
3239    sort
3240)
3241    echo
3242
3243    $as_echo "## ----------------- ##
3244## Output variables. ##
3245## ----------------- ##"
3246    echo
3247    for ac_var in $ac_subst_vars
3248    do
3249      eval ac_val=\$$ac_var
3250      case $ac_val in
3251      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252      esac
3253      $as_echo "$ac_var='\''$ac_val'\''"
3254    done | sort
3255    echo
3256
3257    if test -n "$ac_subst_files"; then
3258      $as_echo "## ------------------- ##
3259## File substitutions. ##
3260## ------------------- ##"
3261      echo
3262      for ac_var in $ac_subst_files
3263      do
3264	eval ac_val=\$$ac_var
3265	case $ac_val in
3266	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3267	esac
3268	$as_echo "$ac_var='\''$ac_val'\''"
3269      done | sort
3270      echo
3271    fi
3272
3273    if test -s confdefs.h; then
3274      $as_echo "## ----------- ##
3275## confdefs.h. ##
3276## ----------- ##"
3277      echo
3278      cat confdefs.h
3279      echo
3280    fi
3281    test "$ac_signal" != 0 &&
3282      $as_echo "$as_me: caught signal $ac_signal"
3283    $as_echo "$as_me: exit $exit_status"
3284  } >&5
3285  rm -f core *.core core.conftest.* &&
3286    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3287    exit $exit_status
3288' 0
3289for ac_signal in 1 2 13 15; do
3290  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3291done
3292ac_signal=0
3293
3294# confdefs.h avoids OS command line length limits that DEFS can exceed.
3295rm -f -r conftest* confdefs.h
3296
3297$as_echo "/* confdefs.h */" > confdefs.h
3298
3299# Predefined preprocessor variables.
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_NAME "$PACKAGE_NAME"
3303_ACEOF
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_VERSION "$PACKAGE_VERSION"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_STRING "$PACKAGE_STRING"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3319_ACEOF
3320
3321cat >>confdefs.h <<_ACEOF
3322#define PACKAGE_URL "$PACKAGE_URL"
3323_ACEOF
3324
3325
3326# Let the site file select an alternate cache file if it wants to.
3327# Prefer an explicitly selected file to automatically selected ones.
3328ac_site_file1=NONE
3329ac_site_file2=NONE
3330if test -n "$CONFIG_SITE"; then
3331  # We do not want a PATH search for config.site.
3332  case $CONFIG_SITE in #((
3333    -*)  ac_site_file1=./$CONFIG_SITE;;
3334    */*) ac_site_file1=$CONFIG_SITE;;
3335    *)   ac_site_file1=./$CONFIG_SITE;;
3336  esac
3337elif test "x$prefix" != xNONE; then
3338  ac_site_file1=$prefix/share/config.site
3339  ac_site_file2=$prefix/etc/config.site
3340else
3341  ac_site_file1=$ac_default_prefix/share/config.site
3342  ac_site_file2=$ac_default_prefix/etc/config.site
3343fi
3344for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3345do
3346  test "x$ac_site_file" = xNONE && continue
3347  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3349$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3350    sed 's/^/| /' "$ac_site_file" >&5
3351    . "$ac_site_file" \
3352      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3354as_fn_error $? "failed to load site script $ac_site_file
3355See \`config.log' for more details" "$LINENO" 5; }
3356  fi
3357done
3358
3359if test -r "$cache_file"; then
3360  # Some versions of bash will fail to source /dev/null (special files
3361  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3362  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3363    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3364$as_echo "$as_me: loading cache $cache_file" >&6;}
3365    case $cache_file in
3366      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3367      *)                      . "./$cache_file";;
3368    esac
3369  fi
3370else
3371  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3372$as_echo "$as_me: creating cache $cache_file" >&6;}
3373  >$cache_file
3374fi
3375
3376# Check that the precious variables saved in the cache have kept the same
3377# value.
3378ac_cache_corrupted=false
3379for ac_var in $ac_precious_vars; do
3380  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3381  eval ac_new_set=\$ac_env_${ac_var}_set
3382  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3383  eval ac_new_val=\$ac_env_${ac_var}_value
3384  case $ac_old_set,$ac_new_set in
3385    set,)
3386      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3387$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3388      ac_cache_corrupted=: ;;
3389    ,set)
3390      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3391$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3392      ac_cache_corrupted=: ;;
3393    ,);;
3394    *)
3395      if test "x$ac_old_val" != "x$ac_new_val"; then
3396	# differences in whitespace do not lead to failure.
3397	ac_old_val_w=`echo x $ac_old_val`
3398	ac_new_val_w=`echo x $ac_new_val`
3399	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3400	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3401$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3402	  ac_cache_corrupted=:
3403	else
3404	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3405$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3406	  eval $ac_var=\$ac_old_val
3407	fi
3408	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3409$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3410	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3411$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3412      fi;;
3413  esac
3414  # Pass precious variables to config.status.
3415  if test "$ac_new_set" = set; then
3416    case $ac_new_val in
3417    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3418    *) ac_arg=$ac_var=$ac_new_val ;;
3419    esac
3420    case " $ac_configure_args " in
3421      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3422      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3423    esac
3424  fi
3425done
3426if $ac_cache_corrupted; then
3427  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3429  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3430$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3431  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3432fi
3433## -------------------- ##
3434## Main body of script. ##
3435## -------------------- ##
3436
3437ac_ext=c
3438ac_cpp='$CPP $CPPFLAGS'
3439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3441ac_compiler_gnu=$ac_cv_c_compiler_gnu
3442
3443
3444
3445ac_aux_dir=
3446for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3447  if test -f "$ac_dir/install-sh"; then
3448    ac_aux_dir=$ac_dir
3449    ac_install_sh="$ac_aux_dir/install-sh -c"
3450    break
3451  elif test -f "$ac_dir/install.sh"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/install.sh -c"
3454    break
3455  elif test -f "$ac_dir/shtool"; then
3456    ac_aux_dir=$ac_dir
3457    ac_install_sh="$ac_aux_dir/shtool install -c"
3458    break
3459  fi
3460done
3461if test -z "$ac_aux_dir"; then
3462  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
3463fi
3464
3465# These three variables are undocumented and unsupported,
3466# and are intended to be withdrawn in a future Autoconf release.
3467# They can cause serious problems if a builder's source tree is in a directory
3468# whose full name contains unusual characters.
3469ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3470ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3471ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3472
3473
3474# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3475
3476#
3477# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501#
3502# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3503#
3504# This program is free software; you can redistribute it and/or modify
3505# it under the terms of the GNU General Public License as published by
3506# the Free Software Foundation; either version 2 of the License, or
3507# (at your option) any later version.
3508#
3509# This program is distributed in the hope that it will be useful, but
3510# WITHOUT ANY WARRANTY; without even the implied warranty of
3511# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3512# General Public License for more details.
3513#
3514# You should have received a copy of the GNU General Public License
3515# along with this program; if not, write to the Free Software
3516# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3517#
3518# As a special exception to the GNU General Public License, if you
3519# distribute this file as part of a program that contains a
3520# configuration script generated by Autoconf, you may include it under
3521# the same distribution terms that you use for the rest of that program.
3522
3523# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3524# ----------------------------------
3525# PKG_PROG_PKG_CONFIG
3526
3527# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3528#
3529# Check to see whether a particular set of modules exists.  Similar
3530# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3531#
3532#
3533# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3534# this or PKG_CHECK_MODULES is called, or make sure to call
3535# PKG_CHECK_EXISTS manually
3536# --------------------------------------------------------------
3537
3538
3539
3540# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3541# ---------------------------------------------
3542# _PKG_CONFIG
3543
3544# _PKG_SHORT_ERRORS_SUPPORTED
3545# -----------------------------
3546# _PKG_SHORT_ERRORS_SUPPORTED
3547
3548
3549# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3550# [ACTION-IF-NOT-FOUND])
3551#
3552#
3553# Note that if there is a possibility the first call to
3554# PKG_CHECK_MODULES might not happen, you should be sure to include an
3555# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3556#
3557#
3558# --------------------------------------------------------------
3559# PKG_CHECK_MODULES
3560
3561
3562# Include these first...
3563#
3564# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3566#
3567# This code is free software; you can redistribute it and/or modify it
3568# under the terms of the GNU General Public License version 2 only, as
3569# published by the Free Software Foundation.  Oracle designates this
3570# particular file as subject to the "Classpath" exception as provided
3571# by Oracle in the LICENSE file that accompanied this code.
3572#
3573# This code is distributed in the hope that it will be useful, but WITHOUT
3574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3576# version 2 for more details (a copy is included in the LICENSE file that
3577# accompanied this code).
3578#
3579# You should have received a copy of the GNU General Public License version
3580# 2 along with this work; if not, write to the Free Software Foundation,
3581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3582#
3583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3584# or visit www.oracle.com if you need additional information or have any
3585# questions.
3586#
3587
3588# Create a function/macro that takes a series of named arguments. The call is
3589# similar to AC_DEFUN, but the setup of the function looks like this:
3590# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3591# ... do something
3592#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3593# ])
3594# A star (*) in front of a named argument means that it is required and it's
3595# presence will be verified. To pass e.g. the first value as a normal indexed
3596# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3597# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3598# "ARG_FOO".
3599#
3600# The generated function can be called like this:
3601# MYFUNC(FOO: [foo-val],
3602#     BAR: [
3603#         $ECHO hello world
3604#     ])
3605# Note that the argument value must start on the same line as the argument name.
3606#
3607# Argument 1: Name of the function to define
3608# Argument 2: List of legal named arguments, with a * prefix for required arguments
3609# Argument 3: Argument array to treat as named, typically $@
3610# Argument 4: The main function body
3611
3612
3613# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3614# If so, then append $1 to $2 \
3615# Also set JVM_ARG_OK to true/false depending on outcome.
3616
3617
3618# Appends a string to a path variable, only adding the : when needed.
3619
3620
3621# Prepends a string to a path variable, only adding the : when needed.
3622
3623
3624# This will make sure the given variable points to a full and proper
3625# path. This means:
3626# 1) There will be no spaces in the path. On unix platforms,
3627#    spaces in the path will result in an error. On Windows,
3628#    the path will be rewritten using short-style to be space-free.
3629# 2) The path will be absolute, and it will be in unix-style (on
3630#     cygwin).
3631# $1: The name of the variable to fix
3632
3633
3634# This will make sure the given variable points to a executable
3635# with a full and proper path. This means:
3636# 1) There will be no spaces in the path. On unix platforms,
3637#    spaces in the path will result in an error. On Windows,
3638#    the path will be rewritten using short-style to be space-free.
3639# 2) The path will be absolute, and it will be in unix-style (on
3640#     cygwin).
3641# Any arguments given to the executable is preserved.
3642# If the input variable does not have a directory specification, then
3643# it need to be in the PATH.
3644# $1: The name of the variable to fix
3645
3646
3647
3648
3649# Register a --with argument but mark it as deprecated
3650# $1: The name of the with argument to deprecate, not including --with-
3651
3652
3653# Register a --enable argument but mark it as deprecated
3654# $1: The name of the with argument to deprecate, not including --enable-
3655# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3656# $3: Messages to user.
3657
3658
3659
3660
3661# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3662# $1: variable to check
3663
3664
3665# Check that there are no unprocessed overridden variables left.
3666# If so, they are an incorrect argument and we will exit with an error.
3667
3668
3669# Setup a tool for the given variable. If correctly specified by the user,
3670# use that value, otherwise search for the tool using the supplied code snippet.
3671# $1: variable to set
3672# $2: code snippet to call to look for the tool
3673# $3: code snippet to call if variable was used to find tool
3674
3675
3676# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3677# $1: variable to set
3678# $2: executable name (or list of names) to look for
3679# $3: [path]
3680
3681
3682# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3683# $1: variable to set
3684# $2: executable name (or list of names) to look for
3685
3686
3687# Like BASIC_PATH_PROGS but fails if no tool was found.
3688# $1: variable to set
3689# $2: executable name (or list of names) to look for
3690# $3: [path]
3691
3692
3693# Like BASIC_SETUP_TOOL but fails if no tool was found.
3694# $1: variable to set
3695# $2: autoconf macro to call to look for the special tool
3696
3697
3698# Setup the most fundamental tools that relies on not much else to set up,
3699# but is used by much of the early bootstrap code.
3700
3701
3702# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3703
3704
3705# Evaluates platform specific overrides for devkit variables.
3706# $1: Name of variable
3707
3708
3709
3710
3711
3712
3713#%%% Simple tools %%%
3714
3715# Check if we have found a usable version of make
3716# $1: the path to a potential make binary (or empty)
3717# $2: the description on how we found this
3718
3719
3720
3721
3722# Goes looking for a usable version of GNU make.
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733# Check if build directory is on local disk. If not possible to determine,
3734# we prefer to claim it's local.
3735# Argument 1: directory to test
3736# Argument 2: what to do if it is on local disk
3737# Argument 3: what to do otherwise (remote disk or failure)
3738
3739
3740# Check that source files have basic read permissions set. This might
3741# not be the case in cygwin in certain conditions.
3742
3743
3744
3745
3746# Check for support for specific options in bash
3747
3748
3749################################################################################
3750#
3751# Default make target
3752#
3753
3754
3755# Code to run after AC_OUTPUT
3756
3757
3758#
3759# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3760# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3761#
3762# This code is free software; you can redistribute it and/or modify it
3763# under the terms of the GNU General Public License version 2 only, as
3764# published by the Free Software Foundation.  Oracle designates this
3765# particular file as subject to the "Classpath" exception as provided
3766# by Oracle in the LICENSE file that accompanied this code.
3767#
3768# This code is distributed in the hope that it will be useful, but WITHOUT
3769# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3770# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3771# version 2 for more details (a copy is included in the LICENSE file that
3772# accompanied this code).
3773#
3774# You should have received a copy of the GNU General Public License version
3775# 2 along with this work; if not, write to the Free Software Foundation,
3776# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3777#
3778# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3779# or visit www.oracle.com if you need additional information or have any
3780# questions.
3781#
3782
3783
3784
3785
3786
3787# Helper function which possibly converts a path using DOS-style short mode.
3788# If so, the updated path is stored in $new_path.
3789# $1: The path to check
3790
3791
3792# Helper function which possibly converts a path using DOS-style short mode.
3793# If so, the updated path is stored in $new_path.
3794# $1: The path to check
3795
3796
3797# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3798# and could probably be heavily simplified. However, all changes in this
3799# area tend to need lot of testing in different scenarios, and in lack of
3800# proper unit testing, cleaning this up has not been deemed worth the effort
3801# at the moment.
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3812
3813
3814
3815
3816# ... then the rest
3817#
3818# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3819# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3820#
3821# This code is free software; you can redistribute it and/or modify it
3822# under the terms of the GNU General Public License version 2 only, as
3823# published by the Free Software Foundation.  Oracle designates this
3824# particular file as subject to the "Classpath" exception as provided
3825# by Oracle in the LICENSE file that accompanied this code.
3826#
3827# This code is distributed in the hope that it will be useful, but WITHOUT
3828# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3829# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3830# version 2 for more details (a copy is included in the LICENSE file that
3831# accompanied this code).
3832#
3833# You should have received a copy of the GNU General Public License version
3834# 2 along with this work; if not, write to the Free Software Foundation,
3835# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3836#
3837# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3838# or visit www.oracle.com if you need additional information or have any
3839# questions.
3840#
3841
3842########################################################################
3843# This file handles detection of the Boot JDK. The Boot JDK detection
3844# process has been developed as a response to solve a complex real-world
3845# problem. Initially, it was simple, but it has grown as platform after
3846# platform, idiosyncracy after idiosyncracy has been supported.
3847#
3848# The basic idea is this:
3849# 1) You need an acceptable *) JDK to use as a Boot JDK
3850# 2) There are several ways to locate a JDK, that are mostly platform
3851#    dependent **)
3852# 3) You can have multiple JDKs installed
3853# 4) If possible, configure should try to dig out an acceptable JDK
3854#    automatically, without having to resort to command-line options
3855#
3856# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3857#     javac) and not a JRE, etc.
3858#
3859# **) On Windows we typically use a well-known path.
3860#     On MacOSX we typically use the tool java_home.
3861#     On Linux we typically find javac in the $PATH, and then follow a
3862#     chain of symlinks that often ends up in a real JDK.
3863#
3864# This leads to the code where we check in different ways to locate a
3865# JDK, and if one is found, check if it is acceptable. If not, we print
3866# our reasons for rejecting it (useful when debugging non-working
3867# configure situations) and continue checking the next one.
3868########################################################################
3869
3870# Execute the check given as argument, and verify the result
3871# If the Boot JDK was previously found, do nothing
3872# $1 A command line (typically autoconf macro) to execute
3873
3874
3875# Test: Is bootjdk explicitly set by command line arguments?
3876
3877
3878# Test: Is $JAVA_HOME set?
3879
3880
3881# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3882
3883
3884# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3885# $1: Argument to the java_home binary (optional)
3886
3887
3888# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3889
3890
3891# Look for a jdk in the given path. If there are multiple, try to select the newest.
3892# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3893# $1 = Path to directory containing jdk installations.
3894# $2 = String to append to the found JDK directory to get the proper JDK home
3895
3896
3897# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3898# environmental variable as base for where to look.
3899# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3900
3901
3902# Test: Is there a JDK installed in default, well-known locations?
3903
3904
3905# Check that a command-line tool in the Boot JDK is correct
3906# $1 = name of variable to assign
3907# $2 = name of binary
3908
3909
3910###############################################################################
3911#
3912# We need a Boot JDK to bootstrap the build.
3913#
3914
3915
3916
3917
3918
3919# BUILD_JDK: the location of the latest JDK that can run
3920#   on the host system and supports the target class file version
3921#   generated in this JDK build.  This variable should only be
3922#   used after the launchers are built.
3923#
3924
3925# Execute the check given as argument, and verify the result.
3926# If the JDK was previously found, do nothing.
3927# $1 A command line (typically autoconf macro) to execute
3928
3929
3930# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3931# is different than the host system doing the build (e.g. cross-compilation),
3932# a special BUILD_JDK is built as part of the build process.  An external
3933# prebuilt BUILD_JDK can also be supplied.
3934
3935
3936#
3937# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3938# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3939#
3940# This code is free software; you can redistribute it and/or modify it
3941# under the terms of the GNU General Public License version 2 only, as
3942# published by the Free Software Foundation.  Oracle designates this
3943# particular file as subject to the "Classpath" exception as provided
3944# by Oracle in the LICENSE file that accompanied this code.
3945#
3946# This code is distributed in the hope that it will be useful, but WITHOUT
3947# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3948# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3949# version 2 for more details (a copy is included in the LICENSE file that
3950# accompanied this code).
3951#
3952# You should have received a copy of the GNU General Public License version
3953# 2 along with this work; if not, write to the Free Software Foundation,
3954# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3955#
3956# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3957# or visit www.oracle.com if you need additional information or have any
3958# questions.
3959#
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977################################################################################
3978#
3979# Runs icecc-create-env once and prints the error if it fails
3980#
3981# $1: arguments to icecc-create-env
3982# $2: log file
3983#
3984
3985
3986################################################################################
3987#
3988# Optionally enable distributed compilation of native code using icecc/icecream
3989#
3990
3991
3992
3993
3994
3995
3996
3997#
3998# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3999# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4000#
4001# This code is free software; you can redistribute it and/or modify it
4002# under the terms of the GNU General Public License version 2 only, as
4003# published by the Free Software Foundation.  Oracle designates this
4004# particular file as subject to the "Classpath" exception as provided
4005# by Oracle in the LICENSE file that accompanied this code.
4006#
4007# This code is distributed in the hope that it will be useful, but WITHOUT
4008# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4009# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4010# version 2 for more details (a copy is included in the LICENSE file that
4011# accompanied this code).
4012#
4013# You should have received a copy of the GNU General Public License version
4014# 2 along with this work; if not, write to the Free Software Foundation,
4015# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4016#
4017# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4018# or visit www.oracle.com if you need additional information or have any
4019# questions.
4020#
4021
4022################################################################################
4023#
4024# Setup ABI profile (for arm)
4025#
4026
4027
4028# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4029# corresponding configure arguments instead
4030
4031
4032# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4033# that configure can use them while detecting compilers.
4034# TOOLCHAIN_TYPE is available here.
4035# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4036
4037
4038
4039
4040
4041
4042# Documentation on common flags used for solstudio in HIGHEST.
4043#
4044# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4045#          done with care, there are some assumptions below that need to
4046#          be understood about the use of pointers, and IEEE behavior.
4047#
4048# -fns: Use non-standard floating point mode (not IEEE 754)
4049# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4050# -fsingle: Use single precision floating point with 'float'
4051# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4052#   (Source with excessing pointer casting and data access with mixed
4053#    pointer types are not recommended)
4054# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4055#   (If you expect perfect errno behavior, do not use this)
4056# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4057# -xrestrict: Pointer parameters to functions do not overlap
4058#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4059#    If you pass in multiple pointers to the same data, do not use this)
4060# -xlibmil: Inline some library routines
4061#   (If you expect perfect errno behavior, do not use this)
4062# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4063#   (If you expect perfect errno behavior, do not use this)
4064#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4065
4066    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4067    # Bug?
4068    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4069    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4070    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4071    #fi
4072
4073
4074
4075
4076
4077
4078################################################################################
4079# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4080#      conditionals against.
4081# $2 - Optional prefix for each variable defined.
4082
4083
4084# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4085#                                  IF_FALSE: [RUN-IF-FALSE])
4086# ------------------------------------------------------------
4087# Check that the C compiler supports an argument
4088
4089
4090
4091
4092# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4093#                                    IF_FALSE: [RUN-IF-FALSE])
4094# ------------------------------------------------------------
4095# Check that the C++ compiler supports an argument
4096
4097
4098
4099
4100# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4101#                                IF_FALSE: [RUN-IF-FALSE])
4102# ------------------------------------------------------------
4103# Check that the C and C++ compilers support an argument
4104
4105
4106
4107
4108# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4109#                                   IF_FALSE: [RUN-IF-FALSE])
4110# ------------------------------------------------------------
4111# Check that the linker support an argument
4112
4113
4114
4115
4116
4117
4118# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4119# Arguments:
4120# $1 - Optional prefix for each variable defined.
4121
4122
4123#
4124# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126#
4127# This code is free software; you can redistribute it and/or modify it
4128# under the terms of the GNU General Public License version 2 only, as
4129# published by the Free Software Foundation.  Oracle designates this
4130# particular file as subject to the "Classpath" exception as provided
4131# by Oracle in the LICENSE file that accompanied this code.
4132#
4133# This code is distributed in the hope that it will be useful, but WITHOUT
4134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136# version 2 for more details (a copy is included in the LICENSE file that
4137# accompanied this code).
4138#
4139# You should have received a copy of the GNU General Public License version
4140# 2 along with this work; if not, write to the Free Software Foundation,
4141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142#
4143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144# or visit www.oracle.com if you need additional information or have any
4145# questions.
4146#
4147
4148
4149
4150
4151
4152cygwin_help() {
4153  case $1 in
4154    unzip)
4155      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4156      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4157      ;;
4158    zip)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    make)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    freetype)
4167      HELP_MSG="
4168The freetype library can now be build during the configure process.
4169Download the freetype sources and unpack them into an arbitrary directory:
4170
4171wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4172tar -xzf freetype-2.5.3.tar.gz
4173
4174Then run configure with '--with-freetype-src=<freetype_src>'. This will
4175automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4176builds or into '<freetype_src>/lib32' for 32-bit builds.
4177Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4178and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4179
4180Alternatively you can unpack the sources like this to use the default directory:
4181
4182tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4183      ;;
4184  esac
4185}
4186
4187msys_help() {
4188  PKGHANDLER_COMMAND=""
4189}
4190
4191apt_help() {
4192  case $1 in
4193    reduced)
4194      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4195    devkit)
4196      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4197    openjdk)
4198      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4199    alsa)
4200      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4201    cups)
4202      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4203    freetype)
4204      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4205    ffi)
4206      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4207    x11)
4208      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4209    ccache)
4210      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4211    dtrace)
4212      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4213    elf)
4214      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4215  esac
4216}
4217
4218yum_help() {
4219  case $1 in
4220    devkit)
4221      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4222    openjdk)
4223      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4224    alsa)
4225      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4226    cups)
4227      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4228    freetype)
4229      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4230    x11)
4231      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4232    ccache)
4233      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4234    elf)
4235      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4236  esac
4237}
4238
4239brew_help() {
4240  case $1 in
4241    openjdk)
4242      PKGHANDLER_COMMAND="brew cask install java" ;;
4243    freetype)
4244      PKGHANDLER_COMMAND="brew install freetype" ;;
4245    ccache)
4246      PKGHANDLER_COMMAND="brew install ccache" ;;
4247  esac
4248}
4249
4250port_help() {
4251  PKGHANDLER_COMMAND=""
4252}
4253
4254pkgutil_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258pkgadd_help() {
4259  PKGHANDLER_COMMAND=""
4260}
4261
4262# This function will check if we're called from the "configure" wrapper while
4263# printing --help. If so, we will print out additional information that can
4264# only be extracted within the autoconf script, and then exit. This must be
4265# called at the very beginning in configure.ac.
4266
4267
4268
4269
4270
4271
4272#
4273# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4274# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4275#
4276# This code is free software; you can redistribute it and/or modify it
4277# under the terms of the GNU General Public License version 2 only, as
4278# published by the Free Software Foundation.  Oracle designates this
4279# particular file as subject to the "Classpath" exception as provided
4280# by Oracle in the LICENSE file that accompanied this code.
4281#
4282# This code is distributed in the hope that it will be useful, but WITHOUT
4283# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4284# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4285# version 2 for more details (a copy is included in the LICENSE file that
4286# accompanied this code).
4287#
4288# You should have received a copy of the GNU General Public License version
4289# 2 along with this work; if not, write to the Free Software Foundation,
4290# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4291#
4292# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4293# or visit www.oracle.com if you need additional information or have any
4294# questions.
4295#
4296
4297# All valid JVM features, regardless of platform
4298VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4299    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4300    static-build link-time-opt aot"
4301
4302# All valid JVM variants
4303VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4304
4305###############################################################################
4306# Check if the specified JVM variant should be built. To be used in shell if
4307# constructs, like this:
4308# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4309#
4310# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4311
4312# Definition kept in one line to allow inlining in if statements.
4313# Additional [] needed to keep m4 from mangling shell constructs.
4314
4315
4316###############################################################################
4317# Check if the specified JVM features are explicitly enabled. To be used in
4318# shell if constructs, like this:
4319# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4320#
4321# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4322
4323# Definition kept in one line to allow inlining in if statements.
4324# Additional [] needed to keep m4 from mangling shell constructs.
4325
4326
4327###############################################################################
4328# Check which variants of the JVM that we want to build. Available variants are:
4329#   server: normal interpreter, and a tiered C1/C2 compiler
4330#   client: normal interpreter, and C1 (no C2 compiler)
4331#   minimal: reduced form of client with optional features stripped out
4332#   core: normal interpreter only, no compiler
4333#   zero: C++ based interpreter only, no compiler
4334#   zeroshark: C++ based interpreter, and a llvm-based compiler
4335#   custom: baseline JVM with no default features
4336#
4337
4338
4339###############################################################################
4340# Check if dtrace should be enabled and has all prerequisites present.
4341#
4342
4343
4344################################################################################
4345# Check if AOT should be enabled
4346#
4347
4348
4349###############################################################################
4350# Set up all JVM features for each JVM variant.
4351#
4352
4353
4354###############################################################################
4355# Validate JVM features once all setup is complete, including custom setup.
4356#
4357
4358
4359################################################################################
4360#
4361# Specify which sources will be used to build the 64-bit ARM port
4362#
4363# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4364# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4365#
4366
4367
4368
4369################################################################################
4370# Check if gtest should be built
4371#
4372
4373
4374#
4375# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4376# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4377#
4378# This code is free software; you can redistribute it and/or modify it
4379# under the terms of the GNU General Public License version 2 only, as
4380# published by the Free Software Foundation.  Oracle designates this
4381# particular file as subject to the "Classpath" exception as provided
4382# by Oracle in the LICENSE file that accompanied this code.
4383#
4384# This code is distributed in the hope that it will be useful, but WITHOUT
4385# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4386# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4387# version 2 for more details (a copy is included in the LICENSE file that
4388# accompanied this code).
4389#
4390# You should have received a copy of the GNU General Public License version
4391# 2 along with this work; if not, write to the Free Software Foundation,
4392# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4393#
4394# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4395# or visit www.oracle.com if you need additional information or have any
4396# questions.
4397#
4398
4399###############################################################################
4400# Check which variant of the JDK that we want to build.
4401# Currently we have:
4402#    normal:   standard edition
4403# but the custom make system may add other variants
4404#
4405# Effectively the JDK variant gives a name to a specific set of
4406# modules to compile into the JDK.
4407
4408
4409###############################################################################
4410# Set the debug level
4411#    release: no debug information, all optimizations, no asserts.
4412#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4413#    fastdebug: debug information (-g), all optimizations, all asserts
4414#    slowdebug: debug information (-g), no optimizations, all asserts
4415
4416
4417###############################################################################
4418#
4419# Should we build only OpenJDK even if closed sources are present?
4420#
4421
4422
4423
4424
4425###############################################################################
4426#
4427# Enable or disable the elliptic curve crypto implementation
4428#
4429
4430
4431
4432
4433################################################################################
4434#
4435# Gcov coverage data for hotspot
4436#
4437
4438
4439################################################################################
4440#
4441# Static build support.  When enabled will generate static
4442# libraries instead of shared libraries for all JDK libs.
4443#
4444
4445
4446################################################################################
4447#
4448# jlink options.
4449# We always keep packaged modules in JDK image.
4450#
4451
4452
4453################################################################################
4454#
4455# Check if building of the jtreg failure handler should be enabled.
4456#
4457
4458
4459################################################################################
4460#
4461# Enable or disable generation of the classlist at build time
4462#
4463
4464
4465#
4466# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4468#
4469# This code is free software; you can redistribute it and/or modify it
4470# under the terms of the GNU General Public License version 2 only, as
4471# published by the Free Software Foundation.  Oracle designates this
4472# particular file as subject to the "Classpath" exception as provided
4473# by Oracle in the LICENSE file that accompanied this code.
4474#
4475# This code is distributed in the hope that it will be useful, but WITHOUT
4476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4478# version 2 for more details (a copy is included in the LICENSE file that
4479# accompanied this code).
4480#
4481# You should have received a copy of the GNU General Public License version
4482# 2 along with this work; if not, write to the Free Software Foundation,
4483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4484#
4485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4486# or visit www.oracle.com if you need additional information or have any
4487# questions.
4488#
4489
4490###############################################################################
4491#
4492# Setup version numbers
4493#
4494
4495# Verify that a given string represents a valid version number, and assign it
4496# to a variable.
4497
4498# Argument 1: the variable to assign to
4499# Argument 2: the value given by the user
4500
4501
4502
4503
4504#
4505# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4507#
4508# This code is free software; you can redistribute it and/or modify it
4509# under the terms of the GNU General Public License version 2 only, as
4510# published by the Free Software Foundation.  Oracle designates this
4511# particular file as subject to the "Classpath" exception as provided
4512# by Oracle in the LICENSE file that accompanied this code.
4513#
4514# This code is distributed in the hope that it will be useful, but WITHOUT
4515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4517# version 2 for more details (a copy is included in the LICENSE file that
4518# accompanied this code).
4519#
4520# You should have received a copy of the GNU General Public License version
4521# 2 along with this work; if not, write to the Free Software Foundation,
4522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4523#
4524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4525# or visit www.oracle.com if you need additional information or have any
4526# questions.
4527#
4528
4529# Major library component reside in separate files.
4530#
4531# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4532# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4533#
4534# This code is free software; you can redistribute it and/or modify it
4535# under the terms of the GNU General Public License version 2 only, as
4536# published by the Free Software Foundation.  Oracle designates this
4537# particular file as subject to the "Classpath" exception as provided
4538# by Oracle in the LICENSE file that accompanied this code.
4539#
4540# This code is distributed in the hope that it will be useful, but WITHOUT
4541# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4542# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4543# version 2 for more details (a copy is included in the LICENSE file that
4544# accompanied this code).
4545#
4546# You should have received a copy of the GNU General Public License version
4547# 2 along with this work; if not, write to the Free Software Foundation,
4548# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4549#
4550# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4551# or visit www.oracle.com if you need additional information or have any
4552# questions.
4553#
4554
4555################################################################################
4556# Setup alsa (Advanced Linux Sound Architecture)
4557################################################################################
4558
4559
4560#
4561# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4563#
4564# This code is free software; you can redistribute it and/or modify it
4565# under the terms of the GNU General Public License version 2 only, as
4566# published by the Free Software Foundation.  Oracle designates this
4567# particular file as subject to the "Classpath" exception as provided
4568# by Oracle in the LICENSE file that accompanied this code.
4569#
4570# This code is distributed in the hope that it will be useful, but WITHOUT
4571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4573# version 2 for more details (a copy is included in the LICENSE file that
4574# accompanied this code).
4575#
4576# You should have received a copy of the GNU General Public License version
4577# 2 along with this work; if not, write to the Free Software Foundation,
4578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4579#
4580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4581# or visit www.oracle.com if you need additional information or have any
4582# questions.
4583#
4584
4585################################################################################
4586# Setup bundled libraries.
4587#
4588# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4589# OpenJDK repository. Default is to use these libraries as bundled, but they
4590# might be replaced by en external version by the user.
4591################################################################################
4592
4593
4594################################################################################
4595# Setup libjpeg
4596################################################################################
4597
4598
4599################################################################################
4600# Setup giflib
4601################################################################################
4602
4603
4604################################################################################
4605# Setup libpng
4606################################################################################
4607
4608
4609################################################################################
4610# Setup zlib
4611################################################################################
4612
4613
4614################################################################################
4615# Setup lcms (Little CMS)
4616################################################################################
4617
4618
4619#
4620# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4622#
4623# This code is free software; you can redistribute it and/or modify it
4624# under the terms of the GNU General Public License version 2 only, as
4625# published by the Free Software Foundation.  Oracle designates this
4626# particular file as subject to the "Classpath" exception as provided
4627# by Oracle in the LICENSE file that accompanied this code.
4628#
4629# This code is distributed in the hope that it will be useful, but WITHOUT
4630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4632# version 2 for more details (a copy is included in the LICENSE file that
4633# accompanied this code).
4634#
4635# You should have received a copy of the GNU General Public License version
4636# 2 along with this work; if not, write to the Free Software Foundation,
4637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4638#
4639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4640# or visit www.oracle.com if you need additional information or have any
4641# questions.
4642#
4643
4644################################################################################
4645# Setup cups (Common Unix Printing System)
4646################################################################################
4647
4648
4649#
4650# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4651# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4652#
4653# This code is free software; you can redistribute it and/or modify it
4654# under the terms of the GNU General Public License version 2 only, as
4655# published by the Free Software Foundation.  Oracle designates this
4656# particular file as subject to the "Classpath" exception as provided
4657# by Oracle in the LICENSE file that accompanied this code.
4658#
4659# This code is distributed in the hope that it will be useful, but WITHOUT
4660# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4661# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4662# version 2 for more details (a copy is included in the LICENSE file that
4663# accompanied this code).
4664#
4665# You should have received a copy of the GNU General Public License version
4666# 2 along with this work; if not, write to the Free Software Foundation,
4667# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4668#
4669# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4670# or visit www.oracle.com if you need additional information or have any
4671# questions.
4672#
4673
4674################################################################################
4675# Setup libffi (Foreign Function Interface)
4676################################################################################
4677
4678
4679#
4680# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4681# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4682#
4683# This code is free software; you can redistribute it and/or modify it
4684# under the terms of the GNU General Public License version 2 only, as
4685# published by the Free Software Foundation.  Oracle designates this
4686# particular file as subject to the "Classpath" exception as provided
4687# by Oracle in the LICENSE file that accompanied this code.
4688#
4689# This code is distributed in the hope that it will be useful, but WITHOUT
4690# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4691# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4692# version 2 for more details (a copy is included in the LICENSE file that
4693# accompanied this code).
4694#
4695# You should have received a copy of the GNU General Public License version
4696# 2 along with this work; if not, write to the Free Software Foundation,
4697# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4698#
4699# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4700# or visit www.oracle.com if you need additional information or have any
4701# questions.
4702#
4703
4704################################################################################
4705# Build the freetype lib from source
4706################################################################################
4707
4708
4709################################################################################
4710# Check if a potential freeype library match is correct and usable
4711################################################################################
4712
4713
4714################################################################################
4715# Setup freetype (The FreeType2 font rendering library)
4716################################################################################
4717
4718
4719#
4720# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4721# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4722#
4723# This code is free software; you can redistribute it and/or modify it
4724# under the terms of the GNU General Public License version 2 only, as
4725# published by the Free Software Foundation.  Oracle designates this
4726# particular file as subject to the "Classpath" exception as provided
4727# by Oracle in the LICENSE file that accompanied this code.
4728#
4729# This code is distributed in the hope that it will be useful, but WITHOUT
4730# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4731# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4732# version 2 for more details (a copy is included in the LICENSE file that
4733# accompanied this code).
4734#
4735# You should have received a copy of the GNU General Public License version
4736# 2 along with this work; if not, write to the Free Software Foundation,
4737# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4738#
4739# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4740# or visit www.oracle.com if you need additional information or have any
4741# questions.
4742#
4743
4744################################################################################
4745# Setup the standard C/C++ runtime libraries.
4746#
4747# Most importantly, determine if stdc++ should be linked statically or
4748# dynamically.
4749################################################################################
4750
4751
4752#
4753# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755#
4756# This code is free software; you can redistribute it and/or modify it
4757# under the terms of the GNU General Public License version 2 only, as
4758# published by the Free Software Foundation.  Oracle designates this
4759# particular file as subject to the "Classpath" exception as provided
4760# by Oracle in the LICENSE file that accompanied this code.
4761#
4762# This code is distributed in the hope that it will be useful, but WITHOUT
4763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765# version 2 for more details (a copy is included in the LICENSE file that
4766# accompanied this code).
4767#
4768# You should have received a copy of the GNU General Public License version
4769# 2 along with this work; if not, write to the Free Software Foundation,
4770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771#
4772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773# or visit www.oracle.com if you need additional information or have any
4774# questions.
4775#
4776
4777################################################################################
4778# Setup X11 Windows system
4779################################################################################
4780
4781
4782#
4783# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4784# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4785#
4786# This code is free software; you can redistribute it and/or modify it
4787# under the terms of the GNU General Public License version 2 only, as
4788# published by the Free Software Foundation.  Oracle designates this
4789# particular file as subject to the "Classpath" exception as provided
4790# by Oracle in the LICENSE file that accompanied this code.
4791#
4792# This code is distributed in the hope that it will be useful, but WITHOUT
4793# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4794# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4795# version 2 for more details (a copy is included in the LICENSE file that
4796# accompanied this code).
4797#
4798# You should have received a copy of the GNU General Public License version
4799# 2 along with this work; if not, write to the Free Software Foundation,
4800# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4801#
4802# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4803# or visit www.oracle.com if you need additional information or have any
4804# questions.
4805#
4806
4807################################################################################
4808# Setup libelf (ELF library)
4809################################################################################
4810
4811
4812
4813################################################################################
4814# Determine which libraries are needed for this configuration
4815################################################################################
4816
4817
4818################################################################################
4819# Parse library options, and setup needed libraries
4820################################################################################
4821
4822
4823################################################################################
4824# Setup llvm (Low-Level VM)
4825################################################################################
4826
4827
4828################################################################################
4829# Setup various libraries, typically small system libraries
4830################################################################################
4831
4832
4833################################################################################
4834# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4835# redistribute it in the test image.
4836################################################################################
4837
4838
4839
4840#
4841# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4843#
4844# This code is free software; you can redistribute it and/or modify it
4845# under the terms of the GNU General Public License version 2 only, as
4846# published by the Free Software Foundation.  Oracle designates this
4847# particular file as subject to the "Classpath" exception as provided
4848# by Oracle in the LICENSE file that accompanied this code.
4849#
4850# This code is distributed in the hope that it will be useful, but WITHOUT
4851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4853# version 2 for more details (a copy is included in the LICENSE file that
4854# accompanied this code).
4855#
4856# You should have received a copy of the GNU General Public License version
4857# 2 along with this work; if not, write to the Free Software Foundation,
4858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4859#
4860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4861# or visit www.oracle.com if you need additional information or have any
4862# questions.
4863#
4864
4865# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4866# Converts autoconf style CPU name to OpenJDK style, into
4867# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4868
4869
4870# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4871# Converts autoconf style OS name to OpenJDK style, into
4872# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4873
4874
4875# Expects $host_os $host_cpu $build_os and $build_cpu
4876# and $with_target_bits to have been setup!
4877#
4878# Translate the standard triplet(quadruplet) definition
4879# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4880# OPENJDK_BUILD_OS, etc.
4881
4882
4883# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4884# accordingly. Must be done after setting up build and target system, but before
4885# doing anything else with these values.
4886
4887
4888# Setup the legacy variables, for controlling the old makefiles.
4889#
4890
4891
4892# $1 - Either TARGET or BUILD to setup the variables for.
4893
4894
4895
4896
4897#%%% Build and target systems %%%
4898
4899
4900
4901
4902# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4903# Add -mX to various FLAGS variables.
4904
4905
4906
4907
4908
4909
4910#
4911# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4912# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4913#
4914# This code is free software; you can redistribute it and/or modify it
4915# under the terms of the GNU General Public License version 2 only, as
4916# published by the Free Software Foundation.  Oracle designates this
4917# particular file as subject to the "Classpath" exception as provided
4918# by Oracle in the LICENSE file that accompanied this code.
4919#
4920# This code is distributed in the hope that it will be useful, but WITHOUT
4921# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4922# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4923# version 2 for more details (a copy is included in the LICENSE file that
4924# accompanied this code).
4925#
4926# You should have received a copy of the GNU General Public License version
4927# 2 along with this work; if not, write to the Free Software Foundation,
4928# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4929#
4930# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4931# or visit www.oracle.com if you need additional information or have any
4932# questions.
4933#
4934
4935
4936
4937
4938
4939
4940
4941################################################################################
4942# Define a mechanism for importing extra prebuilt modules
4943#
4944
4945
4946
4947#
4948# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4949# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4950#
4951# This code is free software; you can redistribute it and/or modify it
4952# under the terms of the GNU General Public License version 2 only, as
4953# published by the Free Software Foundation.  Oracle designates this
4954# particular file as subject to the "Classpath" exception as provided
4955# by Oracle in the LICENSE file that accompanied this code.
4956#
4957# This code is distributed in the hope that it will be useful, but WITHOUT
4958# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4959# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4960# version 2 for more details (a copy is included in the LICENSE file that
4961# accompanied this code).
4962#
4963# You should have received a copy of the GNU General Public License version
4964# 2 along with this work; if not, write to the Free Software Foundation,
4965# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4966#
4967# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4968# or visit www.oracle.com if you need additional information or have any
4969# questions.
4970#
4971
4972########################################################################
4973# This file is responsible for detecting, verifying and setting up the
4974# toolchain, i.e. the compiler, linker and related utilities. It will setup
4975# proper paths to the binaries, but it will not setup any flags.
4976#
4977# The binaries used is determined by the toolchain type, which is the family of
4978# compilers and related tools that are used.
4979########################################################################
4980
4981
4982# All valid toolchains, regardless of platform (used by help.m4)
4983VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4984
4985# These toolchains are valid on different platforms
4986VALID_TOOLCHAINS_linux="gcc clang"
4987VALID_TOOLCHAINS_solaris="solstudio"
4988VALID_TOOLCHAINS_macosx="gcc clang"
4989VALID_TOOLCHAINS_aix="xlc"
4990VALID_TOOLCHAINS_windows="microsoft"
4991
4992# Toolchain descriptions
4993TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4994TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4995TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4996TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4997TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4998
4999# Minimum supported versions, empty means unspecified
5000TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5001TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5002TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5003TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5004TOOLCHAIN_MINIMUM_VERSION_xlc=""
5005
5006# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5007# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5008# $1 - optional variable prefix for compiler and version variables (BUILD_)
5009# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5010
5011
5012# Check if the configured compiler (C and C++) is of a specific version or
5013# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5014#
5015# Arguments:
5016#   VERSION:   The version string to check against the found version
5017#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5018#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5019#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5020
5021
5022
5023
5024# Setup a number of variables describing how native output files are
5025# named on this platform/toolchain.
5026
5027
5028# Determine which toolchain type to use, and make sure it is valid for this
5029# platform. Setup various information about the selected toolchain.
5030
5031
5032# Before we start detecting the toolchain executables, we might need some
5033# special setup, e.g. additional paths etc.
5034
5035
5036# Restore path, etc
5037
5038
5039# Check if a compiler is of the toolchain type we expect, and save the version
5040# information from it. If the compiler does not match the expected type,
5041# this function will abort using AC_MSG_ERROR. If it matches, the version will
5042# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5043# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5044#
5045# $1 = compiler to test (CC or CXX)
5046# $2 = human readable name of compiler (C or C++)
5047
5048
5049# Try to locate the given C or C++ compiler in the path, or otherwise.
5050#
5051# $1 = compiler to test (CC or CXX)
5052# $2 = human readable name of compiler (C or C++)
5053# $3 = compiler name to search for
5054
5055
5056# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5057# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5058# archiver (AR). Verify that the compilers are correct according to the
5059# toolchain type.
5060
5061
5062# Setup additional tools that is considered a part of the toolchain, but not the
5063# core part. Many of these are highly platform-specific and do not exist,
5064# and/or are not needed on all platforms.
5065
5066
5067# Setup the build tools (i.e, the compiler and linker used to build programs
5068# that should be run on the build platform, not the target platform, as a build
5069# helper). Since the non-cross-compile case uses the normal, target compilers
5070# for this, we can only do this after these have been setup.
5071
5072
5073# Do some additional checks on the detected tools.
5074
5075
5076# Setup the JTReg Regression Test Harness.
5077
5078
5079#
5080# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5081# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5082#
5083# This code is free software; you can redistribute it and/or modify it
5084# under the terms of the GNU General Public License version 2 only, as
5085# published by the Free Software Foundation.  Oracle designates this
5086# particular file as subject to the "Classpath" exception as provided
5087# by Oracle in the LICENSE file that accompanied this code.
5088#
5089# This code is distributed in the hope that it will be useful, but WITHOUT
5090# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5091# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5092# version 2 for more details (a copy is included in the LICENSE file that
5093# accompanied this code).
5094#
5095# You should have received a copy of the GNU General Public License version
5096# 2 along with this work; if not, write to the Free Software Foundation,
5097# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5098#
5099# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5100# or visit www.oracle.com if you need additional information or have any
5101# questions.
5102#
5103
5104################################################################################
5105# The order of these defines the priority by which we try to find them.
5106VALID_VS_VERSIONS="2013 2012 2010"
5107
5108VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5109VS_VERSION_INTERNAL_2010=100
5110VS_MSVCR_2010=msvcr100.dll
5111# We don't use msvcp on Visual Studio 2010
5112#VS_MSVCP_2010=msvcp100.dll
5113VS_ENVVAR_2010="VS100COMNTOOLS"
5114VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5115VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5116VS_VS_PLATFORM_NAME_2010="v100"
5117VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5118
5119VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5120VS_VERSION_INTERNAL_2012=110
5121VS_MSVCR_2012=msvcr110.dll
5122VS_MSVCP_2012=msvcp110.dll
5123VS_ENVVAR_2012="VS110COMNTOOLS"
5124VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5125VS_SDK_INSTALLDIR_2012=
5126VS_VS_PLATFORM_NAME_2012="v110"
5127VS_SDK_PLATFORM_NAME_2012=
5128
5129VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5130VS_VERSION_INTERNAL_2013=120
5131VS_MSVCR_2013=msvcr120.dll
5132VS_MSVCP_2013=msvcp120.dll
5133VS_ENVVAR_2013="VS120COMNTOOLS"
5134VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5135VS_SDK_INSTALLDIR_2013=
5136VS_VS_PLATFORM_NAME_2013="v120"
5137VS_SDK_PLATFORM_NAME_2013=
5138
5139################################################################################
5140
5141
5142
5143################################################################################
5144
5145
5146
5147################################################################################
5148# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5149# build environment and assigns it to VS_ENV_CMD
5150
5151
5152################################################################################
5153
5154
5155
5156################################################################################
5157# Check if the VS env variables were setup prior to running configure.
5158# If not, then find vcvarsall.bat and run it automatically, and integrate
5159# the set env variables into the spec file.
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174# This line needs to be here, verbatim, after all includes and the dummy hook
5175# definitions. It is replaced with custom functionality when building
5176# custom sources.
5177#CUSTOM_AUTOCONF_INCLUDE
5178
5179# Do not change or remove the following line, it is needed for consistency checks:
5180DATE_WHEN_GENERATED=1490900744
5181
5182###############################################################################
5183#
5184# Initialization / Boot-strapping
5185#
5186# The bootstrapping process needs to solve the "chicken or the egg" problem,
5187# thus it jumps back and forth, each time gaining something needed later on.
5188#
5189###############################################################################
5190
5191# If we are requested to print additional help, do that and then exit.
5192# This must be the very first call.
5193
5194  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5195
5196    # Print available toolchains
5197    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5198    $PRINTF "Which are valid to use depends on the build platform.\n"
5199    for toolchain in $VALID_TOOLCHAINS_all; do
5200      # Use indirect variable referencing
5201      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5202      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5203      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5204    done
5205    $PRINTF "\n"
5206
5207    # Print available jvm features
5208    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5209    $PRINTF "Which are valid to use depends on the target platform.\n  "
5210    $PRINTF "%s " $VALID_JVM_FEATURES
5211    $PRINTF "\n"
5212
5213    # And now exit directly
5214    exit 0
5215  fi
5216
5217
5218# Basic initialization that must happen first of all in the normal process.
5219
5220  # Save the original command line. This is passed to us by the wrapper configure script.
5221
5222  # Save the path variable before it gets changed
5223  ORIGINAL_PATH="$PATH"
5224
5225  DATE_WHEN_CONFIGURED=`LANG=C date`
5226
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5228$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5230$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5231
5232
5233  # Start with tools that do not need have cross compilation support
5234  # and can be expected to be found in the default PATH. These tools are
5235  # used by configure.
5236
5237  # First are all the simple required tools.
5238
5239
5240
5241  # Publish this variable in the help.
5242
5243
5244  if [ -z "${BASENAME+x}" ]; then
5245    # The variable is not set by user, try to locate tool using the code snippet
5246    for ac_prog in basename
5247do
5248  # Extract the first word of "$ac_prog", so it can be a program name with args.
5249set dummy $ac_prog; ac_word=$2
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5251$as_echo_n "checking for $ac_word... " >&6; }
5252if ${ac_cv_path_BASENAME+:} false; then :
5253  $as_echo_n "(cached) " >&6
5254else
5255  case $BASENAME in
5256  [\\/]* | ?:[\\/]*)
5257  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5258  ;;
5259  *)
5260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5261for as_dir in $PATH
5262do
5263  IFS=$as_save_IFS
5264  test -z "$as_dir" && as_dir=.
5265    for ac_exec_ext in '' $ac_executable_extensions; do
5266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5267    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5269    break 2
5270  fi
5271done
5272  done
5273IFS=$as_save_IFS
5274
5275  ;;
5276esac
5277fi
5278BASENAME=$ac_cv_path_BASENAME
5279if test -n "$BASENAME"; then
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5281$as_echo "$BASENAME" >&6; }
5282else
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5284$as_echo "no" >&6; }
5285fi
5286
5287
5288  test -n "$BASENAME" && break
5289done
5290
5291  else
5292    # The variable is set, but is it from the command line or the environment?
5293
5294    # Try to remove the string !BASENAME! from our list.
5295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5297      # If it failed, the variable was not from the command line. Ignore it,
5298      # but warn the user (except for BASH, which is always set by the calling BASH).
5299      if test "xBASENAME" != xBASH; then
5300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5301$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5302      fi
5303      # Try to locate tool using the code snippet
5304      for ac_prog in basename
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if ${ac_cv_path_BASENAME+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $BASENAME in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5325    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336BASENAME=$ac_cv_path_BASENAME
5337if test -n "$BASENAME"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5339$as_echo "$BASENAME" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$BASENAME" && break
5347done
5348
5349    else
5350      # If it succeeded, then it was overridden by the user. We will use it
5351      # for the tool.
5352
5353      # First remove it from the list of overridden variables, so we can test
5354      # for unknown variables in the end.
5355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5356
5357      # Check if we try to supply an empty value
5358      if test "x$BASENAME" = x; then
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5360$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5362$as_echo_n "checking for BASENAME... " >&6; }
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5364$as_echo "disabled" >&6; }
5365      else
5366        # Check if the provided tool contains a complete path.
5367        tool_specified="$BASENAME"
5368        tool_basename="${tool_specified##*/}"
5369        if test "x$tool_basename" = "x$tool_specified"; then
5370          # A command without a complete path is provided, search $PATH.
5371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5372$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5373          # Extract the first word of "$tool_basename", so it can be a program name with args.
5374set dummy $tool_basename; ac_word=$2
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5376$as_echo_n "checking for $ac_word... " >&6; }
5377if ${ac_cv_path_BASENAME+:} false; then :
5378  $as_echo_n "(cached) " >&6
5379else
5380  case $BASENAME in
5381  [\\/]* | ?:[\\/]*)
5382  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5383  ;;
5384  *)
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390    for ac_exec_ext in '' $ac_executable_extensions; do
5391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5392    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5394    break 2
5395  fi
5396done
5397  done
5398IFS=$as_save_IFS
5399
5400  ;;
5401esac
5402fi
5403BASENAME=$ac_cv_path_BASENAME
5404if test -n "$BASENAME"; then
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5406$as_echo "$BASENAME" >&6; }
5407else
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }
5410fi
5411
5412
5413          if test "x$BASENAME" = x; then
5414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5415          fi
5416        else
5417          # Otherwise we believe it is a complete path. Use it as it is.
5418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5419$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5421$as_echo_n "checking for BASENAME... " >&6; }
5422          if test ! -x "$tool_specified"; then
5423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5424$as_echo "not found" >&6; }
5425            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5426          fi
5427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5428$as_echo "$tool_specified" >&6; }
5429        fi
5430      fi
5431    fi
5432
5433  fi
5434
5435
5436
5437  if test "x$BASENAME" = x; then
5438    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5439  fi
5440
5441
5442
5443
5444
5445  # Publish this variable in the help.
5446
5447
5448  if [ -z "${BASH+x}" ]; then
5449    # The variable is not set by user, try to locate tool using the code snippet
5450    for ac_prog in bash
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if ${ac_cv_path_BASH+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $BASH in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482BASH=$ac_cv_path_BASH
5483if test -n "$BASH"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5485$as_echo "$BASH" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$BASH" && break
5493done
5494
5495  else
5496    # The variable is set, but is it from the command line or the environment?
5497
5498    # Try to remove the string !BASH! from our list.
5499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5501      # If it failed, the variable was not from the command line. Ignore it,
5502      # but warn the user (except for BASH, which is always set by the calling BASH).
5503      if test "xBASH" != xBASH; then
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5505$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5506      fi
5507      # Try to locate tool using the code snippet
5508      for ac_prog in bash
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_BASH+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $BASH in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540BASH=$ac_cv_path_BASH
5541if test -n "$BASH"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5543$as_echo "$BASH" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$BASH" && break
5551done
5552
5553    else
5554      # If it succeeded, then it was overridden by the user. We will use it
5555      # for the tool.
5556
5557      # First remove it from the list of overridden variables, so we can test
5558      # for unknown variables in the end.
5559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5560
5561      # Check if we try to supply an empty value
5562      if test "x$BASH" = x; then
5563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5564$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5566$as_echo_n "checking for BASH... " >&6; }
5567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5568$as_echo "disabled" >&6; }
5569      else
5570        # Check if the provided tool contains a complete path.
5571        tool_specified="$BASH"
5572        tool_basename="${tool_specified##*/}"
5573        if test "x$tool_basename" = "x$tool_specified"; then
5574          # A command without a complete path is provided, search $PATH.
5575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5576$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5577          # Extract the first word of "$tool_basename", so it can be a program name with args.
5578set dummy $tool_basename; ac_word=$2
5579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5580$as_echo_n "checking for $ac_word... " >&6; }
5581if ${ac_cv_path_BASH+:} false; then :
5582  $as_echo_n "(cached) " >&6
5583else
5584  case $BASH in
5585  [\\/]* | ?:[\\/]*)
5586  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5587  ;;
5588  *)
5589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5590for as_dir in $PATH
5591do
5592  IFS=$as_save_IFS
5593  test -z "$as_dir" && as_dir=.
5594    for ac_exec_ext in '' $ac_executable_extensions; do
5595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5596    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5598    break 2
5599  fi
5600done
5601  done
5602IFS=$as_save_IFS
5603
5604  ;;
5605esac
5606fi
5607BASH=$ac_cv_path_BASH
5608if test -n "$BASH"; then
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5610$as_echo "$BASH" >&6; }
5611else
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5613$as_echo "no" >&6; }
5614fi
5615
5616
5617          if test "x$BASH" = x; then
5618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5619          fi
5620        else
5621          # Otherwise we believe it is a complete path. Use it as it is.
5622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5623$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5625$as_echo_n "checking for BASH... " >&6; }
5626          if test ! -x "$tool_specified"; then
5627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5628$as_echo "not found" >&6; }
5629            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5630          fi
5631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5632$as_echo "$tool_specified" >&6; }
5633        fi
5634      fi
5635    fi
5636
5637  fi
5638
5639
5640
5641  if test "x$BASH" = x; then
5642    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5643  fi
5644
5645
5646
5647
5648
5649  # Publish this variable in the help.
5650
5651
5652  if [ -z "${CAT+x}" ]; then
5653    # The variable is not set by user, try to locate tool using the code snippet
5654    for ac_prog in cat
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if ${ac_cv_path_CAT+:} false; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $CAT in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5675    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686CAT=$ac_cv_path_CAT
5687if test -n "$CAT"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5689$as_echo "$CAT" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$CAT" && break
5697done
5698
5699  else
5700    # The variable is set, but is it from the command line or the environment?
5701
5702    # Try to remove the string !CAT! from our list.
5703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5705      # If it failed, the variable was not from the command line. Ignore it,
5706      # but warn the user (except for BASH, which is always set by the calling BASH).
5707      if test "xCAT" != xBASH; then
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5709$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5710      fi
5711      # Try to locate tool using the code snippet
5712      for ac_prog in cat
5713do
5714  # Extract the first word of "$ac_prog", so it can be a program name with args.
5715set dummy $ac_prog; ac_word=$2
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
5718if ${ac_cv_path_CAT+:} false; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  case $CAT in
5722  [\\/]* | ?:[\\/]*)
5723  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5724  ;;
5725  *)
5726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729  IFS=$as_save_IFS
5730  test -z "$as_dir" && as_dir=.
5731    for ac_exec_ext in '' $ac_executable_extensions; do
5732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5733    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735    break 2
5736  fi
5737done
5738  done
5739IFS=$as_save_IFS
5740
5741  ;;
5742esac
5743fi
5744CAT=$ac_cv_path_CAT
5745if test -n "$CAT"; then
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5747$as_echo "$CAT" >&6; }
5748else
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754  test -n "$CAT" && break
5755done
5756
5757    else
5758      # If it succeeded, then it was overridden by the user. We will use it
5759      # for the tool.
5760
5761      # First remove it from the list of overridden variables, so we can test
5762      # for unknown variables in the end.
5763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5764
5765      # Check if we try to supply an empty value
5766      if test "x$CAT" = x; then
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5768$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5770$as_echo_n "checking for CAT... " >&6; }
5771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5772$as_echo "disabled" >&6; }
5773      else
5774        # Check if the provided tool contains a complete path.
5775        tool_specified="$CAT"
5776        tool_basename="${tool_specified##*/}"
5777        if test "x$tool_basename" = "x$tool_specified"; then
5778          # A command without a complete path is provided, search $PATH.
5779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5780$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5781          # Extract the first word of "$tool_basename", so it can be a program name with args.
5782set dummy $tool_basename; ac_word=$2
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784$as_echo_n "checking for $ac_word... " >&6; }
5785if ${ac_cv_path_CAT+:} false; then :
5786  $as_echo_n "(cached) " >&6
5787else
5788  case $CAT in
5789  [\\/]* | ?:[\\/]*)
5790  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5791  ;;
5792  *)
5793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796  IFS=$as_save_IFS
5797  test -z "$as_dir" && as_dir=.
5798    for ac_exec_ext in '' $ac_executable_extensions; do
5799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5800    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802    break 2
5803  fi
5804done
5805  done
5806IFS=$as_save_IFS
5807
5808  ;;
5809esac
5810fi
5811CAT=$ac_cv_path_CAT
5812if test -n "$CAT"; then
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5814$as_echo "$CAT" >&6; }
5815else
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818fi
5819
5820
5821          if test "x$CAT" = x; then
5822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5823          fi
5824        else
5825          # Otherwise we believe it is a complete path. Use it as it is.
5826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5827$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5829$as_echo_n "checking for CAT... " >&6; }
5830          if test ! -x "$tool_specified"; then
5831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5832$as_echo "not found" >&6; }
5833            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5834          fi
5835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5836$as_echo "$tool_specified" >&6; }
5837        fi
5838      fi
5839    fi
5840
5841  fi
5842
5843
5844
5845  if test "x$CAT" = x; then
5846    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5847  fi
5848
5849
5850
5851
5852
5853  # Publish this variable in the help.
5854
5855
5856  if [ -z "${CHMOD+x}" ]; then
5857    # The variable is not set by user, try to locate tool using the code snippet
5858    for ac_prog in chmod
5859do
5860  # Extract the first word of "$ac_prog", so it can be a program name with args.
5861set dummy $ac_prog; ac_word=$2
5862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5863$as_echo_n "checking for $ac_word... " >&6; }
5864if ${ac_cv_path_CHMOD+:} false; then :
5865  $as_echo_n "(cached) " >&6
5866else
5867  case $CHMOD in
5868  [\\/]* | ?:[\\/]*)
5869  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5870  ;;
5871  *)
5872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5873for as_dir in $PATH
5874do
5875  IFS=$as_save_IFS
5876  test -z "$as_dir" && as_dir=.
5877    for ac_exec_ext in '' $ac_executable_extensions; do
5878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5879    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5881    break 2
5882  fi
5883done
5884  done
5885IFS=$as_save_IFS
5886
5887  ;;
5888esac
5889fi
5890CHMOD=$ac_cv_path_CHMOD
5891if test -n "$CHMOD"; then
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5893$as_echo "$CHMOD" >&6; }
5894else
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897fi
5898
5899
5900  test -n "$CHMOD" && break
5901done
5902
5903  else
5904    # The variable is set, but is it from the command line or the environment?
5905
5906    # Try to remove the string !CHMOD! from our list.
5907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5909      # If it failed, the variable was not from the command line. Ignore it,
5910      # but warn the user (except for BASH, which is always set by the calling BASH).
5911      if test "xCHMOD" != xBASH; then
5912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5913$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5914      fi
5915      # Try to locate tool using the code snippet
5916      for ac_prog in chmod
5917do
5918  # Extract the first word of "$ac_prog", so it can be a program name with args.
5919set dummy $ac_prog; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if ${ac_cv_path_CHMOD+:} false; then :
5923  $as_echo_n "(cached) " >&6
5924else
5925  case $CHMOD in
5926  [\\/]* | ?:[\\/]*)
5927  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5928  ;;
5929  *)
5930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931for as_dir in $PATH
5932do
5933  IFS=$as_save_IFS
5934  test -z "$as_dir" && as_dir=.
5935    for ac_exec_ext in '' $ac_executable_extensions; do
5936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5937    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5939    break 2
5940  fi
5941done
5942  done
5943IFS=$as_save_IFS
5944
5945  ;;
5946esac
5947fi
5948CHMOD=$ac_cv_path_CHMOD
5949if test -n "$CHMOD"; then
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5951$as_echo "$CHMOD" >&6; }
5952else
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954$as_echo "no" >&6; }
5955fi
5956
5957
5958  test -n "$CHMOD" && break
5959done
5960
5961    else
5962      # If it succeeded, then it was overridden by the user. We will use it
5963      # for the tool.
5964
5965      # First remove it from the list of overridden variables, so we can test
5966      # for unknown variables in the end.
5967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5968
5969      # Check if we try to supply an empty value
5970      if test "x$CHMOD" = x; then
5971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5972$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5974$as_echo_n "checking for CHMOD... " >&6; }
5975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5976$as_echo "disabled" >&6; }
5977      else
5978        # Check if the provided tool contains a complete path.
5979        tool_specified="$CHMOD"
5980        tool_basename="${tool_specified##*/}"
5981        if test "x$tool_basename" = "x$tool_specified"; then
5982          # A command without a complete path is provided, search $PATH.
5983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5984$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5985          # Extract the first word of "$tool_basename", so it can be a program name with args.
5986set dummy $tool_basename; ac_word=$2
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
5989if ${ac_cv_path_CHMOD+:} false; then :
5990  $as_echo_n "(cached) " >&6
5991else
5992  case $CHMOD in
5993  [\\/]* | ?:[\\/]*)
5994  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5995  ;;
5996  *)
5997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000  IFS=$as_save_IFS
6001  test -z "$as_dir" && as_dir=.
6002    for ac_exec_ext in '' $ac_executable_extensions; do
6003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6004    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006    break 2
6007  fi
6008done
6009  done
6010IFS=$as_save_IFS
6011
6012  ;;
6013esac
6014fi
6015CHMOD=$ac_cv_path_CHMOD
6016if test -n "$CHMOD"; then
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6018$as_echo "$CHMOD" >&6; }
6019else
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
6022fi
6023
6024
6025          if test "x$CHMOD" = x; then
6026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6027          fi
6028        else
6029          # Otherwise we believe it is a complete path. Use it as it is.
6030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6031$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6033$as_echo_n "checking for CHMOD... " >&6; }
6034          if test ! -x "$tool_specified"; then
6035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6036$as_echo "not found" >&6; }
6037            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6038          fi
6039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6040$as_echo "$tool_specified" >&6; }
6041        fi
6042      fi
6043    fi
6044
6045  fi
6046
6047
6048
6049  if test "x$CHMOD" = x; then
6050    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6051  fi
6052
6053
6054
6055
6056
6057  # Publish this variable in the help.
6058
6059
6060  if [ -z "${CMP+x}" ]; then
6061    # The variable is not set by user, try to locate tool using the code snippet
6062    for ac_prog in cmp
6063do
6064  # Extract the first word of "$ac_prog", so it can be a program name with args.
6065set dummy $ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_path_CMP+:} false; then :
6069  $as_echo_n "(cached) " >&6
6070else
6071  case $CMP in
6072  [\\/]* | ?:[\\/]*)
6073  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6074  ;;
6075  *)
6076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH
6078do
6079  IFS=$as_save_IFS
6080  test -z "$as_dir" && as_dir=.
6081    for ac_exec_ext in '' $ac_executable_extensions; do
6082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6083    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6085    break 2
6086  fi
6087done
6088  done
6089IFS=$as_save_IFS
6090
6091  ;;
6092esac
6093fi
6094CMP=$ac_cv_path_CMP
6095if test -n "$CMP"; then
6096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6097$as_echo "$CMP" >&6; }
6098else
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6100$as_echo "no" >&6; }
6101fi
6102
6103
6104  test -n "$CMP" && break
6105done
6106
6107  else
6108    # The variable is set, but is it from the command line or the environment?
6109
6110    # Try to remove the string !CMP! from our list.
6111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6113      # If it failed, the variable was not from the command line. Ignore it,
6114      # but warn the user (except for BASH, which is always set by the calling BASH).
6115      if test "xCMP" != xBASH; then
6116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6117$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6118      fi
6119      # Try to locate tool using the code snippet
6120      for ac_prog in cmp
6121do
6122  # Extract the first word of "$ac_prog", so it can be a program name with args.
6123set dummy $ac_prog; ac_word=$2
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6125$as_echo_n "checking for $ac_word... " >&6; }
6126if ${ac_cv_path_CMP+:} false; then :
6127  $as_echo_n "(cached) " >&6
6128else
6129  case $CMP in
6130  [\\/]* | ?:[\\/]*)
6131  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6132  ;;
6133  *)
6134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137  IFS=$as_save_IFS
6138  test -z "$as_dir" && as_dir=.
6139    for ac_exec_ext in '' $ac_executable_extensions; do
6140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6141    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6143    break 2
6144  fi
6145done
6146  done
6147IFS=$as_save_IFS
6148
6149  ;;
6150esac
6151fi
6152CMP=$ac_cv_path_CMP
6153if test -n "$CMP"; then
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6155$as_echo "$CMP" >&6; }
6156else
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6158$as_echo "no" >&6; }
6159fi
6160
6161
6162  test -n "$CMP" && break
6163done
6164
6165    else
6166      # If it succeeded, then it was overridden by the user. We will use it
6167      # for the tool.
6168
6169      # First remove it from the list of overridden variables, so we can test
6170      # for unknown variables in the end.
6171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6172
6173      # Check if we try to supply an empty value
6174      if test "x$CMP" = x; then
6175        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6176$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6178$as_echo_n "checking for CMP... " >&6; }
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6180$as_echo "disabled" >&6; }
6181      else
6182        # Check if the provided tool contains a complete path.
6183        tool_specified="$CMP"
6184        tool_basename="${tool_specified##*/}"
6185        if test "x$tool_basename" = "x$tool_specified"; then
6186          # A command without a complete path is provided, search $PATH.
6187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6188$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6189          # Extract the first word of "$tool_basename", so it can be a program name with args.
6190set dummy $tool_basename; ac_word=$2
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6192$as_echo_n "checking for $ac_word... " >&6; }
6193if ${ac_cv_path_CMP+:} false; then :
6194  $as_echo_n "(cached) " >&6
6195else
6196  case $CMP in
6197  [\\/]* | ?:[\\/]*)
6198  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6199  ;;
6200  *)
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_exec_ext in '' $ac_executable_extensions; do
6207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6208    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210    break 2
6211  fi
6212done
6213  done
6214IFS=$as_save_IFS
6215
6216  ;;
6217esac
6218fi
6219CMP=$ac_cv_path_CMP
6220if test -n "$CMP"; then
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6222$as_echo "$CMP" >&6; }
6223else
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6225$as_echo "no" >&6; }
6226fi
6227
6228
6229          if test "x$CMP" = x; then
6230            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6231          fi
6232        else
6233          # Otherwise we believe it is a complete path. Use it as it is.
6234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6235$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6237$as_echo_n "checking for CMP... " >&6; }
6238          if test ! -x "$tool_specified"; then
6239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6240$as_echo "not found" >&6; }
6241            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6242          fi
6243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6244$as_echo "$tool_specified" >&6; }
6245        fi
6246      fi
6247    fi
6248
6249  fi
6250
6251
6252
6253  if test "x$CMP" = x; then
6254    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6255  fi
6256
6257
6258
6259
6260
6261  # Publish this variable in the help.
6262
6263
6264  if [ -z "${COMM+x}" ]; then
6265    # The variable is not set by user, try to locate tool using the code snippet
6266    for ac_prog in comm
6267do
6268  # Extract the first word of "$ac_prog", so it can be a program name with args.
6269set dummy $ac_prog; ac_word=$2
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6271$as_echo_n "checking for $ac_word... " >&6; }
6272if ${ac_cv_path_COMM+:} false; then :
6273  $as_echo_n "(cached) " >&6
6274else
6275  case $COMM in
6276  [\\/]* | ?:[\\/]*)
6277  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6278  ;;
6279  *)
6280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283  IFS=$as_save_IFS
6284  test -z "$as_dir" && as_dir=.
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6287    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289    break 2
6290  fi
6291done
6292  done
6293IFS=$as_save_IFS
6294
6295  ;;
6296esac
6297fi
6298COMM=$ac_cv_path_COMM
6299if test -n "$COMM"; then
6300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6301$as_echo "$COMM" >&6; }
6302else
6303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304$as_echo "no" >&6; }
6305fi
6306
6307
6308  test -n "$COMM" && break
6309done
6310
6311  else
6312    # The variable is set, but is it from the command line or the environment?
6313
6314    # Try to remove the string !COMM! from our list.
6315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6317      # If it failed, the variable was not from the command line. Ignore it,
6318      # but warn the user (except for BASH, which is always set by the calling BASH).
6319      if test "xCOMM" != xBASH; then
6320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6321$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6322      fi
6323      # Try to locate tool using the code snippet
6324      for ac_prog in comm
6325do
6326  # Extract the first word of "$ac_prog", so it can be a program name with args.
6327set dummy $ac_prog; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if ${ac_cv_path_COMM+:} false; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $COMM in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6345    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356COMM=$ac_cv_path_COMM
6357if test -n "$COMM"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6359$as_echo "$COMM" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366  test -n "$COMM" && break
6367done
6368
6369    else
6370      # If it succeeded, then it was overridden by the user. We will use it
6371      # for the tool.
6372
6373      # First remove it from the list of overridden variables, so we can test
6374      # for unknown variables in the end.
6375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6376
6377      # Check if we try to supply an empty value
6378      if test "x$COMM" = x; then
6379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6380$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6382$as_echo_n "checking for COMM... " >&6; }
6383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6384$as_echo "disabled" >&6; }
6385      else
6386        # Check if the provided tool contains a complete path.
6387        tool_specified="$COMM"
6388        tool_basename="${tool_specified##*/}"
6389        if test "x$tool_basename" = "x$tool_specified"; then
6390          # A command without a complete path is provided, search $PATH.
6391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6392$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6393          # Extract the first word of "$tool_basename", so it can be a program name with args.
6394set dummy $tool_basename; ac_word=$2
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6396$as_echo_n "checking for $ac_word... " >&6; }
6397if ${ac_cv_path_COMM+:} false; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  case $COMM in
6401  [\\/]* | ?:[\\/]*)
6402  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6403  ;;
6404  *)
6405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6406for as_dir in $PATH
6407do
6408  IFS=$as_save_IFS
6409  test -z "$as_dir" && as_dir=.
6410    for ac_exec_ext in '' $ac_executable_extensions; do
6411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6412    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6414    break 2
6415  fi
6416done
6417  done
6418IFS=$as_save_IFS
6419
6420  ;;
6421esac
6422fi
6423COMM=$ac_cv_path_COMM
6424if test -n "$COMM"; then
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6426$as_echo "$COMM" >&6; }
6427else
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430fi
6431
6432
6433          if test "x$COMM" = x; then
6434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6435          fi
6436        else
6437          # Otherwise we believe it is a complete path. Use it as it is.
6438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6439$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6441$as_echo_n "checking for COMM... " >&6; }
6442          if test ! -x "$tool_specified"; then
6443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6444$as_echo "not found" >&6; }
6445            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6446          fi
6447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6448$as_echo "$tool_specified" >&6; }
6449        fi
6450      fi
6451    fi
6452
6453  fi
6454
6455
6456
6457  if test "x$COMM" = x; then
6458    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6459  fi
6460
6461
6462
6463
6464
6465  # Publish this variable in the help.
6466
6467
6468  if [ -z "${CP+x}" ]; then
6469    # The variable is not set by user, try to locate tool using the code snippet
6470    for ac_prog in cp
6471do
6472  # Extract the first word of "$ac_prog", so it can be a program name with args.
6473set dummy $ac_prog; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
6476if ${ac_cv_path_CP+:} false; then :
6477  $as_echo_n "(cached) " >&6
6478else
6479  case $CP in
6480  [\\/]* | ?:[\\/]*)
6481  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6482  ;;
6483  *)
6484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485for as_dir in $PATH
6486do
6487  IFS=$as_save_IFS
6488  test -z "$as_dir" && as_dir=.
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493    break 2
6494  fi
6495done
6496  done
6497IFS=$as_save_IFS
6498
6499  ;;
6500esac
6501fi
6502CP=$ac_cv_path_CP
6503if test -n "$CP"; then
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6505$as_echo "$CP" >&6; }
6506else
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }
6509fi
6510
6511
6512  test -n "$CP" && break
6513done
6514
6515  else
6516    # The variable is set, but is it from the command line or the environment?
6517
6518    # Try to remove the string !CP! from our list.
6519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6521      # If it failed, the variable was not from the command line. Ignore it,
6522      # but warn the user (except for BASH, which is always set by the calling BASH).
6523      if test "xCP" != xBASH; then
6524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6525$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6526      fi
6527      # Try to locate tool using the code snippet
6528      for ac_prog in cp
6529do
6530  # Extract the first word of "$ac_prog", so it can be a program name with args.
6531set dummy $ac_prog; ac_word=$2
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533$as_echo_n "checking for $ac_word... " >&6; }
6534if ${ac_cv_path_CP+:} false; then :
6535  $as_echo_n "(cached) " >&6
6536else
6537  case $CP in
6538  [\\/]* | ?:[\\/]*)
6539  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6540  ;;
6541  *)
6542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543for as_dir in $PATH
6544do
6545  IFS=$as_save_IFS
6546  test -z "$as_dir" && as_dir=.
6547    for ac_exec_ext in '' $ac_executable_extensions; do
6548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6551    break 2
6552  fi
6553done
6554  done
6555IFS=$as_save_IFS
6556
6557  ;;
6558esac
6559fi
6560CP=$ac_cv_path_CP
6561if test -n "$CP"; then
6562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6563$as_echo "$CP" >&6; }
6564else
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569
6570  test -n "$CP" && break
6571done
6572
6573    else
6574      # If it succeeded, then it was overridden by the user. We will use it
6575      # for the tool.
6576
6577      # First remove it from the list of overridden variables, so we can test
6578      # for unknown variables in the end.
6579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6580
6581      # Check if we try to supply an empty value
6582      if test "x$CP" = x; then
6583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6584$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6586$as_echo_n "checking for CP... " >&6; }
6587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6588$as_echo "disabled" >&6; }
6589      else
6590        # Check if the provided tool contains a complete path.
6591        tool_specified="$CP"
6592        tool_basename="${tool_specified##*/}"
6593        if test "x$tool_basename" = "x$tool_specified"; then
6594          # A command without a complete path is provided, search $PATH.
6595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6596$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6597          # Extract the first word of "$tool_basename", so it can be a program name with args.
6598set dummy $tool_basename; ac_word=$2
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6600$as_echo_n "checking for $ac_word... " >&6; }
6601if ${ac_cv_path_CP+:} false; then :
6602  $as_echo_n "(cached) " >&6
6603else
6604  case $CP in
6605  [\\/]* | ?:[\\/]*)
6606  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6607  ;;
6608  *)
6609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6610for as_dir in $PATH
6611do
6612  IFS=$as_save_IFS
6613  test -z "$as_dir" && as_dir=.
6614    for ac_exec_ext in '' $ac_executable_extensions; do
6615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6616    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6618    break 2
6619  fi
6620done
6621  done
6622IFS=$as_save_IFS
6623
6624  ;;
6625esac
6626fi
6627CP=$ac_cv_path_CP
6628if test -n "$CP"; then
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6630$as_echo "$CP" >&6; }
6631else
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633$as_echo "no" >&6; }
6634fi
6635
6636
6637          if test "x$CP" = x; then
6638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6639          fi
6640        else
6641          # Otherwise we believe it is a complete path. Use it as it is.
6642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6643$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6645$as_echo_n "checking for CP... " >&6; }
6646          if test ! -x "$tool_specified"; then
6647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6648$as_echo "not found" >&6; }
6649            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6650          fi
6651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6652$as_echo "$tool_specified" >&6; }
6653        fi
6654      fi
6655    fi
6656
6657  fi
6658
6659
6660
6661  if test "x$CP" = x; then
6662    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6663  fi
6664
6665
6666
6667
6668
6669  # Publish this variable in the help.
6670
6671
6672  if [ -z "${CUT+x}" ]; then
6673    # The variable is not set by user, try to locate tool using the code snippet
6674    for ac_prog in cut
6675do
6676  # Extract the first word of "$ac_prog", so it can be a program name with args.
6677set dummy $ac_prog; ac_word=$2
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679$as_echo_n "checking for $ac_word... " >&6; }
6680if ${ac_cv_path_CUT+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  case $CUT in
6684  [\\/]* | ?:[\\/]*)
6685  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6686  ;;
6687  *)
6688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6689for as_dir in $PATH
6690do
6691  IFS=$as_save_IFS
6692  test -z "$as_dir" && as_dir=.
6693    for ac_exec_ext in '' $ac_executable_extensions; do
6694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6695    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6697    break 2
6698  fi
6699done
6700  done
6701IFS=$as_save_IFS
6702
6703  ;;
6704esac
6705fi
6706CUT=$ac_cv_path_CUT
6707if test -n "$CUT"; then
6708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6709$as_echo "$CUT" >&6; }
6710else
6711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6712$as_echo "no" >&6; }
6713fi
6714
6715
6716  test -n "$CUT" && break
6717done
6718
6719  else
6720    # The variable is set, but is it from the command line or the environment?
6721
6722    # Try to remove the string !CUT! from our list.
6723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6725      # If it failed, the variable was not from the command line. Ignore it,
6726      # but warn the user (except for BASH, which is always set by the calling BASH).
6727      if test "xCUT" != xBASH; then
6728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6729$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6730      fi
6731      # Try to locate tool using the code snippet
6732      for ac_prog in cut
6733do
6734  # Extract the first word of "$ac_prog", so it can be a program name with args.
6735set dummy $ac_prog; ac_word=$2
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6737$as_echo_n "checking for $ac_word... " >&6; }
6738if ${ac_cv_path_CUT+:} false; then :
6739  $as_echo_n "(cached) " >&6
6740else
6741  case $CUT in
6742  [\\/]* | ?:[\\/]*)
6743  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6744  ;;
6745  *)
6746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6747for as_dir in $PATH
6748do
6749  IFS=$as_save_IFS
6750  test -z "$as_dir" && as_dir=.
6751    for ac_exec_ext in '' $ac_executable_extensions; do
6752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6753    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6755    break 2
6756  fi
6757done
6758  done
6759IFS=$as_save_IFS
6760
6761  ;;
6762esac
6763fi
6764CUT=$ac_cv_path_CUT
6765if test -n "$CUT"; then
6766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6767$as_echo "$CUT" >&6; }
6768else
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770$as_echo "no" >&6; }
6771fi
6772
6773
6774  test -n "$CUT" && break
6775done
6776
6777    else
6778      # If it succeeded, then it was overridden by the user. We will use it
6779      # for the tool.
6780
6781      # First remove it from the list of overridden variables, so we can test
6782      # for unknown variables in the end.
6783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6784
6785      # Check if we try to supply an empty value
6786      if test "x$CUT" = x; then
6787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6788$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6790$as_echo_n "checking for CUT... " >&6; }
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6792$as_echo "disabled" >&6; }
6793      else
6794        # Check if the provided tool contains a complete path.
6795        tool_specified="$CUT"
6796        tool_basename="${tool_specified##*/}"
6797        if test "x$tool_basename" = "x$tool_specified"; then
6798          # A command without a complete path is provided, search $PATH.
6799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6800$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6801          # Extract the first word of "$tool_basename", so it can be a program name with args.
6802set dummy $tool_basename; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_CUT+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $CUT in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831CUT=$ac_cv_path_CUT
6832if test -n "$CUT"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6834$as_echo "$CUT" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841          if test "x$CUT" = x; then
6842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6843          fi
6844        else
6845          # Otherwise we believe it is a complete path. Use it as it is.
6846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6847$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6849$as_echo_n "checking for CUT... " >&6; }
6850          if test ! -x "$tool_specified"; then
6851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6852$as_echo "not found" >&6; }
6853            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6854          fi
6855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6856$as_echo "$tool_specified" >&6; }
6857        fi
6858      fi
6859    fi
6860
6861  fi
6862
6863
6864
6865  if test "x$CUT" = x; then
6866    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6867  fi
6868
6869
6870
6871
6872
6873  # Publish this variable in the help.
6874
6875
6876  if [ -z "${DATE+x}" ]; then
6877    # The variable is not set by user, try to locate tool using the code snippet
6878    for ac_prog in date
6879do
6880  # Extract the first word of "$ac_prog", so it can be a program name with args.
6881set dummy $ac_prog; ac_word=$2
6882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6883$as_echo_n "checking for $ac_word... " >&6; }
6884if ${ac_cv_path_DATE+:} false; then :
6885  $as_echo_n "(cached) " >&6
6886else
6887  case $DATE in
6888  [\\/]* | ?:[\\/]*)
6889  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6890  ;;
6891  *)
6892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893for as_dir in $PATH
6894do
6895  IFS=$as_save_IFS
6896  test -z "$as_dir" && as_dir=.
6897    for ac_exec_ext in '' $ac_executable_extensions; do
6898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6899    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6901    break 2
6902  fi
6903done
6904  done
6905IFS=$as_save_IFS
6906
6907  ;;
6908esac
6909fi
6910DATE=$ac_cv_path_DATE
6911if test -n "$DATE"; then
6912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6913$as_echo "$DATE" >&6; }
6914else
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6916$as_echo "no" >&6; }
6917fi
6918
6919
6920  test -n "$DATE" && break
6921done
6922
6923  else
6924    # The variable is set, but is it from the command line or the environment?
6925
6926    # Try to remove the string !DATE! from our list.
6927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6929      # If it failed, the variable was not from the command line. Ignore it,
6930      # but warn the user (except for BASH, which is always set by the calling BASH).
6931      if test "xDATE" != xBASH; then
6932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6933$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6934      fi
6935      # Try to locate tool using the code snippet
6936      for ac_prog in date
6937do
6938  # Extract the first word of "$ac_prog", so it can be a program name with args.
6939set dummy $ac_prog; ac_word=$2
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6941$as_echo_n "checking for $ac_word... " >&6; }
6942if ${ac_cv_path_DATE+:} false; then :
6943  $as_echo_n "(cached) " >&6
6944else
6945  case $DATE in
6946  [\\/]* | ?:[\\/]*)
6947  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6948  ;;
6949  *)
6950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951for as_dir in $PATH
6952do
6953  IFS=$as_save_IFS
6954  test -z "$as_dir" && as_dir=.
6955    for ac_exec_ext in '' $ac_executable_extensions; do
6956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6957    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959    break 2
6960  fi
6961done
6962  done
6963IFS=$as_save_IFS
6964
6965  ;;
6966esac
6967fi
6968DATE=$ac_cv_path_DATE
6969if test -n "$DATE"; then
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6971$as_echo "$DATE" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976
6977
6978  test -n "$DATE" && break
6979done
6980
6981    else
6982      # If it succeeded, then it was overridden by the user. We will use it
6983      # for the tool.
6984
6985      # First remove it from the list of overridden variables, so we can test
6986      # for unknown variables in the end.
6987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6988
6989      # Check if we try to supply an empty value
6990      if test "x$DATE" = x; then
6991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6992$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6994$as_echo_n "checking for DATE... " >&6; }
6995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6996$as_echo "disabled" >&6; }
6997      else
6998        # Check if the provided tool contains a complete path.
6999        tool_specified="$DATE"
7000        tool_basename="${tool_specified##*/}"
7001        if test "x$tool_basename" = "x$tool_specified"; then
7002          # A command without a complete path is provided, search $PATH.
7003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7004$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7005          # Extract the first word of "$tool_basename", so it can be a program name with args.
7006set dummy $tool_basename; ac_word=$2
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7008$as_echo_n "checking for $ac_word... " >&6; }
7009if ${ac_cv_path_DATE+:} false; then :
7010  $as_echo_n "(cached) " >&6
7011else
7012  case $DATE in
7013  [\\/]* | ?:[\\/]*)
7014  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7015  ;;
7016  *)
7017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7018for as_dir in $PATH
7019do
7020  IFS=$as_save_IFS
7021  test -z "$as_dir" && as_dir=.
7022    for ac_exec_ext in '' $ac_executable_extensions; do
7023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7024    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7026    break 2
7027  fi
7028done
7029  done
7030IFS=$as_save_IFS
7031
7032  ;;
7033esac
7034fi
7035DATE=$ac_cv_path_DATE
7036if test -n "$DATE"; then
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7038$as_echo "$DATE" >&6; }
7039else
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7041$as_echo "no" >&6; }
7042fi
7043
7044
7045          if test "x$DATE" = x; then
7046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7047          fi
7048        else
7049          # Otherwise we believe it is a complete path. Use it as it is.
7050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7051$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7053$as_echo_n "checking for DATE... " >&6; }
7054          if test ! -x "$tool_specified"; then
7055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7056$as_echo "not found" >&6; }
7057            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7058          fi
7059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7060$as_echo "$tool_specified" >&6; }
7061        fi
7062      fi
7063    fi
7064
7065  fi
7066
7067
7068
7069  if test "x$DATE" = x; then
7070    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7071  fi
7072
7073
7074
7075
7076
7077  # Publish this variable in the help.
7078
7079
7080  if [ -z "${DIFF+x}" ]; then
7081    # The variable is not set by user, try to locate tool using the code snippet
7082    for ac_prog in gdiff diff
7083do
7084  # Extract the first word of "$ac_prog", so it can be a program name with args.
7085set dummy $ac_prog; ac_word=$2
7086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7087$as_echo_n "checking for $ac_word... " >&6; }
7088if ${ac_cv_path_DIFF+:} false; then :
7089  $as_echo_n "(cached) " >&6
7090else
7091  case $DIFF in
7092  [\\/]* | ?:[\\/]*)
7093  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7094  ;;
7095  *)
7096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097for as_dir in $PATH
7098do
7099  IFS=$as_save_IFS
7100  test -z "$as_dir" && as_dir=.
7101    for ac_exec_ext in '' $ac_executable_extensions; do
7102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7103    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7105    break 2
7106  fi
7107done
7108  done
7109IFS=$as_save_IFS
7110
7111  ;;
7112esac
7113fi
7114DIFF=$ac_cv_path_DIFF
7115if test -n "$DIFF"; then
7116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7117$as_echo "$DIFF" >&6; }
7118else
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7120$as_echo "no" >&6; }
7121fi
7122
7123
7124  test -n "$DIFF" && break
7125done
7126
7127  else
7128    # The variable is set, but is it from the command line or the environment?
7129
7130    # Try to remove the string !DIFF! from our list.
7131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7133      # If it failed, the variable was not from the command line. Ignore it,
7134      # but warn the user (except for BASH, which is always set by the calling BASH).
7135      if test "xDIFF" != xBASH; then
7136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7137$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7138      fi
7139      # Try to locate tool using the code snippet
7140      for ac_prog in gdiff diff
7141do
7142  # Extract the first word of "$ac_prog", so it can be a program name with args.
7143set dummy $ac_prog; ac_word=$2
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7145$as_echo_n "checking for $ac_word... " >&6; }
7146if ${ac_cv_path_DIFF+:} false; then :
7147  $as_echo_n "(cached) " >&6
7148else
7149  case $DIFF in
7150  [\\/]* | ?:[\\/]*)
7151  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7152  ;;
7153  *)
7154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155for as_dir in $PATH
7156do
7157  IFS=$as_save_IFS
7158  test -z "$as_dir" && as_dir=.
7159    for ac_exec_ext in '' $ac_executable_extensions; do
7160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163    break 2
7164  fi
7165done
7166  done
7167IFS=$as_save_IFS
7168
7169  ;;
7170esac
7171fi
7172DIFF=$ac_cv_path_DIFF
7173if test -n "$DIFF"; then
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7175$as_echo "$DIFF" >&6; }
7176else
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178$as_echo "no" >&6; }
7179fi
7180
7181
7182  test -n "$DIFF" && break
7183done
7184
7185    else
7186      # If it succeeded, then it was overridden by the user. We will use it
7187      # for the tool.
7188
7189      # First remove it from the list of overridden variables, so we can test
7190      # for unknown variables in the end.
7191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7192
7193      # Check if we try to supply an empty value
7194      if test "x$DIFF" = x; then
7195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7196$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7198$as_echo_n "checking for DIFF... " >&6; }
7199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7200$as_echo "disabled" >&6; }
7201      else
7202        # Check if the provided tool contains a complete path.
7203        tool_specified="$DIFF"
7204        tool_basename="${tool_specified##*/}"
7205        if test "x$tool_basename" = "x$tool_specified"; then
7206          # A command without a complete path is provided, search $PATH.
7207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7208$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7209          # Extract the first word of "$tool_basename", so it can be a program name with args.
7210set dummy $tool_basename; ac_word=$2
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212$as_echo_n "checking for $ac_word... " >&6; }
7213if ${ac_cv_path_DIFF+:} false; then :
7214  $as_echo_n "(cached) " >&6
7215else
7216  case $DIFF in
7217  [\\/]* | ?:[\\/]*)
7218  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7219  ;;
7220  *)
7221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222for as_dir in $PATH
7223do
7224  IFS=$as_save_IFS
7225  test -z "$as_dir" && as_dir=.
7226    for ac_exec_ext in '' $ac_executable_extensions; do
7227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230    break 2
7231  fi
7232done
7233  done
7234IFS=$as_save_IFS
7235
7236  ;;
7237esac
7238fi
7239DIFF=$ac_cv_path_DIFF
7240if test -n "$DIFF"; then
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7242$as_echo "$DIFF" >&6; }
7243else
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
7246fi
7247
7248
7249          if test "x$DIFF" = x; then
7250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7251          fi
7252        else
7253          # Otherwise we believe it is a complete path. Use it as it is.
7254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7255$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7257$as_echo_n "checking for DIFF... " >&6; }
7258          if test ! -x "$tool_specified"; then
7259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7260$as_echo "not found" >&6; }
7261            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7262          fi
7263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7264$as_echo "$tool_specified" >&6; }
7265        fi
7266      fi
7267    fi
7268
7269  fi
7270
7271
7272
7273  if test "x$DIFF" = x; then
7274    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7275  fi
7276
7277
7278
7279
7280
7281  # Publish this variable in the help.
7282
7283
7284  if [ -z "${DIRNAME+x}" ]; then
7285    # The variable is not set by user, try to locate tool using the code snippet
7286    for ac_prog in dirname
7287do
7288  # Extract the first word of "$ac_prog", so it can be a program name with args.
7289set dummy $ac_prog; ac_word=$2
7290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291$as_echo_n "checking for $ac_word... " >&6; }
7292if ${ac_cv_path_DIRNAME+:} false; then :
7293  $as_echo_n "(cached) " >&6
7294else
7295  case $DIRNAME in
7296  [\\/]* | ?:[\\/]*)
7297  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7298  ;;
7299  *)
7300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7301for as_dir in $PATH
7302do
7303  IFS=$as_save_IFS
7304  test -z "$as_dir" && as_dir=.
7305    for ac_exec_ext in '' $ac_executable_extensions; do
7306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7307    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7309    break 2
7310  fi
7311done
7312  done
7313IFS=$as_save_IFS
7314
7315  ;;
7316esac
7317fi
7318DIRNAME=$ac_cv_path_DIRNAME
7319if test -n "$DIRNAME"; then
7320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7321$as_echo "$DIRNAME" >&6; }
7322else
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7324$as_echo "no" >&6; }
7325fi
7326
7327
7328  test -n "$DIRNAME" && break
7329done
7330
7331  else
7332    # The variable is set, but is it from the command line or the environment?
7333
7334    # Try to remove the string !DIRNAME! from our list.
7335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7337      # If it failed, the variable was not from the command line. Ignore it,
7338      # but warn the user (except for BASH, which is always set by the calling BASH).
7339      if test "xDIRNAME" != xBASH; then
7340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7341$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7342      fi
7343      # Try to locate tool using the code snippet
7344      for ac_prog in dirname
7345do
7346  # Extract the first word of "$ac_prog", so it can be a program name with args.
7347set dummy $ac_prog; ac_word=$2
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
7350if ${ac_cv_path_DIRNAME+:} false; then :
7351  $as_echo_n "(cached) " >&6
7352else
7353  case $DIRNAME in
7354  [\\/]* | ?:[\\/]*)
7355  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7356  ;;
7357  *)
7358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359for as_dir in $PATH
7360do
7361  IFS=$as_save_IFS
7362  test -z "$as_dir" && as_dir=.
7363    for ac_exec_ext in '' $ac_executable_extensions; do
7364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7365    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7367    break 2
7368  fi
7369done
7370  done
7371IFS=$as_save_IFS
7372
7373  ;;
7374esac
7375fi
7376DIRNAME=$ac_cv_path_DIRNAME
7377if test -n "$DIRNAME"; then
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7379$as_echo "$DIRNAME" >&6; }
7380else
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382$as_echo "no" >&6; }
7383fi
7384
7385
7386  test -n "$DIRNAME" && break
7387done
7388
7389    else
7390      # If it succeeded, then it was overridden by the user. We will use it
7391      # for the tool.
7392
7393      # First remove it from the list of overridden variables, so we can test
7394      # for unknown variables in the end.
7395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7396
7397      # Check if we try to supply an empty value
7398      if test "x$DIRNAME" = x; then
7399        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7400$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7402$as_echo_n "checking for DIRNAME... " >&6; }
7403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7404$as_echo "disabled" >&6; }
7405      else
7406        # Check if the provided tool contains a complete path.
7407        tool_specified="$DIRNAME"
7408        tool_basename="${tool_specified##*/}"
7409        if test "x$tool_basename" = "x$tool_specified"; then
7410          # A command without a complete path is provided, search $PATH.
7411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7412$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7413          # Extract the first word of "$tool_basename", so it can be a program name with args.
7414set dummy $tool_basename; ac_word=$2
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7416$as_echo_n "checking for $ac_word... " >&6; }
7417if ${ac_cv_path_DIRNAME+:} false; then :
7418  $as_echo_n "(cached) " >&6
7419else
7420  case $DIRNAME in
7421  [\\/]* | ?:[\\/]*)
7422  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7423  ;;
7424  *)
7425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7426for as_dir in $PATH
7427do
7428  IFS=$as_save_IFS
7429  test -z "$as_dir" && as_dir=.
7430    for ac_exec_ext in '' $ac_executable_extensions; do
7431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7432    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7434    break 2
7435  fi
7436done
7437  done
7438IFS=$as_save_IFS
7439
7440  ;;
7441esac
7442fi
7443DIRNAME=$ac_cv_path_DIRNAME
7444if test -n "$DIRNAME"; then
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7446$as_echo "$DIRNAME" >&6; }
7447else
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
7450fi
7451
7452
7453          if test "x$DIRNAME" = x; then
7454            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7455          fi
7456        else
7457          # Otherwise we believe it is a complete path. Use it as it is.
7458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7459$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7461$as_echo_n "checking for DIRNAME... " >&6; }
7462          if test ! -x "$tool_specified"; then
7463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7464$as_echo "not found" >&6; }
7465            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7466          fi
7467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7468$as_echo "$tool_specified" >&6; }
7469        fi
7470      fi
7471    fi
7472
7473  fi
7474
7475
7476
7477  if test "x$DIRNAME" = x; then
7478    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7479  fi
7480
7481
7482
7483
7484
7485  # Publish this variable in the help.
7486
7487
7488  if [ -z "${ECHO+x}" ]; then
7489    # The variable is not set by user, try to locate tool using the code snippet
7490    for ac_prog in echo
7491do
7492  # Extract the first word of "$ac_prog", so it can be a program name with args.
7493set dummy $ac_prog; ac_word=$2
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7495$as_echo_n "checking for $ac_word... " >&6; }
7496if ${ac_cv_path_ECHO+:} false; then :
7497  $as_echo_n "(cached) " >&6
7498else
7499  case $ECHO in
7500  [\\/]* | ?:[\\/]*)
7501  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7502  ;;
7503  *)
7504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7505for as_dir in $PATH
7506do
7507  IFS=$as_save_IFS
7508  test -z "$as_dir" && as_dir=.
7509    for ac_exec_ext in '' $ac_executable_extensions; do
7510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7511    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7513    break 2
7514  fi
7515done
7516  done
7517IFS=$as_save_IFS
7518
7519  ;;
7520esac
7521fi
7522ECHO=$ac_cv_path_ECHO
7523if test -n "$ECHO"; then
7524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7525$as_echo "$ECHO" >&6; }
7526else
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7528$as_echo "no" >&6; }
7529fi
7530
7531
7532  test -n "$ECHO" && break
7533done
7534
7535  else
7536    # The variable is set, but is it from the command line or the environment?
7537
7538    # Try to remove the string !ECHO! from our list.
7539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7541      # If it failed, the variable was not from the command line. Ignore it,
7542      # but warn the user (except for BASH, which is always set by the calling BASH).
7543      if test "xECHO" != xBASH; then
7544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7545$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7546      fi
7547      # Try to locate tool using the code snippet
7548      for ac_prog in echo
7549do
7550  # Extract the first word of "$ac_prog", so it can be a program name with args.
7551set dummy $ac_prog; ac_word=$2
7552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7553$as_echo_n "checking for $ac_word... " >&6; }
7554if ${ac_cv_path_ECHO+:} false; then :
7555  $as_echo_n "(cached) " >&6
7556else
7557  case $ECHO in
7558  [\\/]* | ?:[\\/]*)
7559  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7560  ;;
7561  *)
7562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7563for as_dir in $PATH
7564do
7565  IFS=$as_save_IFS
7566  test -z "$as_dir" && as_dir=.
7567    for ac_exec_ext in '' $ac_executable_extensions; do
7568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7569    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7571    break 2
7572  fi
7573done
7574  done
7575IFS=$as_save_IFS
7576
7577  ;;
7578esac
7579fi
7580ECHO=$ac_cv_path_ECHO
7581if test -n "$ECHO"; then
7582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7583$as_echo "$ECHO" >&6; }
7584else
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
7587fi
7588
7589
7590  test -n "$ECHO" && break
7591done
7592
7593    else
7594      # If it succeeded, then it was overridden by the user. We will use it
7595      # for the tool.
7596
7597      # First remove it from the list of overridden variables, so we can test
7598      # for unknown variables in the end.
7599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7600
7601      # Check if we try to supply an empty value
7602      if test "x$ECHO" = x; then
7603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7604$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7606$as_echo_n "checking for ECHO... " >&6; }
7607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7608$as_echo "disabled" >&6; }
7609      else
7610        # Check if the provided tool contains a complete path.
7611        tool_specified="$ECHO"
7612        tool_basename="${tool_specified##*/}"
7613        if test "x$tool_basename" = "x$tool_specified"; then
7614          # A command without a complete path is provided, search $PATH.
7615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7616$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7617          # Extract the first word of "$tool_basename", so it can be a program name with args.
7618set dummy $tool_basename; ac_word=$2
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7620$as_echo_n "checking for $ac_word... " >&6; }
7621if ${ac_cv_path_ECHO+:} false; then :
7622  $as_echo_n "(cached) " >&6
7623else
7624  case $ECHO in
7625  [\\/]* | ?:[\\/]*)
7626  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7627  ;;
7628  *)
7629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7630for as_dir in $PATH
7631do
7632  IFS=$as_save_IFS
7633  test -z "$as_dir" && as_dir=.
7634    for ac_exec_ext in '' $ac_executable_extensions; do
7635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7636    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7638    break 2
7639  fi
7640done
7641  done
7642IFS=$as_save_IFS
7643
7644  ;;
7645esac
7646fi
7647ECHO=$ac_cv_path_ECHO
7648if test -n "$ECHO"; then
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7650$as_echo "$ECHO" >&6; }
7651else
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
7654fi
7655
7656
7657          if test "x$ECHO" = x; then
7658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7659          fi
7660        else
7661          # Otherwise we believe it is a complete path. Use it as it is.
7662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7663$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7665$as_echo_n "checking for ECHO... " >&6; }
7666          if test ! -x "$tool_specified"; then
7667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7668$as_echo "not found" >&6; }
7669            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7670          fi
7671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7672$as_echo "$tool_specified" >&6; }
7673        fi
7674      fi
7675    fi
7676
7677  fi
7678
7679
7680
7681  if test "x$ECHO" = x; then
7682    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7683  fi
7684
7685
7686
7687
7688
7689  # Publish this variable in the help.
7690
7691
7692  if [ -z "${EXPR+x}" ]; then
7693    # The variable is not set by user, try to locate tool using the code snippet
7694    for ac_prog in expr
7695do
7696  # Extract the first word of "$ac_prog", so it can be a program name with args.
7697set dummy $ac_prog; ac_word=$2
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7699$as_echo_n "checking for $ac_word... " >&6; }
7700if ${ac_cv_path_EXPR+:} false; then :
7701  $as_echo_n "(cached) " >&6
7702else
7703  case $EXPR in
7704  [\\/]* | ?:[\\/]*)
7705  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7706  ;;
7707  *)
7708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7709for as_dir in $PATH
7710do
7711  IFS=$as_save_IFS
7712  test -z "$as_dir" && as_dir=.
7713    for ac_exec_ext in '' $ac_executable_extensions; do
7714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7715    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7717    break 2
7718  fi
7719done
7720  done
7721IFS=$as_save_IFS
7722
7723  ;;
7724esac
7725fi
7726EXPR=$ac_cv_path_EXPR
7727if test -n "$EXPR"; then
7728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7729$as_echo "$EXPR" >&6; }
7730else
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7732$as_echo "no" >&6; }
7733fi
7734
7735
7736  test -n "$EXPR" && break
7737done
7738
7739  else
7740    # The variable is set, but is it from the command line or the environment?
7741
7742    # Try to remove the string !EXPR! from our list.
7743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7745      # If it failed, the variable was not from the command line. Ignore it,
7746      # but warn the user (except for BASH, which is always set by the calling BASH).
7747      if test "xEXPR" != xBASH; then
7748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7749$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7750      fi
7751      # Try to locate tool using the code snippet
7752      for ac_prog in expr
7753do
7754  # Extract the first word of "$ac_prog", so it can be a program name with args.
7755set dummy $ac_prog; ac_word=$2
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7757$as_echo_n "checking for $ac_word... " >&6; }
7758if ${ac_cv_path_EXPR+:} false; then :
7759  $as_echo_n "(cached) " >&6
7760else
7761  case $EXPR in
7762  [\\/]* | ?:[\\/]*)
7763  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7764  ;;
7765  *)
7766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767for as_dir in $PATH
7768do
7769  IFS=$as_save_IFS
7770  test -z "$as_dir" && as_dir=.
7771    for ac_exec_ext in '' $ac_executable_extensions; do
7772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775    break 2
7776  fi
7777done
7778  done
7779IFS=$as_save_IFS
7780
7781  ;;
7782esac
7783fi
7784EXPR=$ac_cv_path_EXPR
7785if test -n "$EXPR"; then
7786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7787$as_echo "$EXPR" >&6; }
7788else
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7790$as_echo "no" >&6; }
7791fi
7792
7793
7794  test -n "$EXPR" && break
7795done
7796
7797    else
7798      # If it succeeded, then it was overridden by the user. We will use it
7799      # for the tool.
7800
7801      # First remove it from the list of overridden variables, so we can test
7802      # for unknown variables in the end.
7803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7804
7805      # Check if we try to supply an empty value
7806      if test "x$EXPR" = x; then
7807        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7808$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7809        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7810$as_echo_n "checking for EXPR... " >&6; }
7811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7812$as_echo "disabled" >&6; }
7813      else
7814        # Check if the provided tool contains a complete path.
7815        tool_specified="$EXPR"
7816        tool_basename="${tool_specified##*/}"
7817        if test "x$tool_basename" = "x$tool_specified"; then
7818          # A command without a complete path is provided, search $PATH.
7819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7820$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7821          # Extract the first word of "$tool_basename", so it can be a program name with args.
7822set dummy $tool_basename; ac_word=$2
7823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7824$as_echo_n "checking for $ac_word... " >&6; }
7825if ${ac_cv_path_EXPR+:} false; then :
7826  $as_echo_n "(cached) " >&6
7827else
7828  case $EXPR in
7829  [\\/]* | ?:[\\/]*)
7830  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7831  ;;
7832  *)
7833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7834for as_dir in $PATH
7835do
7836  IFS=$as_save_IFS
7837  test -z "$as_dir" && as_dir=.
7838    for ac_exec_ext in '' $ac_executable_extensions; do
7839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7840    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7842    break 2
7843  fi
7844done
7845  done
7846IFS=$as_save_IFS
7847
7848  ;;
7849esac
7850fi
7851EXPR=$ac_cv_path_EXPR
7852if test -n "$EXPR"; then
7853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7854$as_echo "$EXPR" >&6; }
7855else
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7857$as_echo "no" >&6; }
7858fi
7859
7860
7861          if test "x$EXPR" = x; then
7862            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7863          fi
7864        else
7865          # Otherwise we believe it is a complete path. Use it as it is.
7866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7867$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7869$as_echo_n "checking for EXPR... " >&6; }
7870          if test ! -x "$tool_specified"; then
7871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7872$as_echo "not found" >&6; }
7873            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7874          fi
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7876$as_echo "$tool_specified" >&6; }
7877        fi
7878      fi
7879    fi
7880
7881  fi
7882
7883
7884
7885  if test "x$EXPR" = x; then
7886    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7887  fi
7888
7889
7890
7891
7892
7893  # Publish this variable in the help.
7894
7895
7896  if [ -z "${FILE+x}" ]; then
7897    # The variable is not set by user, try to locate tool using the code snippet
7898    for ac_prog in file
7899do
7900  # Extract the first word of "$ac_prog", so it can be a program name with args.
7901set dummy $ac_prog; ac_word=$2
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903$as_echo_n "checking for $ac_word... " >&6; }
7904if ${ac_cv_path_FILE+:} false; then :
7905  $as_echo_n "(cached) " >&6
7906else
7907  case $FILE in
7908  [\\/]* | ?:[\\/]*)
7909  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7910  ;;
7911  *)
7912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH
7914do
7915  IFS=$as_save_IFS
7916  test -z "$as_dir" && as_dir=.
7917    for ac_exec_ext in '' $ac_executable_extensions; do
7918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7919    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7921    break 2
7922  fi
7923done
7924  done
7925IFS=$as_save_IFS
7926
7927  ;;
7928esac
7929fi
7930FILE=$ac_cv_path_FILE
7931if test -n "$FILE"; then
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7933$as_echo "$FILE" >&6; }
7934else
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
7937fi
7938
7939
7940  test -n "$FILE" && break
7941done
7942
7943  else
7944    # The variable is set, but is it from the command line or the environment?
7945
7946    # Try to remove the string !FILE! from our list.
7947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7949      # If it failed, the variable was not from the command line. Ignore it,
7950      # but warn the user (except for BASH, which is always set by the calling BASH).
7951      if test "xFILE" != xBASH; then
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7953$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7954      fi
7955      # Try to locate tool using the code snippet
7956      for ac_prog in file
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_FILE+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $FILE in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988FILE=$ac_cv_path_FILE
7989if test -n "$FILE"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7991$as_echo "$FILE" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$FILE" && break
7999done
8000
8001    else
8002      # If it succeeded, then it was overridden by the user. We will use it
8003      # for the tool.
8004
8005      # First remove it from the list of overridden variables, so we can test
8006      # for unknown variables in the end.
8007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8008
8009      # Check if we try to supply an empty value
8010      if test "x$FILE" = x; then
8011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8012$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8014$as_echo_n "checking for FILE... " >&6; }
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8016$as_echo "disabled" >&6; }
8017      else
8018        # Check if the provided tool contains a complete path.
8019        tool_specified="$FILE"
8020        tool_basename="${tool_specified##*/}"
8021        if test "x$tool_basename" = "x$tool_specified"; then
8022          # A command without a complete path is provided, search $PATH.
8023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8024$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8025          # Extract the first word of "$tool_basename", so it can be a program name with args.
8026set dummy $tool_basename; ac_word=$2
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8028$as_echo_n "checking for $ac_word... " >&6; }
8029if ${ac_cv_path_FILE+:} false; then :
8030  $as_echo_n "(cached) " >&6
8031else
8032  case $FILE in
8033  [\\/]* | ?:[\\/]*)
8034  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8035  ;;
8036  *)
8037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8038for as_dir in $PATH
8039do
8040  IFS=$as_save_IFS
8041  test -z "$as_dir" && as_dir=.
8042    for ac_exec_ext in '' $ac_executable_extensions; do
8043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8044    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8046    break 2
8047  fi
8048done
8049  done
8050IFS=$as_save_IFS
8051
8052  ;;
8053esac
8054fi
8055FILE=$ac_cv_path_FILE
8056if test -n "$FILE"; then
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8058$as_echo "$FILE" >&6; }
8059else
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8061$as_echo "no" >&6; }
8062fi
8063
8064
8065          if test "x$FILE" = x; then
8066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8067          fi
8068        else
8069          # Otherwise we believe it is a complete path. Use it as it is.
8070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8071$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8073$as_echo_n "checking for FILE... " >&6; }
8074          if test ! -x "$tool_specified"; then
8075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8076$as_echo "not found" >&6; }
8077            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8078          fi
8079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8080$as_echo "$tool_specified" >&6; }
8081        fi
8082      fi
8083    fi
8084
8085  fi
8086
8087
8088
8089  if test "x$FILE" = x; then
8090    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8091  fi
8092
8093
8094
8095
8096
8097  # Publish this variable in the help.
8098
8099
8100  if [ -z "${FIND+x}" ]; then
8101    # The variable is not set by user, try to locate tool using the code snippet
8102    for ac_prog in find
8103do
8104  # Extract the first word of "$ac_prog", so it can be a program name with args.
8105set dummy $ac_prog; ac_word=$2
8106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8107$as_echo_n "checking for $ac_word... " >&6; }
8108if ${ac_cv_path_FIND+:} false; then :
8109  $as_echo_n "(cached) " >&6
8110else
8111  case $FIND in
8112  [\\/]* | ?:[\\/]*)
8113  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8114  ;;
8115  *)
8116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8117for as_dir in $PATH
8118do
8119  IFS=$as_save_IFS
8120  test -z "$as_dir" && as_dir=.
8121    for ac_exec_ext in '' $ac_executable_extensions; do
8122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8123    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8125    break 2
8126  fi
8127done
8128  done
8129IFS=$as_save_IFS
8130
8131  ;;
8132esac
8133fi
8134FIND=$ac_cv_path_FIND
8135if test -n "$FIND"; then
8136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8137$as_echo "$FIND" >&6; }
8138else
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
8141fi
8142
8143
8144  test -n "$FIND" && break
8145done
8146
8147  else
8148    # The variable is set, but is it from the command line or the environment?
8149
8150    # Try to remove the string !FIND! from our list.
8151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8153      # If it failed, the variable was not from the command line. Ignore it,
8154      # but warn the user (except for BASH, which is always set by the calling BASH).
8155      if test "xFIND" != xBASH; then
8156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8157$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8158      fi
8159      # Try to locate tool using the code snippet
8160      for ac_prog in find
8161do
8162  # Extract the first word of "$ac_prog", so it can be a program name with args.
8163set dummy $ac_prog; ac_word=$2
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8165$as_echo_n "checking for $ac_word... " >&6; }
8166if ${ac_cv_path_FIND+:} false; then :
8167  $as_echo_n "(cached) " >&6
8168else
8169  case $FIND in
8170  [\\/]* | ?:[\\/]*)
8171  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8172  ;;
8173  *)
8174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8175for as_dir in $PATH
8176do
8177  IFS=$as_save_IFS
8178  test -z "$as_dir" && as_dir=.
8179    for ac_exec_ext in '' $ac_executable_extensions; do
8180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8181    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8183    break 2
8184  fi
8185done
8186  done
8187IFS=$as_save_IFS
8188
8189  ;;
8190esac
8191fi
8192FIND=$ac_cv_path_FIND
8193if test -n "$FIND"; then
8194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8195$as_echo "$FIND" >&6; }
8196else
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8198$as_echo "no" >&6; }
8199fi
8200
8201
8202  test -n "$FIND" && break
8203done
8204
8205    else
8206      # If it succeeded, then it was overridden by the user. We will use it
8207      # for the tool.
8208
8209      # First remove it from the list of overridden variables, so we can test
8210      # for unknown variables in the end.
8211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8212
8213      # Check if we try to supply an empty value
8214      if test "x$FIND" = x; then
8215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8216$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8218$as_echo_n "checking for FIND... " >&6; }
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8220$as_echo "disabled" >&6; }
8221      else
8222        # Check if the provided tool contains a complete path.
8223        tool_specified="$FIND"
8224        tool_basename="${tool_specified##*/}"
8225        if test "x$tool_basename" = "x$tool_specified"; then
8226          # A command without a complete path is provided, search $PATH.
8227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8228$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8229          # Extract the first word of "$tool_basename", so it can be a program name with args.
8230set dummy $tool_basename; ac_word=$2
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8232$as_echo_n "checking for $ac_word... " >&6; }
8233if ${ac_cv_path_FIND+:} false; then :
8234  $as_echo_n "(cached) " >&6
8235else
8236  case $FIND in
8237  [\\/]* | ?:[\\/]*)
8238  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8239  ;;
8240  *)
8241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8242for as_dir in $PATH
8243do
8244  IFS=$as_save_IFS
8245  test -z "$as_dir" && as_dir=.
8246    for ac_exec_ext in '' $ac_executable_extensions; do
8247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8248    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8250    break 2
8251  fi
8252done
8253  done
8254IFS=$as_save_IFS
8255
8256  ;;
8257esac
8258fi
8259FIND=$ac_cv_path_FIND
8260if test -n "$FIND"; then
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8262$as_echo "$FIND" >&6; }
8263else
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265$as_echo "no" >&6; }
8266fi
8267
8268
8269          if test "x$FIND" = x; then
8270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8271          fi
8272        else
8273          # Otherwise we believe it is a complete path. Use it as it is.
8274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8275$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8277$as_echo_n "checking for FIND... " >&6; }
8278          if test ! -x "$tool_specified"; then
8279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8280$as_echo "not found" >&6; }
8281            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8282          fi
8283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8284$as_echo "$tool_specified" >&6; }
8285        fi
8286      fi
8287    fi
8288
8289  fi
8290
8291
8292
8293  if test "x$FIND" = x; then
8294    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8295  fi
8296
8297
8298
8299
8300
8301  # Publish this variable in the help.
8302
8303
8304  if [ -z "${HEAD+x}" ]; then
8305    # The variable is not set by user, try to locate tool using the code snippet
8306    for ac_prog in head
8307do
8308  # Extract the first word of "$ac_prog", so it can be a program name with args.
8309set dummy $ac_prog; ac_word=$2
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311$as_echo_n "checking for $ac_word... " >&6; }
8312if ${ac_cv_path_HEAD+:} false; then :
8313  $as_echo_n "(cached) " >&6
8314else
8315  case $HEAD in
8316  [\\/]* | ?:[\\/]*)
8317  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8318  ;;
8319  *)
8320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  test -z "$as_dir" && as_dir=.
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335  ;;
8336esac
8337fi
8338HEAD=$ac_cv_path_HEAD
8339if test -n "$HEAD"; then
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8341$as_echo "$HEAD" >&6; }
8342else
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344$as_echo "no" >&6; }
8345fi
8346
8347
8348  test -n "$HEAD" && break
8349done
8350
8351  else
8352    # The variable is set, but is it from the command line or the environment?
8353
8354    # Try to remove the string !HEAD! from our list.
8355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8357      # If it failed, the variable was not from the command line. Ignore it,
8358      # but warn the user (except for BASH, which is always set by the calling BASH).
8359      if test "xHEAD" != xBASH; then
8360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8361$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8362      fi
8363      # Try to locate tool using the code snippet
8364      for ac_prog in head
8365do
8366  # Extract the first word of "$ac_prog", so it can be a program name with args.
8367set dummy $ac_prog; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_HEAD+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $HEAD in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396HEAD=$ac_cv_path_HEAD
8397if test -n "$HEAD"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8399$as_echo "$HEAD" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406  test -n "$HEAD" && break
8407done
8408
8409    else
8410      # If it succeeded, then it was overridden by the user. We will use it
8411      # for the tool.
8412
8413      # First remove it from the list of overridden variables, so we can test
8414      # for unknown variables in the end.
8415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8416
8417      # Check if we try to supply an empty value
8418      if test "x$HEAD" = x; then
8419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8420$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8422$as_echo_n "checking for HEAD... " >&6; }
8423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8424$as_echo "disabled" >&6; }
8425      else
8426        # Check if the provided tool contains a complete path.
8427        tool_specified="$HEAD"
8428        tool_basename="${tool_specified##*/}"
8429        if test "x$tool_basename" = "x$tool_specified"; then
8430          # A command without a complete path is provided, search $PATH.
8431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8432$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8433          # Extract the first word of "$tool_basename", so it can be a program name with args.
8434set dummy $tool_basename; ac_word=$2
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436$as_echo_n "checking for $ac_word... " >&6; }
8437if ${ac_cv_path_HEAD+:} false; then :
8438  $as_echo_n "(cached) " >&6
8439else
8440  case $HEAD in
8441  [\\/]* | ?:[\\/]*)
8442  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8443  ;;
8444  *)
8445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446for as_dir in $PATH
8447do
8448  IFS=$as_save_IFS
8449  test -z "$as_dir" && as_dir=.
8450    for ac_exec_ext in '' $ac_executable_extensions; do
8451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454    break 2
8455  fi
8456done
8457  done
8458IFS=$as_save_IFS
8459
8460  ;;
8461esac
8462fi
8463HEAD=$ac_cv_path_HEAD
8464if test -n "$HEAD"; then
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8466$as_echo "$HEAD" >&6; }
8467else
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469$as_echo "no" >&6; }
8470fi
8471
8472
8473          if test "x$HEAD" = x; then
8474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8475          fi
8476        else
8477          # Otherwise we believe it is a complete path. Use it as it is.
8478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8479$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8481$as_echo_n "checking for HEAD... " >&6; }
8482          if test ! -x "$tool_specified"; then
8483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8484$as_echo "not found" >&6; }
8485            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8486          fi
8487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8488$as_echo "$tool_specified" >&6; }
8489        fi
8490      fi
8491    fi
8492
8493  fi
8494
8495
8496
8497  if test "x$HEAD" = x; then
8498    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8499  fi
8500
8501
8502
8503
8504
8505  # Publish this variable in the help.
8506
8507
8508  if [ -z "${GUNZIP+x}" ]; then
8509    # The variable is not set by user, try to locate tool using the code snippet
8510    for ac_prog in gunzip
8511do
8512  # Extract the first word of "$ac_prog", so it can be a program name with args.
8513set dummy $ac_prog; ac_word=$2
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8515$as_echo_n "checking for $ac_word... " >&6; }
8516if ${ac_cv_path_GUNZIP+:} false; then :
8517  $as_echo_n "(cached) " >&6
8518else
8519  case $GUNZIP in
8520  [\\/]* | ?:[\\/]*)
8521  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8522  ;;
8523  *)
8524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8525for as_dir in $PATH
8526do
8527  IFS=$as_save_IFS
8528  test -z "$as_dir" && as_dir=.
8529    for ac_exec_ext in '' $ac_executable_extensions; do
8530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8531    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8533    break 2
8534  fi
8535done
8536  done
8537IFS=$as_save_IFS
8538
8539  ;;
8540esac
8541fi
8542GUNZIP=$ac_cv_path_GUNZIP
8543if test -n "$GUNZIP"; then
8544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8545$as_echo "$GUNZIP" >&6; }
8546else
8547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548$as_echo "no" >&6; }
8549fi
8550
8551
8552  test -n "$GUNZIP" && break
8553done
8554
8555  else
8556    # The variable is set, but is it from the command line or the environment?
8557
8558    # Try to remove the string !GUNZIP! from our list.
8559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8561      # If it failed, the variable was not from the command line. Ignore it,
8562      # but warn the user (except for BASH, which is always set by the calling BASH).
8563      if test "xGUNZIP" != xBASH; then
8564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8565$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8566      fi
8567      # Try to locate tool using the code snippet
8568      for ac_prog in gunzip
8569do
8570  # Extract the first word of "$ac_prog", so it can be a program name with args.
8571set dummy $ac_prog; ac_word=$2
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8573$as_echo_n "checking for $ac_word... " >&6; }
8574if ${ac_cv_path_GUNZIP+:} false; then :
8575  $as_echo_n "(cached) " >&6
8576else
8577  case $GUNZIP in
8578  [\\/]* | ?:[\\/]*)
8579  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8580  ;;
8581  *)
8582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8583for as_dir in $PATH
8584do
8585  IFS=$as_save_IFS
8586  test -z "$as_dir" && as_dir=.
8587    for ac_exec_ext in '' $ac_executable_extensions; do
8588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8589    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8591    break 2
8592  fi
8593done
8594  done
8595IFS=$as_save_IFS
8596
8597  ;;
8598esac
8599fi
8600GUNZIP=$ac_cv_path_GUNZIP
8601if test -n "$GUNZIP"; then
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8603$as_echo "$GUNZIP" >&6; }
8604else
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8606$as_echo "no" >&6; }
8607fi
8608
8609
8610  test -n "$GUNZIP" && break
8611done
8612
8613    else
8614      # If it succeeded, then it was overridden by the user. We will use it
8615      # for the tool.
8616
8617      # First remove it from the list of overridden variables, so we can test
8618      # for unknown variables in the end.
8619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8620
8621      # Check if we try to supply an empty value
8622      if test "x$GUNZIP" = x; then
8623        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8624$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8626$as_echo_n "checking for GUNZIP... " >&6; }
8627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8628$as_echo "disabled" >&6; }
8629      else
8630        # Check if the provided tool contains a complete path.
8631        tool_specified="$GUNZIP"
8632        tool_basename="${tool_specified##*/}"
8633        if test "x$tool_basename" = "x$tool_specified"; then
8634          # A command without a complete path is provided, search $PATH.
8635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8636$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8637          # Extract the first word of "$tool_basename", so it can be a program name with args.
8638set dummy $tool_basename; ac_word=$2
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640$as_echo_n "checking for $ac_word... " >&6; }
8641if ${ac_cv_path_GUNZIP+:} false; then :
8642  $as_echo_n "(cached) " >&6
8643else
8644  case $GUNZIP in
8645  [\\/]* | ?:[\\/]*)
8646  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8647  ;;
8648  *)
8649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650for as_dir in $PATH
8651do
8652  IFS=$as_save_IFS
8653  test -z "$as_dir" && as_dir=.
8654    for ac_exec_ext in '' $ac_executable_extensions; do
8655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658    break 2
8659  fi
8660done
8661  done
8662IFS=$as_save_IFS
8663
8664  ;;
8665esac
8666fi
8667GUNZIP=$ac_cv_path_GUNZIP
8668if test -n "$GUNZIP"; then
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8670$as_echo "$GUNZIP" >&6; }
8671else
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673$as_echo "no" >&6; }
8674fi
8675
8676
8677          if test "x$GUNZIP" = x; then
8678            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8679          fi
8680        else
8681          # Otherwise we believe it is a complete path. Use it as it is.
8682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8683$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8685$as_echo_n "checking for GUNZIP... " >&6; }
8686          if test ! -x "$tool_specified"; then
8687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8688$as_echo "not found" >&6; }
8689            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8690          fi
8691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8692$as_echo "$tool_specified" >&6; }
8693        fi
8694      fi
8695    fi
8696
8697  fi
8698
8699
8700
8701  if test "x$GUNZIP" = x; then
8702    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8703  fi
8704
8705
8706
8707
8708
8709  # Publish this variable in the help.
8710
8711
8712  if [ -z "${GZIP+x}" ]; then
8713    # The variable is not set by user, try to locate tool using the code snippet
8714    for ac_prog in pigz gzip
8715do
8716  # Extract the first word of "$ac_prog", so it can be a program name with args.
8717set dummy $ac_prog; ac_word=$2
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719$as_echo_n "checking for $ac_word... " >&6; }
8720if ${ac_cv_path_GZIP+:} false; then :
8721  $as_echo_n "(cached) " >&6
8722else
8723  case $GZIP in
8724  [\\/]* | ?:[\\/]*)
8725  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8726  ;;
8727  *)
8728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8729for as_dir in $PATH
8730do
8731  IFS=$as_save_IFS
8732  test -z "$as_dir" && as_dir=.
8733    for ac_exec_ext in '' $ac_executable_extensions; do
8734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8735    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8737    break 2
8738  fi
8739done
8740  done
8741IFS=$as_save_IFS
8742
8743  ;;
8744esac
8745fi
8746GZIP=$ac_cv_path_GZIP
8747if test -n "$GZIP"; then
8748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8749$as_echo "$GZIP" >&6; }
8750else
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8752$as_echo "no" >&6; }
8753fi
8754
8755
8756  test -n "$GZIP" && break
8757done
8758
8759  else
8760    # The variable is set, but is it from the command line or the environment?
8761
8762    # Try to remove the string !GZIP! from our list.
8763    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8764    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8765      # If it failed, the variable was not from the command line. Ignore it,
8766      # but warn the user (except for BASH, which is always set by the calling BASH).
8767      if test "xGZIP" != xBASH; then
8768        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8769$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8770      fi
8771      # Try to locate tool using the code snippet
8772      for ac_prog in pigz gzip
8773do
8774  # Extract the first word of "$ac_prog", so it can be a program name with args.
8775set dummy $ac_prog; ac_word=$2
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8777$as_echo_n "checking for $ac_word... " >&6; }
8778if ${ac_cv_path_GZIP+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  case $GZIP in
8782  [\\/]* | ?:[\\/]*)
8783  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8784  ;;
8785  *)
8786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8787for as_dir in $PATH
8788do
8789  IFS=$as_save_IFS
8790  test -z "$as_dir" && as_dir=.
8791    for ac_exec_ext in '' $ac_executable_extensions; do
8792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8793    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8795    break 2
8796  fi
8797done
8798  done
8799IFS=$as_save_IFS
8800
8801  ;;
8802esac
8803fi
8804GZIP=$ac_cv_path_GZIP
8805if test -n "$GZIP"; then
8806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8807$as_echo "$GZIP" >&6; }
8808else
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812
8813
8814  test -n "$GZIP" && break
8815done
8816
8817    else
8818      # If it succeeded, then it was overridden by the user. We will use it
8819      # for the tool.
8820
8821      # First remove it from the list of overridden variables, so we can test
8822      # for unknown variables in the end.
8823      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8824
8825      # Check if we try to supply an empty value
8826      if test "x$GZIP" = x; then
8827        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8828$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8830$as_echo_n "checking for GZIP... " >&6; }
8831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8832$as_echo "disabled" >&6; }
8833      else
8834        # Check if the provided tool contains a complete path.
8835        tool_specified="$GZIP"
8836        tool_basename="${tool_specified##*/}"
8837        if test "x$tool_basename" = "x$tool_specified"; then
8838          # A command without a complete path is provided, search $PATH.
8839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8840$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8841          # Extract the first word of "$tool_basename", so it can be a program name with args.
8842set dummy $tool_basename; ac_word=$2
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8844$as_echo_n "checking for $ac_word... " >&6; }
8845if ${ac_cv_path_GZIP+:} false; then :
8846  $as_echo_n "(cached) " >&6
8847else
8848  case $GZIP in
8849  [\\/]* | ?:[\\/]*)
8850  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8851  ;;
8852  *)
8853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8854for as_dir in $PATH
8855do
8856  IFS=$as_save_IFS
8857  test -z "$as_dir" && as_dir=.
8858    for ac_exec_ext in '' $ac_executable_extensions; do
8859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8860    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8862    break 2
8863  fi
8864done
8865  done
8866IFS=$as_save_IFS
8867
8868  ;;
8869esac
8870fi
8871GZIP=$ac_cv_path_GZIP
8872if test -n "$GZIP"; then
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8874$as_echo "$GZIP" >&6; }
8875else
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8877$as_echo "no" >&6; }
8878fi
8879
8880
8881          if test "x$GZIP" = x; then
8882            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8883          fi
8884        else
8885          # Otherwise we believe it is a complete path. Use it as it is.
8886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8887$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8889$as_echo_n "checking for GZIP... " >&6; }
8890          if test ! -x "$tool_specified"; then
8891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8892$as_echo "not found" >&6; }
8893            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8894          fi
8895          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8896$as_echo "$tool_specified" >&6; }
8897        fi
8898      fi
8899    fi
8900
8901  fi
8902
8903
8904
8905  if test "x$GZIP" = x; then
8906    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8907  fi
8908
8909
8910
8911
8912
8913  # Publish this variable in the help.
8914
8915
8916  if [ -z "${LN+x}" ]; then
8917    # The variable is not set by user, try to locate tool using the code snippet
8918    for ac_prog in ln
8919do
8920  # Extract the first word of "$ac_prog", so it can be a program name with args.
8921set dummy $ac_prog; ac_word=$2
8922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923$as_echo_n "checking for $ac_word... " >&6; }
8924if ${ac_cv_path_LN+:} false; then :
8925  $as_echo_n "(cached) " >&6
8926else
8927  case $LN in
8928  [\\/]* | ?:[\\/]*)
8929  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8930  ;;
8931  *)
8932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933for as_dir in $PATH
8934do
8935  IFS=$as_save_IFS
8936  test -z "$as_dir" && as_dir=.
8937    for ac_exec_ext in '' $ac_executable_extensions; do
8938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941    break 2
8942  fi
8943done
8944  done
8945IFS=$as_save_IFS
8946
8947  ;;
8948esac
8949fi
8950LN=$ac_cv_path_LN
8951if test -n "$LN"; then
8952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8953$as_echo "$LN" >&6; }
8954else
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956$as_echo "no" >&6; }
8957fi
8958
8959
8960  test -n "$LN" && break
8961done
8962
8963  else
8964    # The variable is set, but is it from the command line or the environment?
8965
8966    # Try to remove the string !LN! from our list.
8967    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8968    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8969      # If it failed, the variable was not from the command line. Ignore it,
8970      # but warn the user (except for BASH, which is always set by the calling BASH).
8971      if test "xLN" != xBASH; then
8972        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8973$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8974      fi
8975      # Try to locate tool using the code snippet
8976      for ac_prog in ln
8977do
8978  # Extract the first word of "$ac_prog", so it can be a program name with args.
8979set dummy $ac_prog; ac_word=$2
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8981$as_echo_n "checking for $ac_word... " >&6; }
8982if ${ac_cv_path_LN+:} false; then :
8983  $as_echo_n "(cached) " >&6
8984else
8985  case $LN in
8986  [\\/]* | ?:[\\/]*)
8987  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8988  ;;
8989  *)
8990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993  IFS=$as_save_IFS
8994  test -z "$as_dir" && as_dir=.
8995    for ac_exec_ext in '' $ac_executable_extensions; do
8996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8997    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8999    break 2
9000  fi
9001done
9002  done
9003IFS=$as_save_IFS
9004
9005  ;;
9006esac
9007fi
9008LN=$ac_cv_path_LN
9009if test -n "$LN"; then
9010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9011$as_echo "$LN" >&6; }
9012else
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
9015fi
9016
9017
9018  test -n "$LN" && break
9019done
9020
9021    else
9022      # If it succeeded, then it was overridden by the user. We will use it
9023      # for the tool.
9024
9025      # First remove it from the list of overridden variables, so we can test
9026      # for unknown variables in the end.
9027      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9028
9029      # Check if we try to supply an empty value
9030      if test "x$LN" = x; then
9031        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9032$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9034$as_echo_n "checking for LN... " >&6; }
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9036$as_echo "disabled" >&6; }
9037      else
9038        # Check if the provided tool contains a complete path.
9039        tool_specified="$LN"
9040        tool_basename="${tool_specified##*/}"
9041        if test "x$tool_basename" = "x$tool_specified"; then
9042          # A command without a complete path is provided, search $PATH.
9043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9044$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9045          # Extract the first word of "$tool_basename", so it can be a program name with args.
9046set dummy $tool_basename; ac_word=$2
9047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9048$as_echo_n "checking for $ac_word... " >&6; }
9049if ${ac_cv_path_LN+:} false; then :
9050  $as_echo_n "(cached) " >&6
9051else
9052  case $LN in
9053  [\\/]* | ?:[\\/]*)
9054  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9055  ;;
9056  *)
9057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9058for as_dir in $PATH
9059do
9060  IFS=$as_save_IFS
9061  test -z "$as_dir" && as_dir=.
9062    for ac_exec_ext in '' $ac_executable_extensions; do
9063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9064    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9066    break 2
9067  fi
9068done
9069  done
9070IFS=$as_save_IFS
9071
9072  ;;
9073esac
9074fi
9075LN=$ac_cv_path_LN
9076if test -n "$LN"; then
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9078$as_echo "$LN" >&6; }
9079else
9080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
9082fi
9083
9084
9085          if test "x$LN" = x; then
9086            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9087          fi
9088        else
9089          # Otherwise we believe it is a complete path. Use it as it is.
9090          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9091$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9093$as_echo_n "checking for LN... " >&6; }
9094          if test ! -x "$tool_specified"; then
9095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9096$as_echo "not found" >&6; }
9097            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9098          fi
9099          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9100$as_echo "$tool_specified" >&6; }
9101        fi
9102      fi
9103    fi
9104
9105  fi
9106
9107
9108
9109  if test "x$LN" = x; then
9110    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9111  fi
9112
9113
9114
9115
9116
9117  # Publish this variable in the help.
9118
9119
9120  if [ -z "${LS+x}" ]; then
9121    # The variable is not set by user, try to locate tool using the code snippet
9122    for ac_prog in ls
9123do
9124  # Extract the first word of "$ac_prog", so it can be a program name with args.
9125set dummy $ac_prog; ac_word=$2
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9127$as_echo_n "checking for $ac_word... " >&6; }
9128if ${ac_cv_path_LS+:} false; then :
9129  $as_echo_n "(cached) " >&6
9130else
9131  case $LS in
9132  [\\/]* | ?:[\\/]*)
9133  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9134  ;;
9135  *)
9136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9137for as_dir in $PATH
9138do
9139  IFS=$as_save_IFS
9140  test -z "$as_dir" && as_dir=.
9141    for ac_exec_ext in '' $ac_executable_extensions; do
9142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9143    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9145    break 2
9146  fi
9147done
9148  done
9149IFS=$as_save_IFS
9150
9151  ;;
9152esac
9153fi
9154LS=$ac_cv_path_LS
9155if test -n "$LS"; then
9156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9157$as_echo "$LS" >&6; }
9158else
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160$as_echo "no" >&6; }
9161fi
9162
9163
9164  test -n "$LS" && break
9165done
9166
9167  else
9168    # The variable is set, but is it from the command line or the environment?
9169
9170    # Try to remove the string !LS! from our list.
9171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9173      # If it failed, the variable was not from the command line. Ignore it,
9174      # but warn the user (except for BASH, which is always set by the calling BASH).
9175      if test "xLS" != xBASH; then
9176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9177$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9178      fi
9179      # Try to locate tool using the code snippet
9180      for ac_prog in ls
9181do
9182  # Extract the first word of "$ac_prog", so it can be a program name with args.
9183set dummy $ac_prog; ac_word=$2
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9185$as_echo_n "checking for $ac_word... " >&6; }
9186if ${ac_cv_path_LS+:} false; then :
9187  $as_echo_n "(cached) " >&6
9188else
9189  case $LS in
9190  [\\/]* | ?:[\\/]*)
9191  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9192  ;;
9193  *)
9194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9195for as_dir in $PATH
9196do
9197  IFS=$as_save_IFS
9198  test -z "$as_dir" && as_dir=.
9199    for ac_exec_ext in '' $ac_executable_extensions; do
9200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9201    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9203    break 2
9204  fi
9205done
9206  done
9207IFS=$as_save_IFS
9208
9209  ;;
9210esac
9211fi
9212LS=$ac_cv_path_LS
9213if test -n "$LS"; then
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9215$as_echo "$LS" >&6; }
9216else
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9218$as_echo "no" >&6; }
9219fi
9220
9221
9222  test -n "$LS" && break
9223done
9224
9225    else
9226      # If it succeeded, then it was overridden by the user. We will use it
9227      # for the tool.
9228
9229      # First remove it from the list of overridden variables, so we can test
9230      # for unknown variables in the end.
9231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9232
9233      # Check if we try to supply an empty value
9234      if test "x$LS" = x; then
9235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9236$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9238$as_echo_n "checking for LS... " >&6; }
9239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9240$as_echo "disabled" >&6; }
9241      else
9242        # Check if the provided tool contains a complete path.
9243        tool_specified="$LS"
9244        tool_basename="${tool_specified##*/}"
9245        if test "x$tool_basename" = "x$tool_specified"; then
9246          # A command without a complete path is provided, search $PATH.
9247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9248$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9249          # Extract the first word of "$tool_basename", so it can be a program name with args.
9250set dummy $tool_basename; ac_word=$2
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9252$as_echo_n "checking for $ac_word... " >&6; }
9253if ${ac_cv_path_LS+:} false; then :
9254  $as_echo_n "(cached) " >&6
9255else
9256  case $LS in
9257  [\\/]* | ?:[\\/]*)
9258  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9259  ;;
9260  *)
9261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9262for as_dir in $PATH
9263do
9264  IFS=$as_save_IFS
9265  test -z "$as_dir" && as_dir=.
9266    for ac_exec_ext in '' $ac_executable_extensions; do
9267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9268    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9270    break 2
9271  fi
9272done
9273  done
9274IFS=$as_save_IFS
9275
9276  ;;
9277esac
9278fi
9279LS=$ac_cv_path_LS
9280if test -n "$LS"; then
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9282$as_echo "$LS" >&6; }
9283else
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285$as_echo "no" >&6; }
9286fi
9287
9288
9289          if test "x$LS" = x; then
9290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9291          fi
9292        else
9293          # Otherwise we believe it is a complete path. Use it as it is.
9294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9295$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9297$as_echo_n "checking for LS... " >&6; }
9298          if test ! -x "$tool_specified"; then
9299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9300$as_echo "not found" >&6; }
9301            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9302          fi
9303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9304$as_echo "$tool_specified" >&6; }
9305        fi
9306      fi
9307    fi
9308
9309  fi
9310
9311
9312
9313  if test "x$LS" = x; then
9314    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9315  fi
9316
9317
9318
9319
9320
9321  # Publish this variable in the help.
9322
9323
9324  if [ -z "${MKDIR+x}" ]; then
9325    # The variable is not set by user, try to locate tool using the code snippet
9326    for ac_prog in mkdir
9327do
9328  # Extract the first word of "$ac_prog", so it can be a program name with args.
9329set dummy $ac_prog; ac_word=$2
9330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9331$as_echo_n "checking for $ac_word... " >&6; }
9332if ${ac_cv_path_MKDIR+:} false; then :
9333  $as_echo_n "(cached) " >&6
9334else
9335  case $MKDIR in
9336  [\\/]* | ?:[\\/]*)
9337  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9338  ;;
9339  *)
9340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341for as_dir in $PATH
9342do
9343  IFS=$as_save_IFS
9344  test -z "$as_dir" && as_dir=.
9345    for ac_exec_ext in '' $ac_executable_extensions; do
9346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349    break 2
9350  fi
9351done
9352  done
9353IFS=$as_save_IFS
9354
9355  ;;
9356esac
9357fi
9358MKDIR=$ac_cv_path_MKDIR
9359if test -n "$MKDIR"; then
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9361$as_echo "$MKDIR" >&6; }
9362else
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
9365fi
9366
9367
9368  test -n "$MKDIR" && break
9369done
9370
9371  else
9372    # The variable is set, but is it from the command line or the environment?
9373
9374    # Try to remove the string !MKDIR! from our list.
9375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9377      # If it failed, the variable was not from the command line. Ignore it,
9378      # but warn the user (except for BASH, which is always set by the calling BASH).
9379      if test "xMKDIR" != xBASH; then
9380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9381$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9382      fi
9383      # Try to locate tool using the code snippet
9384      for ac_prog in mkdir
9385do
9386  # Extract the first word of "$ac_prog", so it can be a program name with args.
9387set dummy $ac_prog; ac_word=$2
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9389$as_echo_n "checking for $ac_word... " >&6; }
9390if ${ac_cv_path_MKDIR+:} false; then :
9391  $as_echo_n "(cached) " >&6
9392else
9393  case $MKDIR in
9394  [\\/]* | ?:[\\/]*)
9395  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9396  ;;
9397  *)
9398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9399for as_dir in $PATH
9400do
9401  IFS=$as_save_IFS
9402  test -z "$as_dir" && as_dir=.
9403    for ac_exec_ext in '' $ac_executable_extensions; do
9404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9405    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9407    break 2
9408  fi
9409done
9410  done
9411IFS=$as_save_IFS
9412
9413  ;;
9414esac
9415fi
9416MKDIR=$ac_cv_path_MKDIR
9417if test -n "$MKDIR"; then
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9419$as_echo "$MKDIR" >&6; }
9420else
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
9423fi
9424
9425
9426  test -n "$MKDIR" && break
9427done
9428
9429    else
9430      # If it succeeded, then it was overridden by the user. We will use it
9431      # for the tool.
9432
9433      # First remove it from the list of overridden variables, so we can test
9434      # for unknown variables in the end.
9435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9436
9437      # Check if we try to supply an empty value
9438      if test "x$MKDIR" = x; then
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9440$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9442$as_echo_n "checking for MKDIR... " >&6; }
9443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9444$as_echo "disabled" >&6; }
9445      else
9446        # Check if the provided tool contains a complete path.
9447        tool_specified="$MKDIR"
9448        tool_basename="${tool_specified##*/}"
9449        if test "x$tool_basename" = "x$tool_specified"; then
9450          # A command without a complete path is provided, search $PATH.
9451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9452$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9453          # Extract the first word of "$tool_basename", so it can be a program name with args.
9454set dummy $tool_basename; ac_word=$2
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456$as_echo_n "checking for $ac_word... " >&6; }
9457if ${ac_cv_path_MKDIR+:} false; then :
9458  $as_echo_n "(cached) " >&6
9459else
9460  case $MKDIR in
9461  [\\/]* | ?:[\\/]*)
9462  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9463  ;;
9464  *)
9465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468  IFS=$as_save_IFS
9469  test -z "$as_dir" && as_dir=.
9470    for ac_exec_ext in '' $ac_executable_extensions; do
9471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9472    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474    break 2
9475  fi
9476done
9477  done
9478IFS=$as_save_IFS
9479
9480  ;;
9481esac
9482fi
9483MKDIR=$ac_cv_path_MKDIR
9484if test -n "$MKDIR"; then
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9486$as_echo "$MKDIR" >&6; }
9487else
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
9490fi
9491
9492
9493          if test "x$MKDIR" = x; then
9494            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9495          fi
9496        else
9497          # Otherwise we believe it is a complete path. Use it as it is.
9498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9499$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9501$as_echo_n "checking for MKDIR... " >&6; }
9502          if test ! -x "$tool_specified"; then
9503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9504$as_echo "not found" >&6; }
9505            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9506          fi
9507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9508$as_echo "$tool_specified" >&6; }
9509        fi
9510      fi
9511    fi
9512
9513  fi
9514
9515
9516
9517  if test "x$MKDIR" = x; then
9518    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9519  fi
9520
9521
9522
9523
9524
9525  # Publish this variable in the help.
9526
9527
9528  if [ -z "${MKTEMP+x}" ]; then
9529    # The variable is not set by user, try to locate tool using the code snippet
9530    for ac_prog in mktemp
9531do
9532  # Extract the first word of "$ac_prog", so it can be a program name with args.
9533set dummy $ac_prog; ac_word=$2
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9535$as_echo_n "checking for $ac_word... " >&6; }
9536if ${ac_cv_path_MKTEMP+:} false; then :
9537  $as_echo_n "(cached) " >&6
9538else
9539  case $MKTEMP in
9540  [\\/]* | ?:[\\/]*)
9541  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9542  ;;
9543  *)
9544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9545for as_dir in $PATH
9546do
9547  IFS=$as_save_IFS
9548  test -z "$as_dir" && as_dir=.
9549    for ac_exec_ext in '' $ac_executable_extensions; do
9550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9551    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9553    break 2
9554  fi
9555done
9556  done
9557IFS=$as_save_IFS
9558
9559  ;;
9560esac
9561fi
9562MKTEMP=$ac_cv_path_MKTEMP
9563if test -n "$MKTEMP"; then
9564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9565$as_echo "$MKTEMP" >&6; }
9566else
9567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568$as_echo "no" >&6; }
9569fi
9570
9571
9572  test -n "$MKTEMP" && break
9573done
9574
9575  else
9576    # The variable is set, but is it from the command line or the environment?
9577
9578    # Try to remove the string !MKTEMP! from our list.
9579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9581      # If it failed, the variable was not from the command line. Ignore it,
9582      # but warn the user (except for BASH, which is always set by the calling BASH).
9583      if test "xMKTEMP" != xBASH; then
9584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9585$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9586      fi
9587      # Try to locate tool using the code snippet
9588      for ac_prog in mktemp
9589do
9590  # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if ${ac_cv_path_MKTEMP+:} false; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $MKTEMP in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9609    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620MKTEMP=$ac_cv_path_MKTEMP
9621if test -n "$MKTEMP"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9623$as_echo "$MKTEMP" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630  test -n "$MKTEMP" && break
9631done
9632
9633    else
9634      # If it succeeded, then it was overridden by the user. We will use it
9635      # for the tool.
9636
9637      # First remove it from the list of overridden variables, so we can test
9638      # for unknown variables in the end.
9639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9640
9641      # Check if we try to supply an empty value
9642      if test "x$MKTEMP" = x; then
9643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9644$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9646$as_echo_n "checking for MKTEMP... " >&6; }
9647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9648$as_echo "disabled" >&6; }
9649      else
9650        # Check if the provided tool contains a complete path.
9651        tool_specified="$MKTEMP"
9652        tool_basename="${tool_specified##*/}"
9653        if test "x$tool_basename" = "x$tool_specified"; then
9654          # A command without a complete path is provided, search $PATH.
9655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9656$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9657          # Extract the first word of "$tool_basename", so it can be a program name with args.
9658set dummy $tool_basename; ac_word=$2
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9660$as_echo_n "checking for $ac_word... " >&6; }
9661if ${ac_cv_path_MKTEMP+:} false; then :
9662  $as_echo_n "(cached) " >&6
9663else
9664  case $MKTEMP in
9665  [\\/]* | ?:[\\/]*)
9666  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9667  ;;
9668  *)
9669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9670for as_dir in $PATH
9671do
9672  IFS=$as_save_IFS
9673  test -z "$as_dir" && as_dir=.
9674    for ac_exec_ext in '' $ac_executable_extensions; do
9675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9676    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9678    break 2
9679  fi
9680done
9681  done
9682IFS=$as_save_IFS
9683
9684  ;;
9685esac
9686fi
9687MKTEMP=$ac_cv_path_MKTEMP
9688if test -n "$MKTEMP"; then
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9690$as_echo "$MKTEMP" >&6; }
9691else
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694fi
9695
9696
9697          if test "x$MKTEMP" = x; then
9698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9699          fi
9700        else
9701          # Otherwise we believe it is a complete path. Use it as it is.
9702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9703$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9705$as_echo_n "checking for MKTEMP... " >&6; }
9706          if test ! -x "$tool_specified"; then
9707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9708$as_echo "not found" >&6; }
9709            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9710          fi
9711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9712$as_echo "$tool_specified" >&6; }
9713        fi
9714      fi
9715    fi
9716
9717  fi
9718
9719
9720
9721  if test "x$MKTEMP" = x; then
9722    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9723  fi
9724
9725
9726
9727
9728
9729  # Publish this variable in the help.
9730
9731
9732  if [ -z "${MV+x}" ]; then
9733    # The variable is not set by user, try to locate tool using the code snippet
9734    for ac_prog in mv
9735do
9736  # Extract the first word of "$ac_prog", so it can be a program name with args.
9737set dummy $ac_prog; ac_word=$2
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9739$as_echo_n "checking for $ac_word... " >&6; }
9740if ${ac_cv_path_MV+:} false; then :
9741  $as_echo_n "(cached) " >&6
9742else
9743  case $MV in
9744  [\\/]* | ?:[\\/]*)
9745  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9746  ;;
9747  *)
9748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9749for as_dir in $PATH
9750do
9751  IFS=$as_save_IFS
9752  test -z "$as_dir" && as_dir=.
9753    for ac_exec_ext in '' $ac_executable_extensions; do
9754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9755    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9757    break 2
9758  fi
9759done
9760  done
9761IFS=$as_save_IFS
9762
9763  ;;
9764esac
9765fi
9766MV=$ac_cv_path_MV
9767if test -n "$MV"; then
9768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9769$as_echo "$MV" >&6; }
9770else
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
9773fi
9774
9775
9776  test -n "$MV" && break
9777done
9778
9779  else
9780    # The variable is set, but is it from the command line or the environment?
9781
9782    # Try to remove the string !MV! from our list.
9783    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9784    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9785      # If it failed, the variable was not from the command line. Ignore it,
9786      # but warn the user (except for BASH, which is always set by the calling BASH).
9787      if test "xMV" != xBASH; then
9788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9789$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9790      fi
9791      # Try to locate tool using the code snippet
9792      for ac_prog in mv
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_MV+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $MV in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824MV=$ac_cv_path_MV
9825if test -n "$MV"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9827$as_echo "$MV" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$MV" && break
9835done
9836
9837    else
9838      # If it succeeded, then it was overridden by the user. We will use it
9839      # for the tool.
9840
9841      # First remove it from the list of overridden variables, so we can test
9842      # for unknown variables in the end.
9843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9844
9845      # Check if we try to supply an empty value
9846      if test "x$MV" = x; then
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9848$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9850$as_echo_n "checking for MV... " >&6; }
9851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9852$as_echo "disabled" >&6; }
9853      else
9854        # Check if the provided tool contains a complete path.
9855        tool_specified="$MV"
9856        tool_basename="${tool_specified##*/}"
9857        if test "x$tool_basename" = "x$tool_specified"; then
9858          # A command without a complete path is provided, search $PATH.
9859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9860$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9861          # Extract the first word of "$tool_basename", so it can be a program name with args.
9862set dummy $tool_basename; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if ${ac_cv_path_MV+:} false; then :
9866  $as_echo_n "(cached) " >&6
9867else
9868  case $MV in
9869  [\\/]* | ?:[\\/]*)
9870  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9871  ;;
9872  *)
9873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874for as_dir in $PATH
9875do
9876  IFS=$as_save_IFS
9877  test -z "$as_dir" && as_dir=.
9878    for ac_exec_ext in '' $ac_executable_extensions; do
9879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882    break 2
9883  fi
9884done
9885  done
9886IFS=$as_save_IFS
9887
9888  ;;
9889esac
9890fi
9891MV=$ac_cv_path_MV
9892if test -n "$MV"; then
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9894$as_echo "$MV" >&6; }
9895else
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898fi
9899
9900
9901          if test "x$MV" = x; then
9902            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9903          fi
9904        else
9905          # Otherwise we believe it is a complete path. Use it as it is.
9906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9907$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9909$as_echo_n "checking for MV... " >&6; }
9910          if test ! -x "$tool_specified"; then
9911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9912$as_echo "not found" >&6; }
9913            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9914          fi
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9916$as_echo "$tool_specified" >&6; }
9917        fi
9918      fi
9919    fi
9920
9921  fi
9922
9923
9924
9925  if test "x$MV" = x; then
9926    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9927  fi
9928
9929
9930
9931
9932
9933  # Publish this variable in the help.
9934
9935
9936  if [ -z "${NAWK+x}" ]; then
9937    # The variable is not set by user, try to locate tool using the code snippet
9938    for ac_prog in nawk gawk awk
9939do
9940  # Extract the first word of "$ac_prog", so it can be a program name with args.
9941set dummy $ac_prog; ac_word=$2
9942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9943$as_echo_n "checking for $ac_word... " >&6; }
9944if ${ac_cv_path_NAWK+:} false; then :
9945  $as_echo_n "(cached) " >&6
9946else
9947  case $NAWK in
9948  [\\/]* | ?:[\\/]*)
9949  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9950  ;;
9951  *)
9952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9953for as_dir in $PATH
9954do
9955  IFS=$as_save_IFS
9956  test -z "$as_dir" && as_dir=.
9957    for ac_exec_ext in '' $ac_executable_extensions; do
9958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9959    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9961    break 2
9962  fi
9963done
9964  done
9965IFS=$as_save_IFS
9966
9967  ;;
9968esac
9969fi
9970NAWK=$ac_cv_path_NAWK
9971if test -n "$NAWK"; then
9972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9973$as_echo "$NAWK" >&6; }
9974else
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9976$as_echo "no" >&6; }
9977fi
9978
9979
9980  test -n "$NAWK" && break
9981done
9982
9983  else
9984    # The variable is set, but is it from the command line or the environment?
9985
9986    # Try to remove the string !NAWK! from our list.
9987    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9988    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9989      # If it failed, the variable was not from the command line. Ignore it,
9990      # but warn the user (except for BASH, which is always set by the calling BASH).
9991      if test "xNAWK" != xBASH; then
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9993$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9994      fi
9995      # Try to locate tool using the code snippet
9996      for ac_prog in nawk gawk awk
9997do
9998  # Extract the first word of "$ac_prog", so it can be a program name with args.
9999set dummy $ac_prog; ac_word=$2
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10001$as_echo_n "checking for $ac_word... " >&6; }
10002if ${ac_cv_path_NAWK+:} false; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005  case $NAWK in
10006  [\\/]* | ?:[\\/]*)
10007  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10008  ;;
10009  *)
10010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011for as_dir in $PATH
10012do
10013  IFS=$as_save_IFS
10014  test -z "$as_dir" && as_dir=.
10015    for ac_exec_ext in '' $ac_executable_extensions; do
10016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10017    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019    break 2
10020  fi
10021done
10022  done
10023IFS=$as_save_IFS
10024
10025  ;;
10026esac
10027fi
10028NAWK=$ac_cv_path_NAWK
10029if test -n "$NAWK"; then
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10031$as_echo "$NAWK" >&6; }
10032else
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035fi
10036
10037
10038  test -n "$NAWK" && break
10039done
10040
10041    else
10042      # If it succeeded, then it was overridden by the user. We will use it
10043      # for the tool.
10044
10045      # First remove it from the list of overridden variables, so we can test
10046      # for unknown variables in the end.
10047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10048
10049      # Check if we try to supply an empty value
10050      if test "x$NAWK" = x; then
10051        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10052$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10054$as_echo_n "checking for NAWK... " >&6; }
10055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10056$as_echo "disabled" >&6; }
10057      else
10058        # Check if the provided tool contains a complete path.
10059        tool_specified="$NAWK"
10060        tool_basename="${tool_specified##*/}"
10061        if test "x$tool_basename" = "x$tool_specified"; then
10062          # A command without a complete path is provided, search $PATH.
10063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10064$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10065          # Extract the first word of "$tool_basename", so it can be a program name with args.
10066set dummy $tool_basename; ac_word=$2
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10068$as_echo_n "checking for $ac_word... " >&6; }
10069if ${ac_cv_path_NAWK+:} false; then :
10070  $as_echo_n "(cached) " >&6
10071else
10072  case $NAWK in
10073  [\\/]* | ?:[\\/]*)
10074  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10075  ;;
10076  *)
10077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10078for as_dir in $PATH
10079do
10080  IFS=$as_save_IFS
10081  test -z "$as_dir" && as_dir=.
10082    for ac_exec_ext in '' $ac_executable_extensions; do
10083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10084    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10086    break 2
10087  fi
10088done
10089  done
10090IFS=$as_save_IFS
10091
10092  ;;
10093esac
10094fi
10095NAWK=$ac_cv_path_NAWK
10096if test -n "$NAWK"; then
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10098$as_echo "$NAWK" >&6; }
10099else
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104
10105          if test "x$NAWK" = x; then
10106            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10107          fi
10108        else
10109          # Otherwise we believe it is a complete path. Use it as it is.
10110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10111$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10113$as_echo_n "checking for NAWK... " >&6; }
10114          if test ! -x "$tool_specified"; then
10115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10116$as_echo "not found" >&6; }
10117            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10118          fi
10119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10120$as_echo "$tool_specified" >&6; }
10121        fi
10122      fi
10123    fi
10124
10125  fi
10126
10127
10128
10129  if test "x$NAWK" = x; then
10130    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10131  fi
10132
10133
10134
10135
10136
10137  # Publish this variable in the help.
10138
10139
10140  if [ -z "${PRINTF+x}" ]; then
10141    # The variable is not set by user, try to locate tool using the code snippet
10142    for ac_prog in printf
10143do
10144  # Extract the first word of "$ac_prog", so it can be a program name with args.
10145set dummy $ac_prog; ac_word=$2
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147$as_echo_n "checking for $ac_word... " >&6; }
10148if ${ac_cv_path_PRINTF+:} false; then :
10149  $as_echo_n "(cached) " >&6
10150else
10151  case $PRINTF in
10152  [\\/]* | ?:[\\/]*)
10153  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10154  ;;
10155  *)
10156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157for as_dir in $PATH
10158do
10159  IFS=$as_save_IFS
10160  test -z "$as_dir" && as_dir=.
10161    for ac_exec_ext in '' $ac_executable_extensions; do
10162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165    break 2
10166  fi
10167done
10168  done
10169IFS=$as_save_IFS
10170
10171  ;;
10172esac
10173fi
10174PRINTF=$ac_cv_path_PRINTF
10175if test -n "$PRINTF"; then
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10177$as_echo "$PRINTF" >&6; }
10178else
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
10181fi
10182
10183
10184  test -n "$PRINTF" && break
10185done
10186
10187  else
10188    # The variable is set, but is it from the command line or the environment?
10189
10190    # Try to remove the string !PRINTF! from our list.
10191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10193      # If it failed, the variable was not from the command line. Ignore it,
10194      # but warn the user (except for BASH, which is always set by the calling BASH).
10195      if test "xPRINTF" != xBASH; then
10196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10197$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10198      fi
10199      # Try to locate tool using the code snippet
10200      for ac_prog in printf
10201do
10202  # Extract the first word of "$ac_prog", so it can be a program name with args.
10203set dummy $ac_prog; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_PRINTF+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $PRINTF in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232PRINTF=$ac_cv_path_PRINTF
10233if test -n "$PRINTF"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10235$as_echo "$PRINTF" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242  test -n "$PRINTF" && break
10243done
10244
10245    else
10246      # If it succeeded, then it was overridden by the user. We will use it
10247      # for the tool.
10248
10249      # First remove it from the list of overridden variables, so we can test
10250      # for unknown variables in the end.
10251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10252
10253      # Check if we try to supply an empty value
10254      if test "x$PRINTF" = x; then
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10256$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10258$as_echo_n "checking for PRINTF... " >&6; }
10259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10260$as_echo "disabled" >&6; }
10261      else
10262        # Check if the provided tool contains a complete path.
10263        tool_specified="$PRINTF"
10264        tool_basename="${tool_specified##*/}"
10265        if test "x$tool_basename" = "x$tool_specified"; then
10266          # A command without a complete path is provided, search $PATH.
10267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10268$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10269          # Extract the first word of "$tool_basename", so it can be a program name with args.
10270set dummy $tool_basename; ac_word=$2
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10272$as_echo_n "checking for $ac_word... " >&6; }
10273if ${ac_cv_path_PRINTF+:} false; then :
10274  $as_echo_n "(cached) " >&6
10275else
10276  case $PRINTF in
10277  [\\/]* | ?:[\\/]*)
10278  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10279  ;;
10280  *)
10281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282for as_dir in $PATH
10283do
10284  IFS=$as_save_IFS
10285  test -z "$as_dir" && as_dir=.
10286    for ac_exec_ext in '' $ac_executable_extensions; do
10287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10288    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10290    break 2
10291  fi
10292done
10293  done
10294IFS=$as_save_IFS
10295
10296  ;;
10297esac
10298fi
10299PRINTF=$ac_cv_path_PRINTF
10300if test -n "$PRINTF"; then
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10302$as_echo "$PRINTF" >&6; }
10303else
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
10306fi
10307
10308
10309          if test "x$PRINTF" = x; then
10310            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10311          fi
10312        else
10313          # Otherwise we believe it is a complete path. Use it as it is.
10314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10315$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10317$as_echo_n "checking for PRINTF... " >&6; }
10318          if test ! -x "$tool_specified"; then
10319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10320$as_echo "not found" >&6; }
10321            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10322          fi
10323          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10324$as_echo "$tool_specified" >&6; }
10325        fi
10326      fi
10327    fi
10328
10329  fi
10330
10331
10332
10333  if test "x$PRINTF" = x; then
10334    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10335  fi
10336
10337
10338
10339
10340
10341  # Publish this variable in the help.
10342
10343
10344  if [ -z "${RM+x}" ]; then
10345    # The variable is not set by user, try to locate tool using the code snippet
10346    for ac_prog in rm
10347do
10348  # Extract the first word of "$ac_prog", so it can be a program name with args.
10349set dummy $ac_prog; ac_word=$2
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351$as_echo_n "checking for $ac_word... " >&6; }
10352if ${ac_cv_path_RM+:} false; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355  case $RM in
10356  [\\/]* | ?:[\\/]*)
10357  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10358  ;;
10359  *)
10360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361for as_dir in $PATH
10362do
10363  IFS=$as_save_IFS
10364  test -z "$as_dir" && as_dir=.
10365    for ac_exec_ext in '' $ac_executable_extensions; do
10366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10367    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369    break 2
10370  fi
10371done
10372  done
10373IFS=$as_save_IFS
10374
10375  ;;
10376esac
10377fi
10378RM=$ac_cv_path_RM
10379if test -n "$RM"; then
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10381$as_echo "$RM" >&6; }
10382else
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
10385fi
10386
10387
10388  test -n "$RM" && break
10389done
10390
10391  else
10392    # The variable is set, but is it from the command line or the environment?
10393
10394    # Try to remove the string !RM! from our list.
10395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10397      # If it failed, the variable was not from the command line. Ignore it,
10398      # but warn the user (except for BASH, which is always set by the calling BASH).
10399      if test "xRM" != xBASH; then
10400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10401$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10402      fi
10403      # Try to locate tool using the code snippet
10404      for ac_prog in rm
10405do
10406  # Extract the first word of "$ac_prog", so it can be a program name with args.
10407set dummy $ac_prog; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_RM+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $RM in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436RM=$ac_cv_path_RM
10437if test -n "$RM"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10439$as_echo "$RM" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446  test -n "$RM" && break
10447done
10448
10449    else
10450      # If it succeeded, then it was overridden by the user. We will use it
10451      # for the tool.
10452
10453      # First remove it from the list of overridden variables, so we can test
10454      # for unknown variables in the end.
10455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10456
10457      # Check if we try to supply an empty value
10458      if test "x$RM" = x; then
10459        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10460$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10462$as_echo_n "checking for RM... " >&6; }
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10464$as_echo "disabled" >&6; }
10465      else
10466        # Check if the provided tool contains a complete path.
10467        tool_specified="$RM"
10468        tool_basename="${tool_specified##*/}"
10469        if test "x$tool_basename" = "x$tool_specified"; then
10470          # A command without a complete path is provided, search $PATH.
10471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10472$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10473          # Extract the first word of "$tool_basename", so it can be a program name with args.
10474set dummy $tool_basename; ac_word=$2
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10476$as_echo_n "checking for $ac_word... " >&6; }
10477if ${ac_cv_path_RM+:} false; then :
10478  $as_echo_n "(cached) " >&6
10479else
10480  case $RM in
10481  [\\/]* | ?:[\\/]*)
10482  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10483  ;;
10484  *)
10485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486for as_dir in $PATH
10487do
10488  IFS=$as_save_IFS
10489  test -z "$as_dir" && as_dir=.
10490    for ac_exec_ext in '' $ac_executable_extensions; do
10491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10492    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10494    break 2
10495  fi
10496done
10497  done
10498IFS=$as_save_IFS
10499
10500  ;;
10501esac
10502fi
10503RM=$ac_cv_path_RM
10504if test -n "$RM"; then
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10506$as_echo "$RM" >&6; }
10507else
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
10510fi
10511
10512
10513          if test "x$RM" = x; then
10514            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10515          fi
10516        else
10517          # Otherwise we believe it is a complete path. Use it as it is.
10518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10519$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10521$as_echo_n "checking for RM... " >&6; }
10522          if test ! -x "$tool_specified"; then
10523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10524$as_echo "not found" >&6; }
10525            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10526          fi
10527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10528$as_echo "$tool_specified" >&6; }
10529        fi
10530      fi
10531    fi
10532
10533  fi
10534
10535
10536
10537  if test "x$RM" = x; then
10538    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10539  fi
10540
10541
10542
10543
10544
10545  # Publish this variable in the help.
10546
10547
10548  if [ -z "${RMDIR+x}" ]; then
10549    # The variable is not set by user, try to locate tool using the code snippet
10550    for ac_prog in rmdir
10551do
10552  # Extract the first word of "$ac_prog", so it can be a program name with args.
10553set dummy $ac_prog; ac_word=$2
10554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10555$as_echo_n "checking for $ac_word... " >&6; }
10556if ${ac_cv_path_RMDIR+:} false; then :
10557  $as_echo_n "(cached) " >&6
10558else
10559  case $RMDIR in
10560  [\\/]* | ?:[\\/]*)
10561  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10562  ;;
10563  *)
10564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10565for as_dir in $PATH
10566do
10567  IFS=$as_save_IFS
10568  test -z "$as_dir" && as_dir=.
10569    for ac_exec_ext in '' $ac_executable_extensions; do
10570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10571    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10573    break 2
10574  fi
10575done
10576  done
10577IFS=$as_save_IFS
10578
10579  ;;
10580esac
10581fi
10582RMDIR=$ac_cv_path_RMDIR
10583if test -n "$RMDIR"; then
10584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10585$as_echo "$RMDIR" >&6; }
10586else
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10588$as_echo "no" >&6; }
10589fi
10590
10591
10592  test -n "$RMDIR" && break
10593done
10594
10595  else
10596    # The variable is set, but is it from the command line or the environment?
10597
10598    # Try to remove the string !RMDIR! from our list.
10599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10601      # If it failed, the variable was not from the command line. Ignore it,
10602      # but warn the user (except for BASH, which is always set by the calling BASH).
10603      if test "xRMDIR" != xBASH; then
10604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10605$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10606      fi
10607      # Try to locate tool using the code snippet
10608      for ac_prog in rmdir
10609do
10610  # Extract the first word of "$ac_prog", so it can be a program name with args.
10611set dummy $ac_prog; ac_word=$2
10612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10613$as_echo_n "checking for $ac_word... " >&6; }
10614if ${ac_cv_path_RMDIR+:} false; then :
10615  $as_echo_n "(cached) " >&6
10616else
10617  case $RMDIR in
10618  [\\/]* | ?:[\\/]*)
10619  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10620  ;;
10621  *)
10622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10623for as_dir in $PATH
10624do
10625  IFS=$as_save_IFS
10626  test -z "$as_dir" && as_dir=.
10627    for ac_exec_ext in '' $ac_executable_extensions; do
10628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10629    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10631    break 2
10632  fi
10633done
10634  done
10635IFS=$as_save_IFS
10636
10637  ;;
10638esac
10639fi
10640RMDIR=$ac_cv_path_RMDIR
10641if test -n "$RMDIR"; then
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10643$as_echo "$RMDIR" >&6; }
10644else
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646$as_echo "no" >&6; }
10647fi
10648
10649
10650  test -n "$RMDIR" && break
10651done
10652
10653    else
10654      # If it succeeded, then it was overridden by the user. We will use it
10655      # for the tool.
10656
10657      # First remove it from the list of overridden variables, so we can test
10658      # for unknown variables in the end.
10659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10660
10661      # Check if we try to supply an empty value
10662      if test "x$RMDIR" = x; then
10663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10664$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10666$as_echo_n "checking for RMDIR... " >&6; }
10667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10668$as_echo "disabled" >&6; }
10669      else
10670        # Check if the provided tool contains a complete path.
10671        tool_specified="$RMDIR"
10672        tool_basename="${tool_specified##*/}"
10673        if test "x$tool_basename" = "x$tool_specified"; then
10674          # A command without a complete path is provided, search $PATH.
10675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10676$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10677          # Extract the first word of "$tool_basename", so it can be a program name with args.
10678set dummy $tool_basename; ac_word=$2
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10680$as_echo_n "checking for $ac_word... " >&6; }
10681if ${ac_cv_path_RMDIR+:} false; then :
10682  $as_echo_n "(cached) " >&6
10683else
10684  case $RMDIR in
10685  [\\/]* | ?:[\\/]*)
10686  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10687  ;;
10688  *)
10689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10690for as_dir in $PATH
10691do
10692  IFS=$as_save_IFS
10693  test -z "$as_dir" && as_dir=.
10694    for ac_exec_ext in '' $ac_executable_extensions; do
10695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10696    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10698    break 2
10699  fi
10700done
10701  done
10702IFS=$as_save_IFS
10703
10704  ;;
10705esac
10706fi
10707RMDIR=$ac_cv_path_RMDIR
10708if test -n "$RMDIR"; then
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10710$as_echo "$RMDIR" >&6; }
10711else
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714fi
10715
10716
10717          if test "x$RMDIR" = x; then
10718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10719          fi
10720        else
10721          # Otherwise we believe it is a complete path. Use it as it is.
10722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10723$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10725$as_echo_n "checking for RMDIR... " >&6; }
10726          if test ! -x "$tool_specified"; then
10727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10728$as_echo "not found" >&6; }
10729            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10730          fi
10731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10732$as_echo "$tool_specified" >&6; }
10733        fi
10734      fi
10735    fi
10736
10737  fi
10738
10739
10740
10741  if test "x$RMDIR" = x; then
10742    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10743  fi
10744
10745
10746
10747
10748
10749  # Publish this variable in the help.
10750
10751
10752  if [ -z "${SH+x}" ]; then
10753    # The variable is not set by user, try to locate tool using the code snippet
10754    for ac_prog in sh
10755do
10756  # Extract the first word of "$ac_prog", so it can be a program name with args.
10757set dummy $ac_prog; ac_word=$2
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10759$as_echo_n "checking for $ac_word... " >&6; }
10760if ${ac_cv_path_SH+:} false; then :
10761  $as_echo_n "(cached) " >&6
10762else
10763  case $SH in
10764  [\\/]* | ?:[\\/]*)
10765  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10766  ;;
10767  *)
10768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10769for as_dir in $PATH
10770do
10771  IFS=$as_save_IFS
10772  test -z "$as_dir" && as_dir=.
10773    for ac_exec_ext in '' $ac_executable_extensions; do
10774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10775    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10777    break 2
10778  fi
10779done
10780  done
10781IFS=$as_save_IFS
10782
10783  ;;
10784esac
10785fi
10786SH=$ac_cv_path_SH
10787if test -n "$SH"; then
10788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10789$as_echo "$SH" >&6; }
10790else
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
10793fi
10794
10795
10796  test -n "$SH" && break
10797done
10798
10799  else
10800    # The variable is set, but is it from the command line or the environment?
10801
10802    # Try to remove the string !SH! from our list.
10803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10805      # If it failed, the variable was not from the command line. Ignore it,
10806      # but warn the user (except for BASH, which is always set by the calling BASH).
10807      if test "xSH" != xBASH; then
10808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10809$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10810      fi
10811      # Try to locate tool using the code snippet
10812      for ac_prog in sh
10813do
10814  # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
10818if ${ac_cv_path_SH+:} false; then :
10819  $as_echo_n "(cached) " >&6
10820else
10821  case $SH in
10822  [\\/]* | ?:[\\/]*)
10823  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10824  ;;
10825  *)
10826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10827for as_dir in $PATH
10828do
10829  IFS=$as_save_IFS
10830  test -z "$as_dir" && as_dir=.
10831    for ac_exec_ext in '' $ac_executable_extensions; do
10832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10833    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10835    break 2
10836  fi
10837done
10838  done
10839IFS=$as_save_IFS
10840
10841  ;;
10842esac
10843fi
10844SH=$ac_cv_path_SH
10845if test -n "$SH"; then
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10847$as_echo "$SH" >&6; }
10848else
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10850$as_echo "no" >&6; }
10851fi
10852
10853
10854  test -n "$SH" && break
10855done
10856
10857    else
10858      # If it succeeded, then it was overridden by the user. We will use it
10859      # for the tool.
10860
10861      # First remove it from the list of overridden variables, so we can test
10862      # for unknown variables in the end.
10863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10864
10865      # Check if we try to supply an empty value
10866      if test "x$SH" = x; then
10867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10868$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10870$as_echo_n "checking for SH... " >&6; }
10871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10872$as_echo "disabled" >&6; }
10873      else
10874        # Check if the provided tool contains a complete path.
10875        tool_specified="$SH"
10876        tool_basename="${tool_specified##*/}"
10877        if test "x$tool_basename" = "x$tool_specified"; then
10878          # A command without a complete path is provided, search $PATH.
10879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10880$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10881          # Extract the first word of "$tool_basename", so it can be a program name with args.
10882set dummy $tool_basename; ac_word=$2
10883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10884$as_echo_n "checking for $ac_word... " >&6; }
10885if ${ac_cv_path_SH+:} false; then :
10886  $as_echo_n "(cached) " >&6
10887else
10888  case $SH in
10889  [\\/]* | ?:[\\/]*)
10890  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10891  ;;
10892  *)
10893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10894for as_dir in $PATH
10895do
10896  IFS=$as_save_IFS
10897  test -z "$as_dir" && as_dir=.
10898    for ac_exec_ext in '' $ac_executable_extensions; do
10899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10900    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10902    break 2
10903  fi
10904done
10905  done
10906IFS=$as_save_IFS
10907
10908  ;;
10909esac
10910fi
10911SH=$ac_cv_path_SH
10912if test -n "$SH"; then
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10914$as_echo "$SH" >&6; }
10915else
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918fi
10919
10920
10921          if test "x$SH" = x; then
10922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10923          fi
10924        else
10925          # Otherwise we believe it is a complete path. Use it as it is.
10926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10927$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10929$as_echo_n "checking for SH... " >&6; }
10930          if test ! -x "$tool_specified"; then
10931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10932$as_echo "not found" >&6; }
10933            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10934          fi
10935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10936$as_echo "$tool_specified" >&6; }
10937        fi
10938      fi
10939    fi
10940
10941  fi
10942
10943
10944
10945  if test "x$SH" = x; then
10946    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10947  fi
10948
10949
10950
10951
10952
10953  # Publish this variable in the help.
10954
10955
10956  if [ -z "${SORT+x}" ]; then
10957    # The variable is not set by user, try to locate tool using the code snippet
10958    for ac_prog in sort
10959do
10960  # Extract the first word of "$ac_prog", so it can be a program name with args.
10961set dummy $ac_prog; ac_word=$2
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10963$as_echo_n "checking for $ac_word... " >&6; }
10964if ${ac_cv_path_SORT+:} false; then :
10965  $as_echo_n "(cached) " >&6
10966else
10967  case $SORT in
10968  [\\/]* | ?:[\\/]*)
10969  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10970  ;;
10971  *)
10972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10973for as_dir in $PATH
10974do
10975  IFS=$as_save_IFS
10976  test -z "$as_dir" && as_dir=.
10977    for ac_exec_ext in '' $ac_executable_extensions; do
10978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10979    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10981    break 2
10982  fi
10983done
10984  done
10985IFS=$as_save_IFS
10986
10987  ;;
10988esac
10989fi
10990SORT=$ac_cv_path_SORT
10991if test -n "$SORT"; then
10992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10993$as_echo "$SORT" >&6; }
10994else
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
10997fi
10998
10999
11000  test -n "$SORT" && break
11001done
11002
11003  else
11004    # The variable is set, but is it from the command line or the environment?
11005
11006    # Try to remove the string !SORT! from our list.
11007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11009      # If it failed, the variable was not from the command line. Ignore it,
11010      # but warn the user (except for BASH, which is always set by the calling BASH).
11011      if test "xSORT" != xBASH; then
11012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11013$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11014      fi
11015      # Try to locate tool using the code snippet
11016      for ac_prog in sort
11017do
11018  # Extract the first word of "$ac_prog", so it can be a program name with args.
11019set dummy $ac_prog; ac_word=$2
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021$as_echo_n "checking for $ac_word... " >&6; }
11022if ${ac_cv_path_SORT+:} false; then :
11023  $as_echo_n "(cached) " >&6
11024else
11025  case $SORT in
11026  [\\/]* | ?:[\\/]*)
11027  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11028  ;;
11029  *)
11030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033  IFS=$as_save_IFS
11034  test -z "$as_dir" && as_dir=.
11035    for ac_exec_ext in '' $ac_executable_extensions; do
11036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039    break 2
11040  fi
11041done
11042  done
11043IFS=$as_save_IFS
11044
11045  ;;
11046esac
11047fi
11048SORT=$ac_cv_path_SORT
11049if test -n "$SORT"; then
11050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11051$as_echo "$SORT" >&6; }
11052else
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
11055fi
11056
11057
11058  test -n "$SORT" && break
11059done
11060
11061    else
11062      # If it succeeded, then it was overridden by the user. We will use it
11063      # for the tool.
11064
11065      # First remove it from the list of overridden variables, so we can test
11066      # for unknown variables in the end.
11067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11068
11069      # Check if we try to supply an empty value
11070      if test "x$SORT" = x; then
11071        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11072$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11074$as_echo_n "checking for SORT... " >&6; }
11075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11076$as_echo "disabled" >&6; }
11077      else
11078        # Check if the provided tool contains a complete path.
11079        tool_specified="$SORT"
11080        tool_basename="${tool_specified##*/}"
11081        if test "x$tool_basename" = "x$tool_specified"; then
11082          # A command without a complete path is provided, search $PATH.
11083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11084$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11085          # Extract the first word of "$tool_basename", so it can be a program name with args.
11086set dummy $tool_basename; ac_word=$2
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11088$as_echo_n "checking for $ac_word... " >&6; }
11089if ${ac_cv_path_SORT+:} false; then :
11090  $as_echo_n "(cached) " >&6
11091else
11092  case $SORT in
11093  [\\/]* | ?:[\\/]*)
11094  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11095  ;;
11096  *)
11097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100  IFS=$as_save_IFS
11101  test -z "$as_dir" && as_dir=.
11102    for ac_exec_ext in '' $ac_executable_extensions; do
11103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11104    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11106    break 2
11107  fi
11108done
11109  done
11110IFS=$as_save_IFS
11111
11112  ;;
11113esac
11114fi
11115SORT=$ac_cv_path_SORT
11116if test -n "$SORT"; then
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11118$as_echo "$SORT" >&6; }
11119else
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
11122fi
11123
11124
11125          if test "x$SORT" = x; then
11126            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11127          fi
11128        else
11129          # Otherwise we believe it is a complete path. Use it as it is.
11130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11131$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11133$as_echo_n "checking for SORT... " >&6; }
11134          if test ! -x "$tool_specified"; then
11135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11136$as_echo "not found" >&6; }
11137            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11138          fi
11139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11140$as_echo "$tool_specified" >&6; }
11141        fi
11142      fi
11143    fi
11144
11145  fi
11146
11147
11148
11149  if test "x$SORT" = x; then
11150    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11151  fi
11152
11153
11154
11155
11156
11157  # Publish this variable in the help.
11158
11159
11160  if [ -z "${TAIL+x}" ]; then
11161    # The variable is not set by user, try to locate tool using the code snippet
11162    for ac_prog in tail
11163do
11164  # Extract the first word of "$ac_prog", so it can be a program name with args.
11165set dummy $ac_prog; ac_word=$2
11166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11167$as_echo_n "checking for $ac_word... " >&6; }
11168if ${ac_cv_path_TAIL+:} false; then :
11169  $as_echo_n "(cached) " >&6
11170else
11171  case $TAIL in
11172  [\\/]* | ?:[\\/]*)
11173  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11174  ;;
11175  *)
11176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11177for as_dir in $PATH
11178do
11179  IFS=$as_save_IFS
11180  test -z "$as_dir" && as_dir=.
11181    for ac_exec_ext in '' $ac_executable_extensions; do
11182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11183    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11185    break 2
11186  fi
11187done
11188  done
11189IFS=$as_save_IFS
11190
11191  ;;
11192esac
11193fi
11194TAIL=$ac_cv_path_TAIL
11195if test -n "$TAIL"; then
11196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11197$as_echo "$TAIL" >&6; }
11198else
11199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11200$as_echo "no" >&6; }
11201fi
11202
11203
11204  test -n "$TAIL" && break
11205done
11206
11207  else
11208    # The variable is set, but is it from the command line or the environment?
11209
11210    # Try to remove the string !TAIL! from our list.
11211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11213      # If it failed, the variable was not from the command line. Ignore it,
11214      # but warn the user (except for BASH, which is always set by the calling BASH).
11215      if test "xTAIL" != xBASH; then
11216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11217$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11218      fi
11219      # Try to locate tool using the code snippet
11220      for ac_prog in tail
11221do
11222  # Extract the first word of "$ac_prog", so it can be a program name with args.
11223set dummy $ac_prog; ac_word=$2
11224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11225$as_echo_n "checking for $ac_word... " >&6; }
11226if ${ac_cv_path_TAIL+:} false; then :
11227  $as_echo_n "(cached) " >&6
11228else
11229  case $TAIL in
11230  [\\/]* | ?:[\\/]*)
11231  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11232  ;;
11233  *)
11234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11235for as_dir in $PATH
11236do
11237  IFS=$as_save_IFS
11238  test -z "$as_dir" && as_dir=.
11239    for ac_exec_ext in '' $ac_executable_extensions; do
11240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11241    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11243    break 2
11244  fi
11245done
11246  done
11247IFS=$as_save_IFS
11248
11249  ;;
11250esac
11251fi
11252TAIL=$ac_cv_path_TAIL
11253if test -n "$TAIL"; then
11254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11255$as_echo "$TAIL" >&6; }
11256else
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259fi
11260
11261
11262  test -n "$TAIL" && break
11263done
11264
11265    else
11266      # If it succeeded, then it was overridden by the user. We will use it
11267      # for the tool.
11268
11269      # First remove it from the list of overridden variables, so we can test
11270      # for unknown variables in the end.
11271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11272
11273      # Check if we try to supply an empty value
11274      if test "x$TAIL" = x; then
11275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11276$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11278$as_echo_n "checking for TAIL... " >&6; }
11279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11280$as_echo "disabled" >&6; }
11281      else
11282        # Check if the provided tool contains a complete path.
11283        tool_specified="$TAIL"
11284        tool_basename="${tool_specified##*/}"
11285        if test "x$tool_basename" = "x$tool_specified"; then
11286          # A command without a complete path is provided, search $PATH.
11287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11288$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11289          # Extract the first word of "$tool_basename", so it can be a program name with args.
11290set dummy $tool_basename; ac_word=$2
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11292$as_echo_n "checking for $ac_word... " >&6; }
11293if ${ac_cv_path_TAIL+:} false; then :
11294  $as_echo_n "(cached) " >&6
11295else
11296  case $TAIL in
11297  [\\/]* | ?:[\\/]*)
11298  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11299  ;;
11300  *)
11301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11302for as_dir in $PATH
11303do
11304  IFS=$as_save_IFS
11305  test -z "$as_dir" && as_dir=.
11306    for ac_exec_ext in '' $ac_executable_extensions; do
11307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11308    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11310    break 2
11311  fi
11312done
11313  done
11314IFS=$as_save_IFS
11315
11316  ;;
11317esac
11318fi
11319TAIL=$ac_cv_path_TAIL
11320if test -n "$TAIL"; then
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11322$as_echo "$TAIL" >&6; }
11323else
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
11326fi
11327
11328
11329          if test "x$TAIL" = x; then
11330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11331          fi
11332        else
11333          # Otherwise we believe it is a complete path. Use it as it is.
11334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11335$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11337$as_echo_n "checking for TAIL... " >&6; }
11338          if test ! -x "$tool_specified"; then
11339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11340$as_echo "not found" >&6; }
11341            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11342          fi
11343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11344$as_echo "$tool_specified" >&6; }
11345        fi
11346      fi
11347    fi
11348
11349  fi
11350
11351
11352
11353  if test "x$TAIL" = x; then
11354    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11355  fi
11356
11357
11358
11359
11360
11361  # Publish this variable in the help.
11362
11363
11364  if [ -z "${TAR+x}" ]; then
11365    # The variable is not set by user, try to locate tool using the code snippet
11366    for ac_prog in gtar tar
11367do
11368  # Extract the first word of "$ac_prog", so it can be a program name with args.
11369set dummy $ac_prog; ac_word=$2
11370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371$as_echo_n "checking for $ac_word... " >&6; }
11372if ${ac_cv_path_TAR+:} false; then :
11373  $as_echo_n "(cached) " >&6
11374else
11375  case $TAR in
11376  [\\/]* | ?:[\\/]*)
11377  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11378  ;;
11379  *)
11380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381for as_dir in $PATH
11382do
11383  IFS=$as_save_IFS
11384  test -z "$as_dir" && as_dir=.
11385    for ac_exec_ext in '' $ac_executable_extensions; do
11386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389    break 2
11390  fi
11391done
11392  done
11393IFS=$as_save_IFS
11394
11395  ;;
11396esac
11397fi
11398TAR=$ac_cv_path_TAR
11399if test -n "$TAR"; then
11400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11401$as_echo "$TAR" >&6; }
11402else
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
11405fi
11406
11407
11408  test -n "$TAR" && break
11409done
11410
11411  else
11412    # The variable is set, but is it from the command line or the environment?
11413
11414    # Try to remove the string !TAR! from our list.
11415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11417      # If it failed, the variable was not from the command line. Ignore it,
11418      # but warn the user (except for BASH, which is always set by the calling BASH).
11419      if test "xTAR" != xBASH; then
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11421$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11422      fi
11423      # Try to locate tool using the code snippet
11424      for ac_prog in gtar tar
11425do
11426  # Extract the first word of "$ac_prog", so it can be a program name with args.
11427set dummy $ac_prog; ac_word=$2
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11429$as_echo_n "checking for $ac_word... " >&6; }
11430if ${ac_cv_path_TAR+:} false; then :
11431  $as_echo_n "(cached) " >&6
11432else
11433  case $TAR in
11434  [\\/]* | ?:[\\/]*)
11435  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11436  ;;
11437  *)
11438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11439for as_dir in $PATH
11440do
11441  IFS=$as_save_IFS
11442  test -z "$as_dir" && as_dir=.
11443    for ac_exec_ext in '' $ac_executable_extensions; do
11444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11445    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11447    break 2
11448  fi
11449done
11450  done
11451IFS=$as_save_IFS
11452
11453  ;;
11454esac
11455fi
11456TAR=$ac_cv_path_TAR
11457if test -n "$TAR"; then
11458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11459$as_echo "$TAR" >&6; }
11460else
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462$as_echo "no" >&6; }
11463fi
11464
11465
11466  test -n "$TAR" && break
11467done
11468
11469    else
11470      # If it succeeded, then it was overridden by the user. We will use it
11471      # for the tool.
11472
11473      # First remove it from the list of overridden variables, so we can test
11474      # for unknown variables in the end.
11475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11476
11477      # Check if we try to supply an empty value
11478      if test "x$TAR" = x; then
11479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11480$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11482$as_echo_n "checking for TAR... " >&6; }
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11484$as_echo "disabled" >&6; }
11485      else
11486        # Check if the provided tool contains a complete path.
11487        tool_specified="$TAR"
11488        tool_basename="${tool_specified##*/}"
11489        if test "x$tool_basename" = "x$tool_specified"; then
11490          # A command without a complete path is provided, search $PATH.
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11492$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11493          # Extract the first word of "$tool_basename", so it can be a program name with args.
11494set dummy $tool_basename; ac_word=$2
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11496$as_echo_n "checking for $ac_word... " >&6; }
11497if ${ac_cv_path_TAR+:} false; then :
11498  $as_echo_n "(cached) " >&6
11499else
11500  case $TAR in
11501  [\\/]* | ?:[\\/]*)
11502  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11503  ;;
11504  *)
11505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11506for as_dir in $PATH
11507do
11508  IFS=$as_save_IFS
11509  test -z "$as_dir" && as_dir=.
11510    for ac_exec_ext in '' $ac_executable_extensions; do
11511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11512    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11514    break 2
11515  fi
11516done
11517  done
11518IFS=$as_save_IFS
11519
11520  ;;
11521esac
11522fi
11523TAR=$ac_cv_path_TAR
11524if test -n "$TAR"; then
11525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11526$as_echo "$TAR" >&6; }
11527else
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
11530fi
11531
11532
11533          if test "x$TAR" = x; then
11534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11535          fi
11536        else
11537          # Otherwise we believe it is a complete path. Use it as it is.
11538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11539$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11541$as_echo_n "checking for TAR... " >&6; }
11542          if test ! -x "$tool_specified"; then
11543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11544$as_echo "not found" >&6; }
11545            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11546          fi
11547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11548$as_echo "$tool_specified" >&6; }
11549        fi
11550      fi
11551    fi
11552
11553  fi
11554
11555
11556
11557  if test "x$TAR" = x; then
11558    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11559  fi
11560
11561
11562
11563
11564
11565  # Publish this variable in the help.
11566
11567
11568  if [ -z "${TEE+x}" ]; then
11569    # The variable is not set by user, try to locate tool using the code snippet
11570    for ac_prog in tee
11571do
11572  # Extract the first word of "$ac_prog", so it can be a program name with args.
11573set dummy $ac_prog; ac_word=$2
11574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11575$as_echo_n "checking for $ac_word... " >&6; }
11576if ${ac_cv_path_TEE+:} false; then :
11577  $as_echo_n "(cached) " >&6
11578else
11579  case $TEE in
11580  [\\/]* | ?:[\\/]*)
11581  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11582  ;;
11583  *)
11584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11585for as_dir in $PATH
11586do
11587  IFS=$as_save_IFS
11588  test -z "$as_dir" && as_dir=.
11589    for ac_exec_ext in '' $ac_executable_extensions; do
11590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11591    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11593    break 2
11594  fi
11595done
11596  done
11597IFS=$as_save_IFS
11598
11599  ;;
11600esac
11601fi
11602TEE=$ac_cv_path_TEE
11603if test -n "$TEE"; then
11604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11605$as_echo "$TEE" >&6; }
11606else
11607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
11609fi
11610
11611
11612  test -n "$TEE" && break
11613done
11614
11615  else
11616    # The variable is set, but is it from the command line or the environment?
11617
11618    # Try to remove the string !TEE! from our list.
11619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11621      # If it failed, the variable was not from the command line. Ignore it,
11622      # but warn the user (except for BASH, which is always set by the calling BASH).
11623      if test "xTEE" != xBASH; then
11624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11625$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11626      fi
11627      # Try to locate tool using the code snippet
11628      for ac_prog in tee
11629do
11630  # Extract the first word of "$ac_prog", so it can be a program name with args.
11631set dummy $ac_prog; ac_word=$2
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11633$as_echo_n "checking for $ac_word... " >&6; }
11634if ${ac_cv_path_TEE+:} false; then :
11635  $as_echo_n "(cached) " >&6
11636else
11637  case $TEE in
11638  [\\/]* | ?:[\\/]*)
11639  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11640  ;;
11641  *)
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_exec_ext in '' $ac_executable_extensions; do
11648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11649    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11651    break 2
11652  fi
11653done
11654  done
11655IFS=$as_save_IFS
11656
11657  ;;
11658esac
11659fi
11660TEE=$ac_cv_path_TEE
11661if test -n "$TEE"; then
11662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11663$as_echo "$TEE" >&6; }
11664else
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
11667fi
11668
11669
11670  test -n "$TEE" && break
11671done
11672
11673    else
11674      # If it succeeded, then it was overridden by the user. We will use it
11675      # for the tool.
11676
11677      # First remove it from the list of overridden variables, so we can test
11678      # for unknown variables in the end.
11679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11680
11681      # Check if we try to supply an empty value
11682      if test "x$TEE" = x; then
11683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11684$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11686$as_echo_n "checking for TEE... " >&6; }
11687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11688$as_echo "disabled" >&6; }
11689      else
11690        # Check if the provided tool contains a complete path.
11691        tool_specified="$TEE"
11692        tool_basename="${tool_specified##*/}"
11693        if test "x$tool_basename" = "x$tool_specified"; then
11694          # A command without a complete path is provided, search $PATH.
11695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11696$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11697          # Extract the first word of "$tool_basename", so it can be a program name with args.
11698set dummy $tool_basename; ac_word=$2
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11700$as_echo_n "checking for $ac_word... " >&6; }
11701if ${ac_cv_path_TEE+:} false; then :
11702  $as_echo_n "(cached) " >&6
11703else
11704  case $TEE in
11705  [\\/]* | ?:[\\/]*)
11706  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11707  ;;
11708  *)
11709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11710for as_dir in $PATH
11711do
11712  IFS=$as_save_IFS
11713  test -z "$as_dir" && as_dir=.
11714    for ac_exec_ext in '' $ac_executable_extensions; do
11715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11716    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11718    break 2
11719  fi
11720done
11721  done
11722IFS=$as_save_IFS
11723
11724  ;;
11725esac
11726fi
11727TEE=$ac_cv_path_TEE
11728if test -n "$TEE"; then
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11730$as_echo "$TEE" >&6; }
11731else
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
11734fi
11735
11736
11737          if test "x$TEE" = x; then
11738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11739          fi
11740        else
11741          # Otherwise we believe it is a complete path. Use it as it is.
11742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11743$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11745$as_echo_n "checking for TEE... " >&6; }
11746          if test ! -x "$tool_specified"; then
11747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11748$as_echo "not found" >&6; }
11749            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11750          fi
11751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11752$as_echo "$tool_specified" >&6; }
11753        fi
11754      fi
11755    fi
11756
11757  fi
11758
11759
11760
11761  if test "x$TEE" = x; then
11762    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11763  fi
11764
11765
11766
11767
11768
11769  # Publish this variable in the help.
11770
11771
11772  if [ -z "${TOUCH+x}" ]; then
11773    # The variable is not set by user, try to locate tool using the code snippet
11774    for ac_prog in touch
11775do
11776  # Extract the first word of "$ac_prog", so it can be a program name with args.
11777set dummy $ac_prog; ac_word=$2
11778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11779$as_echo_n "checking for $ac_word... " >&6; }
11780if ${ac_cv_path_TOUCH+:} false; then :
11781  $as_echo_n "(cached) " >&6
11782else
11783  case $TOUCH in
11784  [\\/]* | ?:[\\/]*)
11785  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11786  ;;
11787  *)
11788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11789for as_dir in $PATH
11790do
11791  IFS=$as_save_IFS
11792  test -z "$as_dir" && as_dir=.
11793    for ac_exec_ext in '' $ac_executable_extensions; do
11794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11795    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11797    break 2
11798  fi
11799done
11800  done
11801IFS=$as_save_IFS
11802
11803  ;;
11804esac
11805fi
11806TOUCH=$ac_cv_path_TOUCH
11807if test -n "$TOUCH"; then
11808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11809$as_echo "$TOUCH" >&6; }
11810else
11811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11812$as_echo "no" >&6; }
11813fi
11814
11815
11816  test -n "$TOUCH" && break
11817done
11818
11819  else
11820    # The variable is set, but is it from the command line or the environment?
11821
11822    # Try to remove the string !TOUCH! from our list.
11823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11825      # If it failed, the variable was not from the command line. Ignore it,
11826      # but warn the user (except for BASH, which is always set by the calling BASH).
11827      if test "xTOUCH" != xBASH; then
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11829$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11830      fi
11831      # Try to locate tool using the code snippet
11832      for ac_prog in touch
11833do
11834  # Extract the first word of "$ac_prog", so it can be a program name with args.
11835set dummy $ac_prog; ac_word=$2
11836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11837$as_echo_n "checking for $ac_word... " >&6; }
11838if ${ac_cv_path_TOUCH+:} false; then :
11839  $as_echo_n "(cached) " >&6
11840else
11841  case $TOUCH in
11842  [\\/]* | ?:[\\/]*)
11843  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11844  ;;
11845  *)
11846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11847for as_dir in $PATH
11848do
11849  IFS=$as_save_IFS
11850  test -z "$as_dir" && as_dir=.
11851    for ac_exec_ext in '' $ac_executable_extensions; do
11852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11853    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11855    break 2
11856  fi
11857done
11858  done
11859IFS=$as_save_IFS
11860
11861  ;;
11862esac
11863fi
11864TOUCH=$ac_cv_path_TOUCH
11865if test -n "$TOUCH"; then
11866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11867$as_echo "$TOUCH" >&6; }
11868else
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870$as_echo "no" >&6; }
11871fi
11872
11873
11874  test -n "$TOUCH" && break
11875done
11876
11877    else
11878      # If it succeeded, then it was overridden by the user. We will use it
11879      # for the tool.
11880
11881      # First remove it from the list of overridden variables, so we can test
11882      # for unknown variables in the end.
11883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11884
11885      # Check if we try to supply an empty value
11886      if test "x$TOUCH" = x; then
11887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11888$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11890$as_echo_n "checking for TOUCH... " >&6; }
11891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11892$as_echo "disabled" >&6; }
11893      else
11894        # Check if the provided tool contains a complete path.
11895        tool_specified="$TOUCH"
11896        tool_basename="${tool_specified##*/}"
11897        if test "x$tool_basename" = "x$tool_specified"; then
11898          # A command without a complete path is provided, search $PATH.
11899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11900$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11901          # Extract the first word of "$tool_basename", so it can be a program name with args.
11902set dummy $tool_basename; ac_word=$2
11903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11904$as_echo_n "checking for $ac_word... " >&6; }
11905if ${ac_cv_path_TOUCH+:} false; then :
11906  $as_echo_n "(cached) " >&6
11907else
11908  case $TOUCH in
11909  [\\/]* | ?:[\\/]*)
11910  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11911  ;;
11912  *)
11913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11914for as_dir in $PATH
11915do
11916  IFS=$as_save_IFS
11917  test -z "$as_dir" && as_dir=.
11918    for ac_exec_ext in '' $ac_executable_extensions; do
11919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11920    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11922    break 2
11923  fi
11924done
11925  done
11926IFS=$as_save_IFS
11927
11928  ;;
11929esac
11930fi
11931TOUCH=$ac_cv_path_TOUCH
11932if test -n "$TOUCH"; then
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11934$as_echo "$TOUCH" >&6; }
11935else
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937$as_echo "no" >&6; }
11938fi
11939
11940
11941          if test "x$TOUCH" = x; then
11942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11943          fi
11944        else
11945          # Otherwise we believe it is a complete path. Use it as it is.
11946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11947$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11949$as_echo_n "checking for TOUCH... " >&6; }
11950          if test ! -x "$tool_specified"; then
11951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11952$as_echo "not found" >&6; }
11953            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11954          fi
11955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11956$as_echo "$tool_specified" >&6; }
11957        fi
11958      fi
11959    fi
11960
11961  fi
11962
11963
11964
11965  if test "x$TOUCH" = x; then
11966    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11967  fi
11968
11969
11970
11971
11972
11973  # Publish this variable in the help.
11974
11975
11976  if [ -z "${TR+x}" ]; then
11977    # The variable is not set by user, try to locate tool using the code snippet
11978    for ac_prog in tr
11979do
11980  # Extract the first word of "$ac_prog", so it can be a program name with args.
11981set dummy $ac_prog; ac_word=$2
11982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11983$as_echo_n "checking for $ac_word... " >&6; }
11984if ${ac_cv_path_TR+:} false; then :
11985  $as_echo_n "(cached) " >&6
11986else
11987  case $TR in
11988  [\\/]* | ?:[\\/]*)
11989  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11990  ;;
11991  *)
11992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11993for as_dir in $PATH
11994do
11995  IFS=$as_save_IFS
11996  test -z "$as_dir" && as_dir=.
11997    for ac_exec_ext in '' $ac_executable_extensions; do
11998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11999    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12001    break 2
12002  fi
12003done
12004  done
12005IFS=$as_save_IFS
12006
12007  ;;
12008esac
12009fi
12010TR=$ac_cv_path_TR
12011if test -n "$TR"; then
12012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12013$as_echo "$TR" >&6; }
12014else
12015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016$as_echo "no" >&6; }
12017fi
12018
12019
12020  test -n "$TR" && break
12021done
12022
12023  else
12024    # The variable is set, but is it from the command line or the environment?
12025
12026    # Try to remove the string !TR! from our list.
12027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12029      # If it failed, the variable was not from the command line. Ignore it,
12030      # but warn the user (except for BASH, which is always set by the calling BASH).
12031      if test "xTR" != xBASH; then
12032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12033$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12034      fi
12035      # Try to locate tool using the code snippet
12036      for ac_prog in tr
12037do
12038  # Extract the first word of "$ac_prog", so it can be a program name with args.
12039set dummy $ac_prog; ac_word=$2
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12041$as_echo_n "checking for $ac_word... " >&6; }
12042if ${ac_cv_path_TR+:} false; then :
12043  $as_echo_n "(cached) " >&6
12044else
12045  case $TR in
12046  [\\/]* | ?:[\\/]*)
12047  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12048  ;;
12049  *)
12050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12051for as_dir in $PATH
12052do
12053  IFS=$as_save_IFS
12054  test -z "$as_dir" && as_dir=.
12055    for ac_exec_ext in '' $ac_executable_extensions; do
12056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12057    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12059    break 2
12060  fi
12061done
12062  done
12063IFS=$as_save_IFS
12064
12065  ;;
12066esac
12067fi
12068TR=$ac_cv_path_TR
12069if test -n "$TR"; then
12070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12071$as_echo "$TR" >&6; }
12072else
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
12075fi
12076
12077
12078  test -n "$TR" && break
12079done
12080
12081    else
12082      # If it succeeded, then it was overridden by the user. We will use it
12083      # for the tool.
12084
12085      # First remove it from the list of overridden variables, so we can test
12086      # for unknown variables in the end.
12087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12088
12089      # Check if we try to supply an empty value
12090      if test "x$TR" = x; then
12091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12092$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12094$as_echo_n "checking for TR... " >&6; }
12095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12096$as_echo "disabled" >&6; }
12097      else
12098        # Check if the provided tool contains a complete path.
12099        tool_specified="$TR"
12100        tool_basename="${tool_specified##*/}"
12101        if test "x$tool_basename" = "x$tool_specified"; then
12102          # A command without a complete path is provided, search $PATH.
12103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12104$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12105          # Extract the first word of "$tool_basename", so it can be a program name with args.
12106set dummy $tool_basename; ac_word=$2
12107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12108$as_echo_n "checking for $ac_word... " >&6; }
12109if ${ac_cv_path_TR+:} false; then :
12110  $as_echo_n "(cached) " >&6
12111else
12112  case $TR in
12113  [\\/]* | ?:[\\/]*)
12114  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12115  ;;
12116  *)
12117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12118for as_dir in $PATH
12119do
12120  IFS=$as_save_IFS
12121  test -z "$as_dir" && as_dir=.
12122    for ac_exec_ext in '' $ac_executable_extensions; do
12123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12124    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12126    break 2
12127  fi
12128done
12129  done
12130IFS=$as_save_IFS
12131
12132  ;;
12133esac
12134fi
12135TR=$ac_cv_path_TR
12136if test -n "$TR"; then
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12138$as_echo "$TR" >&6; }
12139else
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12141$as_echo "no" >&6; }
12142fi
12143
12144
12145          if test "x$TR" = x; then
12146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12147          fi
12148        else
12149          # Otherwise we believe it is a complete path. Use it as it is.
12150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12151$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12153$as_echo_n "checking for TR... " >&6; }
12154          if test ! -x "$tool_specified"; then
12155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12156$as_echo "not found" >&6; }
12157            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12158          fi
12159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12160$as_echo "$tool_specified" >&6; }
12161        fi
12162      fi
12163    fi
12164
12165  fi
12166
12167
12168
12169  if test "x$TR" = x; then
12170    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12171  fi
12172
12173
12174
12175
12176
12177  # Publish this variable in the help.
12178
12179
12180  if [ -z "${UNAME+x}" ]; then
12181    # The variable is not set by user, try to locate tool using the code snippet
12182    for ac_prog in uname
12183do
12184  # Extract the first word of "$ac_prog", so it can be a program name with args.
12185set dummy $ac_prog; ac_word=$2
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187$as_echo_n "checking for $ac_word... " >&6; }
12188if ${ac_cv_path_UNAME+:} false; then :
12189  $as_echo_n "(cached) " >&6
12190else
12191  case $UNAME in
12192  [\\/]* | ?:[\\/]*)
12193  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12194  ;;
12195  *)
12196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12197for as_dir in $PATH
12198do
12199  IFS=$as_save_IFS
12200  test -z "$as_dir" && as_dir=.
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12203    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12205    break 2
12206  fi
12207done
12208  done
12209IFS=$as_save_IFS
12210
12211  ;;
12212esac
12213fi
12214UNAME=$ac_cv_path_UNAME
12215if test -n "$UNAME"; then
12216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12217$as_echo "$UNAME" >&6; }
12218else
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12220$as_echo "no" >&6; }
12221fi
12222
12223
12224  test -n "$UNAME" && break
12225done
12226
12227  else
12228    # The variable is set, but is it from the command line or the environment?
12229
12230    # Try to remove the string !UNAME! from our list.
12231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12233      # If it failed, the variable was not from the command line. Ignore it,
12234      # but warn the user (except for BASH, which is always set by the calling BASH).
12235      if test "xUNAME" != xBASH; then
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12237$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12238      fi
12239      # Try to locate tool using the code snippet
12240      for ac_prog in uname
12241do
12242  # Extract the first word of "$ac_prog", so it can be a program name with args.
12243set dummy $ac_prog; ac_word=$2
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12245$as_echo_n "checking for $ac_word... " >&6; }
12246if ${ac_cv_path_UNAME+:} false; then :
12247  $as_echo_n "(cached) " >&6
12248else
12249  case $UNAME in
12250  [\\/]* | ?:[\\/]*)
12251  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12252  ;;
12253  *)
12254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12255for as_dir in $PATH
12256do
12257  IFS=$as_save_IFS
12258  test -z "$as_dir" && as_dir=.
12259    for ac_exec_ext in '' $ac_executable_extensions; do
12260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12261    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12263    break 2
12264  fi
12265done
12266  done
12267IFS=$as_save_IFS
12268
12269  ;;
12270esac
12271fi
12272UNAME=$ac_cv_path_UNAME
12273if test -n "$UNAME"; then
12274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12275$as_echo "$UNAME" >&6; }
12276else
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278$as_echo "no" >&6; }
12279fi
12280
12281
12282  test -n "$UNAME" && break
12283done
12284
12285    else
12286      # If it succeeded, then it was overridden by the user. We will use it
12287      # for the tool.
12288
12289      # First remove it from the list of overridden variables, so we can test
12290      # for unknown variables in the end.
12291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12292
12293      # Check if we try to supply an empty value
12294      if test "x$UNAME" = x; then
12295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12296$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12298$as_echo_n "checking for UNAME... " >&6; }
12299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12300$as_echo "disabled" >&6; }
12301      else
12302        # Check if the provided tool contains a complete path.
12303        tool_specified="$UNAME"
12304        tool_basename="${tool_specified##*/}"
12305        if test "x$tool_basename" = "x$tool_specified"; then
12306          # A command without a complete path is provided, search $PATH.
12307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12308$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12309          # Extract the first word of "$tool_basename", so it can be a program name with args.
12310set dummy $tool_basename; ac_word=$2
12311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12312$as_echo_n "checking for $ac_word... " >&6; }
12313if ${ac_cv_path_UNAME+:} false; then :
12314  $as_echo_n "(cached) " >&6
12315else
12316  case $UNAME in
12317  [\\/]* | ?:[\\/]*)
12318  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12319  ;;
12320  *)
12321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12322for as_dir in $PATH
12323do
12324  IFS=$as_save_IFS
12325  test -z "$as_dir" && as_dir=.
12326    for ac_exec_ext in '' $ac_executable_extensions; do
12327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12328    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12330    break 2
12331  fi
12332done
12333  done
12334IFS=$as_save_IFS
12335
12336  ;;
12337esac
12338fi
12339UNAME=$ac_cv_path_UNAME
12340if test -n "$UNAME"; then
12341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12342$as_echo "$UNAME" >&6; }
12343else
12344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12345$as_echo "no" >&6; }
12346fi
12347
12348
12349          if test "x$UNAME" = x; then
12350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12351          fi
12352        else
12353          # Otherwise we believe it is a complete path. Use it as it is.
12354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12355$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12357$as_echo_n "checking for UNAME... " >&6; }
12358          if test ! -x "$tool_specified"; then
12359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12360$as_echo "not found" >&6; }
12361            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12362          fi
12363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12364$as_echo "$tool_specified" >&6; }
12365        fi
12366      fi
12367    fi
12368
12369  fi
12370
12371
12372
12373  if test "x$UNAME" = x; then
12374    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12375  fi
12376
12377
12378
12379
12380
12381  # Publish this variable in the help.
12382
12383
12384  if [ -z "${UNIQ+x}" ]; then
12385    # The variable is not set by user, try to locate tool using the code snippet
12386    for ac_prog in uniq
12387do
12388  # Extract the first word of "$ac_prog", so it can be a program name with args.
12389set dummy $ac_prog; ac_word=$2
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12391$as_echo_n "checking for $ac_word... " >&6; }
12392if ${ac_cv_path_UNIQ+:} false; then :
12393  $as_echo_n "(cached) " >&6
12394else
12395  case $UNIQ in
12396  [\\/]* | ?:[\\/]*)
12397  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12398  ;;
12399  *)
12400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12401for as_dir in $PATH
12402do
12403  IFS=$as_save_IFS
12404  test -z "$as_dir" && as_dir=.
12405    for ac_exec_ext in '' $ac_executable_extensions; do
12406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12407    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12409    break 2
12410  fi
12411done
12412  done
12413IFS=$as_save_IFS
12414
12415  ;;
12416esac
12417fi
12418UNIQ=$ac_cv_path_UNIQ
12419if test -n "$UNIQ"; then
12420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12421$as_echo "$UNIQ" >&6; }
12422else
12423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12424$as_echo "no" >&6; }
12425fi
12426
12427
12428  test -n "$UNIQ" && break
12429done
12430
12431  else
12432    # The variable is set, but is it from the command line or the environment?
12433
12434    # Try to remove the string !UNIQ! from our list.
12435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12437      # If it failed, the variable was not from the command line. Ignore it,
12438      # but warn the user (except for BASH, which is always set by the calling BASH).
12439      if test "xUNIQ" != xBASH; then
12440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12441$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12442      fi
12443      # Try to locate tool using the code snippet
12444      for ac_prog in uniq
12445do
12446  # Extract the first word of "$ac_prog", so it can be a program name with args.
12447set dummy $ac_prog; ac_word=$2
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12449$as_echo_n "checking for $ac_word... " >&6; }
12450if ${ac_cv_path_UNIQ+:} false; then :
12451  $as_echo_n "(cached) " >&6
12452else
12453  case $UNIQ in
12454  [\\/]* | ?:[\\/]*)
12455  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12456  ;;
12457  *)
12458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12459for as_dir in $PATH
12460do
12461  IFS=$as_save_IFS
12462  test -z "$as_dir" && as_dir=.
12463    for ac_exec_ext in '' $ac_executable_extensions; do
12464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12465    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12467    break 2
12468  fi
12469done
12470  done
12471IFS=$as_save_IFS
12472
12473  ;;
12474esac
12475fi
12476UNIQ=$ac_cv_path_UNIQ
12477if test -n "$UNIQ"; then
12478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12479$as_echo "$UNIQ" >&6; }
12480else
12481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12482$as_echo "no" >&6; }
12483fi
12484
12485
12486  test -n "$UNIQ" && break
12487done
12488
12489    else
12490      # If it succeeded, then it was overridden by the user. We will use it
12491      # for the tool.
12492
12493      # First remove it from the list of overridden variables, so we can test
12494      # for unknown variables in the end.
12495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12496
12497      # Check if we try to supply an empty value
12498      if test "x$UNIQ" = x; then
12499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12500$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12502$as_echo_n "checking for UNIQ... " >&6; }
12503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12504$as_echo "disabled" >&6; }
12505      else
12506        # Check if the provided tool contains a complete path.
12507        tool_specified="$UNIQ"
12508        tool_basename="${tool_specified##*/}"
12509        if test "x$tool_basename" = "x$tool_specified"; then
12510          # A command without a complete path is provided, search $PATH.
12511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12512$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12513          # Extract the first word of "$tool_basename", so it can be a program name with args.
12514set dummy $tool_basename; ac_word=$2
12515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12516$as_echo_n "checking for $ac_word... " >&6; }
12517if ${ac_cv_path_UNIQ+:} false; then :
12518  $as_echo_n "(cached) " >&6
12519else
12520  case $UNIQ in
12521  [\\/]* | ?:[\\/]*)
12522  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12523  ;;
12524  *)
12525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12526for as_dir in $PATH
12527do
12528  IFS=$as_save_IFS
12529  test -z "$as_dir" && as_dir=.
12530    for ac_exec_ext in '' $ac_executable_extensions; do
12531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12532    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12534    break 2
12535  fi
12536done
12537  done
12538IFS=$as_save_IFS
12539
12540  ;;
12541esac
12542fi
12543UNIQ=$ac_cv_path_UNIQ
12544if test -n "$UNIQ"; then
12545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12546$as_echo "$UNIQ" >&6; }
12547else
12548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12549$as_echo "no" >&6; }
12550fi
12551
12552
12553          if test "x$UNIQ" = x; then
12554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12555          fi
12556        else
12557          # Otherwise we believe it is a complete path. Use it as it is.
12558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12559$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12561$as_echo_n "checking for UNIQ... " >&6; }
12562          if test ! -x "$tool_specified"; then
12563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12564$as_echo "not found" >&6; }
12565            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12566          fi
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12568$as_echo "$tool_specified" >&6; }
12569        fi
12570      fi
12571    fi
12572
12573  fi
12574
12575
12576
12577  if test "x$UNIQ" = x; then
12578    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12579  fi
12580
12581
12582
12583
12584
12585  # Publish this variable in the help.
12586
12587
12588  if [ -z "${WC+x}" ]; then
12589    # The variable is not set by user, try to locate tool using the code snippet
12590    for ac_prog in wc
12591do
12592  # Extract the first word of "$ac_prog", so it can be a program name with args.
12593set dummy $ac_prog; ac_word=$2
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12595$as_echo_n "checking for $ac_word... " >&6; }
12596if ${ac_cv_path_WC+:} false; then :
12597  $as_echo_n "(cached) " >&6
12598else
12599  case $WC in
12600  [\\/]* | ?:[\\/]*)
12601  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12602  ;;
12603  *)
12604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12605for as_dir in $PATH
12606do
12607  IFS=$as_save_IFS
12608  test -z "$as_dir" && as_dir=.
12609    for ac_exec_ext in '' $ac_executable_extensions; do
12610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12611    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12613    break 2
12614  fi
12615done
12616  done
12617IFS=$as_save_IFS
12618
12619  ;;
12620esac
12621fi
12622WC=$ac_cv_path_WC
12623if test -n "$WC"; then
12624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12625$as_echo "$WC" >&6; }
12626else
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12628$as_echo "no" >&6; }
12629fi
12630
12631
12632  test -n "$WC" && break
12633done
12634
12635  else
12636    # The variable is set, but is it from the command line or the environment?
12637
12638    # Try to remove the string !WC! from our list.
12639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12641      # If it failed, the variable was not from the command line. Ignore it,
12642      # but warn the user (except for BASH, which is always set by the calling BASH).
12643      if test "xWC" != xBASH; then
12644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12645$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12646      fi
12647      # Try to locate tool using the code snippet
12648      for ac_prog in wc
12649do
12650  # Extract the first word of "$ac_prog", so it can be a program name with args.
12651set dummy $ac_prog; ac_word=$2
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12653$as_echo_n "checking for $ac_word... " >&6; }
12654if ${ac_cv_path_WC+:} false; then :
12655  $as_echo_n "(cached) " >&6
12656else
12657  case $WC in
12658  [\\/]* | ?:[\\/]*)
12659  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12660  ;;
12661  *)
12662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12663for as_dir in $PATH
12664do
12665  IFS=$as_save_IFS
12666  test -z "$as_dir" && as_dir=.
12667    for ac_exec_ext in '' $ac_executable_extensions; do
12668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12669    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12671    break 2
12672  fi
12673done
12674  done
12675IFS=$as_save_IFS
12676
12677  ;;
12678esac
12679fi
12680WC=$ac_cv_path_WC
12681if test -n "$WC"; then
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12683$as_echo "$WC" >&6; }
12684else
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12686$as_echo "no" >&6; }
12687fi
12688
12689
12690  test -n "$WC" && break
12691done
12692
12693    else
12694      # If it succeeded, then it was overridden by the user. We will use it
12695      # for the tool.
12696
12697      # First remove it from the list of overridden variables, so we can test
12698      # for unknown variables in the end.
12699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12700
12701      # Check if we try to supply an empty value
12702      if test "x$WC" = x; then
12703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12704$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12706$as_echo_n "checking for WC... " >&6; }
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12708$as_echo "disabled" >&6; }
12709      else
12710        # Check if the provided tool contains a complete path.
12711        tool_specified="$WC"
12712        tool_basename="${tool_specified##*/}"
12713        if test "x$tool_basename" = "x$tool_specified"; then
12714          # A command without a complete path is provided, search $PATH.
12715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12716$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12717          # Extract the first word of "$tool_basename", so it can be a program name with args.
12718set dummy $tool_basename; ac_word=$2
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12720$as_echo_n "checking for $ac_word... " >&6; }
12721if ${ac_cv_path_WC+:} false; then :
12722  $as_echo_n "(cached) " >&6
12723else
12724  case $WC in
12725  [\\/]* | ?:[\\/]*)
12726  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12727  ;;
12728  *)
12729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12730for as_dir in $PATH
12731do
12732  IFS=$as_save_IFS
12733  test -z "$as_dir" && as_dir=.
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12736    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12738    break 2
12739  fi
12740done
12741  done
12742IFS=$as_save_IFS
12743
12744  ;;
12745esac
12746fi
12747WC=$ac_cv_path_WC
12748if test -n "$WC"; then
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12750$as_echo "$WC" >&6; }
12751else
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12753$as_echo "no" >&6; }
12754fi
12755
12756
12757          if test "x$WC" = x; then
12758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12759          fi
12760        else
12761          # Otherwise we believe it is a complete path. Use it as it is.
12762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12763$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12765$as_echo_n "checking for WC... " >&6; }
12766          if test ! -x "$tool_specified"; then
12767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12768$as_echo "not found" >&6; }
12769            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12770          fi
12771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12772$as_echo "$tool_specified" >&6; }
12773        fi
12774      fi
12775    fi
12776
12777  fi
12778
12779
12780
12781  if test "x$WC" = x; then
12782    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12783  fi
12784
12785
12786
12787
12788
12789  # Publish this variable in the help.
12790
12791
12792  if [ -z "${WHICH+x}" ]; then
12793    # The variable is not set by user, try to locate tool using the code snippet
12794    for ac_prog in which
12795do
12796  # Extract the first word of "$ac_prog", so it can be a program name with args.
12797set dummy $ac_prog; ac_word=$2
12798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12799$as_echo_n "checking for $ac_word... " >&6; }
12800if ${ac_cv_path_WHICH+:} false; then :
12801  $as_echo_n "(cached) " >&6
12802else
12803  case $WHICH in
12804  [\\/]* | ?:[\\/]*)
12805  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12806  ;;
12807  *)
12808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12809for as_dir in $PATH
12810do
12811  IFS=$as_save_IFS
12812  test -z "$as_dir" && as_dir=.
12813    for ac_exec_ext in '' $ac_executable_extensions; do
12814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12815    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12817    break 2
12818  fi
12819done
12820  done
12821IFS=$as_save_IFS
12822
12823  ;;
12824esac
12825fi
12826WHICH=$ac_cv_path_WHICH
12827if test -n "$WHICH"; then
12828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12829$as_echo "$WHICH" >&6; }
12830else
12831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12832$as_echo "no" >&6; }
12833fi
12834
12835
12836  test -n "$WHICH" && break
12837done
12838
12839  else
12840    # The variable is set, but is it from the command line or the environment?
12841
12842    # Try to remove the string !WHICH! from our list.
12843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12845      # If it failed, the variable was not from the command line. Ignore it,
12846      # but warn the user (except for BASH, which is always set by the calling BASH).
12847      if test "xWHICH" != xBASH; then
12848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12849$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12850      fi
12851      # Try to locate tool using the code snippet
12852      for ac_prog in which
12853do
12854  # Extract the first word of "$ac_prog", so it can be a program name with args.
12855set dummy $ac_prog; ac_word=$2
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12857$as_echo_n "checking for $ac_word... " >&6; }
12858if ${ac_cv_path_WHICH+:} false; then :
12859  $as_echo_n "(cached) " >&6
12860else
12861  case $WHICH in
12862  [\\/]* | ?:[\\/]*)
12863  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12864  ;;
12865  *)
12866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12867for as_dir in $PATH
12868do
12869  IFS=$as_save_IFS
12870  test -z "$as_dir" && as_dir=.
12871    for ac_exec_ext in '' $ac_executable_extensions; do
12872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12873    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12875    break 2
12876  fi
12877done
12878  done
12879IFS=$as_save_IFS
12880
12881  ;;
12882esac
12883fi
12884WHICH=$ac_cv_path_WHICH
12885if test -n "$WHICH"; then
12886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12887$as_echo "$WHICH" >&6; }
12888else
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12890$as_echo "no" >&6; }
12891fi
12892
12893
12894  test -n "$WHICH" && break
12895done
12896
12897    else
12898      # If it succeeded, then it was overridden by the user. We will use it
12899      # for the tool.
12900
12901      # First remove it from the list of overridden variables, so we can test
12902      # for unknown variables in the end.
12903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12904
12905      # Check if we try to supply an empty value
12906      if test "x$WHICH" = x; then
12907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12908$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12910$as_echo_n "checking for WHICH... " >&6; }
12911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12912$as_echo "disabled" >&6; }
12913      else
12914        # Check if the provided tool contains a complete path.
12915        tool_specified="$WHICH"
12916        tool_basename="${tool_specified##*/}"
12917        if test "x$tool_basename" = "x$tool_specified"; then
12918          # A command without a complete path is provided, search $PATH.
12919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12920$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12921          # Extract the first word of "$tool_basename", so it can be a program name with args.
12922set dummy $tool_basename; ac_word=$2
12923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12924$as_echo_n "checking for $ac_word... " >&6; }
12925if ${ac_cv_path_WHICH+:} false; then :
12926  $as_echo_n "(cached) " >&6
12927else
12928  case $WHICH in
12929  [\\/]* | ?:[\\/]*)
12930  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12931  ;;
12932  *)
12933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12934for as_dir in $PATH
12935do
12936  IFS=$as_save_IFS
12937  test -z "$as_dir" && as_dir=.
12938    for ac_exec_ext in '' $ac_executable_extensions; do
12939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12940    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12942    break 2
12943  fi
12944done
12945  done
12946IFS=$as_save_IFS
12947
12948  ;;
12949esac
12950fi
12951WHICH=$ac_cv_path_WHICH
12952if test -n "$WHICH"; then
12953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12954$as_echo "$WHICH" >&6; }
12955else
12956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12957$as_echo "no" >&6; }
12958fi
12959
12960
12961          if test "x$WHICH" = x; then
12962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12963          fi
12964        else
12965          # Otherwise we believe it is a complete path. Use it as it is.
12966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12967$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12969$as_echo_n "checking for WHICH... " >&6; }
12970          if test ! -x "$tool_specified"; then
12971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12972$as_echo "not found" >&6; }
12973            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12974          fi
12975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12976$as_echo "$tool_specified" >&6; }
12977        fi
12978      fi
12979    fi
12980
12981  fi
12982
12983
12984
12985  if test "x$WHICH" = x; then
12986    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12987  fi
12988
12989
12990
12991
12992
12993  # Publish this variable in the help.
12994
12995
12996  if [ -z "${XARGS+x}" ]; then
12997    # The variable is not set by user, try to locate tool using the code snippet
12998    for ac_prog in xargs
12999do
13000  # Extract the first word of "$ac_prog", so it can be a program name with args.
13001set dummy $ac_prog; ac_word=$2
13002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13003$as_echo_n "checking for $ac_word... " >&6; }
13004if ${ac_cv_path_XARGS+:} false; then :
13005  $as_echo_n "(cached) " >&6
13006else
13007  case $XARGS in
13008  [\\/]* | ?:[\\/]*)
13009  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13010  ;;
13011  *)
13012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13013for as_dir in $PATH
13014do
13015  IFS=$as_save_IFS
13016  test -z "$as_dir" && as_dir=.
13017    for ac_exec_ext in '' $ac_executable_extensions; do
13018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13019    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13021    break 2
13022  fi
13023done
13024  done
13025IFS=$as_save_IFS
13026
13027  ;;
13028esac
13029fi
13030XARGS=$ac_cv_path_XARGS
13031if test -n "$XARGS"; then
13032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13033$as_echo "$XARGS" >&6; }
13034else
13035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13036$as_echo "no" >&6; }
13037fi
13038
13039
13040  test -n "$XARGS" && break
13041done
13042
13043  else
13044    # The variable is set, but is it from the command line or the environment?
13045
13046    # Try to remove the string !XARGS! from our list.
13047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13049      # If it failed, the variable was not from the command line. Ignore it,
13050      # but warn the user (except for BASH, which is always set by the calling BASH).
13051      if test "xXARGS" != xBASH; then
13052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13053$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13054      fi
13055      # Try to locate tool using the code snippet
13056      for ac_prog in xargs
13057do
13058  # Extract the first word of "$ac_prog", so it can be a program name with args.
13059set dummy $ac_prog; ac_word=$2
13060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13061$as_echo_n "checking for $ac_word... " >&6; }
13062if ${ac_cv_path_XARGS+:} false; then :
13063  $as_echo_n "(cached) " >&6
13064else
13065  case $XARGS in
13066  [\\/]* | ?:[\\/]*)
13067  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13068  ;;
13069  *)
13070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13071for as_dir in $PATH
13072do
13073  IFS=$as_save_IFS
13074  test -z "$as_dir" && as_dir=.
13075    for ac_exec_ext in '' $ac_executable_extensions; do
13076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13077    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13079    break 2
13080  fi
13081done
13082  done
13083IFS=$as_save_IFS
13084
13085  ;;
13086esac
13087fi
13088XARGS=$ac_cv_path_XARGS
13089if test -n "$XARGS"; then
13090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13091$as_echo "$XARGS" >&6; }
13092else
13093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13094$as_echo "no" >&6; }
13095fi
13096
13097
13098  test -n "$XARGS" && break
13099done
13100
13101    else
13102      # If it succeeded, then it was overridden by the user. We will use it
13103      # for the tool.
13104
13105      # First remove it from the list of overridden variables, so we can test
13106      # for unknown variables in the end.
13107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13108
13109      # Check if we try to supply an empty value
13110      if test "x$XARGS" = x; then
13111        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13112$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13114$as_echo_n "checking for XARGS... " >&6; }
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13116$as_echo "disabled" >&6; }
13117      else
13118        # Check if the provided tool contains a complete path.
13119        tool_specified="$XARGS"
13120        tool_basename="${tool_specified##*/}"
13121        if test "x$tool_basename" = "x$tool_specified"; then
13122          # A command without a complete path is provided, search $PATH.
13123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13124$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13125          # Extract the first word of "$tool_basename", so it can be a program name with args.
13126set dummy $tool_basename; ac_word=$2
13127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13128$as_echo_n "checking for $ac_word... " >&6; }
13129if ${ac_cv_path_XARGS+:} false; then :
13130  $as_echo_n "(cached) " >&6
13131else
13132  case $XARGS in
13133  [\\/]* | ?:[\\/]*)
13134  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13135  ;;
13136  *)
13137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13138for as_dir in $PATH
13139do
13140  IFS=$as_save_IFS
13141  test -z "$as_dir" && as_dir=.
13142    for ac_exec_ext in '' $ac_executable_extensions; do
13143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13144    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13146    break 2
13147  fi
13148done
13149  done
13150IFS=$as_save_IFS
13151
13152  ;;
13153esac
13154fi
13155XARGS=$ac_cv_path_XARGS
13156if test -n "$XARGS"; then
13157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13158$as_echo "$XARGS" >&6; }
13159else
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13161$as_echo "no" >&6; }
13162fi
13163
13164
13165          if test "x$XARGS" = x; then
13166            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13167          fi
13168        else
13169          # Otherwise we believe it is a complete path. Use it as it is.
13170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13171$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13173$as_echo_n "checking for XARGS... " >&6; }
13174          if test ! -x "$tool_specified"; then
13175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13176$as_echo "not found" >&6; }
13177            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13178          fi
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13180$as_echo "$tool_specified" >&6; }
13181        fi
13182      fi
13183    fi
13184
13185  fi
13186
13187
13188
13189  if test "x$XARGS" = x; then
13190    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13191  fi
13192
13193
13194
13195  # Then required tools that require some special treatment.
13196
13197
13198  # Publish this variable in the help.
13199
13200
13201  if [ -z "${AWK+x}" ]; then
13202    # The variable is not set by user, try to locate tool using the code snippet
13203    for ac_prog in gawk mawk nawk awk
13204do
13205  # Extract the first word of "$ac_prog", so it can be a program name with args.
13206set dummy $ac_prog; ac_word=$2
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13208$as_echo_n "checking for $ac_word... " >&6; }
13209if ${ac_cv_prog_AWK+:} false; then :
13210  $as_echo_n "(cached) " >&6
13211else
13212  if test -n "$AWK"; then
13213  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13214else
13215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13216for as_dir in $PATH
13217do
13218  IFS=$as_save_IFS
13219  test -z "$as_dir" && as_dir=.
13220    for ac_exec_ext in '' $ac_executable_extensions; do
13221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13222    ac_cv_prog_AWK="$ac_prog"
13223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13224    break 2
13225  fi
13226done
13227  done
13228IFS=$as_save_IFS
13229
13230fi
13231fi
13232AWK=$ac_cv_prog_AWK
13233if test -n "$AWK"; then
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13235$as_echo "$AWK" >&6; }
13236else
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
13239fi
13240
13241
13242  test -n "$AWK" && break
13243done
13244
13245  else
13246    # The variable is set, but is it from the command line or the environment?
13247
13248    # Try to remove the string !AWK! from our list.
13249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13251      # If it failed, the variable was not from the command line. Ignore it,
13252      # but warn the user (except for BASH, which is always set by the calling BASH).
13253      if test "xAWK" != xBASH; then
13254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13255$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13256      fi
13257      # Try to locate tool using the code snippet
13258      for ac_prog in gawk mawk nawk awk
13259do
13260  # Extract the first word of "$ac_prog", so it can be a program name with args.
13261set dummy $ac_prog; ac_word=$2
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13263$as_echo_n "checking for $ac_word... " >&6; }
13264if ${ac_cv_prog_AWK+:} false; then :
13265  $as_echo_n "(cached) " >&6
13266else
13267  if test -n "$AWK"; then
13268  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13269else
13270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13271for as_dir in $PATH
13272do
13273  IFS=$as_save_IFS
13274  test -z "$as_dir" && as_dir=.
13275    for ac_exec_ext in '' $ac_executable_extensions; do
13276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13277    ac_cv_prog_AWK="$ac_prog"
13278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13279    break 2
13280  fi
13281done
13282  done
13283IFS=$as_save_IFS
13284
13285fi
13286fi
13287AWK=$ac_cv_prog_AWK
13288if test -n "$AWK"; then
13289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13290$as_echo "$AWK" >&6; }
13291else
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13293$as_echo "no" >&6; }
13294fi
13295
13296
13297  test -n "$AWK" && break
13298done
13299
13300    else
13301      # If it succeeded, then it was overridden by the user. We will use it
13302      # for the tool.
13303
13304      # First remove it from the list of overridden variables, so we can test
13305      # for unknown variables in the end.
13306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13307
13308      # Check if we try to supply an empty value
13309      if test "x$AWK" = x; then
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13311$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13313$as_echo_n "checking for AWK... " >&6; }
13314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13315$as_echo "disabled" >&6; }
13316      else
13317        # Check if the provided tool contains a complete path.
13318        tool_specified="$AWK"
13319        tool_basename="${tool_specified##*/}"
13320        if test "x$tool_basename" = "x$tool_specified"; then
13321          # A command without a complete path is provided, search $PATH.
13322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13323$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13324          # Extract the first word of "$tool_basename", so it can be a program name with args.
13325set dummy $tool_basename; ac_word=$2
13326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13327$as_echo_n "checking for $ac_word... " >&6; }
13328if ${ac_cv_path_AWK+:} false; then :
13329  $as_echo_n "(cached) " >&6
13330else
13331  case $AWK in
13332  [\\/]* | ?:[\\/]*)
13333  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13334  ;;
13335  *)
13336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13337for as_dir in $PATH
13338do
13339  IFS=$as_save_IFS
13340  test -z "$as_dir" && as_dir=.
13341    for ac_exec_ext in '' $ac_executable_extensions; do
13342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13343    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13345    break 2
13346  fi
13347done
13348  done
13349IFS=$as_save_IFS
13350
13351  ;;
13352esac
13353fi
13354AWK=$ac_cv_path_AWK
13355if test -n "$AWK"; then
13356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13357$as_echo "$AWK" >&6; }
13358else
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13360$as_echo "no" >&6; }
13361fi
13362
13363
13364          if test "x$AWK" = x; then
13365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13366          fi
13367        else
13368          # Otherwise we believe it is a complete path. Use it as it is.
13369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13370$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13372$as_echo_n "checking for AWK... " >&6; }
13373          if test ! -x "$tool_specified"; then
13374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13375$as_echo "not found" >&6; }
13376            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13377          fi
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13379$as_echo "$tool_specified" >&6; }
13380        fi
13381      fi
13382    fi
13383
13384  fi
13385
13386
13387  if test "x$AWK" = x; then
13388    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13389  fi
13390
13391
13392
13393
13394  # Publish this variable in the help.
13395
13396
13397  if [ -z "${GREP+x}" ]; then
13398    # The variable is not set by user, try to locate tool using the code snippet
13399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13400$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13401if ${ac_cv_path_GREP+:} false; then :
13402  $as_echo_n "(cached) " >&6
13403else
13404  if test -z "$GREP"; then
13405  ac_path_GREP_found=false
13406  # Loop through the user's path and test for each of PROGNAME-LIST
13407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13409do
13410  IFS=$as_save_IFS
13411  test -z "$as_dir" && as_dir=.
13412    for ac_prog in grep ggrep; do
13413    for ac_exec_ext in '' $ac_executable_extensions; do
13414      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13415      as_fn_executable_p "$ac_path_GREP" || continue
13416# Check for GNU ac_path_GREP and select it if it is found.
13417  # Check for GNU $ac_path_GREP
13418case `"$ac_path_GREP" --version 2>&1` in
13419*GNU*)
13420  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13421*)
13422  ac_count=0
13423  $as_echo_n 0123456789 >"conftest.in"
13424  while :
13425  do
13426    cat "conftest.in" "conftest.in" >"conftest.tmp"
13427    mv "conftest.tmp" "conftest.in"
13428    cp "conftest.in" "conftest.nl"
13429    $as_echo 'GREP' >> "conftest.nl"
13430    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13431    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13432    as_fn_arith $ac_count + 1 && ac_count=$as_val
13433    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13434      # Best one so far, save it but keep looking for a better one
13435      ac_cv_path_GREP="$ac_path_GREP"
13436      ac_path_GREP_max=$ac_count
13437    fi
13438    # 10*(2^10) chars as input seems more than enough
13439    test $ac_count -gt 10 && break
13440  done
13441  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13442esac
13443
13444      $ac_path_GREP_found && break 3
13445    done
13446  done
13447  done
13448IFS=$as_save_IFS
13449  if test -z "$ac_cv_path_GREP"; then
13450    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13451  fi
13452else
13453  ac_cv_path_GREP=$GREP
13454fi
13455
13456fi
13457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13458$as_echo "$ac_cv_path_GREP" >&6; }
13459 GREP="$ac_cv_path_GREP"
13460
13461
13462  else
13463    # The variable is set, but is it from the command line or the environment?
13464
13465    # Try to remove the string !GREP! from our list.
13466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13468      # If it failed, the variable was not from the command line. Ignore it,
13469      # but warn the user (except for BASH, which is always set by the calling BASH).
13470      if test "xGREP" != xBASH; then
13471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13472$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13473      fi
13474      # Try to locate tool using the code snippet
13475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13476$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13477if ${ac_cv_path_GREP+:} false; then :
13478  $as_echo_n "(cached) " >&6
13479else
13480  if test -z "$GREP"; then
13481  ac_path_GREP_found=false
13482  # Loop through the user's path and test for each of PROGNAME-LIST
13483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13484for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13485do
13486  IFS=$as_save_IFS
13487  test -z "$as_dir" && as_dir=.
13488    for ac_prog in grep ggrep; do
13489    for ac_exec_ext in '' $ac_executable_extensions; do
13490      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13491      as_fn_executable_p "$ac_path_GREP" || continue
13492# Check for GNU ac_path_GREP and select it if it is found.
13493  # Check for GNU $ac_path_GREP
13494case `"$ac_path_GREP" --version 2>&1` in
13495*GNU*)
13496  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13497*)
13498  ac_count=0
13499  $as_echo_n 0123456789 >"conftest.in"
13500  while :
13501  do
13502    cat "conftest.in" "conftest.in" >"conftest.tmp"
13503    mv "conftest.tmp" "conftest.in"
13504    cp "conftest.in" "conftest.nl"
13505    $as_echo 'GREP' >> "conftest.nl"
13506    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13507    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13508    as_fn_arith $ac_count + 1 && ac_count=$as_val
13509    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13510      # Best one so far, save it but keep looking for a better one
13511      ac_cv_path_GREP="$ac_path_GREP"
13512      ac_path_GREP_max=$ac_count
13513    fi
13514    # 10*(2^10) chars as input seems more than enough
13515    test $ac_count -gt 10 && break
13516  done
13517  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13518esac
13519
13520      $ac_path_GREP_found && break 3
13521    done
13522  done
13523  done
13524IFS=$as_save_IFS
13525  if test -z "$ac_cv_path_GREP"; then
13526    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13527  fi
13528else
13529  ac_cv_path_GREP=$GREP
13530fi
13531
13532fi
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13534$as_echo "$ac_cv_path_GREP" >&6; }
13535 GREP="$ac_cv_path_GREP"
13536
13537
13538    else
13539      # If it succeeded, then it was overridden by the user. We will use it
13540      # for the tool.
13541
13542      # First remove it from the list of overridden variables, so we can test
13543      # for unknown variables in the end.
13544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13545
13546      # Check if we try to supply an empty value
13547      if test "x$GREP" = x; then
13548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13549$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13551$as_echo_n "checking for GREP... " >&6; }
13552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13553$as_echo "disabled" >&6; }
13554      else
13555        # Check if the provided tool contains a complete path.
13556        tool_specified="$GREP"
13557        tool_basename="${tool_specified##*/}"
13558        if test "x$tool_basename" = "x$tool_specified"; then
13559          # A command without a complete path is provided, search $PATH.
13560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13561$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13562          # Extract the first word of "$tool_basename", so it can be a program name with args.
13563set dummy $tool_basename; ac_word=$2
13564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13565$as_echo_n "checking for $ac_word... " >&6; }
13566if ${ac_cv_path_GREP+:} false; then :
13567  $as_echo_n "(cached) " >&6
13568else
13569  case $GREP in
13570  [\\/]* | ?:[\\/]*)
13571  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13572  ;;
13573  *)
13574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13575for as_dir in $PATH
13576do
13577  IFS=$as_save_IFS
13578  test -z "$as_dir" && as_dir=.
13579    for ac_exec_ext in '' $ac_executable_extensions; do
13580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13581    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13583    break 2
13584  fi
13585done
13586  done
13587IFS=$as_save_IFS
13588
13589  ;;
13590esac
13591fi
13592GREP=$ac_cv_path_GREP
13593if test -n "$GREP"; then
13594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13595$as_echo "$GREP" >&6; }
13596else
13597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13598$as_echo "no" >&6; }
13599fi
13600
13601
13602          if test "x$GREP" = x; then
13603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13604          fi
13605        else
13606          # Otherwise we believe it is a complete path. Use it as it is.
13607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13608$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13610$as_echo_n "checking for GREP... " >&6; }
13611          if test ! -x "$tool_specified"; then
13612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13613$as_echo "not found" >&6; }
13614            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13615          fi
13616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13617$as_echo "$tool_specified" >&6; }
13618        fi
13619      fi
13620    fi
13621
13622  fi
13623
13624
13625  if test "x$GREP" = x; then
13626    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13627  fi
13628
13629
13630
13631
13632  # Publish this variable in the help.
13633
13634
13635  if [ -z "${EGREP+x}" ]; then
13636    # The variable is not set by user, try to locate tool using the code snippet
13637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13638$as_echo_n "checking for egrep... " >&6; }
13639if ${ac_cv_path_EGREP+:} false; then :
13640  $as_echo_n "(cached) " >&6
13641else
13642  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13643   then ac_cv_path_EGREP="$GREP -E"
13644   else
13645     if test -z "$EGREP"; then
13646  ac_path_EGREP_found=false
13647  # Loop through the user's path and test for each of PROGNAME-LIST
13648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13649for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13650do
13651  IFS=$as_save_IFS
13652  test -z "$as_dir" && as_dir=.
13653    for ac_prog in egrep; do
13654    for ac_exec_ext in '' $ac_executable_extensions; do
13655      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13656      as_fn_executable_p "$ac_path_EGREP" || continue
13657# Check for GNU ac_path_EGREP and select it if it is found.
13658  # Check for GNU $ac_path_EGREP
13659case `"$ac_path_EGREP" --version 2>&1` in
13660*GNU*)
13661  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13662*)
13663  ac_count=0
13664  $as_echo_n 0123456789 >"conftest.in"
13665  while :
13666  do
13667    cat "conftest.in" "conftest.in" >"conftest.tmp"
13668    mv "conftest.tmp" "conftest.in"
13669    cp "conftest.in" "conftest.nl"
13670    $as_echo 'EGREP' >> "conftest.nl"
13671    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13672    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13673    as_fn_arith $ac_count + 1 && ac_count=$as_val
13674    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13675      # Best one so far, save it but keep looking for a better one
13676      ac_cv_path_EGREP="$ac_path_EGREP"
13677      ac_path_EGREP_max=$ac_count
13678    fi
13679    # 10*(2^10) chars as input seems more than enough
13680    test $ac_count -gt 10 && break
13681  done
13682  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13683esac
13684
13685      $ac_path_EGREP_found && break 3
13686    done
13687  done
13688  done
13689IFS=$as_save_IFS
13690  if test -z "$ac_cv_path_EGREP"; then
13691    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13692  fi
13693else
13694  ac_cv_path_EGREP=$EGREP
13695fi
13696
13697   fi
13698fi
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13700$as_echo "$ac_cv_path_EGREP" >&6; }
13701 EGREP="$ac_cv_path_EGREP"
13702
13703
13704  else
13705    # The variable is set, but is it from the command line or the environment?
13706
13707    # Try to remove the string !EGREP! from our list.
13708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13710      # If it failed, the variable was not from the command line. Ignore it,
13711      # but warn the user (except for BASH, which is always set by the calling BASH).
13712      if test "xEGREP" != xBASH; then
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13714$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13715      fi
13716      # Try to locate tool using the code snippet
13717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13718$as_echo_n "checking for egrep... " >&6; }
13719if ${ac_cv_path_EGREP+:} false; then :
13720  $as_echo_n "(cached) " >&6
13721else
13722  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13723   then ac_cv_path_EGREP="$GREP -E"
13724   else
13725     if test -z "$EGREP"; then
13726  ac_path_EGREP_found=false
13727  # Loop through the user's path and test for each of PROGNAME-LIST
13728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13729for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13730do
13731  IFS=$as_save_IFS
13732  test -z "$as_dir" && as_dir=.
13733    for ac_prog in egrep; do
13734    for ac_exec_ext in '' $ac_executable_extensions; do
13735      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13736      as_fn_executable_p "$ac_path_EGREP" || continue
13737# Check for GNU ac_path_EGREP and select it if it is found.
13738  # Check for GNU $ac_path_EGREP
13739case `"$ac_path_EGREP" --version 2>&1` in
13740*GNU*)
13741  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13742*)
13743  ac_count=0
13744  $as_echo_n 0123456789 >"conftest.in"
13745  while :
13746  do
13747    cat "conftest.in" "conftest.in" >"conftest.tmp"
13748    mv "conftest.tmp" "conftest.in"
13749    cp "conftest.in" "conftest.nl"
13750    $as_echo 'EGREP' >> "conftest.nl"
13751    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13752    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13753    as_fn_arith $ac_count + 1 && ac_count=$as_val
13754    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13755      # Best one so far, save it but keep looking for a better one
13756      ac_cv_path_EGREP="$ac_path_EGREP"
13757      ac_path_EGREP_max=$ac_count
13758    fi
13759    # 10*(2^10) chars as input seems more than enough
13760    test $ac_count -gt 10 && break
13761  done
13762  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13763esac
13764
13765      $ac_path_EGREP_found && break 3
13766    done
13767  done
13768  done
13769IFS=$as_save_IFS
13770  if test -z "$ac_cv_path_EGREP"; then
13771    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13772  fi
13773else
13774  ac_cv_path_EGREP=$EGREP
13775fi
13776
13777   fi
13778fi
13779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13780$as_echo "$ac_cv_path_EGREP" >&6; }
13781 EGREP="$ac_cv_path_EGREP"
13782
13783
13784    else
13785      # If it succeeded, then it was overridden by the user. We will use it
13786      # for the tool.
13787
13788      # First remove it from the list of overridden variables, so we can test
13789      # for unknown variables in the end.
13790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13791
13792      # Check if we try to supply an empty value
13793      if test "x$EGREP" = x; then
13794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13795$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13797$as_echo_n "checking for EGREP... " >&6; }
13798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13799$as_echo "disabled" >&6; }
13800      else
13801        # Check if the provided tool contains a complete path.
13802        tool_specified="$EGREP"
13803        tool_basename="${tool_specified##*/}"
13804        if test "x$tool_basename" = "x$tool_specified"; then
13805          # A command without a complete path is provided, search $PATH.
13806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13807$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13808          # Extract the first word of "$tool_basename", so it can be a program name with args.
13809set dummy $tool_basename; ac_word=$2
13810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13811$as_echo_n "checking for $ac_word... " >&6; }
13812if ${ac_cv_path_EGREP+:} false; then :
13813  $as_echo_n "(cached) " >&6
13814else
13815  case $EGREP in
13816  [\\/]* | ?:[\\/]*)
13817  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13818  ;;
13819  *)
13820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13821for as_dir in $PATH
13822do
13823  IFS=$as_save_IFS
13824  test -z "$as_dir" && as_dir=.
13825    for ac_exec_ext in '' $ac_executable_extensions; do
13826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13827    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13829    break 2
13830  fi
13831done
13832  done
13833IFS=$as_save_IFS
13834
13835  ;;
13836esac
13837fi
13838EGREP=$ac_cv_path_EGREP
13839if test -n "$EGREP"; then
13840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13841$as_echo "$EGREP" >&6; }
13842else
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13844$as_echo "no" >&6; }
13845fi
13846
13847
13848          if test "x$EGREP" = x; then
13849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13850          fi
13851        else
13852          # Otherwise we believe it is a complete path. Use it as it is.
13853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13854$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13856$as_echo_n "checking for EGREP... " >&6; }
13857          if test ! -x "$tool_specified"; then
13858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13859$as_echo "not found" >&6; }
13860            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13861          fi
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13863$as_echo "$tool_specified" >&6; }
13864        fi
13865      fi
13866    fi
13867
13868  fi
13869
13870
13871  if test "x$EGREP" = x; then
13872    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13873  fi
13874
13875
13876
13877
13878  # Publish this variable in the help.
13879
13880
13881  if [ -z "${FGREP+x}" ]; then
13882    # The variable is not set by user, try to locate tool using the code snippet
13883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13884$as_echo_n "checking for fgrep... " >&6; }
13885if ${ac_cv_path_FGREP+:} false; then :
13886  $as_echo_n "(cached) " >&6
13887else
13888  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13889   then ac_cv_path_FGREP="$GREP -F"
13890   else
13891     if test -z "$FGREP"; then
13892  ac_path_FGREP_found=false
13893  # Loop through the user's path and test for each of PROGNAME-LIST
13894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13895for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13896do
13897  IFS=$as_save_IFS
13898  test -z "$as_dir" && as_dir=.
13899    for ac_prog in fgrep; do
13900    for ac_exec_ext in '' $ac_executable_extensions; do
13901      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13902      as_fn_executable_p "$ac_path_FGREP" || continue
13903# Check for GNU ac_path_FGREP and select it if it is found.
13904  # Check for GNU $ac_path_FGREP
13905case `"$ac_path_FGREP" --version 2>&1` in
13906*GNU*)
13907  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13908*)
13909  ac_count=0
13910  $as_echo_n 0123456789 >"conftest.in"
13911  while :
13912  do
13913    cat "conftest.in" "conftest.in" >"conftest.tmp"
13914    mv "conftest.tmp" "conftest.in"
13915    cp "conftest.in" "conftest.nl"
13916    $as_echo 'FGREP' >> "conftest.nl"
13917    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13918    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13919    as_fn_arith $ac_count + 1 && ac_count=$as_val
13920    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13921      # Best one so far, save it but keep looking for a better one
13922      ac_cv_path_FGREP="$ac_path_FGREP"
13923      ac_path_FGREP_max=$ac_count
13924    fi
13925    # 10*(2^10) chars as input seems more than enough
13926    test $ac_count -gt 10 && break
13927  done
13928  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13929esac
13930
13931      $ac_path_FGREP_found && break 3
13932    done
13933  done
13934  done
13935IFS=$as_save_IFS
13936  if test -z "$ac_cv_path_FGREP"; then
13937    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13938  fi
13939else
13940  ac_cv_path_FGREP=$FGREP
13941fi
13942
13943   fi
13944fi
13945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13946$as_echo "$ac_cv_path_FGREP" >&6; }
13947 FGREP="$ac_cv_path_FGREP"
13948
13949
13950  else
13951    # The variable is set, but is it from the command line or the environment?
13952
13953    # Try to remove the string !FGREP! from our list.
13954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13956      # If it failed, the variable was not from the command line. Ignore it,
13957      # but warn the user (except for BASH, which is always set by the calling BASH).
13958      if test "xFGREP" != xBASH; then
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13960$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13961      fi
13962      # Try to locate tool using the code snippet
13963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13964$as_echo_n "checking for fgrep... " >&6; }
13965if ${ac_cv_path_FGREP+:} false; then :
13966  $as_echo_n "(cached) " >&6
13967else
13968  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13969   then ac_cv_path_FGREP="$GREP -F"
13970   else
13971     if test -z "$FGREP"; then
13972  ac_path_FGREP_found=false
13973  # Loop through the user's path and test for each of PROGNAME-LIST
13974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13975for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13976do
13977  IFS=$as_save_IFS
13978  test -z "$as_dir" && as_dir=.
13979    for ac_prog in fgrep; do
13980    for ac_exec_ext in '' $ac_executable_extensions; do
13981      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13982      as_fn_executable_p "$ac_path_FGREP" || continue
13983# Check for GNU ac_path_FGREP and select it if it is found.
13984  # Check for GNU $ac_path_FGREP
13985case `"$ac_path_FGREP" --version 2>&1` in
13986*GNU*)
13987  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13988*)
13989  ac_count=0
13990  $as_echo_n 0123456789 >"conftest.in"
13991  while :
13992  do
13993    cat "conftest.in" "conftest.in" >"conftest.tmp"
13994    mv "conftest.tmp" "conftest.in"
13995    cp "conftest.in" "conftest.nl"
13996    $as_echo 'FGREP' >> "conftest.nl"
13997    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13998    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13999    as_fn_arith $ac_count + 1 && ac_count=$as_val
14000    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14001      # Best one so far, save it but keep looking for a better one
14002      ac_cv_path_FGREP="$ac_path_FGREP"
14003      ac_path_FGREP_max=$ac_count
14004    fi
14005    # 10*(2^10) chars as input seems more than enough
14006    test $ac_count -gt 10 && break
14007  done
14008  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14009esac
14010
14011      $ac_path_FGREP_found && break 3
14012    done
14013  done
14014  done
14015IFS=$as_save_IFS
14016  if test -z "$ac_cv_path_FGREP"; then
14017    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14018  fi
14019else
14020  ac_cv_path_FGREP=$FGREP
14021fi
14022
14023   fi
14024fi
14025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14026$as_echo "$ac_cv_path_FGREP" >&6; }
14027 FGREP="$ac_cv_path_FGREP"
14028
14029
14030    else
14031      # If it succeeded, then it was overridden by the user. We will use it
14032      # for the tool.
14033
14034      # First remove it from the list of overridden variables, so we can test
14035      # for unknown variables in the end.
14036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14037
14038      # Check if we try to supply an empty value
14039      if test "x$FGREP" = x; then
14040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14041$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14043$as_echo_n "checking for FGREP... " >&6; }
14044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14045$as_echo "disabled" >&6; }
14046      else
14047        # Check if the provided tool contains a complete path.
14048        tool_specified="$FGREP"
14049        tool_basename="${tool_specified##*/}"
14050        if test "x$tool_basename" = "x$tool_specified"; then
14051          # A command without a complete path is provided, search $PATH.
14052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14053$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14054          # Extract the first word of "$tool_basename", so it can be a program name with args.
14055set dummy $tool_basename; ac_word=$2
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14057$as_echo_n "checking for $ac_word... " >&6; }
14058if ${ac_cv_path_FGREP+:} false; then :
14059  $as_echo_n "(cached) " >&6
14060else
14061  case $FGREP in
14062  [\\/]* | ?:[\\/]*)
14063  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14064  ;;
14065  *)
14066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067for as_dir in $PATH
14068do
14069  IFS=$as_save_IFS
14070  test -z "$as_dir" && as_dir=.
14071    for ac_exec_ext in '' $ac_executable_extensions; do
14072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14075    break 2
14076  fi
14077done
14078  done
14079IFS=$as_save_IFS
14080
14081  ;;
14082esac
14083fi
14084FGREP=$ac_cv_path_FGREP
14085if test -n "$FGREP"; then
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14087$as_echo "$FGREP" >&6; }
14088else
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14090$as_echo "no" >&6; }
14091fi
14092
14093
14094          if test "x$FGREP" = x; then
14095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14096          fi
14097        else
14098          # Otherwise we believe it is a complete path. Use it as it is.
14099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14100$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14102$as_echo_n "checking for FGREP... " >&6; }
14103          if test ! -x "$tool_specified"; then
14104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14105$as_echo "not found" >&6; }
14106            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14107          fi
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14109$as_echo "$tool_specified" >&6; }
14110        fi
14111      fi
14112    fi
14113
14114  fi
14115
14116
14117  if test "x$FGREP" = x; then
14118    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14119  fi
14120
14121
14122
14123
14124  # Publish this variable in the help.
14125
14126
14127  if [ -z "${SED+x}" ]; then
14128    # The variable is not set by user, try to locate tool using the code snippet
14129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14130$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14131if ${ac_cv_path_SED+:} false; then :
14132  $as_echo_n "(cached) " >&6
14133else
14134            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14135     for ac_i in 1 2 3 4 5 6 7; do
14136       ac_script="$ac_script$as_nl$ac_script"
14137     done
14138     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14139     { ac_script=; unset ac_script;}
14140     if test -z "$SED"; then
14141  ac_path_SED_found=false
14142  # Loop through the user's path and test for each of PROGNAME-LIST
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_prog in sed gsed; do
14149    for ac_exec_ext in '' $ac_executable_extensions; do
14150      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14151      as_fn_executable_p "$ac_path_SED" || continue
14152# Check for GNU ac_path_SED and select it if it is found.
14153  # Check for GNU $ac_path_SED
14154case `"$ac_path_SED" --version 2>&1` in
14155*GNU*)
14156  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14157*)
14158  ac_count=0
14159  $as_echo_n 0123456789 >"conftest.in"
14160  while :
14161  do
14162    cat "conftest.in" "conftest.in" >"conftest.tmp"
14163    mv "conftest.tmp" "conftest.in"
14164    cp "conftest.in" "conftest.nl"
14165    $as_echo '' >> "conftest.nl"
14166    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14167    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14168    as_fn_arith $ac_count + 1 && ac_count=$as_val
14169    if test $ac_count -gt ${ac_path_SED_max-0}; then
14170      # Best one so far, save it but keep looking for a better one
14171      ac_cv_path_SED="$ac_path_SED"
14172      ac_path_SED_max=$ac_count
14173    fi
14174    # 10*(2^10) chars as input seems more than enough
14175    test $ac_count -gt 10 && break
14176  done
14177  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14178esac
14179
14180      $ac_path_SED_found && break 3
14181    done
14182  done
14183  done
14184IFS=$as_save_IFS
14185  if test -z "$ac_cv_path_SED"; then
14186    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14187  fi
14188else
14189  ac_cv_path_SED=$SED
14190fi
14191
14192fi
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14194$as_echo "$ac_cv_path_SED" >&6; }
14195 SED="$ac_cv_path_SED"
14196  rm -f conftest.sed
14197
14198  else
14199    # The variable is set, but is it from the command line or the environment?
14200
14201    # Try to remove the string !SED! from our list.
14202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14204      # If it failed, the variable was not from the command line. Ignore it,
14205      # but warn the user (except for BASH, which is always set by the calling BASH).
14206      if test "xSED" != xBASH; then
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14208$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14209      fi
14210      # Try to locate tool using the code snippet
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14212$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14213if ${ac_cv_path_SED+:} false; then :
14214  $as_echo_n "(cached) " >&6
14215else
14216            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14217     for ac_i in 1 2 3 4 5 6 7; do
14218       ac_script="$ac_script$as_nl$ac_script"
14219     done
14220     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14221     { ac_script=; unset ac_script;}
14222     if test -z "$SED"; then
14223  ac_path_SED_found=false
14224  # Loop through the user's path and test for each of PROGNAME-LIST
14225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14226for as_dir in $PATH
14227do
14228  IFS=$as_save_IFS
14229  test -z "$as_dir" && as_dir=.
14230    for ac_prog in sed gsed; do
14231    for ac_exec_ext in '' $ac_executable_extensions; do
14232      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14233      as_fn_executable_p "$ac_path_SED" || continue
14234# Check for GNU ac_path_SED and select it if it is found.
14235  # Check for GNU $ac_path_SED
14236case `"$ac_path_SED" --version 2>&1` in
14237*GNU*)
14238  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14239*)
14240  ac_count=0
14241  $as_echo_n 0123456789 >"conftest.in"
14242  while :
14243  do
14244    cat "conftest.in" "conftest.in" >"conftest.tmp"
14245    mv "conftest.tmp" "conftest.in"
14246    cp "conftest.in" "conftest.nl"
14247    $as_echo '' >> "conftest.nl"
14248    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14249    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14250    as_fn_arith $ac_count + 1 && ac_count=$as_val
14251    if test $ac_count -gt ${ac_path_SED_max-0}; then
14252      # Best one so far, save it but keep looking for a better one
14253      ac_cv_path_SED="$ac_path_SED"
14254      ac_path_SED_max=$ac_count
14255    fi
14256    # 10*(2^10) chars as input seems more than enough
14257    test $ac_count -gt 10 && break
14258  done
14259  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14260esac
14261
14262      $ac_path_SED_found && break 3
14263    done
14264  done
14265  done
14266IFS=$as_save_IFS
14267  if test -z "$ac_cv_path_SED"; then
14268    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14269  fi
14270else
14271  ac_cv_path_SED=$SED
14272fi
14273
14274fi
14275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14276$as_echo "$ac_cv_path_SED" >&6; }
14277 SED="$ac_cv_path_SED"
14278  rm -f conftest.sed
14279
14280    else
14281      # If it succeeded, then it was overridden by the user. We will use it
14282      # for the tool.
14283
14284      # First remove it from the list of overridden variables, so we can test
14285      # for unknown variables in the end.
14286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14287
14288      # Check if we try to supply an empty value
14289      if test "x$SED" = x; then
14290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14291$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14293$as_echo_n "checking for SED... " >&6; }
14294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14295$as_echo "disabled" >&6; }
14296      else
14297        # Check if the provided tool contains a complete path.
14298        tool_specified="$SED"
14299        tool_basename="${tool_specified##*/}"
14300        if test "x$tool_basename" = "x$tool_specified"; then
14301          # A command without a complete path is provided, search $PATH.
14302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14303$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14304          # Extract the first word of "$tool_basename", so it can be a program name with args.
14305set dummy $tool_basename; ac_word=$2
14306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14307$as_echo_n "checking for $ac_word... " >&6; }
14308if ${ac_cv_path_SED+:} false; then :
14309  $as_echo_n "(cached) " >&6
14310else
14311  case $SED in
14312  [\\/]* | ?:[\\/]*)
14313  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14314  ;;
14315  *)
14316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14317for as_dir in $PATH
14318do
14319  IFS=$as_save_IFS
14320  test -z "$as_dir" && as_dir=.
14321    for ac_exec_ext in '' $ac_executable_extensions; do
14322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14323    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14325    break 2
14326  fi
14327done
14328  done
14329IFS=$as_save_IFS
14330
14331  ;;
14332esac
14333fi
14334SED=$ac_cv_path_SED
14335if test -n "$SED"; then
14336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14337$as_echo "$SED" >&6; }
14338else
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14340$as_echo "no" >&6; }
14341fi
14342
14343
14344          if test "x$SED" = x; then
14345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14346          fi
14347        else
14348          # Otherwise we believe it is a complete path. Use it as it is.
14349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14350$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14352$as_echo_n "checking for SED... " >&6; }
14353          if test ! -x "$tool_specified"; then
14354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14355$as_echo "not found" >&6; }
14356            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14357          fi
14358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14359$as_echo "$tool_specified" >&6; }
14360        fi
14361      fi
14362    fi
14363
14364  fi
14365
14366
14367  if test "x$SED" = x; then
14368    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14369  fi
14370
14371
14372
14373  # Always force rm.
14374  RM="$RM -f"
14375
14376  # pwd behaves differently on various platforms and some don't support the -L flag.
14377  # Always use the bash builtin pwd to get uniform behavior.
14378  THEPWDCMD=pwd
14379
14380  # These are not required on all platforms
14381
14382
14383  # Publish this variable in the help.
14384
14385
14386  if [ -z "${CYGPATH+x}" ]; then
14387    # The variable is not set by user, try to locate tool using the code snippet
14388    for ac_prog in cygpath
14389do
14390  # Extract the first word of "$ac_prog", so it can be a program name with args.
14391set dummy $ac_prog; ac_word=$2
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14393$as_echo_n "checking for $ac_word... " >&6; }
14394if ${ac_cv_path_CYGPATH+:} false; then :
14395  $as_echo_n "(cached) " >&6
14396else
14397  case $CYGPATH in
14398  [\\/]* | ?:[\\/]*)
14399  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14400  ;;
14401  *)
14402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14403for as_dir in $PATH
14404do
14405  IFS=$as_save_IFS
14406  test -z "$as_dir" && as_dir=.
14407    for ac_exec_ext in '' $ac_executable_extensions; do
14408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14409    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14411    break 2
14412  fi
14413done
14414  done
14415IFS=$as_save_IFS
14416
14417  ;;
14418esac
14419fi
14420CYGPATH=$ac_cv_path_CYGPATH
14421if test -n "$CYGPATH"; then
14422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14423$as_echo "$CYGPATH" >&6; }
14424else
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14426$as_echo "no" >&6; }
14427fi
14428
14429
14430  test -n "$CYGPATH" && break
14431done
14432
14433  else
14434    # The variable is set, but is it from the command line or the environment?
14435
14436    # Try to remove the string !CYGPATH! from our list.
14437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14439      # If it failed, the variable was not from the command line. Ignore it,
14440      # but warn the user (except for BASH, which is always set by the calling BASH).
14441      if test "xCYGPATH" != xBASH; then
14442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14443$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14444      fi
14445      # Try to locate tool using the code snippet
14446      for ac_prog in cygpath
14447do
14448  # Extract the first word of "$ac_prog", so it can be a program name with args.
14449set dummy $ac_prog; ac_word=$2
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14451$as_echo_n "checking for $ac_word... " >&6; }
14452if ${ac_cv_path_CYGPATH+:} false; then :
14453  $as_echo_n "(cached) " >&6
14454else
14455  case $CYGPATH in
14456  [\\/]* | ?:[\\/]*)
14457  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14458  ;;
14459  *)
14460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14461for as_dir in $PATH
14462do
14463  IFS=$as_save_IFS
14464  test -z "$as_dir" && as_dir=.
14465    for ac_exec_ext in '' $ac_executable_extensions; do
14466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14467    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14469    break 2
14470  fi
14471done
14472  done
14473IFS=$as_save_IFS
14474
14475  ;;
14476esac
14477fi
14478CYGPATH=$ac_cv_path_CYGPATH
14479if test -n "$CYGPATH"; then
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14481$as_echo "$CYGPATH" >&6; }
14482else
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14484$as_echo "no" >&6; }
14485fi
14486
14487
14488  test -n "$CYGPATH" && break
14489done
14490
14491    else
14492      # If it succeeded, then it was overridden by the user. We will use it
14493      # for the tool.
14494
14495      # First remove it from the list of overridden variables, so we can test
14496      # for unknown variables in the end.
14497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14498
14499      # Check if we try to supply an empty value
14500      if test "x$CYGPATH" = x; then
14501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14502$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14504$as_echo_n "checking for CYGPATH... " >&6; }
14505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14506$as_echo "disabled" >&6; }
14507      else
14508        # Check if the provided tool contains a complete path.
14509        tool_specified="$CYGPATH"
14510        tool_basename="${tool_specified##*/}"
14511        if test "x$tool_basename" = "x$tool_specified"; then
14512          # A command without a complete path is provided, search $PATH.
14513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14514$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14515          # Extract the first word of "$tool_basename", so it can be a program name with args.
14516set dummy $tool_basename; ac_word=$2
14517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14518$as_echo_n "checking for $ac_word... " >&6; }
14519if ${ac_cv_path_CYGPATH+:} false; then :
14520  $as_echo_n "(cached) " >&6
14521else
14522  case $CYGPATH in
14523  [\\/]* | ?:[\\/]*)
14524  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14525  ;;
14526  *)
14527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14528for as_dir in $PATH
14529do
14530  IFS=$as_save_IFS
14531  test -z "$as_dir" && as_dir=.
14532    for ac_exec_ext in '' $ac_executable_extensions; do
14533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14534    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14536    break 2
14537  fi
14538done
14539  done
14540IFS=$as_save_IFS
14541
14542  ;;
14543esac
14544fi
14545CYGPATH=$ac_cv_path_CYGPATH
14546if test -n "$CYGPATH"; then
14547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14548$as_echo "$CYGPATH" >&6; }
14549else
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14551$as_echo "no" >&6; }
14552fi
14553
14554
14555          if test "x$CYGPATH" = x; then
14556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14557          fi
14558        else
14559          # Otherwise we believe it is a complete path. Use it as it is.
14560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14561$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14563$as_echo_n "checking for CYGPATH... " >&6; }
14564          if test ! -x "$tool_specified"; then
14565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14566$as_echo "not found" >&6; }
14567            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14568          fi
14569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14570$as_echo "$tool_specified" >&6; }
14571        fi
14572      fi
14573    fi
14574
14575  fi
14576
14577
14578
14579
14580  # Publish this variable in the help.
14581
14582
14583  if [ -z "${READLINK+x}" ]; then
14584    # The variable is not set by user, try to locate tool using the code snippet
14585    for ac_prog in greadlink readlink
14586do
14587  # Extract the first word of "$ac_prog", so it can be a program name with args.
14588set dummy $ac_prog; ac_word=$2
14589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14590$as_echo_n "checking for $ac_word... " >&6; }
14591if ${ac_cv_path_READLINK+:} false; then :
14592  $as_echo_n "(cached) " >&6
14593else
14594  case $READLINK in
14595  [\\/]* | ?:[\\/]*)
14596  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14597  ;;
14598  *)
14599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14600for as_dir in $PATH
14601do
14602  IFS=$as_save_IFS
14603  test -z "$as_dir" && as_dir=.
14604    for ac_exec_ext in '' $ac_executable_extensions; do
14605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14606    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14608    break 2
14609  fi
14610done
14611  done
14612IFS=$as_save_IFS
14613
14614  ;;
14615esac
14616fi
14617READLINK=$ac_cv_path_READLINK
14618if test -n "$READLINK"; then
14619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14620$as_echo "$READLINK" >&6; }
14621else
14622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14623$as_echo "no" >&6; }
14624fi
14625
14626
14627  test -n "$READLINK" && break
14628done
14629
14630  else
14631    # The variable is set, but is it from the command line or the environment?
14632
14633    # Try to remove the string !READLINK! from our list.
14634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14636      # If it failed, the variable was not from the command line. Ignore it,
14637      # but warn the user (except for BASH, which is always set by the calling BASH).
14638      if test "xREADLINK" != xBASH; then
14639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14640$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14641      fi
14642      # Try to locate tool using the code snippet
14643      for ac_prog in greadlink readlink
14644do
14645  # Extract the first word of "$ac_prog", so it can be a program name with args.
14646set dummy $ac_prog; ac_word=$2
14647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14648$as_echo_n "checking for $ac_word... " >&6; }
14649if ${ac_cv_path_READLINK+:} false; then :
14650  $as_echo_n "(cached) " >&6
14651else
14652  case $READLINK in
14653  [\\/]* | ?:[\\/]*)
14654  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14655  ;;
14656  *)
14657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14658for as_dir in $PATH
14659do
14660  IFS=$as_save_IFS
14661  test -z "$as_dir" && as_dir=.
14662    for ac_exec_ext in '' $ac_executable_extensions; do
14663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14664    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14666    break 2
14667  fi
14668done
14669  done
14670IFS=$as_save_IFS
14671
14672  ;;
14673esac
14674fi
14675READLINK=$ac_cv_path_READLINK
14676if test -n "$READLINK"; then
14677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14678$as_echo "$READLINK" >&6; }
14679else
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14681$as_echo "no" >&6; }
14682fi
14683
14684
14685  test -n "$READLINK" && break
14686done
14687
14688    else
14689      # If it succeeded, then it was overridden by the user. We will use it
14690      # for the tool.
14691
14692      # First remove it from the list of overridden variables, so we can test
14693      # for unknown variables in the end.
14694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14695
14696      # Check if we try to supply an empty value
14697      if test "x$READLINK" = x; then
14698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14699$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14701$as_echo_n "checking for READLINK... " >&6; }
14702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14703$as_echo "disabled" >&6; }
14704      else
14705        # Check if the provided tool contains a complete path.
14706        tool_specified="$READLINK"
14707        tool_basename="${tool_specified##*/}"
14708        if test "x$tool_basename" = "x$tool_specified"; then
14709          # A command without a complete path is provided, search $PATH.
14710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14711$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14712          # Extract the first word of "$tool_basename", so it can be a program name with args.
14713set dummy $tool_basename; ac_word=$2
14714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14715$as_echo_n "checking for $ac_word... " >&6; }
14716if ${ac_cv_path_READLINK+:} false; then :
14717  $as_echo_n "(cached) " >&6
14718else
14719  case $READLINK in
14720  [\\/]* | ?:[\\/]*)
14721  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14722  ;;
14723  *)
14724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14725for as_dir in $PATH
14726do
14727  IFS=$as_save_IFS
14728  test -z "$as_dir" && as_dir=.
14729    for ac_exec_ext in '' $ac_executable_extensions; do
14730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14731    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14733    break 2
14734  fi
14735done
14736  done
14737IFS=$as_save_IFS
14738
14739  ;;
14740esac
14741fi
14742READLINK=$ac_cv_path_READLINK
14743if test -n "$READLINK"; then
14744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14745$as_echo "$READLINK" >&6; }
14746else
14747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14748$as_echo "no" >&6; }
14749fi
14750
14751
14752          if test "x$READLINK" = x; then
14753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14754          fi
14755        else
14756          # Otherwise we believe it is a complete path. Use it as it is.
14757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14758$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14760$as_echo_n "checking for READLINK... " >&6; }
14761          if test ! -x "$tool_specified"; then
14762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14763$as_echo "not found" >&6; }
14764            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14765          fi
14766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14767$as_echo "$tool_specified" >&6; }
14768        fi
14769      fi
14770    fi
14771
14772  fi
14773
14774
14775
14776
14777  # Publish this variable in the help.
14778
14779
14780  if [ -z "${DF+x}" ]; then
14781    # The variable is not set by user, try to locate tool using the code snippet
14782    for ac_prog in df
14783do
14784  # Extract the first word of "$ac_prog", so it can be a program name with args.
14785set dummy $ac_prog; ac_word=$2
14786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14787$as_echo_n "checking for $ac_word... " >&6; }
14788if ${ac_cv_path_DF+:} false; then :
14789  $as_echo_n "(cached) " >&6
14790else
14791  case $DF in
14792  [\\/]* | ?:[\\/]*)
14793  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14794  ;;
14795  *)
14796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14797for as_dir in $PATH
14798do
14799  IFS=$as_save_IFS
14800  test -z "$as_dir" && as_dir=.
14801    for ac_exec_ext in '' $ac_executable_extensions; do
14802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14803    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14805    break 2
14806  fi
14807done
14808  done
14809IFS=$as_save_IFS
14810
14811  ;;
14812esac
14813fi
14814DF=$ac_cv_path_DF
14815if test -n "$DF"; then
14816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14817$as_echo "$DF" >&6; }
14818else
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14820$as_echo "no" >&6; }
14821fi
14822
14823
14824  test -n "$DF" && break
14825done
14826
14827  else
14828    # The variable is set, but is it from the command line or the environment?
14829
14830    # Try to remove the string !DF! from our list.
14831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14833      # If it failed, the variable was not from the command line. Ignore it,
14834      # but warn the user (except for BASH, which is always set by the calling BASH).
14835      if test "xDF" != xBASH; then
14836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14837$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14838      fi
14839      # Try to locate tool using the code snippet
14840      for ac_prog in df
14841do
14842  # Extract the first word of "$ac_prog", so it can be a program name with args.
14843set dummy $ac_prog; ac_word=$2
14844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14845$as_echo_n "checking for $ac_word... " >&6; }
14846if ${ac_cv_path_DF+:} false; then :
14847  $as_echo_n "(cached) " >&6
14848else
14849  case $DF in
14850  [\\/]* | ?:[\\/]*)
14851  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14852  ;;
14853  *)
14854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14855for as_dir in $PATH
14856do
14857  IFS=$as_save_IFS
14858  test -z "$as_dir" && as_dir=.
14859    for ac_exec_ext in '' $ac_executable_extensions; do
14860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14861    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14863    break 2
14864  fi
14865done
14866  done
14867IFS=$as_save_IFS
14868
14869  ;;
14870esac
14871fi
14872DF=$ac_cv_path_DF
14873if test -n "$DF"; then
14874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14875$as_echo "$DF" >&6; }
14876else
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14878$as_echo "no" >&6; }
14879fi
14880
14881
14882  test -n "$DF" && break
14883done
14884
14885    else
14886      # If it succeeded, then it was overridden by the user. We will use it
14887      # for the tool.
14888
14889      # First remove it from the list of overridden variables, so we can test
14890      # for unknown variables in the end.
14891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14892
14893      # Check if we try to supply an empty value
14894      if test "x$DF" = x; then
14895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14896$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14898$as_echo_n "checking for DF... " >&6; }
14899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14900$as_echo "disabled" >&6; }
14901      else
14902        # Check if the provided tool contains a complete path.
14903        tool_specified="$DF"
14904        tool_basename="${tool_specified##*/}"
14905        if test "x$tool_basename" = "x$tool_specified"; then
14906          # A command without a complete path is provided, search $PATH.
14907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14908$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14909          # Extract the first word of "$tool_basename", so it can be a program name with args.
14910set dummy $tool_basename; ac_word=$2
14911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14912$as_echo_n "checking for $ac_word... " >&6; }
14913if ${ac_cv_path_DF+:} false; then :
14914  $as_echo_n "(cached) " >&6
14915else
14916  case $DF in
14917  [\\/]* | ?:[\\/]*)
14918  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14919  ;;
14920  *)
14921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14922for as_dir in $PATH
14923do
14924  IFS=$as_save_IFS
14925  test -z "$as_dir" && as_dir=.
14926    for ac_exec_ext in '' $ac_executable_extensions; do
14927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14928    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14930    break 2
14931  fi
14932done
14933  done
14934IFS=$as_save_IFS
14935
14936  ;;
14937esac
14938fi
14939DF=$ac_cv_path_DF
14940if test -n "$DF"; then
14941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14942$as_echo "$DF" >&6; }
14943else
14944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14945$as_echo "no" >&6; }
14946fi
14947
14948
14949          if test "x$DF" = x; then
14950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14951          fi
14952        else
14953          # Otherwise we believe it is a complete path. Use it as it is.
14954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14955$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14957$as_echo_n "checking for DF... " >&6; }
14958          if test ! -x "$tool_specified"; then
14959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14960$as_echo "not found" >&6; }
14961            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14962          fi
14963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14964$as_echo "$tool_specified" >&6; }
14965        fi
14966      fi
14967    fi
14968
14969  fi
14970
14971
14972
14973
14974  # Publish this variable in the help.
14975
14976
14977  if [ -z "${CPIO+x}" ]; then
14978    # The variable is not set by user, try to locate tool using the code snippet
14979    for ac_prog in cpio bsdcpio
14980do
14981  # Extract the first word of "$ac_prog", so it can be a program name with args.
14982set dummy $ac_prog; ac_word=$2
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14984$as_echo_n "checking for $ac_word... " >&6; }
14985if ${ac_cv_path_CPIO+:} false; then :
14986  $as_echo_n "(cached) " >&6
14987else
14988  case $CPIO in
14989  [\\/]* | ?:[\\/]*)
14990  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14991  ;;
14992  *)
14993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14994for as_dir in $PATH
14995do
14996  IFS=$as_save_IFS
14997  test -z "$as_dir" && as_dir=.
14998    for ac_exec_ext in '' $ac_executable_extensions; do
14999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15000    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15002    break 2
15003  fi
15004done
15005  done
15006IFS=$as_save_IFS
15007
15008  ;;
15009esac
15010fi
15011CPIO=$ac_cv_path_CPIO
15012if test -n "$CPIO"; then
15013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15014$as_echo "$CPIO" >&6; }
15015else
15016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15017$as_echo "no" >&6; }
15018fi
15019
15020
15021  test -n "$CPIO" && break
15022done
15023
15024  else
15025    # The variable is set, but is it from the command line or the environment?
15026
15027    # Try to remove the string !CPIO! from our list.
15028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15030      # If it failed, the variable was not from the command line. Ignore it,
15031      # but warn the user (except for BASH, which is always set by the calling BASH).
15032      if test "xCPIO" != xBASH; then
15033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15034$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15035      fi
15036      # Try to locate tool using the code snippet
15037      for ac_prog in cpio bsdcpio
15038do
15039  # Extract the first word of "$ac_prog", so it can be a program name with args.
15040set dummy $ac_prog; ac_word=$2
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15042$as_echo_n "checking for $ac_word... " >&6; }
15043if ${ac_cv_path_CPIO+:} false; then :
15044  $as_echo_n "(cached) " >&6
15045else
15046  case $CPIO in
15047  [\\/]* | ?:[\\/]*)
15048  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15049  ;;
15050  *)
15051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15052for as_dir in $PATH
15053do
15054  IFS=$as_save_IFS
15055  test -z "$as_dir" && as_dir=.
15056    for ac_exec_ext in '' $ac_executable_extensions; do
15057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15058    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15060    break 2
15061  fi
15062done
15063  done
15064IFS=$as_save_IFS
15065
15066  ;;
15067esac
15068fi
15069CPIO=$ac_cv_path_CPIO
15070if test -n "$CPIO"; then
15071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15072$as_echo "$CPIO" >&6; }
15073else
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075$as_echo "no" >&6; }
15076fi
15077
15078
15079  test -n "$CPIO" && break
15080done
15081
15082    else
15083      # If it succeeded, then it was overridden by the user. We will use it
15084      # for the tool.
15085
15086      # First remove it from the list of overridden variables, so we can test
15087      # for unknown variables in the end.
15088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15089
15090      # Check if we try to supply an empty value
15091      if test "x$CPIO" = x; then
15092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15093$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15095$as_echo_n "checking for CPIO... " >&6; }
15096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15097$as_echo "disabled" >&6; }
15098      else
15099        # Check if the provided tool contains a complete path.
15100        tool_specified="$CPIO"
15101        tool_basename="${tool_specified##*/}"
15102        if test "x$tool_basename" = "x$tool_specified"; then
15103          # A command without a complete path is provided, search $PATH.
15104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15105$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15106          # Extract the first word of "$tool_basename", so it can be a program name with args.
15107set dummy $tool_basename; ac_word=$2
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15109$as_echo_n "checking for $ac_word... " >&6; }
15110if ${ac_cv_path_CPIO+:} false; then :
15111  $as_echo_n "(cached) " >&6
15112else
15113  case $CPIO in
15114  [\\/]* | ?:[\\/]*)
15115  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15116  ;;
15117  *)
15118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15119for as_dir in $PATH
15120do
15121  IFS=$as_save_IFS
15122  test -z "$as_dir" && as_dir=.
15123    for ac_exec_ext in '' $ac_executable_extensions; do
15124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15125    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15127    break 2
15128  fi
15129done
15130  done
15131IFS=$as_save_IFS
15132
15133  ;;
15134esac
15135fi
15136CPIO=$ac_cv_path_CPIO
15137if test -n "$CPIO"; then
15138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15139$as_echo "$CPIO" >&6; }
15140else
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15142$as_echo "no" >&6; }
15143fi
15144
15145
15146          if test "x$CPIO" = x; then
15147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15148          fi
15149        else
15150          # Otherwise we believe it is a complete path. Use it as it is.
15151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15152$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15154$as_echo_n "checking for CPIO... " >&6; }
15155          if test ! -x "$tool_specified"; then
15156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15157$as_echo "not found" >&6; }
15158            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15159          fi
15160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15161$as_echo "$tool_specified" >&6; }
15162        fi
15163      fi
15164    fi
15165
15166  fi
15167
15168
15169
15170
15171  # Publish this variable in the help.
15172
15173
15174  if [ -z "${NICE+x}" ]; then
15175    # The variable is not set by user, try to locate tool using the code snippet
15176    for ac_prog in nice
15177do
15178  # Extract the first word of "$ac_prog", so it can be a program name with args.
15179set dummy $ac_prog; ac_word=$2
15180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15181$as_echo_n "checking for $ac_word... " >&6; }
15182if ${ac_cv_path_NICE+:} false; then :
15183  $as_echo_n "(cached) " >&6
15184else
15185  case $NICE in
15186  [\\/]* | ?:[\\/]*)
15187  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15188  ;;
15189  *)
15190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15191for as_dir in $PATH
15192do
15193  IFS=$as_save_IFS
15194  test -z "$as_dir" && as_dir=.
15195    for ac_exec_ext in '' $ac_executable_extensions; do
15196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15197    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15199    break 2
15200  fi
15201done
15202  done
15203IFS=$as_save_IFS
15204
15205  ;;
15206esac
15207fi
15208NICE=$ac_cv_path_NICE
15209if test -n "$NICE"; then
15210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15211$as_echo "$NICE" >&6; }
15212else
15213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15214$as_echo "no" >&6; }
15215fi
15216
15217
15218  test -n "$NICE" && break
15219done
15220
15221  else
15222    # The variable is set, but is it from the command line or the environment?
15223
15224    # Try to remove the string !NICE! from our list.
15225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15227      # If it failed, the variable was not from the command line. Ignore it,
15228      # but warn the user (except for BASH, which is always set by the calling BASH).
15229      if test "xNICE" != xBASH; then
15230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15231$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15232      fi
15233      # Try to locate tool using the code snippet
15234      for ac_prog in nice
15235do
15236  # Extract the first word of "$ac_prog", so it can be a program name with args.
15237set dummy $ac_prog; ac_word=$2
15238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15239$as_echo_n "checking for $ac_word... " >&6; }
15240if ${ac_cv_path_NICE+:} false; then :
15241  $as_echo_n "(cached) " >&6
15242else
15243  case $NICE in
15244  [\\/]* | ?:[\\/]*)
15245  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15246  ;;
15247  *)
15248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15249for as_dir in $PATH
15250do
15251  IFS=$as_save_IFS
15252  test -z "$as_dir" && as_dir=.
15253    for ac_exec_ext in '' $ac_executable_extensions; do
15254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15255    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15257    break 2
15258  fi
15259done
15260  done
15261IFS=$as_save_IFS
15262
15263  ;;
15264esac
15265fi
15266NICE=$ac_cv_path_NICE
15267if test -n "$NICE"; then
15268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15269$as_echo "$NICE" >&6; }
15270else
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15272$as_echo "no" >&6; }
15273fi
15274
15275
15276  test -n "$NICE" && break
15277done
15278
15279    else
15280      # If it succeeded, then it was overridden by the user. We will use it
15281      # for the tool.
15282
15283      # First remove it from the list of overridden variables, so we can test
15284      # for unknown variables in the end.
15285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15286
15287      # Check if we try to supply an empty value
15288      if test "x$NICE" = x; then
15289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15290$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15292$as_echo_n "checking for NICE... " >&6; }
15293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15294$as_echo "disabled" >&6; }
15295      else
15296        # Check if the provided tool contains a complete path.
15297        tool_specified="$NICE"
15298        tool_basename="${tool_specified##*/}"
15299        if test "x$tool_basename" = "x$tool_specified"; then
15300          # A command without a complete path is provided, search $PATH.
15301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15302$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15303          # Extract the first word of "$tool_basename", so it can be a program name with args.
15304set dummy $tool_basename; ac_word=$2
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15306$as_echo_n "checking for $ac_word... " >&6; }
15307if ${ac_cv_path_NICE+:} false; then :
15308  $as_echo_n "(cached) " >&6
15309else
15310  case $NICE in
15311  [\\/]* | ?:[\\/]*)
15312  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15313  ;;
15314  *)
15315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15316for as_dir in $PATH
15317do
15318  IFS=$as_save_IFS
15319  test -z "$as_dir" && as_dir=.
15320    for ac_exec_ext in '' $ac_executable_extensions; do
15321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15322    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15324    break 2
15325  fi
15326done
15327  done
15328IFS=$as_save_IFS
15329
15330  ;;
15331esac
15332fi
15333NICE=$ac_cv_path_NICE
15334if test -n "$NICE"; then
15335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15336$as_echo "$NICE" >&6; }
15337else
15338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15339$as_echo "no" >&6; }
15340fi
15341
15342
15343          if test "x$NICE" = x; then
15344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15345          fi
15346        else
15347          # Otherwise we believe it is a complete path. Use it as it is.
15348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15349$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15351$as_echo_n "checking for NICE... " >&6; }
15352          if test ! -x "$tool_specified"; then
15353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15354$as_echo "not found" >&6; }
15355            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15356          fi
15357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15358$as_echo "$tool_specified" >&6; }
15359        fi
15360      fi
15361    fi
15362
15363  fi
15364
15365
15366
15367
15368  # Publish this variable in the help.
15369
15370
15371  if [ -z "${PANDOC+x}" ]; then
15372    # The variable is not set by user, try to locate tool using the code snippet
15373    for ac_prog in pandoc
15374do
15375  # Extract the first word of "$ac_prog", so it can be a program name with args.
15376set dummy $ac_prog; ac_word=$2
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15378$as_echo_n "checking for $ac_word... " >&6; }
15379if ${ac_cv_path_PANDOC+:} false; then :
15380  $as_echo_n "(cached) " >&6
15381else
15382  case $PANDOC in
15383  [\\/]* | ?:[\\/]*)
15384  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15385  ;;
15386  *)
15387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15388for as_dir in $PATH
15389do
15390  IFS=$as_save_IFS
15391  test -z "$as_dir" && as_dir=.
15392    for ac_exec_ext in '' $ac_executable_extensions; do
15393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15394    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15396    break 2
15397  fi
15398done
15399  done
15400IFS=$as_save_IFS
15401
15402  ;;
15403esac
15404fi
15405PANDOC=$ac_cv_path_PANDOC
15406if test -n "$PANDOC"; then
15407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15408$as_echo "$PANDOC" >&6; }
15409else
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15411$as_echo "no" >&6; }
15412fi
15413
15414
15415  test -n "$PANDOC" && break
15416done
15417
15418  else
15419    # The variable is set, but is it from the command line or the environment?
15420
15421    # Try to remove the string !PANDOC! from our list.
15422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15424      # If it failed, the variable was not from the command line. Ignore it,
15425      # but warn the user (except for BASH, which is always set by the calling BASH).
15426      if test "xPANDOC" != xBASH; then
15427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15428$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15429      fi
15430      # Try to locate tool using the code snippet
15431      for ac_prog in pandoc
15432do
15433  # Extract the first word of "$ac_prog", so it can be a program name with args.
15434set dummy $ac_prog; ac_word=$2
15435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15436$as_echo_n "checking for $ac_word... " >&6; }
15437if ${ac_cv_path_PANDOC+:} false; then :
15438  $as_echo_n "(cached) " >&6
15439else
15440  case $PANDOC in
15441  [\\/]* | ?:[\\/]*)
15442  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15443  ;;
15444  *)
15445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15446for as_dir in $PATH
15447do
15448  IFS=$as_save_IFS
15449  test -z "$as_dir" && as_dir=.
15450    for ac_exec_ext in '' $ac_executable_extensions; do
15451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15452    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15454    break 2
15455  fi
15456done
15457  done
15458IFS=$as_save_IFS
15459
15460  ;;
15461esac
15462fi
15463PANDOC=$ac_cv_path_PANDOC
15464if test -n "$PANDOC"; then
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15466$as_echo "$PANDOC" >&6; }
15467else
15468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15469$as_echo "no" >&6; }
15470fi
15471
15472
15473  test -n "$PANDOC" && break
15474done
15475
15476    else
15477      # If it succeeded, then it was overridden by the user. We will use it
15478      # for the tool.
15479
15480      # First remove it from the list of overridden variables, so we can test
15481      # for unknown variables in the end.
15482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15483
15484      # Check if we try to supply an empty value
15485      if test "x$PANDOC" = x; then
15486        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15487$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15489$as_echo_n "checking for PANDOC... " >&6; }
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15491$as_echo "disabled" >&6; }
15492      else
15493        # Check if the provided tool contains a complete path.
15494        tool_specified="$PANDOC"
15495        tool_basename="${tool_specified##*/}"
15496        if test "x$tool_basename" = "x$tool_specified"; then
15497          # A command without a complete path is provided, search $PATH.
15498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15499$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15500          # Extract the first word of "$tool_basename", so it can be a program name with args.
15501set dummy $tool_basename; ac_word=$2
15502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15503$as_echo_n "checking for $ac_word... " >&6; }
15504if ${ac_cv_path_PANDOC+:} false; then :
15505  $as_echo_n "(cached) " >&6
15506else
15507  case $PANDOC in
15508  [\\/]* | ?:[\\/]*)
15509  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15510  ;;
15511  *)
15512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15513for as_dir in $PATH
15514do
15515  IFS=$as_save_IFS
15516  test -z "$as_dir" && as_dir=.
15517    for ac_exec_ext in '' $ac_executable_extensions; do
15518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15519    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15521    break 2
15522  fi
15523done
15524  done
15525IFS=$as_save_IFS
15526
15527  ;;
15528esac
15529fi
15530PANDOC=$ac_cv_path_PANDOC
15531if test -n "$PANDOC"; then
15532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15533$as_echo "$PANDOC" >&6; }
15534else
15535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15536$as_echo "no" >&6; }
15537fi
15538
15539
15540          if test "x$PANDOC" = x; then
15541            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15542          fi
15543        else
15544          # Otherwise we believe it is a complete path. Use it as it is.
15545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15546$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15547          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15548$as_echo_n "checking for PANDOC... " >&6; }
15549          if test ! -x "$tool_specified"; then
15550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15551$as_echo "not found" >&6; }
15552            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15553          fi
15554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15555$as_echo "$tool_specified" >&6; }
15556        fi
15557      fi
15558    fi
15559
15560  fi
15561
15562
15563
15564
15565# Now we can determine OpenJDK build and target platforms. This is required to
15566# have early on.
15567# Make sure we can run config.sub.
15568$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15569  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15570
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15572$as_echo_n "checking build system type... " >&6; }
15573if ${ac_cv_build+:} false; then :
15574  $as_echo_n "(cached) " >&6
15575else
15576  ac_build_alias=$build_alias
15577test "x$ac_build_alias" = x &&
15578  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15579test "x$ac_build_alias" = x &&
15580  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15581ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15582  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15583
15584fi
15585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15586$as_echo "$ac_cv_build" >&6; }
15587case $ac_cv_build in
15588*-*-*) ;;
15589*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15590esac
15591build=$ac_cv_build
15592ac_save_IFS=$IFS; IFS='-'
15593set x $ac_cv_build
15594shift
15595build_cpu=$1
15596build_vendor=$2
15597shift; shift
15598# Remember, the first character of IFS is used to create $*,
15599# except with old shells:
15600build_os=$*
15601IFS=$ac_save_IFS
15602case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15603
15604
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15606$as_echo_n "checking host system type... " >&6; }
15607if ${ac_cv_host+:} false; then :
15608  $as_echo_n "(cached) " >&6
15609else
15610  if test "x$host_alias" = x; then
15611  ac_cv_host=$ac_cv_build
15612else
15613  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15614    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15615fi
15616
15617fi
15618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15619$as_echo "$ac_cv_host" >&6; }
15620case $ac_cv_host in
15621*-*-*) ;;
15622*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15623esac
15624host=$ac_cv_host
15625ac_save_IFS=$IFS; IFS='-'
15626set x $ac_cv_host
15627shift
15628host_cpu=$1
15629host_vendor=$2
15630shift; shift
15631# Remember, the first character of IFS is used to create $*,
15632# except with old shells:
15633host_os=$*
15634IFS=$ac_save_IFS
15635case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15636
15637
15638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15639$as_echo_n "checking target system type... " >&6; }
15640if ${ac_cv_target+:} false; then :
15641  $as_echo_n "(cached) " >&6
15642else
15643  if test "x$target_alias" = x; then
15644  ac_cv_target=$ac_cv_host
15645else
15646  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15647    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15648fi
15649
15650fi
15651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15652$as_echo "$ac_cv_target" >&6; }
15653case $ac_cv_target in
15654*-*-*) ;;
15655*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15656esac
15657target=$ac_cv_target
15658ac_save_IFS=$IFS; IFS='-'
15659set x $ac_cv_target
15660shift
15661target_cpu=$1
15662target_vendor=$2
15663shift; shift
15664# Remember, the first character of IFS is used to create $*,
15665# except with old shells:
15666target_os=$*
15667IFS=$ac_save_IFS
15668case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15669
15670
15671# The aliases save the names the user supplied, while $host etc.
15672# will get canonicalized.
15673test -n "$target_alias" &&
15674  test "$program_prefix$program_suffix$program_transform_name" = \
15675    NONENONEs,x,x, &&
15676  program_prefix=${target_alias}-
15677
15678  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15679  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15680  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15681  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15682  # to use the configure naming style.
15683
15684
15685
15686
15687
15688  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15689  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15690  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15691  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15692  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15693  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15694
15695
15696
15697  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15698
15699  case "$build_os" in
15700    *linux*)
15701      VAR_OS=linux
15702      VAR_OS_TYPE=unix
15703      ;;
15704    *solaris*)
15705      VAR_OS=solaris
15706      VAR_OS_TYPE=unix
15707      ;;
15708    *darwin*)
15709      VAR_OS=macosx
15710      VAR_OS_TYPE=unix
15711      ;;
15712    *bsd*)
15713      VAR_OS=bsd
15714      VAR_OS_TYPE=unix
15715      ;;
15716    *cygwin*)
15717      VAR_OS=windows
15718      VAR_OS_ENV=windows.cygwin
15719      ;;
15720    *mingw*)
15721      VAR_OS=windows
15722      VAR_OS_ENV=windows.msys
15723      ;;
15724    *aix*)
15725      VAR_OS=aix
15726      VAR_OS_TYPE=unix
15727      ;;
15728    *)
15729      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15730      ;;
15731  esac
15732
15733
15734  # First argument is the cpu name from the trip/quad
15735  case "$build_cpu" in
15736    x86_64)
15737      VAR_CPU=x86_64
15738      VAR_CPU_ARCH=x86
15739      VAR_CPU_BITS=64
15740      VAR_CPU_ENDIAN=little
15741      ;;
15742    i?86)
15743      VAR_CPU=x86
15744      VAR_CPU_ARCH=x86
15745      VAR_CPU_BITS=32
15746      VAR_CPU_ENDIAN=little
15747      ;;
15748    arm*)
15749      VAR_CPU=arm
15750      VAR_CPU_ARCH=arm
15751      VAR_CPU_BITS=32
15752      VAR_CPU_ENDIAN=little
15753      ;;
15754    aarch64)
15755      VAR_CPU=aarch64
15756      VAR_CPU_ARCH=aarch64
15757      VAR_CPU_BITS=64
15758      VAR_CPU_ENDIAN=little
15759      ;;
15760    powerpc)
15761      VAR_CPU=ppc
15762      VAR_CPU_ARCH=ppc
15763      VAR_CPU_BITS=32
15764      VAR_CPU_ENDIAN=big
15765      ;;
15766    powerpc64)
15767      VAR_CPU=ppc64
15768      VAR_CPU_ARCH=ppc
15769      VAR_CPU_BITS=64
15770      VAR_CPU_ENDIAN=big
15771      ;;
15772    powerpc64le)
15773      VAR_CPU=ppc64le
15774      VAR_CPU_ARCH=ppc
15775      VAR_CPU_BITS=64
15776      VAR_CPU_ENDIAN=little
15777      ;;
15778    s390)
15779      VAR_CPU=s390
15780      VAR_CPU_ARCH=s390
15781      VAR_CPU_BITS=32
15782      VAR_CPU_ENDIAN=big
15783      ;;
15784    s390x)
15785      VAR_CPU=s390x
15786      VAR_CPU_ARCH=s390
15787      VAR_CPU_BITS=64
15788      VAR_CPU_ENDIAN=big
15789      ;;
15790    sparc)
15791      VAR_CPU=sparc
15792      VAR_CPU_ARCH=sparc
15793      VAR_CPU_BITS=32
15794      VAR_CPU_ENDIAN=big
15795      ;;
15796    sparcv9|sparc64)
15797      VAR_CPU=sparcv9
15798      VAR_CPU_ARCH=sparc
15799      VAR_CPU_BITS=64
15800      VAR_CPU_ENDIAN=big
15801      ;;
15802    *)
15803      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15804      ;;
15805  esac
15806
15807  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15808  OPENJDK_BUILD_OS="$VAR_OS"
15809  if test "x$VAR_OS_TYPE" != x; then
15810    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15811  else
15812    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15813  fi
15814  if test "x$VAR_OS_ENV" != x; then
15815    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15816  else
15817    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15818  fi
15819  OPENJDK_BUILD_CPU="$VAR_CPU"
15820  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15821  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15822  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15823
15824
15825
15826
15827
15828
15829
15830
15831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15832$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15834$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15835
15836  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15837
15838  case "$host_os" in
15839    *linux*)
15840      VAR_OS=linux
15841      VAR_OS_TYPE=unix
15842      ;;
15843    *solaris*)
15844      VAR_OS=solaris
15845      VAR_OS_TYPE=unix
15846      ;;
15847    *darwin*)
15848      VAR_OS=macosx
15849      VAR_OS_TYPE=unix
15850      ;;
15851    *bsd*)
15852      VAR_OS=bsd
15853      VAR_OS_TYPE=unix
15854      ;;
15855    *cygwin*)
15856      VAR_OS=windows
15857      VAR_OS_ENV=windows.cygwin
15858      ;;
15859    *mingw*)
15860      VAR_OS=windows
15861      VAR_OS_ENV=windows.msys
15862      ;;
15863    *aix*)
15864      VAR_OS=aix
15865      VAR_OS_TYPE=unix
15866      ;;
15867    *)
15868      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15869      ;;
15870  esac
15871
15872
15873  # First argument is the cpu name from the trip/quad
15874  case "$host_cpu" in
15875    x86_64)
15876      VAR_CPU=x86_64
15877      VAR_CPU_ARCH=x86
15878      VAR_CPU_BITS=64
15879      VAR_CPU_ENDIAN=little
15880      ;;
15881    i?86)
15882      VAR_CPU=x86
15883      VAR_CPU_ARCH=x86
15884      VAR_CPU_BITS=32
15885      VAR_CPU_ENDIAN=little
15886      ;;
15887    arm*)
15888      VAR_CPU=arm
15889      VAR_CPU_ARCH=arm
15890      VAR_CPU_BITS=32
15891      VAR_CPU_ENDIAN=little
15892      ;;
15893    aarch64)
15894      VAR_CPU=aarch64
15895      VAR_CPU_ARCH=aarch64
15896      VAR_CPU_BITS=64
15897      VAR_CPU_ENDIAN=little
15898      ;;
15899    powerpc)
15900      VAR_CPU=ppc
15901      VAR_CPU_ARCH=ppc
15902      VAR_CPU_BITS=32
15903      VAR_CPU_ENDIAN=big
15904      ;;
15905    powerpc64)
15906      VAR_CPU=ppc64
15907      VAR_CPU_ARCH=ppc
15908      VAR_CPU_BITS=64
15909      VAR_CPU_ENDIAN=big
15910      ;;
15911    powerpc64le)
15912      VAR_CPU=ppc64le
15913      VAR_CPU_ARCH=ppc
15914      VAR_CPU_BITS=64
15915      VAR_CPU_ENDIAN=little
15916      ;;
15917    s390)
15918      VAR_CPU=s390
15919      VAR_CPU_ARCH=s390
15920      VAR_CPU_BITS=32
15921      VAR_CPU_ENDIAN=big
15922      ;;
15923    s390x)
15924      VAR_CPU=s390x
15925      VAR_CPU_ARCH=s390
15926      VAR_CPU_BITS=64
15927      VAR_CPU_ENDIAN=big
15928      ;;
15929    sparc)
15930      VAR_CPU=sparc
15931      VAR_CPU_ARCH=sparc
15932      VAR_CPU_BITS=32
15933      VAR_CPU_ENDIAN=big
15934      ;;
15935    sparcv9|sparc64)
15936      VAR_CPU=sparcv9
15937      VAR_CPU_ARCH=sparc
15938      VAR_CPU_BITS=64
15939      VAR_CPU_ENDIAN=big
15940      ;;
15941    *)
15942      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15943      ;;
15944  esac
15945
15946  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15947  OPENJDK_TARGET_OS="$VAR_OS"
15948  if test "x$VAR_OS_TYPE" != x; then
15949    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15950  else
15951    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15952  fi
15953  if test "x$VAR_OS_ENV" != x; then
15954    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15955  else
15956    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15957  fi
15958  OPENJDK_TARGET_CPU="$VAR_CPU"
15959  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15960  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15961  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15962
15963
15964
15965
15966
15967
15968
15969
15970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15971$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15973$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15974
15975
15976
15977# Check whether --with-target-bits was given.
15978if test "${with_target_bits+set}" = set; then :
15979  withval=$with_target_bits;
15980fi
15981
15982
15983  # We have three types of compiles:
15984  # native  == normal compilation, target system == build system
15985  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15986  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15987  #
15988  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15989    # We're doing a proper cross-compilation
15990    COMPILE_TYPE="cross"
15991  else
15992    COMPILE_TYPE="native"
15993  fi
15994
15995  if test "x$with_target_bits" != x; then
15996    if test "x$COMPILE_TYPE" = "xcross"; then
15997      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15998    fi
15999
16000    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16001      # A reduced build is requested
16002      COMPILE_TYPE="reduced"
16003      OPENJDK_TARGET_CPU_BITS=32
16004      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16005        OPENJDK_TARGET_CPU=x86
16006      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16007        OPENJDK_TARGET_CPU=sparc
16008      else
16009        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16010      fi
16011    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16012      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
16013    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16014      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16015$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16016    else
16017      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16018    fi
16019  fi
16020
16021
16022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16023$as_echo_n "checking compilation type... " >&6; }
16024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16025$as_echo "$COMPILE_TYPE" >&6; }
16026
16027
16028  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16029    REQUIRED_OS_NAME=SunOS
16030    REQUIRED_OS_VERSION=5.10
16031  fi
16032  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16033    REQUIRED_OS_NAME=Linux
16034    REQUIRED_OS_VERSION=2.6
16035  fi
16036  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16037    REQUIRED_OS_NAME=Windows
16038    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
16039      REQUIRED_OS_VERSION=5.2
16040    else
16041      REQUIRED_OS_VERSION=5.1
16042    fi
16043  fi
16044  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16045    REQUIRED_OS_NAME="Mac OS X"
16046    REQUIRED_OS_VERSION=11.2
16047  fi
16048  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16049    REQUIRED_OS_NAME=AIX
16050    REQUIRED_OS_VERSION=7.1
16051  fi
16052  REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
16053
16054
16055
16056
16057
16058
16059
16060  # Also store the legacy naming of the cpu.
16061  # Ie i586 and amd64 instead of x86 and x86_64
16062  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16063  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16064    OPENJDK_TARGET_CPU_LEGACY="i586"
16065  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16066    # On all platforms except MacOSX replace x86_64 with amd64.
16067    OPENJDK_TARGET_CPU_LEGACY="amd64"
16068  fi
16069
16070
16071  # And the second legacy naming of the cpu.
16072  # Ie i386 and amd64 instead of x86 and x86_64.
16073  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16074  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16075    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16076  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16077    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16078  fi
16079
16080
16081  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16082  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16083  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16084  OPENJDK_TARGET_CPU_ISADIR=""
16085  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16086    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16087      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16088    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16089      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16090    fi
16091  fi
16092
16093
16094  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16095  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16096  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16097    # On linux only, we replace x86 with i386.
16098    OPENJDK_TARGET_CPU_OSARCH="i386"
16099  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16100    # On all platforms except macosx, we replace x86_64 with amd64.
16101    OPENJDK_TARGET_CPU_OSARCH="amd64"
16102  fi
16103
16104
16105  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16106  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16107    OPENJDK_TARGET_CPU_JLI="i386"
16108  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16109    # On all platforms except macosx, we replace x86_64 with amd64.
16110    OPENJDK_TARGET_CPU_JLI="amd64"
16111  fi
16112
16113  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16114      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16115  else
16116      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16117  fi
16118
16119
16120  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16121  # Macosx is osx and x86_64 is x64
16122  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16123    OPENJDK_TARGET_OS_BUNDLE="osx"
16124  else
16125    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16126  fi
16127  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16128    OPENJDK_TARGET_CPU_BUNDLE="x64"
16129  else
16130    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16131  fi
16132  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16133
16134
16135  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16136    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16137    # unpack200.exe. This variable is used in
16138    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16139    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16140      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16141    fi
16142  fi
16143
16144  if test "x$COMPILE_TYPE" = "xcross"; then
16145    # FIXME: ... or should this include reduced builds..?
16146    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16147  else
16148    DEFINE_CROSS_COMPILE_ARCH=""
16149  fi
16150
16151
16152  # Convert openjdk platform names to hotspot names
16153
16154  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16155  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16156    HOTSPOT_TARGET_OS=bsd
16157  fi
16158
16159
16160  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16161  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16162    HOTSPOT_TARGET_OS_TYPE=posix
16163  fi
16164
16165
16166  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16167  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16168    HOTSPOT_TARGET_CPU=x86_32
16169  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16170    HOTSPOT_TARGET_CPU=sparc
16171  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16172    HOTSPOT_TARGET_CPU=ppc_64
16173  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16174    HOTSPOT_TARGET_CPU=ppc_64
16175  fi
16176
16177
16178  # This is identical with OPENJDK_*, but define anyway for consistency.
16179  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16180
16181
16182  # Setup HOTSPOT_TARGET_CPU_DEFINE
16183  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16184    HOTSPOT_TARGET_CPU_DEFINE=IA32
16185  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16186    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16187  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16188    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16189  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16190    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16191  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16192    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16193  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16194    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16195
16196  # The cpu defines below are for zero, we don't support them directly.
16197  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16198    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16199  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16200    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16201  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16202    HOTSPOT_TARGET_CPU_DEFINE=S390
16203  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16204    HOTSPOT_TARGET_CPU_DEFINE=S390
16205  elif test "x$OPENJDK_TARGET_CPU" != x; then
16206    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16207  fi
16208
16209
16210
16211
16212  # Also store the legacy naming of the cpu.
16213  # Ie i586 and amd64 instead of x86 and x86_64
16214  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16215  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16216    OPENJDK_BUILD_CPU_LEGACY="i586"
16217  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16218    # On all platforms except MacOSX replace x86_64 with amd64.
16219    OPENJDK_BUILD_CPU_LEGACY="amd64"
16220  fi
16221
16222
16223  # And the second legacy naming of the cpu.
16224  # Ie i386 and amd64 instead of x86 and x86_64.
16225  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16226  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16227    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16228  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16229    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16230  fi
16231
16232
16233  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16234  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16235  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16236  OPENJDK_BUILD_CPU_ISADIR=""
16237  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16238    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16239      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16240    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16241      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16242    fi
16243  fi
16244
16245
16246  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16247  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16248  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16249    # On linux only, we replace x86 with i386.
16250    OPENJDK_BUILD_CPU_OSARCH="i386"
16251  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16252    # On all platforms except macosx, we replace x86_64 with amd64.
16253    OPENJDK_BUILD_CPU_OSARCH="amd64"
16254  fi
16255
16256
16257  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16258  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16259    OPENJDK_BUILD_CPU_JLI="i386"
16260  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16261    # On all platforms except macosx, we replace x86_64 with amd64.
16262    OPENJDK_BUILD_CPU_JLI="amd64"
16263  fi
16264
16265  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16266      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16267  else
16268      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16269  fi
16270
16271
16272  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16273  # Macosx is osx and x86_64 is x64
16274  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16275    OPENJDK_BUILD_OS_BUNDLE="osx"
16276  else
16277    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16278  fi
16279  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16280    OPENJDK_BUILD_CPU_BUNDLE="x64"
16281  else
16282    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16283  fi
16284  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16285
16286
16287  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16288    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16289    # unpack200.exe. This variable is used in
16290    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16291    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16292      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16293    fi
16294  fi
16295
16296  if test "x$COMPILE_TYPE" = "xcross"; then
16297    # FIXME: ... or should this include reduced builds..?
16298    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16299  else
16300    DEFINE_CROSS_COMPILE_ARCH=""
16301  fi
16302
16303
16304  # Convert openjdk platform names to hotspot names
16305
16306  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16307  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16308    HOTSPOT_BUILD_OS=bsd
16309  fi
16310
16311
16312  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16313  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16314    HOTSPOT_BUILD_OS_TYPE=posix
16315  fi
16316
16317
16318  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16319  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16320    HOTSPOT_BUILD_CPU=x86_32
16321  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16322    HOTSPOT_BUILD_CPU=sparc
16323  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16324    HOTSPOT_BUILD_CPU=ppc_64
16325  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16326    HOTSPOT_BUILD_CPU=ppc_64
16327  fi
16328
16329
16330  # This is identical with OPENJDK_*, but define anyway for consistency.
16331  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16332
16333
16334  # Setup HOTSPOT_BUILD_CPU_DEFINE
16335  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16336    HOTSPOT_BUILD_CPU_DEFINE=IA32
16337  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16338    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16339  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16340    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16341  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16342    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16343  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16344    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16345  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16346    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16347
16348  # The cpu defines below are for zero, we don't support them directly.
16349  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16350    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16351  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16352    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16353  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16354    HOTSPOT_BUILD_CPU_DEFINE=S390
16355  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16356    HOTSPOT_BUILD_CPU_DEFINE=S390
16357  elif test "x$OPENJDK_BUILD_CPU" != x; then
16358    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16359  fi
16360
16361
16362
16363
16364
16365
16366# Continue setting up basic stuff. Most remaining code require fundamental tools.
16367
16368  # Save the current directory this script was started from
16369  CURDIR="$PWD"
16370
16371  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16372  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16373  # was not available at that time.
16374  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16375  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16376    ORIGINAL_PATH="$REWRITTEN_PATH"
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16378$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16379  fi
16380
16381  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16382    PATH_SEP=";"
16383
16384  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16385  if test $SRC_ROOT_LENGTH -gt 100; then
16386    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16387  fi
16388
16389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16391$as_echo_n "checking cygwin release... " >&6; }
16392    CYGWIN_VERSION=`$UNAME -r`
16393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16394$as_echo "$CYGWIN_VERSION" >&6; }
16395    WINDOWS_ENV_VENDOR='cygwin'
16396    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16397
16398    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16399    if test "x$CYGWIN_VERSION_OLD" != x; then
16400      { $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
16401$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;}
16402      as_fn_error $? "Cannot continue" "$LINENO" 5
16403    fi
16404    if test "x$CYGPATH" = x; then
16405      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16406    fi
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16408$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16409    # The cmd output ends with Windows line endings (CR/LF)
16410    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16411    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16412    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16414$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16415    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16416    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16417    if test "x$test_cygdrive_prefix" = x; then
16418      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16419    fi
16420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16422$as_echo_n "checking msys release... " >&6; }
16423    MSYS_VERSION=`$UNAME -r`
16424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16425$as_echo "$MSYS_VERSION" >&6; }
16426
16427    WINDOWS_ENV_VENDOR='msys'
16428    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16429
16430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16431$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16432    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16433    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16434
16435  windows_path="$MSYS_ROOT_PATH"
16436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16437    unix_path=`$CYGPATH -u "$windows_path"`
16438    MSYS_ROOT_PATH="$unix_path"
16439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16441    MSYS_ROOT_PATH="$unix_path"
16442  fi
16443
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16445$as_echo "$MSYS_ROOT_PATH" >&6; }
16446    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16447  else
16448    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16449  fi
16450
16451  # Test if windows or unix (cygwin/msys) find is first in path.
16452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16453$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16454  FIND_BINARY_OUTPUT=`find --version 2>&1`
16455  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16457$as_echo "unix style" >&6; }
16458  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16460$as_echo "Windows" >&6; }
16461    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16462$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16463    { $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
16464$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16465    as_fn_error $? "Cannot continue" "$LINENO" 5
16466  else
16467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16468$as_echo "unknown" >&6; }
16469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16470$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16471  fi
16472
16473  else
16474    PATH_SEP=":"
16475  fi
16476
16477
16478  # We get the top-level directory from the supporting wrappers.
16479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16480$as_echo_n "checking for top-level directory... " >&6; }
16481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16482$as_echo "$TOPDIR" >&6; }
16483
16484
16485  # Save the original version of TOPDIR for string comparisons
16486  ORIGINAL_TOPDIR="$TOPDIR"
16487
16488
16489  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16490
16491  # Only process if variable expands to non-empty
16492
16493  if test "x$CURDIR" != x; then
16494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495
16496  # Input might be given as Windows format, start by converting to
16497  # unix format.
16498  path="$CURDIR"
16499  new_path=`$CYGPATH -u "$path"`
16500
16501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16504  # "foo.exe" is OK but "foo" is an error.
16505  #
16506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16507  # It is also a way to make sure we got the proper file name for the real test later on.
16508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16509  if test "x$test_shortpath" = x; then
16510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16511$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16512    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16513  fi
16514
16515  # Call helper function which possibly converts this using DOS-style short mode.
16516  # If so, the updated path is stored in $new_path.
16517
16518  input_path="$new_path"
16519  # Check if we need to convert this using DOS-style short mode. If the path
16520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16521  # take no chances and rewrite it.
16522  # Note: m4 eats our [], so we need to use [ and ] instead.
16523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16524  if test "x$has_forbidden_chars" != x; then
16525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16529      # Going to short mode and back again did indeed matter. Since short mode is
16530      # case insensitive, let's make it lowercase to improve readability.
16531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16532      # Now convert it back to Unix-style (cygpath)
16533      input_path=`$CYGPATH -u "$shortmode_path"`
16534      new_path="$input_path"
16535    fi
16536  fi
16537
16538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16539  if test "x$test_cygdrive_prefix" = x; then
16540    # As a simple fix, exclude /usr/bin since it's not a real path.
16541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16543      # a path prefixed by /cygdrive for fixpath to work.
16544      new_path="$CYGWIN_ROOT_PATH$input_path"
16545    fi
16546  fi
16547
16548
16549  if test "x$path" != "x$new_path"; then
16550    CURDIR="$new_path"
16551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16552$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16553  fi
16554
16555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16556
16557  path="$CURDIR"
16558  has_colon=`$ECHO $path | $GREP ^.:`
16559  new_path="$path"
16560  if test "x$has_colon" = x; then
16561    # Not in mixed or Windows style, start by that.
16562    new_path=`cmd //c echo $path`
16563  fi
16564
16565
16566  input_path="$new_path"
16567  # Check if we need to convert this using DOS-style short mode. If the path
16568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16569  # take no chances and rewrite it.
16570  # Note: m4 eats our [], so we need to use [ and ] instead.
16571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16572  if test "x$has_forbidden_chars" != x; then
16573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16575  fi
16576
16577
16578  windows_path="$new_path"
16579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16580    unix_path=`$CYGPATH -u "$windows_path"`
16581    new_path="$unix_path"
16582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16584    new_path="$unix_path"
16585  fi
16586
16587  if test "x$path" != "x$new_path"; then
16588    CURDIR="$new_path"
16589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16590$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16591  fi
16592
16593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16595
16596    else
16597      # We're on a unix platform. Hooray! :)
16598      path="$CURDIR"
16599      has_space=`$ECHO "$path" | $GREP " "`
16600      if test "x$has_space" != x; then
16601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16602$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16604      fi
16605
16606      # Use eval to expand a potential ~
16607      eval path="$path"
16608      if test ! -f "$path" && test ! -d "$path"; then
16609        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16610      fi
16611
16612      if test -d "$path"; then
16613        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16614      else
16615        dir="`$DIRNAME "$path"`"
16616        base="`$BASENAME "$path"`"
16617        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16618      fi
16619    fi
16620  fi
16621
16622
16623  # Only process if variable expands to non-empty
16624
16625  if test "x$TOPDIR" != x; then
16626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16627
16628  # Input might be given as Windows format, start by converting to
16629  # unix format.
16630  path="$TOPDIR"
16631  new_path=`$CYGPATH -u "$path"`
16632
16633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16636  # "foo.exe" is OK but "foo" is an error.
16637  #
16638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16639  # It is also a way to make sure we got the proper file name for the real test later on.
16640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16641  if test "x$test_shortpath" = x; then
16642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16643$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16644    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16645  fi
16646
16647  # Call helper function which possibly converts this using DOS-style short mode.
16648  # If so, the updated path is stored in $new_path.
16649
16650  input_path="$new_path"
16651  # Check if we need to convert this using DOS-style short mode. If the path
16652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653  # take no chances and rewrite it.
16654  # Note: m4 eats our [], so we need to use [ and ] instead.
16655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16656  if test "x$has_forbidden_chars" != x; then
16657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16661      # Going to short mode and back again did indeed matter. Since short mode is
16662      # case insensitive, let's make it lowercase to improve readability.
16663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16664      # Now convert it back to Unix-style (cygpath)
16665      input_path=`$CYGPATH -u "$shortmode_path"`
16666      new_path="$input_path"
16667    fi
16668  fi
16669
16670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16671  if test "x$test_cygdrive_prefix" = x; then
16672    # As a simple fix, exclude /usr/bin since it's not a real path.
16673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16675      # a path prefixed by /cygdrive for fixpath to work.
16676      new_path="$CYGWIN_ROOT_PATH$input_path"
16677    fi
16678  fi
16679
16680
16681  if test "x$path" != "x$new_path"; then
16682    TOPDIR="$new_path"
16683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16684$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16685  fi
16686
16687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16688
16689  path="$TOPDIR"
16690  has_colon=`$ECHO $path | $GREP ^.:`
16691  new_path="$path"
16692  if test "x$has_colon" = x; then
16693    # Not in mixed or Windows style, start by that.
16694    new_path=`cmd //c echo $path`
16695  fi
16696
16697
16698  input_path="$new_path"
16699  # Check if we need to convert this using DOS-style short mode. If the path
16700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16701  # take no chances and rewrite it.
16702  # Note: m4 eats our [], so we need to use [ and ] instead.
16703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16704  if test "x$has_forbidden_chars" != x; then
16705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16707  fi
16708
16709
16710  windows_path="$new_path"
16711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16712    unix_path=`$CYGPATH -u "$windows_path"`
16713    new_path="$unix_path"
16714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16716    new_path="$unix_path"
16717  fi
16718
16719  if test "x$path" != "x$new_path"; then
16720    TOPDIR="$new_path"
16721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16722$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16723  fi
16724
16725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16727
16728    else
16729      # We're on a unix platform. Hooray! :)
16730      path="$TOPDIR"
16731      has_space=`$ECHO "$path" | $GREP " "`
16732      if test "x$has_space" != x; then
16733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16734$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16736      fi
16737
16738      # Use eval to expand a potential ~
16739      eval path="$path"
16740      if test ! -f "$path" && test ! -d "$path"; then
16741        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16742      fi
16743
16744      if test -d "$path"; then
16745        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16746      else
16747        dir="`$DIRNAME "$path"`"
16748        base="`$BASENAME "$path"`"
16749        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16750      fi
16751    fi
16752  fi
16753
16754  # SRC_ROOT is a traditional alias for TOPDIR.
16755  SRC_ROOT=$TOPDIR
16756
16757  # Calculate a canonical version of TOPDIR for string comparisons
16758  CANONICAL_TOPDIR=$TOPDIR
16759
16760  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16761    # Follow a chain of symbolic links. Use readlink
16762    # where it exists, else fall back to horribly
16763    # complicated shell code.
16764    if test "x$READLINK_TESTED" != yes; then
16765      # On MacOSX there is a readlink tool with a different
16766      # purpose than the GNU readlink tool. Check the found readlink.
16767      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16768      if test "x$ISGNU" = x; then
16769        # A readlink that we do not know how to use.
16770        # Are there other non-GNU readlinks out there?
16771        READLINK_TESTED=yes
16772        READLINK=
16773      fi
16774    fi
16775
16776    if test "x$READLINK" != x; then
16777      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16778    else
16779      # Save the current directory for restoring afterwards
16780      STARTDIR=$PWD
16781      COUNTER=0
16782      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16783      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16784      cd $sym_link_dir
16785      # Use -P flag to resolve symlinks in directories.
16786      cd `$THEPWDCMD -P`
16787      sym_link_dir=`$THEPWDCMD -P`
16788      # Resolve file symlinks
16789      while test $COUNTER -lt 20; do
16790        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16791        if test "x$ISLINK" == x; then
16792          # This is not a symbolic link! We are done!
16793          break
16794        fi
16795        # Again resolve directory symlinks since the target of the just found
16796        # link could be in a different directory
16797        cd `$DIRNAME $ISLINK`
16798        sym_link_dir=`$THEPWDCMD -P`
16799        sym_link_file=`$BASENAME $ISLINK`
16800        let COUNTER=COUNTER+1
16801      done
16802      cd $STARTDIR
16803      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16804    fi
16805  fi
16806
16807
16808
16809  # Locate the directory of this script.
16810  AUTOCONF_DIR=$TOPDIR/common/autoconf
16811
16812  # Setup username (for use in adhoc version strings etc)
16813  # Outer [ ] to quote m4.
16814   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16815
16816
16817
16818# Check if it's a pure open build or if custom sources are to be used.
16819
16820  # Check whether --enable-openjdk-only was given.
16821if test "${enable_openjdk_only+set}" = set; then :
16822  enableval=$enable_openjdk_only;
16823else
16824  enable_openjdk_only="no"
16825fi
16826
16827
16828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16829$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16831$as_echo "$enable_openjdk_only" >&6; }
16832  if test "x$enable_openjdk_only" = "xyes"; then
16833    SUPPRESS_CUSTOM_EXTENSIONS="true"
16834  elif test "x$enable_openjdk_only" = "xno"; then
16835    SUPPRESS_CUSTOM_EXTENSIONS="false"
16836  else
16837    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16838  fi
16839
16840  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16841  # the IncludeCustomExtension macro.
16842
16843
16844# Check whether --with-custom-make-dir was given.
16845if test "${with_custom_make_dir+set}" = set; then :
16846  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
16847$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16848fi
16849
16850
16851
16852
16853# These are needed to be able to create a configuration name (and thus the output directory)
16854
16855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16856$as_echo_n "checking which variant of the JDK to build... " >&6; }
16857
16858# Check whether --with-jdk-variant was given.
16859if test "${with_jdk_variant+set}" = set; then :
16860  withval=$with_jdk_variant;
16861fi
16862
16863
16864  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16865    JDK_VARIANT="normal"
16866  else
16867    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16868  fi
16869
16870
16871
16872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16873$as_echo "$JDK_VARIANT" >&6; }
16874
16875
16876  DEBUG_LEVEL="release"
16877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16878$as_echo_n "checking which debug level to use... " >&6; }
16879  # Check whether --enable-debug was given.
16880if test "${enable_debug+set}" = set; then :
16881  enableval=$enable_debug;
16882        ENABLE_DEBUG="${enableval}"
16883        DEBUG_LEVEL="fastdebug"
16884
16885else
16886  ENABLE_DEBUG="no"
16887fi
16888
16889
16890
16891# Check whether --with-debug-level was given.
16892if test "${with_debug_level+set}" = set; then :
16893  withval=$with_debug_level;
16894        DEBUG_LEVEL="${withval}"
16895        if test "x$ENABLE_DEBUG" = xyes; then
16896          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16897        fi
16898
16899fi
16900
16901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16902$as_echo "$DEBUG_LEVEL" >&6; }
16903
16904  if test "x$DEBUG_LEVEL" != xrelease && \
16905      test "x$DEBUG_LEVEL" != xoptimized && \
16906      test "x$DEBUG_LEVEL" != xfastdebug && \
16907      test "x$DEBUG_LEVEL" != xslowdebug; then
16908    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16909  fi
16910
16911  # Translate DEBUG_LEVEL to debug level used by Hotspot
16912  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16913  if test "x$DEBUG_LEVEL" = xrelease; then
16914    HOTSPOT_DEBUG_LEVEL="product"
16915  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16916    HOTSPOT_DEBUG_LEVEL="debug"
16917  fi
16918
16919  if test "x$DEBUG_LEVEL" = xoptimized; then
16920    # The debug level 'optimized' is a little special because it is currently only
16921    # applicable to the HotSpot build where it means to build a completely
16922    # optimized version of the VM without any debugging code (like for the
16923    # 'release' debug level which is called 'product' in the HotSpot build) but
16924    # with the exception that it can contain additional code which is otherwise
16925    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16926    # test new and/or experimental features which are not intended for customer
16927    # shipment. Because these new features need to be tested and benchmarked in
16928    # real world scenarios, we want to build the containing JDK at the 'release'
16929    # debug level.
16930    DEBUG_LEVEL="release"
16931  fi
16932
16933
16934
16935
16936
16937
16938# Check whether --with-jvm-variants was given.
16939if test "${with_jvm_variants+set}" = set; then :
16940  withval=$with_jvm_variants;
16941fi
16942
16943
16944
16945
16946# Check whether --with-cpu-port was given.
16947if test "${with_cpu_port+set}" = set; then :
16948  withval=$with_cpu_port;
16949fi
16950
16951
16952  if test "x$with_cpu_port" != x; then
16953    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16954      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16955    fi
16956    if test "x$with_cpu_port" != xarm64 && \
16957        test "x$with_cpu_port" != xaarch64; then
16958      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16959    fi
16960    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16961  fi
16962
16963
16964  if test "x$with_jvm_variants" = x; then
16965    with_jvm_variants="server"
16966  fi
16967  JVM_VARIANTS_OPT="$with_jvm_variants"
16968
16969  # Has the user listed more than one variant?
16970  # Additional [] needed to keep m4 from mangling shell constructs.
16971  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16972    BUILDING_MULTIPLE_JVM_VARIANTS=true
16973  else
16974    BUILDING_MULTIPLE_JVM_VARIANTS=false
16975  fi
16976  # Replace the commas with AND for use in the build directory name.
16977  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16978
16979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16980$as_echo_n "checking which variants of the JVM to build... " >&6; }
16981  # JVM_VARIANTS is a space-separated list.
16982  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16983  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16985$as_echo "$JVM_VARIANTS" >&6; }
16986
16987  # Check that the selected variants are valid
16988
16989  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16990  # Notice that the original variant failes on SLES 10 and 11
16991  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16992  STACK=${JVM_VARIANTS// /$'\n'}
16993  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16994  if test "x$INVALID_VARIANTS" != x; then
16995    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16996$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16997    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16998  fi
16999
17000  # All "special" variants share the same output directory ("server")
17001  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17002  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17003  STACK=${JVM_VARIANTS// /$'\n'}
17004  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17005  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17006    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17007  fi
17008
17009  # The "main" variant is the one used by other libs to link against during the
17010  # build.
17011  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17012    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17013    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17014      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17015        JVM_VARIANT_MAIN="$variant"
17016        break
17017      fi
17018    done
17019  else
17020    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17021  fi
17022
17023
17024
17025
17026
17027  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17028    # zero behaves as a platform and rewrites these values. This is really weird. :(
17029    # We are guaranteed that we do not build any other variants when building zero.
17030    HOTSPOT_TARGET_CPU=zero
17031    HOTSPOT_TARGET_CPU_ARCH=zero
17032  fi
17033
17034
17035# With basic setup done, call the custom early hook.
17036
17037
17038# Check if we have devkits, extra paths or sysroot set.
17039
17040
17041# Check whether --with-devkit was given.
17042if test "${with_devkit+set}" = set; then :
17043  withval=$with_devkit;
17044
17045  # Only process if variable expands to non-empty
17046
17047  if test "x$with_devkit" != x; then
17048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17049
17050  # Input might be given as Windows format, start by converting to
17051  # unix format.
17052  path="$with_devkit"
17053  new_path=`$CYGPATH -u "$path"`
17054
17055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17058  # "foo.exe" is OK but "foo" is an error.
17059  #
17060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17061  # It is also a way to make sure we got the proper file name for the real test later on.
17062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17063  if test "x$test_shortpath" = x; then
17064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17065$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17066    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17067  fi
17068
17069  # Call helper function which possibly converts this using DOS-style short mode.
17070  # If so, the updated path is stored in $new_path.
17071
17072  input_path="$new_path"
17073  # Check if we need to convert this using DOS-style short mode. If the path
17074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17075  # take no chances and rewrite it.
17076  # Note: m4 eats our [], so we need to use [ and ] instead.
17077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17078  if test "x$has_forbidden_chars" != x; then
17079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17083      # Going to short mode and back again did indeed matter. Since short mode is
17084      # case insensitive, let's make it lowercase to improve readability.
17085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17086      # Now convert it back to Unix-style (cygpath)
17087      input_path=`$CYGPATH -u "$shortmode_path"`
17088      new_path="$input_path"
17089    fi
17090  fi
17091
17092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17093  if test "x$test_cygdrive_prefix" = x; then
17094    # As a simple fix, exclude /usr/bin since it's not a real path.
17095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17097      # a path prefixed by /cygdrive for fixpath to work.
17098      new_path="$CYGWIN_ROOT_PATH$input_path"
17099    fi
17100  fi
17101
17102
17103  if test "x$path" != "x$new_path"; then
17104    with_devkit="$new_path"
17105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17106$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17107  fi
17108
17109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110
17111  path="$with_devkit"
17112  has_colon=`$ECHO $path | $GREP ^.:`
17113  new_path="$path"
17114  if test "x$has_colon" = x; then
17115    # Not in mixed or Windows style, start by that.
17116    new_path=`cmd //c echo $path`
17117  fi
17118
17119
17120  input_path="$new_path"
17121  # Check if we need to convert this using DOS-style short mode. If the path
17122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17123  # take no chances and rewrite it.
17124  # Note: m4 eats our [], so we need to use [ and ] instead.
17125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17126  if test "x$has_forbidden_chars" != x; then
17127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17129  fi
17130
17131
17132  windows_path="$new_path"
17133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17134    unix_path=`$CYGPATH -u "$windows_path"`
17135    new_path="$unix_path"
17136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17138    new_path="$unix_path"
17139  fi
17140
17141  if test "x$path" != "x$new_path"; then
17142    with_devkit="$new_path"
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17144$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17145  fi
17146
17147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17149
17150    else
17151      # We're on a unix platform. Hooray! :)
17152      path="$with_devkit"
17153      has_space=`$ECHO "$path" | $GREP " "`
17154      if test "x$has_space" != x; then
17155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17156$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17158      fi
17159
17160      # Use eval to expand a potential ~
17161      eval path="$path"
17162      if test ! -f "$path" && test ! -d "$path"; then
17163        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17164      fi
17165
17166      if test -d "$path"; then
17167        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17168      else
17169        dir="`$DIRNAME "$path"`"
17170        base="`$BASENAME "$path"`"
17171        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17172      fi
17173    fi
17174  fi
17175
17176        DEVKIT_ROOT="$with_devkit"
17177        # Check for a meta data info file in the root of the devkit
17178        if test -f "$DEVKIT_ROOT/devkit.info"; then
17179          . $DEVKIT_ROOT/devkit.info
17180          # This potentially sets the following:
17181          # A descriptive name of the devkit
17182
17183  if test "x$DEVKIT_NAME" = x; then
17184    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17185  fi
17186
17187          # Corresponds to --with-extra-path
17188
17189  if test "x$DEVKIT_EXTRA_PATH" = x; then
17190    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17191  fi
17192
17193          # Corresponds to --with-toolchain-path
17194
17195  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17196    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17197  fi
17198
17199          # Corresponds to --with-sysroot
17200
17201  if test "x$DEVKIT_SYSROOT" = x; then
17202    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17203  fi
17204
17205
17206          # Identifies the Visual Studio version in the devkit
17207
17208  if test "x$DEVKIT_VS_VERSION" = x; then
17209    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17210  fi
17211
17212          # The Visual Studio include environment variable
17213
17214  if test "x$DEVKIT_VS_INCLUDE" = x; then
17215    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17216  fi
17217
17218          # The Visual Studio lib environment variable
17219
17220  if test "x$DEVKIT_VS_LIB" = x; then
17221    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17222  fi
17223
17224          # Corresponds to --with-msvcr-dll
17225
17226  if test "x$DEVKIT_MSVCR_DLL" = x; then
17227    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17228  fi
17229
17230          # Corresponds to --with-msvcp-dll
17231
17232  if test "x$DEVKIT_MSVCP_DLL" = x; then
17233    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17234  fi
17235
17236        fi
17237
17238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17239$as_echo_n "checking for devkit... " >&6; }
17240        if test "x$DEVKIT_NAME" != x; then
17241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17242$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17243        else
17244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17245$as_echo "$DEVKIT_ROOT" >&6; }
17246        fi
17247
17248
17249  if test "x$DEVKIT_EXTRA_PATH" != x; then
17250    if test "x$EXTRA_PATH" = x; then
17251      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17252    else
17253      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17254    fi
17255  fi
17256
17257
17258        # Fallback default of just /bin if DEVKIT_PATH is not defined
17259        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17260          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17261        fi
17262
17263  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17264    if test "x$TOOLCHAIN_PATH" = x; then
17265      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17266    else
17267      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17268    fi
17269  fi
17270
17271
17272        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17273        # places for backwards compatiblity.
17274        if test "x$DEVKIT_SYSROOT" != x; then
17275          SYSROOT="$DEVKIT_SYSROOT"
17276        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17277          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17278        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17279          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17280        fi
17281
17282
17283fi
17284
17285
17286  # You can force the sysroot if the sysroot encoded into the compiler tools
17287  # is not correct.
17288
17289# Check whether --with-sys-root was given.
17290if test "${with_sys_root+set}" = set; then :
17291  withval=$with_sys_root; SYSROOT=$with_sys_root
17292
17293fi
17294
17295
17296
17297# Check whether --with-sysroot was given.
17298if test "${with_sysroot+set}" = set; then :
17299  withval=$with_sysroot; SYSROOT=$with_sysroot
17300
17301fi
17302
17303
17304
17305# Check whether --with-tools-dir was given.
17306if test "${with_tools_dir+set}" = set; then :
17307  withval=$with_tools_dir;
17308  if test "x$with_tools_dir" != x; then
17309    if test "x$TOOLCHAIN_PATH" = x; then
17310      TOOLCHAIN_PATH="$with_tools_dir"
17311    else
17312      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17313    fi
17314  fi
17315
17316
17317fi
17318
17319
17320
17321# Check whether --with-toolchain-path was given.
17322if test "${with_toolchain_path+set}" = set; then :
17323  withval=$with_toolchain_path;
17324  if test "x$with_toolchain_path" != x; then
17325    if test "x$TOOLCHAIN_PATH" = x; then
17326      TOOLCHAIN_PATH="$with_toolchain_path"
17327    else
17328      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17329    fi
17330  fi
17331
17332
17333fi
17334
17335
17336
17337# Check whether --with-extra-path was given.
17338if test "${with_extra_path+set}" = set; then :
17339  withval=$with_extra_path;
17340  if test "x$with_extra_path" != x; then
17341    if test "x$EXTRA_PATH" = x; then
17342      EXTRA_PATH="$with_extra_path"
17343    else
17344      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17345    fi
17346  fi
17347
17348
17349fi
17350
17351
17352  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17353    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17354    # If not, detect if Xcode is installed by running xcodebuild -version
17355    # if no Xcode installed, xcodebuild exits with 1
17356    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17357    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17358      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17359      # fall back on the stub binary in /usr/bin/xcodebuild
17360      # Extract the first word of "xcodebuild", so it can be a program name with args.
17361set dummy xcodebuild; ac_word=$2
17362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17363$as_echo_n "checking for $ac_word... " >&6; }
17364if ${ac_cv_path_XCODEBUILD+:} false; then :
17365  $as_echo_n "(cached) " >&6
17366else
17367  case $XCODEBUILD in
17368  [\\/]* | ?:[\\/]*)
17369  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17370  ;;
17371  *)
17372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17373for as_dir in $TOOLCHAIN_PATH
17374do
17375  IFS=$as_save_IFS
17376  test -z "$as_dir" && as_dir=.
17377    for ac_exec_ext in '' $ac_executable_extensions; do
17378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17379    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17381    break 2
17382  fi
17383done
17384  done
17385IFS=$as_save_IFS
17386
17387  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17388  ;;
17389esac
17390fi
17391XCODEBUILD=$ac_cv_path_XCODEBUILD
17392if test -n "$XCODEBUILD"; then
17393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17394$as_echo "$XCODEBUILD" >&6; }
17395else
17396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17397$as_echo "no" >&6; }
17398fi
17399
17400
17401    else
17402      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17403      # when only the command line tools are installed there are no SDKs, so headers
17404      # are copied into the system frameworks
17405      XCODEBUILD=
17406
17407    fi
17408
17409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17410$as_echo_n "checking for sdk name... " >&6; }
17411
17412# Check whether --with-sdk-name was given.
17413if test "${with_sdk_name+set}" = set; then :
17414  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17415
17416fi
17417
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17419$as_echo "$SDKNAME" >&6; }
17420
17421    # if toolchain path is specified then don't rely on system headers, they may not compile
17422    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17423    test -z "$TOOLCHAIN_PATH" && \
17424      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17425
17426    if test -z "$SYSROOT"; then
17427      if test -n "$XCODEBUILD"; then
17428        # if we don't have system headers, use default SDK name (last resort)
17429        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17430          SDKNAME=${SDKNAME:-macosx}
17431        fi
17432
17433        if test -n "$SDKNAME"; then
17434          # Call xcodebuild to determine SYSROOT
17435          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17436        fi
17437      else
17438        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17439          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
17440        fi
17441      fi
17442    else
17443      # warn user if --with-sdk-name was also set
17444      if test -n "$with_sdk_name"; then
17445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17446$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17447      fi
17448    fi
17449
17450    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17451      # If no system framework headers, then SYSROOT must be set, or we won't build
17452      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
17453    fi
17454
17455    # Perform a basic sanity test
17456    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17457      if test -z "$SYSROOT"; then
17458        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
17459      else
17460        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17461      fi
17462    fi
17463
17464    # set SDKROOT too, Xcode tools will pick it up
17465    SDKROOT="$SYSROOT"
17466
17467  fi
17468
17469  # Prepend the extra path to the global path
17470
17471  if test "x$EXTRA_PATH" != x; then
17472    if test "x$PATH" = x; then
17473      PATH="$EXTRA_PATH"
17474    else
17475      PATH="$EXTRA_PATH:$PATH"
17476    fi
17477  fi
17478
17479
17480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17481$as_echo_n "checking for sysroot... " >&6; }
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17483$as_echo "$SYSROOT" >&6; }
17484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17485$as_echo_n "checking for toolchain path... " >&6; }
17486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17487$as_echo "$TOOLCHAIN_PATH" >&6; }
17488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17489$as_echo_n "checking for extra path... " >&6; }
17490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17491$as_echo "$EXTRA_PATH" >&6; }
17492
17493
17494# To properly create a configuration name, we need to have the OpenJDK target
17495# and options (variants and debug level) parsed.
17496
17497
17498
17499# Check whether --with-conf-name was given.
17500if test "${with_conf_name+set}" = set; then :
17501  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17502fi
17503
17504
17505  # Test from where we are running configure, in or outside of src root.
17506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17507$as_echo_n "checking where to store configuration... " >&6; }
17508  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17509      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17510      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17511    # We are running configure from the src root.
17512    # Create a default ./build/target-variant-debuglevel output root.
17513    if test "x${CONF_NAME}" = x; then
17514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17515$as_echo "in default location" >&6; }
17516      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17517    else
17518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17519$as_echo "in build directory with custom name" >&6; }
17520    fi
17521    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17522    $MKDIR -p "$OUTPUT_ROOT"
17523    if test ! -d "$OUTPUT_ROOT"; then
17524      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17525    fi
17526  else
17527    # We are running configure from outside of the src dir.
17528    # Then use the current directory as output dir!
17529    # If configuration is situated in normal build directory, just use the build
17530    # directory name as configuration name, otherwise use the complete path.
17531    if test "x${CONF_NAME}" = x; then
17532      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17533    fi
17534    OUTPUT_ROOT="$CURDIR"
17535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17536$as_echo "in current directory" >&6; }
17537
17538    # WARNING: This might be a bad thing to do. You need to be sure you want to
17539    # have a configuration in this directory. Do some sanity checks!
17540
17541    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17542      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17543      # other files
17544      files_present=`$LS $OUTPUT_ROOT`
17545      # Configure has already touched config.log and confdefs.h in the current dir when this check
17546      # is performed.
17547      filtered_files=`$ECHO "$files_present" \
17548          | $SED -e 's/config.log//g' \
17549              -e 's/configure.log//g' \
17550              -e 's/confdefs.h//g' \
17551              -e 's/ //g' \
17552          | $TR -d '\n'`
17553      if test "x$filtered_files" != x; then
17554        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17555$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17556        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17557$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17558        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17559$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17561$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17562        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17563$as_echo "$as_me: seriously mess up just about everything." >&6;}
17564        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17565$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17567$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17568        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17569      fi
17570    fi
17571  fi
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17573$as_echo_n "checking what configuration name to use... " >&6; }
17574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17575$as_echo "$CONF_NAME" >&6; }
17576
17577
17578  # Only process if variable expands to non-empty
17579
17580  if test "x$OUTPUT_ROOT" != x; then
17581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582
17583  # Input might be given as Windows format, start by converting to
17584  # unix format.
17585  path="$OUTPUT_ROOT"
17586  new_path=`$CYGPATH -u "$path"`
17587
17588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17591  # "foo.exe" is OK but "foo" is an error.
17592  #
17593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17594  # It is also a way to make sure we got the proper file name for the real test later on.
17595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17596  if test "x$test_shortpath" = x; then
17597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17598$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17599    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17600  fi
17601
17602  # Call helper function which possibly converts this using DOS-style short mode.
17603  # If so, the updated path is stored in $new_path.
17604
17605  input_path="$new_path"
17606  # Check if we need to convert this using DOS-style short mode. If the path
17607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17608  # take no chances and rewrite it.
17609  # Note: m4 eats our [], so we need to use [ and ] instead.
17610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17611  if test "x$has_forbidden_chars" != x; then
17612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17616      # Going to short mode and back again did indeed matter. Since short mode is
17617      # case insensitive, let's make it lowercase to improve readability.
17618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17619      # Now convert it back to Unix-style (cygpath)
17620      input_path=`$CYGPATH -u "$shortmode_path"`
17621      new_path="$input_path"
17622    fi
17623  fi
17624
17625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17626  if test "x$test_cygdrive_prefix" = x; then
17627    # As a simple fix, exclude /usr/bin since it's not a real path.
17628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17630      # a path prefixed by /cygdrive for fixpath to work.
17631      new_path="$CYGWIN_ROOT_PATH$input_path"
17632    fi
17633  fi
17634
17635
17636  if test "x$path" != "x$new_path"; then
17637    OUTPUT_ROOT="$new_path"
17638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17639$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17640  fi
17641
17642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17643
17644  path="$OUTPUT_ROOT"
17645  has_colon=`$ECHO $path | $GREP ^.:`
17646  new_path="$path"
17647  if test "x$has_colon" = x; then
17648    # Not in mixed or Windows style, start by that.
17649    new_path=`cmd //c echo $path`
17650  fi
17651
17652
17653  input_path="$new_path"
17654  # Check if we need to convert this using DOS-style short mode. If the path
17655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17656  # take no chances and rewrite it.
17657  # Note: m4 eats our [], so we need to use [ and ] instead.
17658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17659  if test "x$has_forbidden_chars" != x; then
17660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17662  fi
17663
17664
17665  windows_path="$new_path"
17666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17667    unix_path=`$CYGPATH -u "$windows_path"`
17668    new_path="$unix_path"
17669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17671    new_path="$unix_path"
17672  fi
17673
17674  if test "x$path" != "x$new_path"; then
17675    OUTPUT_ROOT="$new_path"
17676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17677$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17678  fi
17679
17680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17682
17683    else
17684      # We're on a unix platform. Hooray! :)
17685      path="$OUTPUT_ROOT"
17686      has_space=`$ECHO "$path" | $GREP " "`
17687      if test "x$has_space" != x; then
17688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17689$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17691      fi
17692
17693      # Use eval to expand a potential ~
17694      eval path="$path"
17695      if test ! -f "$path" && test ! -d "$path"; then
17696        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17697      fi
17698
17699      if test -d "$path"; then
17700        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17701      else
17702        dir="`$DIRNAME "$path"`"
17703        base="`$BASENAME "$path"`"
17704        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17705      fi
17706    fi
17707  fi
17708
17709
17710  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17711  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17712
17713  SPEC="$OUTPUT_ROOT/spec.gmk"
17714
17715
17716
17717
17718
17719  # The spec.gmk file contains all variables for the make system.
17720  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17721
17722  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17723  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17724
17725  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17726  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17727
17728  # The compare.sh is used to compare the build output to other builds.
17729  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17730
17731  # The generated Makefile knows where the spec.gmk is and where the source is.
17732  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17733  # which will look for generated configurations
17734  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17735
17736
17737
17738# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17739
17740  for ac_prog in apt-get yum brew port pkgutil pkgadd
17741do
17742  # Extract the first word of "$ac_prog", so it can be a program name with args.
17743set dummy $ac_prog; ac_word=$2
17744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17745$as_echo_n "checking for $ac_word... " >&6; }
17746if ${ac_cv_prog_PKGHANDLER+:} false; then :
17747  $as_echo_n "(cached) " >&6
17748else
17749  if test -n "$PKGHANDLER"; then
17750  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17751else
17752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17753for as_dir in $PATH
17754do
17755  IFS=$as_save_IFS
17756  test -z "$as_dir" && as_dir=.
17757    for ac_exec_ext in '' $ac_executable_extensions; do
17758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17759    ac_cv_prog_PKGHANDLER="$ac_prog"
17760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17761    break 2
17762  fi
17763done
17764  done
17765IFS=$as_save_IFS
17766
17767fi
17768fi
17769PKGHANDLER=$ac_cv_prog_PKGHANDLER
17770if test -n "$PKGHANDLER"; then
17771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17772$as_echo "$PKGHANDLER" >&6; }
17773else
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17775$as_echo "no" >&6; }
17776fi
17777
17778
17779  test -n "$PKGHANDLER" && break
17780done
17781
17782
17783
17784# Setup tools that requires more complex handling, or that is not needed by the configure script.
17785
17786
17787
17788  # Publish this variable in the help.
17789
17790
17791  if [ -z "${MAKE+x}" ]; then
17792    # The variable is not set by user, try to locate tool using the code snippet
17793
17794    # Try our hardest to locate a correct version of GNU make
17795    for ac_prog in gmake
17796do
17797  # Extract the first word of "$ac_prog", so it can be a program name with args.
17798set dummy $ac_prog; ac_word=$2
17799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17800$as_echo_n "checking for $ac_word... " >&6; }
17801if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17802  $as_echo_n "(cached) " >&6
17803else
17804  case $CHECK_GMAKE in
17805  [\\/]* | ?:[\\/]*)
17806  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17807  ;;
17808  *)
17809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17810for as_dir in $PATH
17811do
17812  IFS=$as_save_IFS
17813  test -z "$as_dir" && as_dir=.
17814    for ac_exec_ext in '' $ac_executable_extensions; do
17815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17816    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17818    break 2
17819  fi
17820done
17821  done
17822IFS=$as_save_IFS
17823
17824  ;;
17825esac
17826fi
17827CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17828if test -n "$CHECK_GMAKE"; then
17829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17830$as_echo "$CHECK_GMAKE" >&6; }
17831else
17832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17833$as_echo "no" >&6; }
17834fi
17835
17836
17837  test -n "$CHECK_GMAKE" && break
17838done
17839
17840
17841  MAKE_CANDIDATE=""$CHECK_GMAKE""
17842  DESCRIPTION="gmake in PATH"
17843
17844  # On Cygwin, we require a newer version of make than on other platforms
17845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846    MAKE_VERSION_EXPR="-e 4\."
17847    MAKE_REQUIRED_VERSION="4.0"
17848   else
17849    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17850    MAKE_REQUIRED_VERSION="3.81"
17851  fi
17852
17853  if test "x$MAKE_CANDIDATE" != x; then
17854    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17855$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17856    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17857    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17858    if test "x$IS_GNU_MAKE" = x; then
17859      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17860$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17861    else
17862      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17863      if test "x$IS_MODERN_MAKE" = x; then
17864        { $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
17865$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;}
17866      else
17867        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17868          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869            MAKE_EXPECTED_ENV='cygwin'
17870          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17871            MAKE_EXPECTED_ENV='msys'
17872          else
17873            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17874          fi
17875          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17876          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17877        else
17878          # Not relevant for non-Windows
17879          IS_MAKE_CORRECT_ENV=true
17880        fi
17881        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17882          { $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
17883$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;}
17884        else
17885          FOUND_MAKE=$MAKE_CANDIDATE
17886
17887  # Only process if variable expands to non-empty
17888
17889  if test "x$FOUND_MAKE" != x; then
17890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17891
17892  # First separate the path from the arguments. This will split at the first
17893  # space.
17894  complete="$FOUND_MAKE"
17895  path="${complete%% *}"
17896  tmp="$complete EOL"
17897  arguments="${tmp#* }"
17898
17899  # Input might be given as Windows format, start by converting to
17900  # unix format.
17901  new_path=`$CYGPATH -u "$path"`
17902
17903  # Now try to locate executable using which
17904  new_path=`$WHICH "$new_path" 2> /dev/null`
17905  # bat and cmd files are not always considered executable in cygwin causing which
17906  # to not find them
17907  if test "x$new_path" = x \
17908      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17909      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17910    new_path=`$CYGPATH -u "$path"`
17911  fi
17912  if test "x$new_path" = x; then
17913    # Oops. Which didn't find the executable.
17914    # The splitting of arguments from the executable at a space might have been incorrect,
17915    # since paths with space are more likely in Windows. Give it another try with the whole
17916    # argument.
17917    path="$complete"
17918    arguments="EOL"
17919    new_path=`$CYGPATH -u "$path"`
17920    new_path=`$WHICH "$new_path" 2> /dev/null`
17921    # bat and cmd files are not always considered executable in cygwin causing which
17922    # to not find them
17923    if test "x$new_path" = x \
17924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17926      new_path=`$CYGPATH -u "$path"`
17927    fi
17928    if test "x$new_path" = x; then
17929      # It's still not found. Now this is an unrecoverable error.
17930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17931$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17932      has_space=`$ECHO "$complete" | $GREP " "`
17933      if test "x$has_space" != x; then
17934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17936      fi
17937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17938    fi
17939  fi
17940
17941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17944  # "foo.exe" is OK but "foo" is an error.
17945  #
17946  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17947  # It is also a way to make sure we got the proper file name for the real test later on.
17948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17949  if test "x$test_shortpath" = x; then
17950    # Short path failed, file does not exist as specified.
17951    # Try adding .exe or .cmd
17952    if test -f "${new_path}.exe"; then
17953      input_to_shortpath="${new_path}.exe"
17954    elif test -f "${new_path}.cmd"; then
17955      input_to_shortpath="${new_path}.cmd"
17956    else
17957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17961      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17962    fi
17963  else
17964    input_to_shortpath="$new_path"
17965  fi
17966
17967  # Call helper function which possibly converts this using DOS-style short mode.
17968  # If so, the updated path is stored in $new_path.
17969  new_path="$input_to_shortpath"
17970
17971  input_path="$input_to_shortpath"
17972  # Check if we need to convert this using DOS-style short mode. If the path
17973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17974  # take no chances and rewrite it.
17975  # Note: m4 eats our [], so we need to use [ and ] instead.
17976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17977  if test "x$has_forbidden_chars" != x; then
17978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17982      # Going to short mode and back again did indeed matter. Since short mode is
17983      # case insensitive, let's make it lowercase to improve readability.
17984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17985      # Now convert it back to Unix-style (cygpath)
17986      input_path=`$CYGPATH -u "$shortmode_path"`
17987      new_path="$input_path"
17988    fi
17989  fi
17990
17991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17992  if test "x$test_cygdrive_prefix" = x; then
17993    # As a simple fix, exclude /usr/bin since it's not a real path.
17994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17996      # a path prefixed by /cygdrive for fixpath to work.
17997      new_path="$CYGWIN_ROOT_PATH$input_path"
17998    fi
17999  fi
18000
18001  # remove trailing .exe if any
18002  new_path="${new_path/%.exe/}"
18003
18004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18005
18006  # First separate the path from the arguments. This will split at the first
18007  # space.
18008  complete="$FOUND_MAKE"
18009  path="${complete%% *}"
18010  tmp="$complete EOL"
18011  arguments="${tmp#* }"
18012
18013  # Input might be given as Windows format, start by converting to
18014  # unix format.
18015  new_path="$path"
18016
18017  windows_path="$new_path"
18018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019    unix_path=`$CYGPATH -u "$windows_path"`
18020    new_path="$unix_path"
18021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18023    new_path="$unix_path"
18024  fi
18025
18026
18027  # Now try to locate executable using which
18028  new_path=`$WHICH "$new_path" 2> /dev/null`
18029
18030  if test "x$new_path" = x; then
18031    # Oops. Which didn't find the executable.
18032    # The splitting of arguments from the executable at a space might have been incorrect,
18033    # since paths with space are more likely in Windows. Give it another try with the whole
18034    # argument.
18035    path="$complete"
18036    arguments="EOL"
18037    new_path="$path"
18038
18039  windows_path="$new_path"
18040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18041    unix_path=`$CYGPATH -u "$windows_path"`
18042    new_path="$unix_path"
18043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18045    new_path="$unix_path"
18046  fi
18047
18048
18049    new_path=`$WHICH "$new_path" 2> /dev/null`
18050    # bat and cmd files are not always considered executable in MSYS causing which
18051    # to not find them
18052    if test "x$new_path" = x \
18053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18055      new_path="$path"
18056
18057  windows_path="$new_path"
18058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18059    unix_path=`$CYGPATH -u "$windows_path"`
18060    new_path="$unix_path"
18061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18063    new_path="$unix_path"
18064  fi
18065
18066    fi
18067
18068    if test "x$new_path" = x; then
18069      # It's still not found. Now this is an unrecoverable error.
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18072      has_space=`$ECHO "$complete" | $GREP " "`
18073      if test "x$has_space" != x; then
18074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18076      fi
18077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18078    fi
18079  fi
18080
18081  # Now new_path has a complete unix path to the binary
18082  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18083    # Keep paths in /bin as-is, but remove trailing .exe if any
18084    new_path="${new_path/%.exe/}"
18085    # Do not save /bin paths to all_fixpath_prefixes!
18086  else
18087    # Not in mixed or Windows style, start by that.
18088    new_path=`cmd //c echo $new_path`
18089
18090  input_path="$new_path"
18091  # Check if we need to convert this using DOS-style short mode. If the path
18092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18093  # take no chances and rewrite it.
18094  # Note: m4 eats our [], so we need to use [ and ] instead.
18095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18096  if test "x$has_forbidden_chars" != x; then
18097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18099  fi
18100
18101    # Output is in $new_path
18102
18103  windows_path="$new_path"
18104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105    unix_path=`$CYGPATH -u "$windows_path"`
18106    new_path="$unix_path"
18107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18109    new_path="$unix_path"
18110  fi
18111
18112    # remove trailing .exe if any
18113    new_path="${new_path/%.exe/}"
18114
18115    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18116    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18117  fi
18118
18119    else
18120      # We're on a unix platform. Hooray! :)
18121      # First separate the path from the arguments. This will split at the first
18122      # space.
18123      complete="$FOUND_MAKE"
18124      path="${complete%% *}"
18125      tmp="$complete EOL"
18126      arguments="${tmp#* }"
18127
18128      # Cannot rely on the command "which" here since it doesn't always work.
18129      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18130      if test -z "$is_absolute_path"; then
18131        # Path to executable is not absolute. Find it.
18132        IFS_save="$IFS"
18133        IFS=:
18134        for p in $PATH; do
18135          if test -f "$p/$path" && test -x "$p/$path"; then
18136            new_path="$p/$path"
18137            break
18138          fi
18139        done
18140        IFS="$IFS_save"
18141      else
18142        # This is an absolute path, we can use it without further modifications.
18143        new_path="$path"
18144      fi
18145
18146      if test "x$new_path" = x; then
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18149        has_space=`$ECHO "$complete" | $GREP " "`
18150        if test "x$has_space" != x; then
18151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18153        fi
18154        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18155      fi
18156    fi
18157
18158    # Now join together the path and the arguments once again
18159    if test "x$arguments" != xEOL; then
18160      new_complete="$new_path ${arguments% *}"
18161    else
18162      new_complete="$new_path"
18163    fi
18164
18165    if test "x$complete" != "x$new_complete"; then
18166      FOUND_MAKE="$new_complete"
18167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18168$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18169    fi
18170  fi
18171
18172        fi
18173      fi
18174    fi
18175  fi
18176
18177
18178    if test "x$FOUND_MAKE" = x; then
18179      for ac_prog in make
18180do
18181  # Extract the first word of "$ac_prog", so it can be a program name with args.
18182set dummy $ac_prog; ac_word=$2
18183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18184$as_echo_n "checking for $ac_word... " >&6; }
18185if ${ac_cv_path_CHECK_MAKE+:} false; then :
18186  $as_echo_n "(cached) " >&6
18187else
18188  case $CHECK_MAKE in
18189  [\\/]* | ?:[\\/]*)
18190  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18191  ;;
18192  *)
18193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18194for as_dir in $PATH
18195do
18196  IFS=$as_save_IFS
18197  test -z "$as_dir" && as_dir=.
18198    for ac_exec_ext in '' $ac_executable_extensions; do
18199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18200    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18202    break 2
18203  fi
18204done
18205  done
18206IFS=$as_save_IFS
18207
18208  ;;
18209esac
18210fi
18211CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18212if test -n "$CHECK_MAKE"; then
18213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18214$as_echo "$CHECK_MAKE" >&6; }
18215else
18216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18217$as_echo "no" >&6; }
18218fi
18219
18220
18221  test -n "$CHECK_MAKE" && break
18222done
18223
18224
18225  MAKE_CANDIDATE=""$CHECK_MAKE""
18226  DESCRIPTION="make in PATH"
18227
18228  # On Cygwin, we require a newer version of make than on other platforms
18229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18230    MAKE_VERSION_EXPR="-e 4\."
18231    MAKE_REQUIRED_VERSION="4.0"
18232   else
18233    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18234    MAKE_REQUIRED_VERSION="3.81"
18235  fi
18236
18237  if test "x$MAKE_CANDIDATE" != x; then
18238    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18239$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18240    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18241    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18242    if test "x$IS_GNU_MAKE" = x; then
18243      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18244$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18245    else
18246      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18247      if test "x$IS_MODERN_MAKE" = x; then
18248        { $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
18249$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;}
18250      else
18251        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18252          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253            MAKE_EXPECTED_ENV='cygwin'
18254          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18255            MAKE_EXPECTED_ENV='msys'
18256          else
18257            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18258          fi
18259          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18260          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18261        else
18262          # Not relevant for non-Windows
18263          IS_MAKE_CORRECT_ENV=true
18264        fi
18265        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18266          { $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
18267$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;}
18268        else
18269          FOUND_MAKE=$MAKE_CANDIDATE
18270
18271  # Only process if variable expands to non-empty
18272
18273  if test "x$FOUND_MAKE" != x; then
18274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18275
18276  # First separate the path from the arguments. This will split at the first
18277  # space.
18278  complete="$FOUND_MAKE"
18279  path="${complete%% *}"
18280  tmp="$complete EOL"
18281  arguments="${tmp#* }"
18282
18283  # Input might be given as Windows format, start by converting to
18284  # unix format.
18285  new_path=`$CYGPATH -u "$path"`
18286
18287  # Now try to locate executable using which
18288  new_path=`$WHICH "$new_path" 2> /dev/null`
18289  # bat and cmd files are not always considered executable in cygwin causing which
18290  # to not find them
18291  if test "x$new_path" = x \
18292      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18293      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18294    new_path=`$CYGPATH -u "$path"`
18295  fi
18296  if test "x$new_path" = x; then
18297    # Oops. Which didn't find the executable.
18298    # The splitting of arguments from the executable at a space might have been incorrect,
18299    # since paths with space are more likely in Windows. Give it another try with the whole
18300    # argument.
18301    path="$complete"
18302    arguments="EOL"
18303    new_path=`$CYGPATH -u "$path"`
18304    new_path=`$WHICH "$new_path" 2> /dev/null`
18305    # bat and cmd files are not always considered executable in cygwin causing which
18306    # to not find them
18307    if test "x$new_path" = x \
18308        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18309        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18310      new_path=`$CYGPATH -u "$path"`
18311    fi
18312    if test "x$new_path" = x; then
18313      # It's still not found. Now this is an unrecoverable error.
18314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18316      has_space=`$ECHO "$complete" | $GREP " "`
18317      if test "x$has_space" != x; then
18318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18320      fi
18321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18322    fi
18323  fi
18324
18325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18328  # "foo.exe" is OK but "foo" is an error.
18329  #
18330  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18331  # It is also a way to make sure we got the proper file name for the real test later on.
18332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18333  if test "x$test_shortpath" = x; then
18334    # Short path failed, file does not exist as specified.
18335    # Try adding .exe or .cmd
18336    if test -f "${new_path}.exe"; then
18337      input_to_shortpath="${new_path}.exe"
18338    elif test -f "${new_path}.cmd"; then
18339      input_to_shortpath="${new_path}.cmd"
18340    else
18341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18343      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18344$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18346    fi
18347  else
18348    input_to_shortpath="$new_path"
18349  fi
18350
18351  # Call helper function which possibly converts this using DOS-style short mode.
18352  # If so, the updated path is stored in $new_path.
18353  new_path="$input_to_shortpath"
18354
18355  input_path="$input_to_shortpath"
18356  # Check if we need to convert this using DOS-style short mode. If the path
18357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18358  # take no chances and rewrite it.
18359  # Note: m4 eats our [], so we need to use [ and ] instead.
18360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18361  if test "x$has_forbidden_chars" != x; then
18362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18366      # Going to short mode and back again did indeed matter. Since short mode is
18367      # case insensitive, let's make it lowercase to improve readability.
18368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18369      # Now convert it back to Unix-style (cygpath)
18370      input_path=`$CYGPATH -u "$shortmode_path"`
18371      new_path="$input_path"
18372    fi
18373  fi
18374
18375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18376  if test "x$test_cygdrive_prefix" = x; then
18377    # As a simple fix, exclude /usr/bin since it's not a real path.
18378    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18380      # a path prefixed by /cygdrive for fixpath to work.
18381      new_path="$CYGWIN_ROOT_PATH$input_path"
18382    fi
18383  fi
18384
18385  # remove trailing .exe if any
18386  new_path="${new_path/%.exe/}"
18387
18388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18389
18390  # First separate the path from the arguments. This will split at the first
18391  # space.
18392  complete="$FOUND_MAKE"
18393  path="${complete%% *}"
18394  tmp="$complete EOL"
18395  arguments="${tmp#* }"
18396
18397  # Input might be given as Windows format, start by converting to
18398  # unix format.
18399  new_path="$path"
18400
18401  windows_path="$new_path"
18402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18403    unix_path=`$CYGPATH -u "$windows_path"`
18404    new_path="$unix_path"
18405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18407    new_path="$unix_path"
18408  fi
18409
18410
18411  # Now try to locate executable using which
18412  new_path=`$WHICH "$new_path" 2> /dev/null`
18413
18414  if test "x$new_path" = x; then
18415    # Oops. Which didn't find the executable.
18416    # The splitting of arguments from the executable at a space might have been incorrect,
18417    # since paths with space are more likely in Windows. Give it another try with the whole
18418    # argument.
18419    path="$complete"
18420    arguments="EOL"
18421    new_path="$path"
18422
18423  windows_path="$new_path"
18424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18425    unix_path=`$CYGPATH -u "$windows_path"`
18426    new_path="$unix_path"
18427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18429    new_path="$unix_path"
18430  fi
18431
18432
18433    new_path=`$WHICH "$new_path" 2> /dev/null`
18434    # bat and cmd files are not always considered executable in MSYS causing which
18435    # to not find them
18436    if test "x$new_path" = x \
18437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18439      new_path="$path"
18440
18441  windows_path="$new_path"
18442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18443    unix_path=`$CYGPATH -u "$windows_path"`
18444    new_path="$unix_path"
18445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18447    new_path="$unix_path"
18448  fi
18449
18450    fi
18451
18452    if test "x$new_path" = x; then
18453      # It's still not found. Now this is an unrecoverable error.
18454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18456      has_space=`$ECHO "$complete" | $GREP " "`
18457      if test "x$has_space" != x; then
18458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18460      fi
18461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18462    fi
18463  fi
18464
18465  # Now new_path has a complete unix path to the binary
18466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18467    # Keep paths in /bin as-is, but remove trailing .exe if any
18468    new_path="${new_path/%.exe/}"
18469    # Do not save /bin paths to all_fixpath_prefixes!
18470  else
18471    # Not in mixed or Windows style, start by that.
18472    new_path=`cmd //c echo $new_path`
18473
18474  input_path="$new_path"
18475  # Check if we need to convert this using DOS-style short mode. If the path
18476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18477  # take no chances and rewrite it.
18478  # Note: m4 eats our [], so we need to use [ and ] instead.
18479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18480  if test "x$has_forbidden_chars" != x; then
18481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18483  fi
18484
18485    # Output is in $new_path
18486
18487  windows_path="$new_path"
18488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18489    unix_path=`$CYGPATH -u "$windows_path"`
18490    new_path="$unix_path"
18491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18493    new_path="$unix_path"
18494  fi
18495
18496    # remove trailing .exe if any
18497    new_path="${new_path/%.exe/}"
18498
18499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18501  fi
18502
18503    else
18504      # We're on a unix platform. Hooray! :)
18505      # First separate the path from the arguments. This will split at the first
18506      # space.
18507      complete="$FOUND_MAKE"
18508      path="${complete%% *}"
18509      tmp="$complete EOL"
18510      arguments="${tmp#* }"
18511
18512      # Cannot rely on the command "which" here since it doesn't always work.
18513      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18514      if test -z "$is_absolute_path"; then
18515        # Path to executable is not absolute. Find it.
18516        IFS_save="$IFS"
18517        IFS=:
18518        for p in $PATH; do
18519          if test -f "$p/$path" && test -x "$p/$path"; then
18520            new_path="$p/$path"
18521            break
18522          fi
18523        done
18524        IFS="$IFS_save"
18525      else
18526        # This is an absolute path, we can use it without further modifications.
18527        new_path="$path"
18528      fi
18529
18530      if test "x$new_path" = x; then
18531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18533        has_space=`$ECHO "$complete" | $GREP " "`
18534        if test "x$has_space" != x; then
18535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18537        fi
18538        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18539      fi
18540    fi
18541
18542    # Now join together the path and the arguments once again
18543    if test "x$arguments" != xEOL; then
18544      new_complete="$new_path ${arguments% *}"
18545    else
18546      new_complete="$new_path"
18547    fi
18548
18549    if test "x$complete" != "x$new_complete"; then
18550      FOUND_MAKE="$new_complete"
18551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18552$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18553    fi
18554  fi
18555
18556        fi
18557      fi
18558    fi
18559  fi
18560
18561    fi
18562
18563    if test "x$FOUND_MAKE" = x; then
18564      if test "x$TOOLCHAIN_PATH" != x; then
18565        # We have a toolchain path, check that as well before giving up.
18566        OLD_PATH=$PATH
18567        PATH=$TOOLCHAIN_PATH:$PATH
18568        for ac_prog in gmake
18569do
18570  # Extract the first word of "$ac_prog", so it can be a program name with args.
18571set dummy $ac_prog; ac_word=$2
18572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18573$as_echo_n "checking for $ac_word... " >&6; }
18574if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18575  $as_echo_n "(cached) " >&6
18576else
18577  case $CHECK_TOOLSDIR_GMAKE in
18578  [\\/]* | ?:[\\/]*)
18579  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18580  ;;
18581  *)
18582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18583for as_dir in $PATH
18584do
18585  IFS=$as_save_IFS
18586  test -z "$as_dir" && as_dir=.
18587    for ac_exec_ext in '' $ac_executable_extensions; do
18588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18589    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18591    break 2
18592  fi
18593done
18594  done
18595IFS=$as_save_IFS
18596
18597  ;;
18598esac
18599fi
18600CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18601if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18603$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18604else
18605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18606$as_echo "no" >&6; }
18607fi
18608
18609
18610  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18611done
18612
18613
18614  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18615  DESCRIPTION="gmake in tools-dir"
18616
18617  # On Cygwin, we require a newer version of make than on other platforms
18618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18619    MAKE_VERSION_EXPR="-e 4\."
18620    MAKE_REQUIRED_VERSION="4.0"
18621   else
18622    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18623    MAKE_REQUIRED_VERSION="3.81"
18624  fi
18625
18626  if test "x$MAKE_CANDIDATE" != x; then
18627    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18628$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18629    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18630    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18631    if test "x$IS_GNU_MAKE" = x; then
18632      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18633$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18634    else
18635      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18636      if test "x$IS_MODERN_MAKE" = x; then
18637        { $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
18638$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;}
18639      else
18640        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18641          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18642            MAKE_EXPECTED_ENV='cygwin'
18643          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18644            MAKE_EXPECTED_ENV='msys'
18645          else
18646            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18647          fi
18648          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18649          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18650        else
18651          # Not relevant for non-Windows
18652          IS_MAKE_CORRECT_ENV=true
18653        fi
18654        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18655          { $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
18656$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;}
18657        else
18658          FOUND_MAKE=$MAKE_CANDIDATE
18659
18660  # Only process if variable expands to non-empty
18661
18662  if test "x$FOUND_MAKE" != x; then
18663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18664
18665  # First separate the path from the arguments. This will split at the first
18666  # space.
18667  complete="$FOUND_MAKE"
18668  path="${complete%% *}"
18669  tmp="$complete EOL"
18670  arguments="${tmp#* }"
18671
18672  # Input might be given as Windows format, start by converting to
18673  # unix format.
18674  new_path=`$CYGPATH -u "$path"`
18675
18676  # Now try to locate executable using which
18677  new_path=`$WHICH "$new_path" 2> /dev/null`
18678  # bat and cmd files are not always considered executable in cygwin causing which
18679  # to not find them
18680  if test "x$new_path" = x \
18681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18683    new_path=`$CYGPATH -u "$path"`
18684  fi
18685  if test "x$new_path" = x; then
18686    # Oops. Which didn't find the executable.
18687    # The splitting of arguments from the executable at a space might have been incorrect,
18688    # since paths with space are more likely in Windows. Give it another try with the whole
18689    # argument.
18690    path="$complete"
18691    arguments="EOL"
18692    new_path=`$CYGPATH -u "$path"`
18693    new_path=`$WHICH "$new_path" 2> /dev/null`
18694    # bat and cmd files are not always considered executable in cygwin causing which
18695    # to not find them
18696    if test "x$new_path" = x \
18697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18699      new_path=`$CYGPATH -u "$path"`
18700    fi
18701    if test "x$new_path" = x; then
18702      # It's still not found. Now this is an unrecoverable error.
18703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18705      has_space=`$ECHO "$complete" | $GREP " "`
18706      if test "x$has_space" != x; then
18707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18709      fi
18710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18711    fi
18712  fi
18713
18714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18717  # "foo.exe" is OK but "foo" is an error.
18718  #
18719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18720  # It is also a way to make sure we got the proper file name for the real test later on.
18721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18722  if test "x$test_shortpath" = x; then
18723    # Short path failed, file does not exist as specified.
18724    # Try adding .exe or .cmd
18725    if test -f "${new_path}.exe"; then
18726      input_to_shortpath="${new_path}.exe"
18727    elif test -f "${new_path}.cmd"; then
18728      input_to_shortpath="${new_path}.cmd"
18729    else
18730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18734      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18735    fi
18736  else
18737    input_to_shortpath="$new_path"
18738  fi
18739
18740  # Call helper function which possibly converts this using DOS-style short mode.
18741  # If so, the updated path is stored in $new_path.
18742  new_path="$input_to_shortpath"
18743
18744  input_path="$input_to_shortpath"
18745  # Check if we need to convert this using DOS-style short mode. If the path
18746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18747  # take no chances and rewrite it.
18748  # Note: m4 eats our [], so we need to use [ and ] instead.
18749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18750  if test "x$has_forbidden_chars" != x; then
18751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18755      # Going to short mode and back again did indeed matter. Since short mode is
18756      # case insensitive, let's make it lowercase to improve readability.
18757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18758      # Now convert it back to Unix-style (cygpath)
18759      input_path=`$CYGPATH -u "$shortmode_path"`
18760      new_path="$input_path"
18761    fi
18762  fi
18763
18764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18765  if test "x$test_cygdrive_prefix" = x; then
18766    # As a simple fix, exclude /usr/bin since it's not a real path.
18767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18769      # a path prefixed by /cygdrive for fixpath to work.
18770      new_path="$CYGWIN_ROOT_PATH$input_path"
18771    fi
18772  fi
18773
18774  # remove trailing .exe if any
18775  new_path="${new_path/%.exe/}"
18776
18777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18778
18779  # First separate the path from the arguments. This will split at the first
18780  # space.
18781  complete="$FOUND_MAKE"
18782  path="${complete%% *}"
18783  tmp="$complete EOL"
18784  arguments="${tmp#* }"
18785
18786  # Input might be given as Windows format, start by converting to
18787  # unix format.
18788  new_path="$path"
18789
18790  windows_path="$new_path"
18791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18792    unix_path=`$CYGPATH -u "$windows_path"`
18793    new_path="$unix_path"
18794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18796    new_path="$unix_path"
18797  fi
18798
18799
18800  # Now try to locate executable using which
18801  new_path=`$WHICH "$new_path" 2> /dev/null`
18802
18803  if test "x$new_path" = x; then
18804    # Oops. Which didn't find the executable.
18805    # The splitting of arguments from the executable at a space might have been incorrect,
18806    # since paths with space are more likely in Windows. Give it another try with the whole
18807    # argument.
18808    path="$complete"
18809    arguments="EOL"
18810    new_path="$path"
18811
18812  windows_path="$new_path"
18813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18814    unix_path=`$CYGPATH -u "$windows_path"`
18815    new_path="$unix_path"
18816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18818    new_path="$unix_path"
18819  fi
18820
18821
18822    new_path=`$WHICH "$new_path" 2> /dev/null`
18823    # bat and cmd files are not always considered executable in MSYS causing which
18824    # to not find them
18825    if test "x$new_path" = x \
18826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828      new_path="$path"
18829
18830  windows_path="$new_path"
18831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18832    unix_path=`$CYGPATH -u "$windows_path"`
18833    new_path="$unix_path"
18834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18836    new_path="$unix_path"
18837  fi
18838
18839    fi
18840
18841    if test "x$new_path" = x; then
18842      # It's still not found. Now this is an unrecoverable error.
18843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18844$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18845      has_space=`$ECHO "$complete" | $GREP " "`
18846      if test "x$has_space" != x; then
18847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18849      fi
18850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18851    fi
18852  fi
18853
18854  # Now new_path has a complete unix path to the binary
18855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18856    # Keep paths in /bin as-is, but remove trailing .exe if any
18857    new_path="${new_path/%.exe/}"
18858    # Do not save /bin paths to all_fixpath_prefixes!
18859  else
18860    # Not in mixed or Windows style, start by that.
18861    new_path=`cmd //c echo $new_path`
18862
18863  input_path="$new_path"
18864  # Check if we need to convert this using DOS-style short mode. If the path
18865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866  # take no chances and rewrite it.
18867  # Note: m4 eats our [], so we need to use [ and ] instead.
18868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18869  if test "x$has_forbidden_chars" != x; then
18870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18872  fi
18873
18874    # Output is in $new_path
18875
18876  windows_path="$new_path"
18877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18878    unix_path=`$CYGPATH -u "$windows_path"`
18879    new_path="$unix_path"
18880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18882    new_path="$unix_path"
18883  fi
18884
18885    # remove trailing .exe if any
18886    new_path="${new_path/%.exe/}"
18887
18888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18890  fi
18891
18892    else
18893      # We're on a unix platform. Hooray! :)
18894      # First separate the path from the arguments. This will split at the first
18895      # space.
18896      complete="$FOUND_MAKE"
18897      path="${complete%% *}"
18898      tmp="$complete EOL"
18899      arguments="${tmp#* }"
18900
18901      # Cannot rely on the command "which" here since it doesn't always work.
18902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18903      if test -z "$is_absolute_path"; then
18904        # Path to executable is not absolute. Find it.
18905        IFS_save="$IFS"
18906        IFS=:
18907        for p in $PATH; do
18908          if test -f "$p/$path" && test -x "$p/$path"; then
18909            new_path="$p/$path"
18910            break
18911          fi
18912        done
18913        IFS="$IFS_save"
18914      else
18915        # This is an absolute path, we can use it without further modifications.
18916        new_path="$path"
18917      fi
18918
18919      if test "x$new_path" = x; then
18920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18921$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18922        has_space=`$ECHO "$complete" | $GREP " "`
18923        if test "x$has_space" != x; then
18924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18926        fi
18927        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18928      fi
18929    fi
18930
18931    # Now join together the path and the arguments once again
18932    if test "x$arguments" != xEOL; then
18933      new_complete="$new_path ${arguments% *}"
18934    else
18935      new_complete="$new_path"
18936    fi
18937
18938    if test "x$complete" != "x$new_complete"; then
18939      FOUND_MAKE="$new_complete"
18940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18941$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18942    fi
18943  fi
18944
18945        fi
18946      fi
18947    fi
18948  fi
18949
18950        if test "x$FOUND_MAKE" = x; then
18951          for ac_prog in make
18952do
18953  # Extract the first word of "$ac_prog", so it can be a program name with args.
18954set dummy $ac_prog; ac_word=$2
18955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18956$as_echo_n "checking for $ac_word... " >&6; }
18957if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18958  $as_echo_n "(cached) " >&6
18959else
18960  case $CHECK_TOOLSDIR_MAKE in
18961  [\\/]* | ?:[\\/]*)
18962  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18963  ;;
18964  *)
18965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18966for as_dir in $PATH
18967do
18968  IFS=$as_save_IFS
18969  test -z "$as_dir" && as_dir=.
18970    for ac_exec_ext in '' $ac_executable_extensions; do
18971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18972    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18974    break 2
18975  fi
18976done
18977  done
18978IFS=$as_save_IFS
18979
18980  ;;
18981esac
18982fi
18983CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18984if test -n "$CHECK_TOOLSDIR_MAKE"; then
18985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18986$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18987else
18988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18989$as_echo "no" >&6; }
18990fi
18991
18992
18993  test -n "$CHECK_TOOLSDIR_MAKE" && break
18994done
18995
18996
18997  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18998  DESCRIPTION="make in tools-dir"
18999
19000  # On Cygwin, we require a newer version of make than on other platforms
19001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002    MAKE_VERSION_EXPR="-e 4\."
19003    MAKE_REQUIRED_VERSION="4.0"
19004   else
19005    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19006    MAKE_REQUIRED_VERSION="3.81"
19007  fi
19008
19009  if test "x$MAKE_CANDIDATE" != x; then
19010    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19011$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19012    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19013    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19014    if test "x$IS_GNU_MAKE" = x; then
19015      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19016$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19017    else
19018      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19019      if test "x$IS_MODERN_MAKE" = x; then
19020        { $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
19021$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;}
19022      else
19023        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19024          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19025            MAKE_EXPECTED_ENV='cygwin'
19026          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19027            MAKE_EXPECTED_ENV='msys'
19028          else
19029            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19030          fi
19031          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19032          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19033        else
19034          # Not relevant for non-Windows
19035          IS_MAKE_CORRECT_ENV=true
19036        fi
19037        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19038          { $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
19039$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;}
19040        else
19041          FOUND_MAKE=$MAKE_CANDIDATE
19042
19043  # Only process if variable expands to non-empty
19044
19045  if test "x$FOUND_MAKE" != x; then
19046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19047
19048  # First separate the path from the arguments. This will split at the first
19049  # space.
19050  complete="$FOUND_MAKE"
19051  path="${complete%% *}"
19052  tmp="$complete EOL"
19053  arguments="${tmp#* }"
19054
19055  # Input might be given as Windows format, start by converting to
19056  # unix format.
19057  new_path=`$CYGPATH -u "$path"`
19058
19059  # Now try to locate executable using which
19060  new_path=`$WHICH "$new_path" 2> /dev/null`
19061  # bat and cmd files are not always considered executable in cygwin causing which
19062  # to not find them
19063  if test "x$new_path" = x \
19064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19066    new_path=`$CYGPATH -u "$path"`
19067  fi
19068  if test "x$new_path" = x; then
19069    # Oops. Which didn't find the executable.
19070    # The splitting of arguments from the executable at a space might have been incorrect,
19071    # since paths with space are more likely in Windows. Give it another try with the whole
19072    # argument.
19073    path="$complete"
19074    arguments="EOL"
19075    new_path=`$CYGPATH -u "$path"`
19076    new_path=`$WHICH "$new_path" 2> /dev/null`
19077    # bat and cmd files are not always considered executable in cygwin causing which
19078    # to not find them
19079    if test "x$new_path" = x \
19080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19082      new_path=`$CYGPATH -u "$path"`
19083    fi
19084    if test "x$new_path" = x; then
19085      # It's still not found. Now this is an unrecoverable error.
19086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19088      has_space=`$ECHO "$complete" | $GREP " "`
19089      if test "x$has_space" != x; then
19090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19092      fi
19093      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19094    fi
19095  fi
19096
19097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19100  # "foo.exe" is OK but "foo" is an error.
19101  #
19102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19103  # It is also a way to make sure we got the proper file name for the real test later on.
19104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19105  if test "x$test_shortpath" = x; then
19106    # Short path failed, file does not exist as specified.
19107    # Try adding .exe or .cmd
19108    if test -f "${new_path}.exe"; then
19109      input_to_shortpath="${new_path}.exe"
19110    elif test -f "${new_path}.cmd"; then
19111      input_to_shortpath="${new_path}.cmd"
19112    else
19113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19117      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19118    fi
19119  else
19120    input_to_shortpath="$new_path"
19121  fi
19122
19123  # Call helper function which possibly converts this using DOS-style short mode.
19124  # If so, the updated path is stored in $new_path.
19125  new_path="$input_to_shortpath"
19126
19127  input_path="$input_to_shortpath"
19128  # Check if we need to convert this using DOS-style short mode. If the path
19129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19130  # take no chances and rewrite it.
19131  # Note: m4 eats our [], so we need to use [ and ] instead.
19132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19133  if test "x$has_forbidden_chars" != x; then
19134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19138      # Going to short mode and back again did indeed matter. Since short mode is
19139      # case insensitive, let's make it lowercase to improve readability.
19140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19141      # Now convert it back to Unix-style (cygpath)
19142      input_path=`$CYGPATH -u "$shortmode_path"`
19143      new_path="$input_path"
19144    fi
19145  fi
19146
19147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19148  if test "x$test_cygdrive_prefix" = x; then
19149    # As a simple fix, exclude /usr/bin since it's not a real path.
19150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19152      # a path prefixed by /cygdrive for fixpath to work.
19153      new_path="$CYGWIN_ROOT_PATH$input_path"
19154    fi
19155  fi
19156
19157  # remove trailing .exe if any
19158  new_path="${new_path/%.exe/}"
19159
19160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19161
19162  # First separate the path from the arguments. This will split at the first
19163  # space.
19164  complete="$FOUND_MAKE"
19165  path="${complete%% *}"
19166  tmp="$complete EOL"
19167  arguments="${tmp#* }"
19168
19169  # Input might be given as Windows format, start by converting to
19170  # unix format.
19171  new_path="$path"
19172
19173  windows_path="$new_path"
19174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19175    unix_path=`$CYGPATH -u "$windows_path"`
19176    new_path="$unix_path"
19177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19179    new_path="$unix_path"
19180  fi
19181
19182
19183  # Now try to locate executable using which
19184  new_path=`$WHICH "$new_path" 2> /dev/null`
19185
19186  if test "x$new_path" = x; then
19187    # Oops. Which didn't find the executable.
19188    # The splitting of arguments from the executable at a space might have been incorrect,
19189    # since paths with space are more likely in Windows. Give it another try with the whole
19190    # argument.
19191    path="$complete"
19192    arguments="EOL"
19193    new_path="$path"
19194
19195  windows_path="$new_path"
19196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19197    unix_path=`$CYGPATH -u "$windows_path"`
19198    new_path="$unix_path"
19199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19201    new_path="$unix_path"
19202  fi
19203
19204
19205    new_path=`$WHICH "$new_path" 2> /dev/null`
19206    # bat and cmd files are not always considered executable in MSYS causing which
19207    # to not find them
19208    if test "x$new_path" = x \
19209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19211      new_path="$path"
19212
19213  windows_path="$new_path"
19214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215    unix_path=`$CYGPATH -u "$windows_path"`
19216    new_path="$unix_path"
19217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19219    new_path="$unix_path"
19220  fi
19221
19222    fi
19223
19224    if test "x$new_path" = x; then
19225      # It's still not found. Now this is an unrecoverable error.
19226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19228      has_space=`$ECHO "$complete" | $GREP " "`
19229      if test "x$has_space" != x; then
19230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19232      fi
19233      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19234    fi
19235  fi
19236
19237  # Now new_path has a complete unix path to the binary
19238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19239    # Keep paths in /bin as-is, but remove trailing .exe if any
19240    new_path="${new_path/%.exe/}"
19241    # Do not save /bin paths to all_fixpath_prefixes!
19242  else
19243    # Not in mixed or Windows style, start by that.
19244    new_path=`cmd //c echo $new_path`
19245
19246  input_path="$new_path"
19247  # Check if we need to convert this using DOS-style short mode. If the path
19248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19249  # take no chances and rewrite it.
19250  # Note: m4 eats our [], so we need to use [ and ] instead.
19251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19252  if test "x$has_forbidden_chars" != x; then
19253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19255  fi
19256
19257    # Output is in $new_path
19258
19259  windows_path="$new_path"
19260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19261    unix_path=`$CYGPATH -u "$windows_path"`
19262    new_path="$unix_path"
19263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19265    new_path="$unix_path"
19266  fi
19267
19268    # remove trailing .exe if any
19269    new_path="${new_path/%.exe/}"
19270
19271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19273  fi
19274
19275    else
19276      # We're on a unix platform. Hooray! :)
19277      # First separate the path from the arguments. This will split at the first
19278      # space.
19279      complete="$FOUND_MAKE"
19280      path="${complete%% *}"
19281      tmp="$complete EOL"
19282      arguments="${tmp#* }"
19283
19284      # Cannot rely on the command "which" here since it doesn't always work.
19285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19286      if test -z "$is_absolute_path"; then
19287        # Path to executable is not absolute. Find it.
19288        IFS_save="$IFS"
19289        IFS=:
19290        for p in $PATH; do
19291          if test -f "$p/$path" && test -x "$p/$path"; then
19292            new_path="$p/$path"
19293            break
19294          fi
19295        done
19296        IFS="$IFS_save"
19297      else
19298        # This is an absolute path, we can use it without further modifications.
19299        new_path="$path"
19300      fi
19301
19302      if test "x$new_path" = x; then
19303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19305        has_space=`$ECHO "$complete" | $GREP " "`
19306        if test "x$has_space" != x; then
19307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19309        fi
19310        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19311      fi
19312    fi
19313
19314    # Now join together the path and the arguments once again
19315    if test "x$arguments" != xEOL; then
19316      new_complete="$new_path ${arguments% *}"
19317    else
19318      new_complete="$new_path"
19319    fi
19320
19321    if test "x$complete" != "x$new_complete"; then
19322      FOUND_MAKE="$new_complete"
19323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19324$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19325    fi
19326  fi
19327
19328        fi
19329      fi
19330    fi
19331  fi
19332
19333        fi
19334        PATH=$OLD_PATH
19335      fi
19336    fi
19337
19338    if test "x$FOUND_MAKE" = x; then
19339      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
19340    fi
19341
19342  else
19343    # The variable is set, but is it from the command line or the environment?
19344
19345    # Try to remove the string !MAKE! from our list.
19346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19348      # If it failed, the variable was not from the command line. Ignore it,
19349      # but warn the user (except for BASH, which is always set by the calling BASH).
19350      if test "xMAKE" != xBASH; then
19351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19352$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19353      fi
19354      # Try to locate tool using the code snippet
19355
19356    # Try our hardest to locate a correct version of GNU make
19357    for ac_prog in gmake
19358do
19359  # Extract the first word of "$ac_prog", so it can be a program name with args.
19360set dummy $ac_prog; ac_word=$2
19361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19362$as_echo_n "checking for $ac_word... " >&6; }
19363if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19364  $as_echo_n "(cached) " >&6
19365else
19366  case $CHECK_GMAKE in
19367  [\\/]* | ?:[\\/]*)
19368  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19369  ;;
19370  *)
19371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19372for as_dir in $PATH
19373do
19374  IFS=$as_save_IFS
19375  test -z "$as_dir" && as_dir=.
19376    for ac_exec_ext in '' $ac_executable_extensions; do
19377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19378    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19380    break 2
19381  fi
19382done
19383  done
19384IFS=$as_save_IFS
19385
19386  ;;
19387esac
19388fi
19389CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19390if test -n "$CHECK_GMAKE"; then
19391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19392$as_echo "$CHECK_GMAKE" >&6; }
19393else
19394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19395$as_echo "no" >&6; }
19396fi
19397
19398
19399  test -n "$CHECK_GMAKE" && break
19400done
19401
19402
19403  MAKE_CANDIDATE=""$CHECK_GMAKE""
19404  DESCRIPTION="gmake in PATH"
19405
19406  # On Cygwin, we require a newer version of make than on other platforms
19407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19408    MAKE_VERSION_EXPR="-e 4\."
19409    MAKE_REQUIRED_VERSION="4.0"
19410   else
19411    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19412    MAKE_REQUIRED_VERSION="3.81"
19413  fi
19414
19415  if test "x$MAKE_CANDIDATE" != x; then
19416    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19417$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19418    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19419    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19420    if test "x$IS_GNU_MAKE" = x; then
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19422$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19423    else
19424      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19425      if test "x$IS_MODERN_MAKE" = x; then
19426        { $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
19427$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;}
19428      else
19429        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19430          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19431            MAKE_EXPECTED_ENV='cygwin'
19432          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19433            MAKE_EXPECTED_ENV='msys'
19434          else
19435            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19436          fi
19437          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19438          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19439        else
19440          # Not relevant for non-Windows
19441          IS_MAKE_CORRECT_ENV=true
19442        fi
19443        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19444          { $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
19445$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;}
19446        else
19447          FOUND_MAKE=$MAKE_CANDIDATE
19448
19449  # Only process if variable expands to non-empty
19450
19451  if test "x$FOUND_MAKE" != x; then
19452    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19453
19454  # First separate the path from the arguments. This will split at the first
19455  # space.
19456  complete="$FOUND_MAKE"
19457  path="${complete%% *}"
19458  tmp="$complete EOL"
19459  arguments="${tmp#* }"
19460
19461  # Input might be given as Windows format, start by converting to
19462  # unix format.
19463  new_path=`$CYGPATH -u "$path"`
19464
19465  # Now try to locate executable using which
19466  new_path=`$WHICH "$new_path" 2> /dev/null`
19467  # bat and cmd files are not always considered executable in cygwin causing which
19468  # to not find them
19469  if test "x$new_path" = x \
19470      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19471      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19472    new_path=`$CYGPATH -u "$path"`
19473  fi
19474  if test "x$new_path" = x; then
19475    # Oops. Which didn't find the executable.
19476    # The splitting of arguments from the executable at a space might have been incorrect,
19477    # since paths with space are more likely in Windows. Give it another try with the whole
19478    # argument.
19479    path="$complete"
19480    arguments="EOL"
19481    new_path=`$CYGPATH -u "$path"`
19482    new_path=`$WHICH "$new_path" 2> /dev/null`
19483    # bat and cmd files are not always considered executable in cygwin causing which
19484    # to not find them
19485    if test "x$new_path" = x \
19486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19488      new_path=`$CYGPATH -u "$path"`
19489    fi
19490    if test "x$new_path" = x; then
19491      # It's still not found. Now this is an unrecoverable error.
19492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19494      has_space=`$ECHO "$complete" | $GREP " "`
19495      if test "x$has_space" != x; then
19496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19498      fi
19499      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19500    fi
19501  fi
19502
19503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19506  # "foo.exe" is OK but "foo" is an error.
19507  #
19508  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19509  # It is also a way to make sure we got the proper file name for the real test later on.
19510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19511  if test "x$test_shortpath" = x; then
19512    # Short path failed, file does not exist as specified.
19513    # Try adding .exe or .cmd
19514    if test -f "${new_path}.exe"; then
19515      input_to_shortpath="${new_path}.exe"
19516    elif test -f "${new_path}.cmd"; then
19517      input_to_shortpath="${new_path}.cmd"
19518    else
19519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19521      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19522$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19523      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19524    fi
19525  else
19526    input_to_shortpath="$new_path"
19527  fi
19528
19529  # Call helper function which possibly converts this using DOS-style short mode.
19530  # If so, the updated path is stored in $new_path.
19531  new_path="$input_to_shortpath"
19532
19533  input_path="$input_to_shortpath"
19534  # Check if we need to convert this using DOS-style short mode. If the path
19535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19536  # take no chances and rewrite it.
19537  # Note: m4 eats our [], so we need to use [ and ] instead.
19538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19539  if test "x$has_forbidden_chars" != x; then
19540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19544      # Going to short mode and back again did indeed matter. Since short mode is
19545      # case insensitive, let's make it lowercase to improve readability.
19546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19547      # Now convert it back to Unix-style (cygpath)
19548      input_path=`$CYGPATH -u "$shortmode_path"`
19549      new_path="$input_path"
19550    fi
19551  fi
19552
19553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19554  if test "x$test_cygdrive_prefix" = x; then
19555    # As a simple fix, exclude /usr/bin since it's not a real path.
19556    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19558      # a path prefixed by /cygdrive for fixpath to work.
19559      new_path="$CYGWIN_ROOT_PATH$input_path"
19560    fi
19561  fi
19562
19563  # remove trailing .exe if any
19564  new_path="${new_path/%.exe/}"
19565
19566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19567
19568  # First separate the path from the arguments. This will split at the first
19569  # space.
19570  complete="$FOUND_MAKE"
19571  path="${complete%% *}"
19572  tmp="$complete EOL"
19573  arguments="${tmp#* }"
19574
19575  # Input might be given as Windows format, start by converting to
19576  # unix format.
19577  new_path="$path"
19578
19579  windows_path="$new_path"
19580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19581    unix_path=`$CYGPATH -u "$windows_path"`
19582    new_path="$unix_path"
19583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19585    new_path="$unix_path"
19586  fi
19587
19588
19589  # Now try to locate executable using which
19590  new_path=`$WHICH "$new_path" 2> /dev/null`
19591
19592  if test "x$new_path" = x; then
19593    # Oops. Which didn't find the executable.
19594    # The splitting of arguments from the executable at a space might have been incorrect,
19595    # since paths with space are more likely in Windows. Give it another try with the whole
19596    # argument.
19597    path="$complete"
19598    arguments="EOL"
19599    new_path="$path"
19600
19601  windows_path="$new_path"
19602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19603    unix_path=`$CYGPATH -u "$windows_path"`
19604    new_path="$unix_path"
19605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19607    new_path="$unix_path"
19608  fi
19609
19610
19611    new_path=`$WHICH "$new_path" 2> /dev/null`
19612    # bat and cmd files are not always considered executable in MSYS causing which
19613    # to not find them
19614    if test "x$new_path" = x \
19615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19617      new_path="$path"
19618
19619  windows_path="$new_path"
19620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19621    unix_path=`$CYGPATH -u "$windows_path"`
19622    new_path="$unix_path"
19623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19625    new_path="$unix_path"
19626  fi
19627
19628    fi
19629
19630    if test "x$new_path" = x; then
19631      # It's still not found. Now this is an unrecoverable error.
19632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19634      has_space=`$ECHO "$complete" | $GREP " "`
19635      if test "x$has_space" != x; then
19636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19638      fi
19639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19640    fi
19641  fi
19642
19643  # Now new_path has a complete unix path to the binary
19644  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19645    # Keep paths in /bin as-is, but remove trailing .exe if any
19646    new_path="${new_path/%.exe/}"
19647    # Do not save /bin paths to all_fixpath_prefixes!
19648  else
19649    # Not in mixed or Windows style, start by that.
19650    new_path=`cmd //c echo $new_path`
19651
19652  input_path="$new_path"
19653  # Check if we need to convert this using DOS-style short mode. If the path
19654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19655  # take no chances and rewrite it.
19656  # Note: m4 eats our [], so we need to use [ and ] instead.
19657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19658  if test "x$has_forbidden_chars" != x; then
19659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19661  fi
19662
19663    # Output is in $new_path
19664
19665  windows_path="$new_path"
19666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19667    unix_path=`$CYGPATH -u "$windows_path"`
19668    new_path="$unix_path"
19669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19671    new_path="$unix_path"
19672  fi
19673
19674    # remove trailing .exe if any
19675    new_path="${new_path/%.exe/}"
19676
19677    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19678    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19679  fi
19680
19681    else
19682      # We're on a unix platform. Hooray! :)
19683      # First separate the path from the arguments. This will split at the first
19684      # space.
19685      complete="$FOUND_MAKE"
19686      path="${complete%% *}"
19687      tmp="$complete EOL"
19688      arguments="${tmp#* }"
19689
19690      # Cannot rely on the command "which" here since it doesn't always work.
19691      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19692      if test -z "$is_absolute_path"; then
19693        # Path to executable is not absolute. Find it.
19694        IFS_save="$IFS"
19695        IFS=:
19696        for p in $PATH; do
19697          if test -f "$p/$path" && test -x "$p/$path"; then
19698            new_path="$p/$path"
19699            break
19700          fi
19701        done
19702        IFS="$IFS_save"
19703      else
19704        # This is an absolute path, we can use it without further modifications.
19705        new_path="$path"
19706      fi
19707
19708      if test "x$new_path" = x; then
19709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19710$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19711        has_space=`$ECHO "$complete" | $GREP " "`
19712        if test "x$has_space" != x; then
19713          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19715        fi
19716        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19717      fi
19718    fi
19719
19720    # Now join together the path and the arguments once again
19721    if test "x$arguments" != xEOL; then
19722      new_complete="$new_path ${arguments% *}"
19723    else
19724      new_complete="$new_path"
19725    fi
19726
19727    if test "x$complete" != "x$new_complete"; then
19728      FOUND_MAKE="$new_complete"
19729      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19730$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19731    fi
19732  fi
19733
19734        fi
19735      fi
19736    fi
19737  fi
19738
19739
19740    if test "x$FOUND_MAKE" = x; then
19741      for ac_prog in make
19742do
19743  # Extract the first word of "$ac_prog", so it can be a program name with args.
19744set dummy $ac_prog; ac_word=$2
19745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19746$as_echo_n "checking for $ac_word... " >&6; }
19747if ${ac_cv_path_CHECK_MAKE+:} false; then :
19748  $as_echo_n "(cached) " >&6
19749else
19750  case $CHECK_MAKE in
19751  [\\/]* | ?:[\\/]*)
19752  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19753  ;;
19754  *)
19755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19756for as_dir in $PATH
19757do
19758  IFS=$as_save_IFS
19759  test -z "$as_dir" && as_dir=.
19760    for ac_exec_ext in '' $ac_executable_extensions; do
19761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19762    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19764    break 2
19765  fi
19766done
19767  done
19768IFS=$as_save_IFS
19769
19770  ;;
19771esac
19772fi
19773CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19774if test -n "$CHECK_MAKE"; then
19775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19776$as_echo "$CHECK_MAKE" >&6; }
19777else
19778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19779$as_echo "no" >&6; }
19780fi
19781
19782
19783  test -n "$CHECK_MAKE" && break
19784done
19785
19786
19787  MAKE_CANDIDATE=""$CHECK_MAKE""
19788  DESCRIPTION="make in PATH"
19789
19790  # On Cygwin, we require a newer version of make than on other platforms
19791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792    MAKE_VERSION_EXPR="-e 4\."
19793    MAKE_REQUIRED_VERSION="4.0"
19794   else
19795    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19796    MAKE_REQUIRED_VERSION="3.81"
19797  fi
19798
19799  if test "x$MAKE_CANDIDATE" != x; then
19800    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19801$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19802    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19803    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19804    if test "x$IS_GNU_MAKE" = x; then
19805      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19806$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19807    else
19808      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19809      if test "x$IS_MODERN_MAKE" = x; then
19810        { $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
19811$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;}
19812      else
19813        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19814          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19815            MAKE_EXPECTED_ENV='cygwin'
19816          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19817            MAKE_EXPECTED_ENV='msys'
19818          else
19819            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19820          fi
19821          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19822          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19823        else
19824          # Not relevant for non-Windows
19825          IS_MAKE_CORRECT_ENV=true
19826        fi
19827        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19828          { $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
19829$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;}
19830        else
19831          FOUND_MAKE=$MAKE_CANDIDATE
19832
19833  # Only process if variable expands to non-empty
19834
19835  if test "x$FOUND_MAKE" != x; then
19836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19837
19838  # First separate the path from the arguments. This will split at the first
19839  # space.
19840  complete="$FOUND_MAKE"
19841  path="${complete%% *}"
19842  tmp="$complete EOL"
19843  arguments="${tmp#* }"
19844
19845  # Input might be given as Windows format, start by converting to
19846  # unix format.
19847  new_path=`$CYGPATH -u "$path"`
19848
19849  # Now try to locate executable using which
19850  new_path=`$WHICH "$new_path" 2> /dev/null`
19851  # bat and cmd files are not always considered executable in cygwin causing which
19852  # to not find them
19853  if test "x$new_path" = x \
19854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19856    new_path=`$CYGPATH -u "$path"`
19857  fi
19858  if test "x$new_path" = x; then
19859    # Oops. Which didn't find the executable.
19860    # The splitting of arguments from the executable at a space might have been incorrect,
19861    # since paths with space are more likely in Windows. Give it another try with the whole
19862    # argument.
19863    path="$complete"
19864    arguments="EOL"
19865    new_path=`$CYGPATH -u "$path"`
19866    new_path=`$WHICH "$new_path" 2> /dev/null`
19867    # bat and cmd files are not always considered executable in cygwin causing which
19868    # to not find them
19869    if test "x$new_path" = x \
19870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19872      new_path=`$CYGPATH -u "$path"`
19873    fi
19874    if test "x$new_path" = x; then
19875      # It's still not found. Now this is an unrecoverable error.
19876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19878      has_space=`$ECHO "$complete" | $GREP " "`
19879      if test "x$has_space" != x; then
19880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19882      fi
19883      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19884    fi
19885  fi
19886
19887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19890  # "foo.exe" is OK but "foo" is an error.
19891  #
19892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19893  # It is also a way to make sure we got the proper file name for the real test later on.
19894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19895  if test "x$test_shortpath" = x; then
19896    # Short path failed, file does not exist as specified.
19897    # Try adding .exe or .cmd
19898    if test -f "${new_path}.exe"; then
19899      input_to_shortpath="${new_path}.exe"
19900    elif test -f "${new_path}.cmd"; then
19901      input_to_shortpath="${new_path}.cmd"
19902    else
19903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19907      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19908    fi
19909  else
19910    input_to_shortpath="$new_path"
19911  fi
19912
19913  # Call helper function which possibly converts this using DOS-style short mode.
19914  # If so, the updated path is stored in $new_path.
19915  new_path="$input_to_shortpath"
19916
19917  input_path="$input_to_shortpath"
19918  # Check if we need to convert this using DOS-style short mode. If the path
19919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19920  # take no chances and rewrite it.
19921  # Note: m4 eats our [], so we need to use [ and ] instead.
19922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19923  if test "x$has_forbidden_chars" != x; then
19924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19928      # Going to short mode and back again did indeed matter. Since short mode is
19929      # case insensitive, let's make it lowercase to improve readability.
19930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19931      # Now convert it back to Unix-style (cygpath)
19932      input_path=`$CYGPATH -u "$shortmode_path"`
19933      new_path="$input_path"
19934    fi
19935  fi
19936
19937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19938  if test "x$test_cygdrive_prefix" = x; then
19939    # As a simple fix, exclude /usr/bin since it's not a real path.
19940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19942      # a path prefixed by /cygdrive for fixpath to work.
19943      new_path="$CYGWIN_ROOT_PATH$input_path"
19944    fi
19945  fi
19946
19947  # remove trailing .exe if any
19948  new_path="${new_path/%.exe/}"
19949
19950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19951
19952  # First separate the path from the arguments. This will split at the first
19953  # space.
19954  complete="$FOUND_MAKE"
19955  path="${complete%% *}"
19956  tmp="$complete EOL"
19957  arguments="${tmp#* }"
19958
19959  # Input might be given as Windows format, start by converting to
19960  # unix format.
19961  new_path="$path"
19962
19963  windows_path="$new_path"
19964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19965    unix_path=`$CYGPATH -u "$windows_path"`
19966    new_path="$unix_path"
19967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19969    new_path="$unix_path"
19970  fi
19971
19972
19973  # Now try to locate executable using which
19974  new_path=`$WHICH "$new_path" 2> /dev/null`
19975
19976  if test "x$new_path" = x; then
19977    # Oops. Which didn't find the executable.
19978    # The splitting of arguments from the executable at a space might have been incorrect,
19979    # since paths with space are more likely in Windows. Give it another try with the whole
19980    # argument.
19981    path="$complete"
19982    arguments="EOL"
19983    new_path="$path"
19984
19985  windows_path="$new_path"
19986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19987    unix_path=`$CYGPATH -u "$windows_path"`
19988    new_path="$unix_path"
19989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19991    new_path="$unix_path"
19992  fi
19993
19994
19995    new_path=`$WHICH "$new_path" 2> /dev/null`
19996    # bat and cmd files are not always considered executable in MSYS causing which
19997    # to not find them
19998    if test "x$new_path" = x \
19999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20001      new_path="$path"
20002
20003  windows_path="$new_path"
20004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20005    unix_path=`$CYGPATH -u "$windows_path"`
20006    new_path="$unix_path"
20007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20009    new_path="$unix_path"
20010  fi
20011
20012    fi
20013
20014    if test "x$new_path" = x; then
20015      # It's still not found. Now this is an unrecoverable error.
20016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20017$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20018      has_space=`$ECHO "$complete" | $GREP " "`
20019      if test "x$has_space" != x; then
20020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20022      fi
20023      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20024    fi
20025  fi
20026
20027  # Now new_path has a complete unix path to the binary
20028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20029    # Keep paths in /bin as-is, but remove trailing .exe if any
20030    new_path="${new_path/%.exe/}"
20031    # Do not save /bin paths to all_fixpath_prefixes!
20032  else
20033    # Not in mixed or Windows style, start by that.
20034    new_path=`cmd //c echo $new_path`
20035
20036  input_path="$new_path"
20037  # Check if we need to convert this using DOS-style short mode. If the path
20038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20039  # take no chances and rewrite it.
20040  # Note: m4 eats our [], so we need to use [ and ] instead.
20041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20042  if test "x$has_forbidden_chars" != x; then
20043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045  fi
20046
20047    # Output is in $new_path
20048
20049  windows_path="$new_path"
20050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20051    unix_path=`$CYGPATH -u "$windows_path"`
20052    new_path="$unix_path"
20053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20055    new_path="$unix_path"
20056  fi
20057
20058    # remove trailing .exe if any
20059    new_path="${new_path/%.exe/}"
20060
20061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20063  fi
20064
20065    else
20066      # We're on a unix platform. Hooray! :)
20067      # First separate the path from the arguments. This will split at the first
20068      # space.
20069      complete="$FOUND_MAKE"
20070      path="${complete%% *}"
20071      tmp="$complete EOL"
20072      arguments="${tmp#* }"
20073
20074      # Cannot rely on the command "which" here since it doesn't always work.
20075      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20076      if test -z "$is_absolute_path"; then
20077        # Path to executable is not absolute. Find it.
20078        IFS_save="$IFS"
20079        IFS=:
20080        for p in $PATH; do
20081          if test -f "$p/$path" && test -x "$p/$path"; then
20082            new_path="$p/$path"
20083            break
20084          fi
20085        done
20086        IFS="$IFS_save"
20087      else
20088        # This is an absolute path, we can use it without further modifications.
20089        new_path="$path"
20090      fi
20091
20092      if test "x$new_path" = x; then
20093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20095        has_space=`$ECHO "$complete" | $GREP " "`
20096        if test "x$has_space" != x; then
20097          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20099        fi
20100        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20101      fi
20102    fi
20103
20104    # Now join together the path and the arguments once again
20105    if test "x$arguments" != xEOL; then
20106      new_complete="$new_path ${arguments% *}"
20107    else
20108      new_complete="$new_path"
20109    fi
20110
20111    if test "x$complete" != "x$new_complete"; then
20112      FOUND_MAKE="$new_complete"
20113      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20114$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20115    fi
20116  fi
20117
20118        fi
20119      fi
20120    fi
20121  fi
20122
20123    fi
20124
20125    if test "x$FOUND_MAKE" = x; then
20126      if test "x$TOOLCHAIN_PATH" != x; then
20127        # We have a toolchain path, check that as well before giving up.
20128        OLD_PATH=$PATH
20129        PATH=$TOOLCHAIN_PATH:$PATH
20130        for ac_prog in gmake
20131do
20132  # Extract the first word of "$ac_prog", so it can be a program name with args.
20133set dummy $ac_prog; ac_word=$2
20134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20135$as_echo_n "checking for $ac_word... " >&6; }
20136if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20137  $as_echo_n "(cached) " >&6
20138else
20139  case $CHECK_TOOLSDIR_GMAKE in
20140  [\\/]* | ?:[\\/]*)
20141  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20142  ;;
20143  *)
20144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20145for as_dir in $PATH
20146do
20147  IFS=$as_save_IFS
20148  test -z "$as_dir" && as_dir=.
20149    for ac_exec_ext in '' $ac_executable_extensions; do
20150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20151    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20153    break 2
20154  fi
20155done
20156  done
20157IFS=$as_save_IFS
20158
20159  ;;
20160esac
20161fi
20162CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20163if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20165$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20166else
20167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20168$as_echo "no" >&6; }
20169fi
20170
20171
20172  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20173done
20174
20175
20176  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20177  DESCRIPTION="gmake in tools-dir"
20178
20179  # On Cygwin, we require a newer version of make than on other platforms
20180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181    MAKE_VERSION_EXPR="-e 4\."
20182    MAKE_REQUIRED_VERSION="4.0"
20183   else
20184    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20185    MAKE_REQUIRED_VERSION="3.81"
20186  fi
20187
20188  if test "x$MAKE_CANDIDATE" != x; then
20189    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20190$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20191    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20192    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20193    if test "x$IS_GNU_MAKE" = x; then
20194      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20195$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20196    else
20197      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20198      if test "x$IS_MODERN_MAKE" = x; then
20199        { $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
20200$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;}
20201      else
20202        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20203          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20204            MAKE_EXPECTED_ENV='cygwin'
20205          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20206            MAKE_EXPECTED_ENV='msys'
20207          else
20208            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20209          fi
20210          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20211          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20212        else
20213          # Not relevant for non-Windows
20214          IS_MAKE_CORRECT_ENV=true
20215        fi
20216        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20217          { $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
20218$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;}
20219        else
20220          FOUND_MAKE=$MAKE_CANDIDATE
20221
20222  # Only process if variable expands to non-empty
20223
20224  if test "x$FOUND_MAKE" != x; then
20225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20226
20227  # First separate the path from the arguments. This will split at the first
20228  # space.
20229  complete="$FOUND_MAKE"
20230  path="${complete%% *}"
20231  tmp="$complete EOL"
20232  arguments="${tmp#* }"
20233
20234  # Input might be given as Windows format, start by converting to
20235  # unix format.
20236  new_path=`$CYGPATH -u "$path"`
20237
20238  # Now try to locate executable using which
20239  new_path=`$WHICH "$new_path" 2> /dev/null`
20240  # bat and cmd files are not always considered executable in cygwin causing which
20241  # to not find them
20242  if test "x$new_path" = x \
20243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20245    new_path=`$CYGPATH -u "$path"`
20246  fi
20247  if test "x$new_path" = x; then
20248    # Oops. Which didn't find the executable.
20249    # The splitting of arguments from the executable at a space might have been incorrect,
20250    # since paths with space are more likely in Windows. Give it another try with the whole
20251    # argument.
20252    path="$complete"
20253    arguments="EOL"
20254    new_path=`$CYGPATH -u "$path"`
20255    new_path=`$WHICH "$new_path" 2> /dev/null`
20256    # bat and cmd files are not always considered executable in cygwin causing which
20257    # to not find them
20258    if test "x$new_path" = x \
20259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20261      new_path=`$CYGPATH -u "$path"`
20262    fi
20263    if test "x$new_path" = x; then
20264      # It's still not found. Now this is an unrecoverable error.
20265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20267      has_space=`$ECHO "$complete" | $GREP " "`
20268      if test "x$has_space" != x; then
20269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20271      fi
20272      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20273    fi
20274  fi
20275
20276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20279  # "foo.exe" is OK but "foo" is an error.
20280  #
20281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20282  # It is also a way to make sure we got the proper file name for the real test later on.
20283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20284  if test "x$test_shortpath" = x; then
20285    # Short path failed, file does not exist as specified.
20286    # Try adding .exe or .cmd
20287    if test -f "${new_path}.exe"; then
20288      input_to_shortpath="${new_path}.exe"
20289    elif test -f "${new_path}.cmd"; then
20290      input_to_shortpath="${new_path}.cmd"
20291    else
20292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20296      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20297    fi
20298  else
20299    input_to_shortpath="$new_path"
20300  fi
20301
20302  # Call helper function which possibly converts this using DOS-style short mode.
20303  # If so, the updated path is stored in $new_path.
20304  new_path="$input_to_shortpath"
20305
20306  input_path="$input_to_shortpath"
20307  # Check if we need to convert this using DOS-style short mode. If the path
20308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20309  # take no chances and rewrite it.
20310  # Note: m4 eats our [], so we need to use [ and ] instead.
20311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20312  if test "x$has_forbidden_chars" != x; then
20313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20317      # Going to short mode and back again did indeed matter. Since short mode is
20318      # case insensitive, let's make it lowercase to improve readability.
20319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20320      # Now convert it back to Unix-style (cygpath)
20321      input_path=`$CYGPATH -u "$shortmode_path"`
20322      new_path="$input_path"
20323    fi
20324  fi
20325
20326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20327  if test "x$test_cygdrive_prefix" = x; then
20328    # As a simple fix, exclude /usr/bin since it's not a real path.
20329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20331      # a path prefixed by /cygdrive for fixpath to work.
20332      new_path="$CYGWIN_ROOT_PATH$input_path"
20333    fi
20334  fi
20335
20336  # remove trailing .exe if any
20337  new_path="${new_path/%.exe/}"
20338
20339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20340
20341  # First separate the path from the arguments. This will split at the first
20342  # space.
20343  complete="$FOUND_MAKE"
20344  path="${complete%% *}"
20345  tmp="$complete EOL"
20346  arguments="${tmp#* }"
20347
20348  # Input might be given as Windows format, start by converting to
20349  # unix format.
20350  new_path="$path"
20351
20352  windows_path="$new_path"
20353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20354    unix_path=`$CYGPATH -u "$windows_path"`
20355    new_path="$unix_path"
20356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20358    new_path="$unix_path"
20359  fi
20360
20361
20362  # Now try to locate executable using which
20363  new_path=`$WHICH "$new_path" 2> /dev/null`
20364
20365  if test "x$new_path" = x; then
20366    # Oops. Which didn't find the executable.
20367    # The splitting of arguments from the executable at a space might have been incorrect,
20368    # since paths with space are more likely in Windows. Give it another try with the whole
20369    # argument.
20370    path="$complete"
20371    arguments="EOL"
20372    new_path="$path"
20373
20374  windows_path="$new_path"
20375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20376    unix_path=`$CYGPATH -u "$windows_path"`
20377    new_path="$unix_path"
20378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20380    new_path="$unix_path"
20381  fi
20382
20383
20384    new_path=`$WHICH "$new_path" 2> /dev/null`
20385    # bat and cmd files are not always considered executable in MSYS causing which
20386    # to not find them
20387    if test "x$new_path" = x \
20388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390      new_path="$path"
20391
20392  windows_path="$new_path"
20393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20394    unix_path=`$CYGPATH -u "$windows_path"`
20395    new_path="$unix_path"
20396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20398    new_path="$unix_path"
20399  fi
20400
20401    fi
20402
20403    if test "x$new_path" = x; then
20404      # It's still not found. Now this is an unrecoverable error.
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20406$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20407      has_space=`$ECHO "$complete" | $GREP " "`
20408      if test "x$has_space" != x; then
20409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20411      fi
20412      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20413    fi
20414  fi
20415
20416  # Now new_path has a complete unix path to the binary
20417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20418    # Keep paths in /bin as-is, but remove trailing .exe if any
20419    new_path="${new_path/%.exe/}"
20420    # Do not save /bin paths to all_fixpath_prefixes!
20421  else
20422    # Not in mixed or Windows style, start by that.
20423    new_path=`cmd //c echo $new_path`
20424
20425  input_path="$new_path"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20434  fi
20435
20436    # Output is in $new_path
20437
20438  windows_path="$new_path"
20439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20440    unix_path=`$CYGPATH -u "$windows_path"`
20441    new_path="$unix_path"
20442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20444    new_path="$unix_path"
20445  fi
20446
20447    # remove trailing .exe if any
20448    new_path="${new_path/%.exe/}"
20449
20450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20452  fi
20453
20454    else
20455      # We're on a unix platform. Hooray! :)
20456      # First separate the path from the arguments. This will split at the first
20457      # space.
20458      complete="$FOUND_MAKE"
20459      path="${complete%% *}"
20460      tmp="$complete EOL"
20461      arguments="${tmp#* }"
20462
20463      # Cannot rely on the command "which" here since it doesn't always work.
20464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20465      if test -z "$is_absolute_path"; then
20466        # Path to executable is not absolute. Find it.
20467        IFS_save="$IFS"
20468        IFS=:
20469        for p in $PATH; do
20470          if test -f "$p/$path" && test -x "$p/$path"; then
20471            new_path="$p/$path"
20472            break
20473          fi
20474        done
20475        IFS="$IFS_save"
20476      else
20477        # This is an absolute path, we can use it without further modifications.
20478        new_path="$path"
20479      fi
20480
20481      if test "x$new_path" = x; then
20482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20483$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20484        has_space=`$ECHO "$complete" | $GREP " "`
20485        if test "x$has_space" != x; then
20486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20488        fi
20489        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20490      fi
20491    fi
20492
20493    # Now join together the path and the arguments once again
20494    if test "x$arguments" != xEOL; then
20495      new_complete="$new_path ${arguments% *}"
20496    else
20497      new_complete="$new_path"
20498    fi
20499
20500    if test "x$complete" != "x$new_complete"; then
20501      FOUND_MAKE="$new_complete"
20502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20503$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20504    fi
20505  fi
20506
20507        fi
20508      fi
20509    fi
20510  fi
20511
20512        if test "x$FOUND_MAKE" = x; then
20513          for ac_prog in make
20514do
20515  # Extract the first word of "$ac_prog", so it can be a program name with args.
20516set dummy $ac_prog; ac_word=$2
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20518$as_echo_n "checking for $ac_word... " >&6; }
20519if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  case $CHECK_TOOLSDIR_MAKE in
20523  [\\/]* | ?:[\\/]*)
20524  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20525  ;;
20526  *)
20527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20528for as_dir in $PATH
20529do
20530  IFS=$as_save_IFS
20531  test -z "$as_dir" && as_dir=.
20532    for ac_exec_ext in '' $ac_executable_extensions; do
20533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20534    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20536    break 2
20537  fi
20538done
20539  done
20540IFS=$as_save_IFS
20541
20542  ;;
20543esac
20544fi
20545CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20546if test -n "$CHECK_TOOLSDIR_MAKE"; then
20547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20548$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20549else
20550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20551$as_echo "no" >&6; }
20552fi
20553
20554
20555  test -n "$CHECK_TOOLSDIR_MAKE" && break
20556done
20557
20558
20559  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20560  DESCRIPTION="make in tools-dir"
20561
20562  # On Cygwin, we require a newer version of make than on other platforms
20563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20564    MAKE_VERSION_EXPR="-e 4\."
20565    MAKE_REQUIRED_VERSION="4.0"
20566   else
20567    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20568    MAKE_REQUIRED_VERSION="3.81"
20569  fi
20570
20571  if test "x$MAKE_CANDIDATE" != x; then
20572    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20573$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20574    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20575    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20576    if test "x$IS_GNU_MAKE" = x; then
20577      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20578$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20579    else
20580      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20581      if test "x$IS_MODERN_MAKE" = x; then
20582        { $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
20583$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;}
20584      else
20585        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20586          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587            MAKE_EXPECTED_ENV='cygwin'
20588          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20589            MAKE_EXPECTED_ENV='msys'
20590          else
20591            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20592          fi
20593          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20594          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20595        else
20596          # Not relevant for non-Windows
20597          IS_MAKE_CORRECT_ENV=true
20598        fi
20599        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20600          { $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
20601$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;}
20602        else
20603          FOUND_MAKE=$MAKE_CANDIDATE
20604
20605  # Only process if variable expands to non-empty
20606
20607  if test "x$FOUND_MAKE" != x; then
20608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20609
20610  # First separate the path from the arguments. This will split at the first
20611  # space.
20612  complete="$FOUND_MAKE"
20613  path="${complete%% *}"
20614  tmp="$complete EOL"
20615  arguments="${tmp#* }"
20616
20617  # Input might be given as Windows format, start by converting to
20618  # unix format.
20619  new_path=`$CYGPATH -u "$path"`
20620
20621  # Now try to locate executable using which
20622  new_path=`$WHICH "$new_path" 2> /dev/null`
20623  # bat and cmd files are not always considered executable in cygwin causing which
20624  # to not find them
20625  if test "x$new_path" = x \
20626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20628    new_path=`$CYGPATH -u "$path"`
20629  fi
20630  if test "x$new_path" = x; then
20631    # Oops. Which didn't find the executable.
20632    # The splitting of arguments from the executable at a space might have been incorrect,
20633    # since paths with space are more likely in Windows. Give it another try with the whole
20634    # argument.
20635    path="$complete"
20636    arguments="EOL"
20637    new_path=`$CYGPATH -u "$path"`
20638    new_path=`$WHICH "$new_path" 2> /dev/null`
20639    # bat and cmd files are not always considered executable in cygwin causing which
20640    # to not find them
20641    if test "x$new_path" = x \
20642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20644      new_path=`$CYGPATH -u "$path"`
20645    fi
20646    if test "x$new_path" = x; then
20647      # It's still not found. Now this is an unrecoverable error.
20648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20650      has_space=`$ECHO "$complete" | $GREP " "`
20651      if test "x$has_space" != x; then
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20654      fi
20655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20656    fi
20657  fi
20658
20659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20662  # "foo.exe" is OK but "foo" is an error.
20663  #
20664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20665  # It is also a way to make sure we got the proper file name for the real test later on.
20666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20667  if test "x$test_shortpath" = x; then
20668    # Short path failed, file does not exist as specified.
20669    # Try adding .exe or .cmd
20670    if test -f "${new_path}.exe"; then
20671      input_to_shortpath="${new_path}.exe"
20672    elif test -f "${new_path}.cmd"; then
20673      input_to_shortpath="${new_path}.cmd"
20674    else
20675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20680    fi
20681  else
20682    input_to_shortpath="$new_path"
20683  fi
20684
20685  # Call helper function which possibly converts this using DOS-style short mode.
20686  # If so, the updated path is stored in $new_path.
20687  new_path="$input_to_shortpath"
20688
20689  input_path="$input_to_shortpath"
20690  # Check if we need to convert this using DOS-style short mode. If the path
20691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20692  # take no chances and rewrite it.
20693  # Note: m4 eats our [], so we need to use [ and ] instead.
20694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20695  if test "x$has_forbidden_chars" != x; then
20696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20700      # Going to short mode and back again did indeed matter. Since short mode is
20701      # case insensitive, let's make it lowercase to improve readability.
20702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20703      # Now convert it back to Unix-style (cygpath)
20704      input_path=`$CYGPATH -u "$shortmode_path"`
20705      new_path="$input_path"
20706    fi
20707  fi
20708
20709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20710  if test "x$test_cygdrive_prefix" = x; then
20711    # As a simple fix, exclude /usr/bin since it's not a real path.
20712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20714      # a path prefixed by /cygdrive for fixpath to work.
20715      new_path="$CYGWIN_ROOT_PATH$input_path"
20716    fi
20717  fi
20718
20719  # remove trailing .exe if any
20720  new_path="${new_path/%.exe/}"
20721
20722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20723
20724  # First separate the path from the arguments. This will split at the first
20725  # space.
20726  complete="$FOUND_MAKE"
20727  path="${complete%% *}"
20728  tmp="$complete EOL"
20729  arguments="${tmp#* }"
20730
20731  # Input might be given as Windows format, start by converting to
20732  # unix format.
20733  new_path="$path"
20734
20735  windows_path="$new_path"
20736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20737    unix_path=`$CYGPATH -u "$windows_path"`
20738    new_path="$unix_path"
20739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20741    new_path="$unix_path"
20742  fi
20743
20744
20745  # Now try to locate executable using which
20746  new_path=`$WHICH "$new_path" 2> /dev/null`
20747
20748  if test "x$new_path" = x; then
20749    # Oops. Which didn't find the executable.
20750    # The splitting of arguments from the executable at a space might have been incorrect,
20751    # since paths with space are more likely in Windows. Give it another try with the whole
20752    # argument.
20753    path="$complete"
20754    arguments="EOL"
20755    new_path="$path"
20756
20757  windows_path="$new_path"
20758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20759    unix_path=`$CYGPATH -u "$windows_path"`
20760    new_path="$unix_path"
20761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20763    new_path="$unix_path"
20764  fi
20765
20766
20767    new_path=`$WHICH "$new_path" 2> /dev/null`
20768    # bat and cmd files are not always considered executable in MSYS causing which
20769    # to not find them
20770    if test "x$new_path" = x \
20771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20773      new_path="$path"
20774
20775  windows_path="$new_path"
20776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20777    unix_path=`$CYGPATH -u "$windows_path"`
20778    new_path="$unix_path"
20779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20781    new_path="$unix_path"
20782  fi
20783
20784    fi
20785
20786    if test "x$new_path" = x; then
20787      # It's still not found. Now this is an unrecoverable error.
20788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20790      has_space=`$ECHO "$complete" | $GREP " "`
20791      if test "x$has_space" != x; then
20792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20794      fi
20795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20796    fi
20797  fi
20798
20799  # Now new_path has a complete unix path to the binary
20800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20801    # Keep paths in /bin as-is, but remove trailing .exe if any
20802    new_path="${new_path/%.exe/}"
20803    # Do not save /bin paths to all_fixpath_prefixes!
20804  else
20805    # Not in mixed or Windows style, start by that.
20806    new_path=`cmd //c echo $new_path`
20807
20808  input_path="$new_path"
20809  # Check if we need to convert this using DOS-style short mode. If the path
20810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20811  # take no chances and rewrite it.
20812  # Note: m4 eats our [], so we need to use [ and ] instead.
20813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20814  if test "x$has_forbidden_chars" != x; then
20815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20817  fi
20818
20819    # Output is in $new_path
20820
20821  windows_path="$new_path"
20822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20823    unix_path=`$CYGPATH -u "$windows_path"`
20824    new_path="$unix_path"
20825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20827    new_path="$unix_path"
20828  fi
20829
20830    # remove trailing .exe if any
20831    new_path="${new_path/%.exe/}"
20832
20833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20835  fi
20836
20837    else
20838      # We're on a unix platform. Hooray! :)
20839      # First separate the path from the arguments. This will split at the first
20840      # space.
20841      complete="$FOUND_MAKE"
20842      path="${complete%% *}"
20843      tmp="$complete EOL"
20844      arguments="${tmp#* }"
20845
20846      # Cannot rely on the command "which" here since it doesn't always work.
20847      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20848      if test -z "$is_absolute_path"; then
20849        # Path to executable is not absolute. Find it.
20850        IFS_save="$IFS"
20851        IFS=:
20852        for p in $PATH; do
20853          if test -f "$p/$path" && test -x "$p/$path"; then
20854            new_path="$p/$path"
20855            break
20856          fi
20857        done
20858        IFS="$IFS_save"
20859      else
20860        # This is an absolute path, we can use it without further modifications.
20861        new_path="$path"
20862      fi
20863
20864      if test "x$new_path" = x; then
20865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20867        has_space=`$ECHO "$complete" | $GREP " "`
20868        if test "x$has_space" != x; then
20869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20871        fi
20872        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20873      fi
20874    fi
20875
20876    # Now join together the path and the arguments once again
20877    if test "x$arguments" != xEOL; then
20878      new_complete="$new_path ${arguments% *}"
20879    else
20880      new_complete="$new_path"
20881    fi
20882
20883    if test "x$complete" != "x$new_complete"; then
20884      FOUND_MAKE="$new_complete"
20885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20886$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20887    fi
20888  fi
20889
20890        fi
20891      fi
20892    fi
20893  fi
20894
20895        fi
20896        PATH=$OLD_PATH
20897      fi
20898    fi
20899
20900    if test "x$FOUND_MAKE" = x; then
20901      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
20902    fi
20903
20904    else
20905      # If it succeeded, then it was overridden by the user. We will use it
20906      # for the tool.
20907
20908      # First remove it from the list of overridden variables, so we can test
20909      # for unknown variables in the end.
20910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20911
20912      # Check if we try to supply an empty value
20913      if test "x$MAKE" = x; then
20914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20915$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20917$as_echo_n "checking for MAKE... " >&6; }
20918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20919$as_echo "disabled" >&6; }
20920      else
20921        # Check if the provided tool contains a complete path.
20922        tool_specified="$MAKE"
20923        tool_basename="${tool_specified##*/}"
20924        if test "x$tool_basename" = "x$tool_specified"; then
20925          # A command without a complete path is provided, search $PATH.
20926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20927$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20928          # Extract the first word of "$tool_basename", so it can be a program name with args.
20929set dummy $tool_basename; ac_word=$2
20930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20931$as_echo_n "checking for $ac_word... " >&6; }
20932if ${ac_cv_path_MAKE+:} false; then :
20933  $as_echo_n "(cached) " >&6
20934else
20935  case $MAKE in
20936  [\\/]* | ?:[\\/]*)
20937  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20938  ;;
20939  *)
20940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20941for as_dir in $PATH
20942do
20943  IFS=$as_save_IFS
20944  test -z "$as_dir" && as_dir=.
20945    for ac_exec_ext in '' $ac_executable_extensions; do
20946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20947    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20949    break 2
20950  fi
20951done
20952  done
20953IFS=$as_save_IFS
20954
20955  ;;
20956esac
20957fi
20958MAKE=$ac_cv_path_MAKE
20959if test -n "$MAKE"; then
20960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20961$as_echo "$MAKE" >&6; }
20962else
20963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20964$as_echo "no" >&6; }
20965fi
20966
20967
20968          if test "x$MAKE" = x; then
20969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20970          fi
20971        else
20972          # Otherwise we believe it is a complete path. Use it as it is.
20973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20974$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20976$as_echo_n "checking for MAKE... " >&6; }
20977          if test ! -x "$tool_specified"; then
20978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20979$as_echo "not found" >&6; }
20980            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20981          fi
20982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20983$as_echo "$tool_specified" >&6; }
20984        fi
20985      fi
20986    fi
20987
20988    # If MAKE was set by user, verify the version
20989
20990  MAKE_CANDIDATE=""$MAKE""
20991  DESCRIPTION="user supplied MAKE=$MAKE"
20992
20993  # On Cygwin, we require a newer version of make than on other platforms
20994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995    MAKE_VERSION_EXPR="-e 4\."
20996    MAKE_REQUIRED_VERSION="4.0"
20997   else
20998    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20999    MAKE_REQUIRED_VERSION="3.81"
21000  fi
21001
21002  if test "x$MAKE_CANDIDATE" != x; then
21003    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21004$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21005    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21006    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21007    if test "x$IS_GNU_MAKE" = x; then
21008      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21009$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21010    else
21011      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21012      if test "x$IS_MODERN_MAKE" = x; then
21013        { $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
21014$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;}
21015      else
21016        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21017          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21018            MAKE_EXPECTED_ENV='cygwin'
21019          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21020            MAKE_EXPECTED_ENV='msys'
21021          else
21022            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21023          fi
21024          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21025          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21026        else
21027          # Not relevant for non-Windows
21028          IS_MAKE_CORRECT_ENV=true
21029        fi
21030        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21031          { $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
21032$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;}
21033        else
21034          FOUND_MAKE=$MAKE_CANDIDATE
21035
21036  # Only process if variable expands to non-empty
21037
21038  if test "x$FOUND_MAKE" != x; then
21039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21040
21041  # First separate the path from the arguments. This will split at the first
21042  # space.
21043  complete="$FOUND_MAKE"
21044  path="${complete%% *}"
21045  tmp="$complete EOL"
21046  arguments="${tmp#* }"
21047
21048  # Input might be given as Windows format, start by converting to
21049  # unix format.
21050  new_path=`$CYGPATH -u "$path"`
21051
21052  # Now try to locate executable using which
21053  new_path=`$WHICH "$new_path" 2> /dev/null`
21054  # bat and cmd files are not always considered executable in cygwin causing which
21055  # to not find them
21056  if test "x$new_path" = x \
21057      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21058      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21059    new_path=`$CYGPATH -u "$path"`
21060  fi
21061  if test "x$new_path" = x; then
21062    # Oops. Which didn't find the executable.
21063    # The splitting of arguments from the executable at a space might have been incorrect,
21064    # since paths with space are more likely in Windows. Give it another try with the whole
21065    # argument.
21066    path="$complete"
21067    arguments="EOL"
21068    new_path=`$CYGPATH -u "$path"`
21069    new_path=`$WHICH "$new_path" 2> /dev/null`
21070    # bat and cmd files are not always considered executable in cygwin causing which
21071    # to not find them
21072    if test "x$new_path" = x \
21073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21075      new_path=`$CYGPATH -u "$path"`
21076    fi
21077    if test "x$new_path" = x; then
21078      # It's still not found. Now this is an unrecoverable error.
21079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21081      has_space=`$ECHO "$complete" | $GREP " "`
21082      if test "x$has_space" != x; then
21083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21085      fi
21086      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21087    fi
21088  fi
21089
21090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21093  # "foo.exe" is OK but "foo" is an error.
21094  #
21095  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21096  # It is also a way to make sure we got the proper file name for the real test later on.
21097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21098  if test "x$test_shortpath" = x; then
21099    # Short path failed, file does not exist as specified.
21100    # Try adding .exe or .cmd
21101    if test -f "${new_path}.exe"; then
21102      input_to_shortpath="${new_path}.exe"
21103    elif test -f "${new_path}.cmd"; then
21104      input_to_shortpath="${new_path}.cmd"
21105    else
21106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21110      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21111    fi
21112  else
21113    input_to_shortpath="$new_path"
21114  fi
21115
21116  # Call helper function which possibly converts this using DOS-style short mode.
21117  # If so, the updated path is stored in $new_path.
21118  new_path="$input_to_shortpath"
21119
21120  input_path="$input_to_shortpath"
21121  # Check if we need to convert this using DOS-style short mode. If the path
21122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21123  # take no chances and rewrite it.
21124  # Note: m4 eats our [], so we need to use [ and ] instead.
21125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21126  if test "x$has_forbidden_chars" != x; then
21127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21131      # Going to short mode and back again did indeed matter. Since short mode is
21132      # case insensitive, let's make it lowercase to improve readability.
21133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21134      # Now convert it back to Unix-style (cygpath)
21135      input_path=`$CYGPATH -u "$shortmode_path"`
21136      new_path="$input_path"
21137    fi
21138  fi
21139
21140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21141  if test "x$test_cygdrive_prefix" = x; then
21142    # As a simple fix, exclude /usr/bin since it's not a real path.
21143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21145      # a path prefixed by /cygdrive for fixpath to work.
21146      new_path="$CYGWIN_ROOT_PATH$input_path"
21147    fi
21148  fi
21149
21150  # remove trailing .exe if any
21151  new_path="${new_path/%.exe/}"
21152
21153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21154
21155  # First separate the path from the arguments. This will split at the first
21156  # space.
21157  complete="$FOUND_MAKE"
21158  path="${complete%% *}"
21159  tmp="$complete EOL"
21160  arguments="${tmp#* }"
21161
21162  # Input might be given as Windows format, start by converting to
21163  # unix format.
21164  new_path="$path"
21165
21166  windows_path="$new_path"
21167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21168    unix_path=`$CYGPATH -u "$windows_path"`
21169    new_path="$unix_path"
21170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21172    new_path="$unix_path"
21173  fi
21174
21175
21176  # Now try to locate executable using which
21177  new_path=`$WHICH "$new_path" 2> /dev/null`
21178
21179  if test "x$new_path" = x; then
21180    # Oops. Which didn't find the executable.
21181    # The splitting of arguments from the executable at a space might have been incorrect,
21182    # since paths with space are more likely in Windows. Give it another try with the whole
21183    # argument.
21184    path="$complete"
21185    arguments="EOL"
21186    new_path="$path"
21187
21188  windows_path="$new_path"
21189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21190    unix_path=`$CYGPATH -u "$windows_path"`
21191    new_path="$unix_path"
21192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21194    new_path="$unix_path"
21195  fi
21196
21197
21198    new_path=`$WHICH "$new_path" 2> /dev/null`
21199    # bat and cmd files are not always considered executable in MSYS causing which
21200    # to not find them
21201    if test "x$new_path" = x \
21202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21204      new_path="$path"
21205
21206  windows_path="$new_path"
21207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21208    unix_path=`$CYGPATH -u "$windows_path"`
21209    new_path="$unix_path"
21210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21212    new_path="$unix_path"
21213  fi
21214
21215    fi
21216
21217    if test "x$new_path" = x; then
21218      # It's still not found. Now this is an unrecoverable error.
21219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21220$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21221      has_space=`$ECHO "$complete" | $GREP " "`
21222      if test "x$has_space" != x; then
21223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21225      fi
21226      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21227    fi
21228  fi
21229
21230  # Now new_path has a complete unix path to the binary
21231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21232    # Keep paths in /bin as-is, but remove trailing .exe if any
21233    new_path="${new_path/%.exe/}"
21234    # Do not save /bin paths to all_fixpath_prefixes!
21235  else
21236    # Not in mixed or Windows style, start by that.
21237    new_path=`cmd //c echo $new_path`
21238
21239  input_path="$new_path"
21240  # Check if we need to convert this using DOS-style short mode. If the path
21241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21242  # take no chances and rewrite it.
21243  # Note: m4 eats our [], so we need to use [ and ] instead.
21244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21245  if test "x$has_forbidden_chars" != x; then
21246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21248  fi
21249
21250    # Output is in $new_path
21251
21252  windows_path="$new_path"
21253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21254    unix_path=`$CYGPATH -u "$windows_path"`
21255    new_path="$unix_path"
21256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21258    new_path="$unix_path"
21259  fi
21260
21261    # remove trailing .exe if any
21262    new_path="${new_path/%.exe/}"
21263
21264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21266  fi
21267
21268    else
21269      # We're on a unix platform. Hooray! :)
21270      # First separate the path from the arguments. This will split at the first
21271      # space.
21272      complete="$FOUND_MAKE"
21273      path="${complete%% *}"
21274      tmp="$complete EOL"
21275      arguments="${tmp#* }"
21276
21277      # Cannot rely on the command "which" here since it doesn't always work.
21278      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21279      if test -z "$is_absolute_path"; then
21280        # Path to executable is not absolute. Find it.
21281        IFS_save="$IFS"
21282        IFS=:
21283        for p in $PATH; do
21284          if test -f "$p/$path" && test -x "$p/$path"; then
21285            new_path="$p/$path"
21286            break
21287          fi
21288        done
21289        IFS="$IFS_save"
21290      else
21291        # This is an absolute path, we can use it without further modifications.
21292        new_path="$path"
21293      fi
21294
21295      if test "x$new_path" = x; then
21296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21297$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21298        has_space=`$ECHO "$complete" | $GREP " "`
21299        if test "x$has_space" != x; then
21300          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21302        fi
21303        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21304      fi
21305    fi
21306
21307    # Now join together the path and the arguments once again
21308    if test "x$arguments" != xEOL; then
21309      new_complete="$new_path ${arguments% *}"
21310    else
21311      new_complete="$new_path"
21312    fi
21313
21314    if test "x$complete" != "x$new_complete"; then
21315      FOUND_MAKE="$new_complete"
21316      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21317$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21318    fi
21319  fi
21320
21321        fi
21322      fi
21323    fi
21324  fi
21325
21326    if test "x$FOUND_MAKE" = x; then
21327      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21328    fi
21329
21330  fi
21331
21332
21333  MAKE=$FOUND_MAKE
21334
21335  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21336$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21337
21338
21339  # Check if make supports the output sync option and if so, setup using it.
21340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21341$as_echo_n "checking if make --output-sync is supported... " >&6; }
21342  if $MAKE --version -O > /dev/null 2>&1; then
21343    OUTPUT_SYNC_SUPPORTED=true
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21345$as_echo "yes" >&6; }
21346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21347$as_echo_n "checking for output-sync value... " >&6; }
21348
21349# Check whether --with-output-sync was given.
21350if test "${with_output_sync+set}" = set; then :
21351  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21352fi
21353
21354    if test "x$OUTPUT_SYNC" = "x"; then
21355      OUTPUT_SYNC=none
21356    fi
21357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21358$as_echo "$OUTPUT_SYNC" >&6; }
21359    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21360      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21361    fi
21362  else
21363    OUTPUT_SYNC_SUPPORTED=false
21364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21365$as_echo "no" >&6; }
21366  fi
21367
21368
21369
21370
21371
21372
21373  # Test if find supports -delete
21374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21375$as_echo_n "checking if find supports -delete... " >&6; }
21376  FIND_DELETE="-delete"
21377
21378  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21379
21380  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21381
21382  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21383  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21384    # No, it does not.
21385    $RM $DELETEDIR/TestIfFindSupportsDelete
21386    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21387      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21388      FIND_DELETE="-print | $XARGS $RM"
21389    else
21390      FIND_DELETE="-exec $RM \{\} \+"
21391    fi
21392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21393$as_echo "no" >&6; }
21394  else
21395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21396$as_echo "yes" >&6; }
21397  fi
21398  $RMDIR $DELETEDIR
21399
21400
21401
21402  # Test which kind of tar was found
21403  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21404    TAR_TYPE="gnu"
21405  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21406    TAR_TYPE="bsd"
21407  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21408    TAR_TYPE="bsd"
21409  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21410    TAR_TYPE="solaris"
21411  fi
21412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21413$as_echo_n "checking what type of tar was found... " >&6; }
21414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21415$as_echo "$TAR_TYPE" >&6; }
21416
21417  TAR_CREATE_FILE_PARAM=""
21418
21419  if test "x$TAR_TYPE" = "xgnu"; then
21420    TAR_INCLUDE_PARAM="T"
21421    TAR_SUPPORTS_TRANSFORM="true"
21422    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21423      # When using gnu tar for Solaris targets, need to use compatibility mode
21424      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21425    fi
21426  else
21427    TAR_INCLUDE_PARAM="I"
21428    TAR_SUPPORTS_TRANSFORM="false"
21429  fi
21430
21431
21432
21433
21434
21435
21436  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21437  # This is a problem for the grep resident on AIX.
21438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21439$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21440  # Multiple subsequent spaces..
21441  STACK_SPACES='aaa   bbb   ccc'
21442  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21443  # patterns in it.
21444  STACK_LIST=${STACK_SPACES// /$'\n'}
21445  NEEDLE_SPACES='ccc bbb aaa'
21446  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21447  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21448  if test "x$RESULT" == "x"; then
21449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21450$as_echo "yes" >&6; }
21451  else
21452    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21453      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21454    fi
21455    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21456  fi
21457
21458
21459  # These tools might not be installed by default,
21460  # need hint on how to install them.
21461
21462
21463
21464  # Publish this variable in the help.
21465
21466
21467  if [ -z "${UNZIP+x}" ]; then
21468    # The variable is not set by user, try to locate tool using the code snippet
21469    for ac_prog in unzip
21470do
21471  # Extract the first word of "$ac_prog", so it can be a program name with args.
21472set dummy $ac_prog; ac_word=$2
21473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21474$as_echo_n "checking for $ac_word... " >&6; }
21475if ${ac_cv_path_UNZIP+:} false; then :
21476  $as_echo_n "(cached) " >&6
21477else
21478  case $UNZIP in
21479  [\\/]* | ?:[\\/]*)
21480  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21481  ;;
21482  *)
21483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21484for as_dir in $PATH
21485do
21486  IFS=$as_save_IFS
21487  test -z "$as_dir" && as_dir=.
21488    for ac_exec_ext in '' $ac_executable_extensions; do
21489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21490    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21492    break 2
21493  fi
21494done
21495  done
21496IFS=$as_save_IFS
21497
21498  ;;
21499esac
21500fi
21501UNZIP=$ac_cv_path_UNZIP
21502if test -n "$UNZIP"; then
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21504$as_echo "$UNZIP" >&6; }
21505else
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21507$as_echo "no" >&6; }
21508fi
21509
21510
21511  test -n "$UNZIP" && break
21512done
21513
21514  else
21515    # The variable is set, but is it from the command line or the environment?
21516
21517    # Try to remove the string !UNZIP! from our list.
21518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21520      # If it failed, the variable was not from the command line. Ignore it,
21521      # but warn the user (except for BASH, which is always set by the calling BASH).
21522      if test "xUNZIP" != xBASH; then
21523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21524$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21525      fi
21526      # Try to locate tool using the code snippet
21527      for ac_prog in unzip
21528do
21529  # Extract the first word of "$ac_prog", so it can be a program name with args.
21530set dummy $ac_prog; ac_word=$2
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21532$as_echo_n "checking for $ac_word... " >&6; }
21533if ${ac_cv_path_UNZIP+:} false; then :
21534  $as_echo_n "(cached) " >&6
21535else
21536  case $UNZIP in
21537  [\\/]* | ?:[\\/]*)
21538  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21539  ;;
21540  *)
21541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21542for as_dir in $PATH
21543do
21544  IFS=$as_save_IFS
21545  test -z "$as_dir" && as_dir=.
21546    for ac_exec_ext in '' $ac_executable_extensions; do
21547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21548    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21550    break 2
21551  fi
21552done
21553  done
21554IFS=$as_save_IFS
21555
21556  ;;
21557esac
21558fi
21559UNZIP=$ac_cv_path_UNZIP
21560if test -n "$UNZIP"; then
21561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21562$as_echo "$UNZIP" >&6; }
21563else
21564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21565$as_echo "no" >&6; }
21566fi
21567
21568
21569  test -n "$UNZIP" && break
21570done
21571
21572    else
21573      # If it succeeded, then it was overridden by the user. We will use it
21574      # for the tool.
21575
21576      # First remove it from the list of overridden variables, so we can test
21577      # for unknown variables in the end.
21578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21579
21580      # Check if we try to supply an empty value
21581      if test "x$UNZIP" = x; then
21582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21583$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21585$as_echo_n "checking for UNZIP... " >&6; }
21586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21587$as_echo "disabled" >&6; }
21588      else
21589        # Check if the provided tool contains a complete path.
21590        tool_specified="$UNZIP"
21591        tool_basename="${tool_specified##*/}"
21592        if test "x$tool_basename" = "x$tool_specified"; then
21593          # A command without a complete path is provided, search $PATH.
21594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21595$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21596          # Extract the first word of "$tool_basename", so it can be a program name with args.
21597set dummy $tool_basename; ac_word=$2
21598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21599$as_echo_n "checking for $ac_word... " >&6; }
21600if ${ac_cv_path_UNZIP+:} false; then :
21601  $as_echo_n "(cached) " >&6
21602else
21603  case $UNZIP in
21604  [\\/]* | ?:[\\/]*)
21605  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21606  ;;
21607  *)
21608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21609for as_dir in $PATH
21610do
21611  IFS=$as_save_IFS
21612  test -z "$as_dir" && as_dir=.
21613    for ac_exec_ext in '' $ac_executable_extensions; do
21614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21615    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21617    break 2
21618  fi
21619done
21620  done
21621IFS=$as_save_IFS
21622
21623  ;;
21624esac
21625fi
21626UNZIP=$ac_cv_path_UNZIP
21627if test -n "$UNZIP"; then
21628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21629$as_echo "$UNZIP" >&6; }
21630else
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21632$as_echo "no" >&6; }
21633fi
21634
21635
21636          if test "x$UNZIP" = x; then
21637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21638          fi
21639        else
21640          # Otherwise we believe it is a complete path. Use it as it is.
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21642$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21644$as_echo_n "checking for UNZIP... " >&6; }
21645          if test ! -x "$tool_specified"; then
21646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21647$as_echo "not found" >&6; }
21648            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21649          fi
21650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21651$as_echo "$tool_specified" >&6; }
21652        fi
21653      fi
21654    fi
21655
21656  fi
21657
21658
21659
21660  if test "x$UNZIP" = x; then
21661    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21662  fi
21663
21664
21665  # Since zip uses "ZIP" as a environment variable for passing options, we need
21666  # to name our variable differently, hence ZIPEXE.
21667
21668
21669
21670  # Publish this variable in the help.
21671
21672
21673  if [ -z "${ZIPEXE+x}" ]; then
21674    # The variable is not set by user, try to locate tool using the code snippet
21675    for ac_prog in zip
21676do
21677  # Extract the first word of "$ac_prog", so it can be a program name with args.
21678set dummy $ac_prog; ac_word=$2
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21680$as_echo_n "checking for $ac_word... " >&6; }
21681if ${ac_cv_path_ZIPEXE+:} false; then :
21682  $as_echo_n "(cached) " >&6
21683else
21684  case $ZIPEXE in
21685  [\\/]* | ?:[\\/]*)
21686  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21687  ;;
21688  *)
21689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21690for as_dir in $PATH
21691do
21692  IFS=$as_save_IFS
21693  test -z "$as_dir" && as_dir=.
21694    for ac_exec_ext in '' $ac_executable_extensions; do
21695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21696    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21698    break 2
21699  fi
21700done
21701  done
21702IFS=$as_save_IFS
21703
21704  ;;
21705esac
21706fi
21707ZIPEXE=$ac_cv_path_ZIPEXE
21708if test -n "$ZIPEXE"; then
21709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21710$as_echo "$ZIPEXE" >&6; }
21711else
21712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21713$as_echo "no" >&6; }
21714fi
21715
21716
21717  test -n "$ZIPEXE" && break
21718done
21719
21720  else
21721    # The variable is set, but is it from the command line or the environment?
21722
21723    # Try to remove the string !ZIPEXE! from our list.
21724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21726      # If it failed, the variable was not from the command line. Ignore it,
21727      # but warn the user (except for BASH, which is always set by the calling BASH).
21728      if test "xZIPEXE" != xBASH; then
21729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21730$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21731      fi
21732      # Try to locate tool using the code snippet
21733      for ac_prog in zip
21734do
21735  # Extract the first word of "$ac_prog", so it can be a program name with args.
21736set dummy $ac_prog; ac_word=$2
21737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21738$as_echo_n "checking for $ac_word... " >&6; }
21739if ${ac_cv_path_ZIPEXE+:} false; then :
21740  $as_echo_n "(cached) " >&6
21741else
21742  case $ZIPEXE in
21743  [\\/]* | ?:[\\/]*)
21744  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21745  ;;
21746  *)
21747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21748for as_dir in $PATH
21749do
21750  IFS=$as_save_IFS
21751  test -z "$as_dir" && as_dir=.
21752    for ac_exec_ext in '' $ac_executable_extensions; do
21753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21754    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21756    break 2
21757  fi
21758done
21759  done
21760IFS=$as_save_IFS
21761
21762  ;;
21763esac
21764fi
21765ZIPEXE=$ac_cv_path_ZIPEXE
21766if test -n "$ZIPEXE"; then
21767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21768$as_echo "$ZIPEXE" >&6; }
21769else
21770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21771$as_echo "no" >&6; }
21772fi
21773
21774
21775  test -n "$ZIPEXE" && break
21776done
21777
21778    else
21779      # If it succeeded, then it was overridden by the user. We will use it
21780      # for the tool.
21781
21782      # First remove it from the list of overridden variables, so we can test
21783      # for unknown variables in the end.
21784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21785
21786      # Check if we try to supply an empty value
21787      if test "x$ZIPEXE" = x; then
21788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21789$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21791$as_echo_n "checking for ZIPEXE... " >&6; }
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21793$as_echo "disabled" >&6; }
21794      else
21795        # Check if the provided tool contains a complete path.
21796        tool_specified="$ZIPEXE"
21797        tool_basename="${tool_specified##*/}"
21798        if test "x$tool_basename" = "x$tool_specified"; then
21799          # A command without a complete path is provided, search $PATH.
21800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21801$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21802          # Extract the first word of "$tool_basename", so it can be a program name with args.
21803set dummy $tool_basename; ac_word=$2
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21805$as_echo_n "checking for $ac_word... " >&6; }
21806if ${ac_cv_path_ZIPEXE+:} false; then :
21807  $as_echo_n "(cached) " >&6
21808else
21809  case $ZIPEXE in
21810  [\\/]* | ?:[\\/]*)
21811  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21812  ;;
21813  *)
21814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21815for as_dir in $PATH
21816do
21817  IFS=$as_save_IFS
21818  test -z "$as_dir" && as_dir=.
21819    for ac_exec_ext in '' $ac_executable_extensions; do
21820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21821    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21823    break 2
21824  fi
21825done
21826  done
21827IFS=$as_save_IFS
21828
21829  ;;
21830esac
21831fi
21832ZIPEXE=$ac_cv_path_ZIPEXE
21833if test -n "$ZIPEXE"; then
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21835$as_echo "$ZIPEXE" >&6; }
21836else
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21838$as_echo "no" >&6; }
21839fi
21840
21841
21842          if test "x$ZIPEXE" = x; then
21843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21844          fi
21845        else
21846          # Otherwise we believe it is a complete path. Use it as it is.
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21848$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21850$as_echo_n "checking for ZIPEXE... " >&6; }
21851          if test ! -x "$tool_specified"; then
21852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21853$as_echo "not found" >&6; }
21854            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21855          fi
21856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21857$as_echo "$tool_specified" >&6; }
21858        fi
21859      fi
21860    fi
21861
21862  fi
21863
21864
21865
21866  if test "x$ZIPEXE" = x; then
21867    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21868  fi
21869
21870
21871
21872  # Non-required basic tools
21873
21874
21875
21876  # Publish this variable in the help.
21877
21878
21879  if [ -z "${LDD+x}" ]; then
21880    # The variable is not set by user, try to locate tool using the code snippet
21881    for ac_prog in ldd
21882do
21883  # Extract the first word of "$ac_prog", so it can be a program name with args.
21884set dummy $ac_prog; ac_word=$2
21885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21886$as_echo_n "checking for $ac_word... " >&6; }
21887if ${ac_cv_path_LDD+:} false; then :
21888  $as_echo_n "(cached) " >&6
21889else
21890  case $LDD in
21891  [\\/]* | ?:[\\/]*)
21892  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21893  ;;
21894  *)
21895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21896for as_dir in $PATH
21897do
21898  IFS=$as_save_IFS
21899  test -z "$as_dir" && as_dir=.
21900    for ac_exec_ext in '' $ac_executable_extensions; do
21901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21902    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21904    break 2
21905  fi
21906done
21907  done
21908IFS=$as_save_IFS
21909
21910  ;;
21911esac
21912fi
21913LDD=$ac_cv_path_LDD
21914if test -n "$LDD"; then
21915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21916$as_echo "$LDD" >&6; }
21917else
21918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21919$as_echo "no" >&6; }
21920fi
21921
21922
21923  test -n "$LDD" && break
21924done
21925
21926  else
21927    # The variable is set, but is it from the command line or the environment?
21928
21929    # Try to remove the string !LDD! from our list.
21930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21932      # If it failed, the variable was not from the command line. Ignore it,
21933      # but warn the user (except for BASH, which is always set by the calling BASH).
21934      if test "xLDD" != xBASH; then
21935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21936$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21937      fi
21938      # Try to locate tool using the code snippet
21939      for ac_prog in ldd
21940do
21941  # Extract the first word of "$ac_prog", so it can be a program name with args.
21942set dummy $ac_prog; ac_word=$2
21943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21944$as_echo_n "checking for $ac_word... " >&6; }
21945if ${ac_cv_path_LDD+:} false; then :
21946  $as_echo_n "(cached) " >&6
21947else
21948  case $LDD in
21949  [\\/]* | ?:[\\/]*)
21950  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21951  ;;
21952  *)
21953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21954for as_dir in $PATH
21955do
21956  IFS=$as_save_IFS
21957  test -z "$as_dir" && as_dir=.
21958    for ac_exec_ext in '' $ac_executable_extensions; do
21959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21960    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21962    break 2
21963  fi
21964done
21965  done
21966IFS=$as_save_IFS
21967
21968  ;;
21969esac
21970fi
21971LDD=$ac_cv_path_LDD
21972if test -n "$LDD"; then
21973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21974$as_echo "$LDD" >&6; }
21975else
21976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21977$as_echo "no" >&6; }
21978fi
21979
21980
21981  test -n "$LDD" && break
21982done
21983
21984    else
21985      # If it succeeded, then it was overridden by the user. We will use it
21986      # for the tool.
21987
21988      # First remove it from the list of overridden variables, so we can test
21989      # for unknown variables in the end.
21990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21991
21992      # Check if we try to supply an empty value
21993      if test "x$LDD" = x; then
21994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21995$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21997$as_echo_n "checking for LDD... " >&6; }
21998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21999$as_echo "disabled" >&6; }
22000      else
22001        # Check if the provided tool contains a complete path.
22002        tool_specified="$LDD"
22003        tool_basename="${tool_specified##*/}"
22004        if test "x$tool_basename" = "x$tool_specified"; then
22005          # A command without a complete path is provided, search $PATH.
22006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22007$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22008          # Extract the first word of "$tool_basename", so it can be a program name with args.
22009set dummy $tool_basename; ac_word=$2
22010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22011$as_echo_n "checking for $ac_word... " >&6; }
22012if ${ac_cv_path_LDD+:} false; then :
22013  $as_echo_n "(cached) " >&6
22014else
22015  case $LDD in
22016  [\\/]* | ?:[\\/]*)
22017  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22018  ;;
22019  *)
22020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22021for as_dir in $PATH
22022do
22023  IFS=$as_save_IFS
22024  test -z "$as_dir" && as_dir=.
22025    for ac_exec_ext in '' $ac_executable_extensions; do
22026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22027    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22029    break 2
22030  fi
22031done
22032  done
22033IFS=$as_save_IFS
22034
22035  ;;
22036esac
22037fi
22038LDD=$ac_cv_path_LDD
22039if test -n "$LDD"; then
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22041$as_echo "$LDD" >&6; }
22042else
22043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22044$as_echo "no" >&6; }
22045fi
22046
22047
22048          if test "x$LDD" = x; then
22049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22050          fi
22051        else
22052          # Otherwise we believe it is a complete path. Use it as it is.
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22054$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22056$as_echo_n "checking for LDD... " >&6; }
22057          if test ! -x "$tool_specified"; then
22058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22059$as_echo "not found" >&6; }
22060            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22061          fi
22062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22063$as_echo "$tool_specified" >&6; }
22064        fi
22065      fi
22066    fi
22067
22068  fi
22069
22070
22071  if test "x$LDD" = "x"; then
22072    # List shared lib dependencies is used for
22073    # debug output and checking for forbidden dependencies.
22074    # We can build without it.
22075    LDD="true"
22076  fi
22077
22078
22079  # Publish this variable in the help.
22080
22081
22082  if [ -z "${OTOOL+x}" ]; then
22083    # The variable is not set by user, try to locate tool using the code snippet
22084    for ac_prog in otool
22085do
22086  # Extract the first word of "$ac_prog", so it can be a program name with args.
22087set dummy $ac_prog; ac_word=$2
22088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22089$as_echo_n "checking for $ac_word... " >&6; }
22090if ${ac_cv_path_OTOOL+:} false; then :
22091  $as_echo_n "(cached) " >&6
22092else
22093  case $OTOOL in
22094  [\\/]* | ?:[\\/]*)
22095  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22096  ;;
22097  *)
22098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22099for as_dir in $PATH
22100do
22101  IFS=$as_save_IFS
22102  test -z "$as_dir" && as_dir=.
22103    for ac_exec_ext in '' $ac_executable_extensions; do
22104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22105    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22107    break 2
22108  fi
22109done
22110  done
22111IFS=$as_save_IFS
22112
22113  ;;
22114esac
22115fi
22116OTOOL=$ac_cv_path_OTOOL
22117if test -n "$OTOOL"; then
22118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22119$as_echo "$OTOOL" >&6; }
22120else
22121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22122$as_echo "no" >&6; }
22123fi
22124
22125
22126  test -n "$OTOOL" && break
22127done
22128
22129  else
22130    # The variable is set, but is it from the command line or the environment?
22131
22132    # Try to remove the string !OTOOL! from our list.
22133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22135      # If it failed, the variable was not from the command line. Ignore it,
22136      # but warn the user (except for BASH, which is always set by the calling BASH).
22137      if test "xOTOOL" != xBASH; then
22138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22139$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22140      fi
22141      # Try to locate tool using the code snippet
22142      for ac_prog in otool
22143do
22144  # Extract the first word of "$ac_prog", so it can be a program name with args.
22145set dummy $ac_prog; ac_word=$2
22146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22147$as_echo_n "checking for $ac_word... " >&6; }
22148if ${ac_cv_path_OTOOL+:} false; then :
22149  $as_echo_n "(cached) " >&6
22150else
22151  case $OTOOL in
22152  [\\/]* | ?:[\\/]*)
22153  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22154  ;;
22155  *)
22156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22157for as_dir in $PATH
22158do
22159  IFS=$as_save_IFS
22160  test -z "$as_dir" && as_dir=.
22161    for ac_exec_ext in '' $ac_executable_extensions; do
22162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22163    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22165    break 2
22166  fi
22167done
22168  done
22169IFS=$as_save_IFS
22170
22171  ;;
22172esac
22173fi
22174OTOOL=$ac_cv_path_OTOOL
22175if test -n "$OTOOL"; then
22176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22177$as_echo "$OTOOL" >&6; }
22178else
22179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22180$as_echo "no" >&6; }
22181fi
22182
22183
22184  test -n "$OTOOL" && break
22185done
22186
22187    else
22188      # If it succeeded, then it was overridden by the user. We will use it
22189      # for the tool.
22190
22191      # First remove it from the list of overridden variables, so we can test
22192      # for unknown variables in the end.
22193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22194
22195      # Check if we try to supply an empty value
22196      if test "x$OTOOL" = x; then
22197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22198$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22200$as_echo_n "checking for OTOOL... " >&6; }
22201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22202$as_echo "disabled" >&6; }
22203      else
22204        # Check if the provided tool contains a complete path.
22205        tool_specified="$OTOOL"
22206        tool_basename="${tool_specified##*/}"
22207        if test "x$tool_basename" = "x$tool_specified"; then
22208          # A command without a complete path is provided, search $PATH.
22209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22210$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22211          # Extract the first word of "$tool_basename", so it can be a program name with args.
22212set dummy $tool_basename; ac_word=$2
22213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22214$as_echo_n "checking for $ac_word... " >&6; }
22215if ${ac_cv_path_OTOOL+:} false; then :
22216  $as_echo_n "(cached) " >&6
22217else
22218  case $OTOOL in
22219  [\\/]* | ?:[\\/]*)
22220  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22221  ;;
22222  *)
22223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22224for as_dir in $PATH
22225do
22226  IFS=$as_save_IFS
22227  test -z "$as_dir" && as_dir=.
22228    for ac_exec_ext in '' $ac_executable_extensions; do
22229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22230    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22232    break 2
22233  fi
22234done
22235  done
22236IFS=$as_save_IFS
22237
22238  ;;
22239esac
22240fi
22241OTOOL=$ac_cv_path_OTOOL
22242if test -n "$OTOOL"; then
22243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22244$as_echo "$OTOOL" >&6; }
22245else
22246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22247$as_echo "no" >&6; }
22248fi
22249
22250
22251          if test "x$OTOOL" = x; then
22252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22253          fi
22254        else
22255          # Otherwise we believe it is a complete path. Use it as it is.
22256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22257$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22259$as_echo_n "checking for OTOOL... " >&6; }
22260          if test ! -x "$tool_specified"; then
22261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22262$as_echo "not found" >&6; }
22263            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22264          fi
22265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22266$as_echo "$tool_specified" >&6; }
22267        fi
22268      fi
22269    fi
22270
22271  fi
22272
22273
22274  if test "x$OTOOL" = "x"; then
22275    OTOOL="true"
22276  fi
22277
22278
22279  # Publish this variable in the help.
22280
22281
22282  if [ -z "${READELF+x}" ]; then
22283    # The variable is not set by user, try to locate tool using the code snippet
22284    for ac_prog in greadelf readelf
22285do
22286  # Extract the first word of "$ac_prog", so it can be a program name with args.
22287set dummy $ac_prog; ac_word=$2
22288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22289$as_echo_n "checking for $ac_word... " >&6; }
22290if ${ac_cv_path_READELF+:} false; then :
22291  $as_echo_n "(cached) " >&6
22292else
22293  case $READELF in
22294  [\\/]* | ?:[\\/]*)
22295  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22296  ;;
22297  *)
22298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22299for as_dir in $PATH
22300do
22301  IFS=$as_save_IFS
22302  test -z "$as_dir" && as_dir=.
22303    for ac_exec_ext in '' $ac_executable_extensions; do
22304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22305    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22307    break 2
22308  fi
22309done
22310  done
22311IFS=$as_save_IFS
22312
22313  ;;
22314esac
22315fi
22316READELF=$ac_cv_path_READELF
22317if test -n "$READELF"; then
22318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22319$as_echo "$READELF" >&6; }
22320else
22321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22322$as_echo "no" >&6; }
22323fi
22324
22325
22326  test -n "$READELF" && break
22327done
22328
22329  else
22330    # The variable is set, but is it from the command line or the environment?
22331
22332    # Try to remove the string !READELF! from our list.
22333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22335      # If it failed, the variable was not from the command line. Ignore it,
22336      # but warn the user (except for BASH, which is always set by the calling BASH).
22337      if test "xREADELF" != xBASH; then
22338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22339$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22340      fi
22341      # Try to locate tool using the code snippet
22342      for ac_prog in greadelf readelf
22343do
22344  # Extract the first word of "$ac_prog", so it can be a program name with args.
22345set dummy $ac_prog; ac_word=$2
22346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22347$as_echo_n "checking for $ac_word... " >&6; }
22348if ${ac_cv_path_READELF+:} false; then :
22349  $as_echo_n "(cached) " >&6
22350else
22351  case $READELF in
22352  [\\/]* | ?:[\\/]*)
22353  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22354  ;;
22355  *)
22356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22357for as_dir in $PATH
22358do
22359  IFS=$as_save_IFS
22360  test -z "$as_dir" && as_dir=.
22361    for ac_exec_ext in '' $ac_executable_extensions; do
22362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22363    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22365    break 2
22366  fi
22367done
22368  done
22369IFS=$as_save_IFS
22370
22371  ;;
22372esac
22373fi
22374READELF=$ac_cv_path_READELF
22375if test -n "$READELF"; then
22376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22377$as_echo "$READELF" >&6; }
22378else
22379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22380$as_echo "no" >&6; }
22381fi
22382
22383
22384  test -n "$READELF" && break
22385done
22386
22387    else
22388      # If it succeeded, then it was overridden by the user. We will use it
22389      # for the tool.
22390
22391      # First remove it from the list of overridden variables, so we can test
22392      # for unknown variables in the end.
22393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22394
22395      # Check if we try to supply an empty value
22396      if test "x$READELF" = x; then
22397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22398$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22400$as_echo_n "checking for READELF... " >&6; }
22401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22402$as_echo "disabled" >&6; }
22403      else
22404        # Check if the provided tool contains a complete path.
22405        tool_specified="$READELF"
22406        tool_basename="${tool_specified##*/}"
22407        if test "x$tool_basename" = "x$tool_specified"; then
22408          # A command without a complete path is provided, search $PATH.
22409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22410$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22411          # Extract the first word of "$tool_basename", so it can be a program name with args.
22412set dummy $tool_basename; ac_word=$2
22413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22414$as_echo_n "checking for $ac_word... " >&6; }
22415if ${ac_cv_path_READELF+:} false; then :
22416  $as_echo_n "(cached) " >&6
22417else
22418  case $READELF in
22419  [\\/]* | ?:[\\/]*)
22420  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22421  ;;
22422  *)
22423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22424for as_dir in $PATH
22425do
22426  IFS=$as_save_IFS
22427  test -z "$as_dir" && as_dir=.
22428    for ac_exec_ext in '' $ac_executable_extensions; do
22429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22430    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22432    break 2
22433  fi
22434done
22435  done
22436IFS=$as_save_IFS
22437
22438  ;;
22439esac
22440fi
22441READELF=$ac_cv_path_READELF
22442if test -n "$READELF"; then
22443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22444$as_echo "$READELF" >&6; }
22445else
22446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22447$as_echo "no" >&6; }
22448fi
22449
22450
22451          if test "x$READELF" = x; then
22452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22453          fi
22454        else
22455          # Otherwise we believe it is a complete path. Use it as it is.
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22457$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22459$as_echo_n "checking for READELF... " >&6; }
22460          if test ! -x "$tool_specified"; then
22461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22462$as_echo "not found" >&6; }
22463            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22464          fi
22465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22466$as_echo "$tool_specified" >&6; }
22467        fi
22468      fi
22469    fi
22470
22471  fi
22472
22473
22474
22475
22476  # Publish this variable in the help.
22477
22478
22479  if [ -z "${HG+x}" ]; then
22480    # The variable is not set by user, try to locate tool using the code snippet
22481    for ac_prog in hg
22482do
22483  # Extract the first word of "$ac_prog", so it can be a program name with args.
22484set dummy $ac_prog; ac_word=$2
22485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22486$as_echo_n "checking for $ac_word... " >&6; }
22487if ${ac_cv_path_HG+:} false; then :
22488  $as_echo_n "(cached) " >&6
22489else
22490  case $HG in
22491  [\\/]* | ?:[\\/]*)
22492  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22493  ;;
22494  *)
22495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22496for as_dir in $PATH
22497do
22498  IFS=$as_save_IFS
22499  test -z "$as_dir" && as_dir=.
22500    for ac_exec_ext in '' $ac_executable_extensions; do
22501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22502    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22504    break 2
22505  fi
22506done
22507  done
22508IFS=$as_save_IFS
22509
22510  ;;
22511esac
22512fi
22513HG=$ac_cv_path_HG
22514if test -n "$HG"; then
22515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22516$as_echo "$HG" >&6; }
22517else
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22519$as_echo "no" >&6; }
22520fi
22521
22522
22523  test -n "$HG" && break
22524done
22525
22526  else
22527    # The variable is set, but is it from the command line or the environment?
22528
22529    # Try to remove the string !HG! from our list.
22530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22532      # If it failed, the variable was not from the command line. Ignore it,
22533      # but warn the user (except for BASH, which is always set by the calling BASH).
22534      if test "xHG" != xBASH; then
22535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22536$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22537      fi
22538      # Try to locate tool using the code snippet
22539      for ac_prog in hg
22540do
22541  # Extract the first word of "$ac_prog", so it can be a program name with args.
22542set dummy $ac_prog; ac_word=$2
22543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22544$as_echo_n "checking for $ac_word... " >&6; }
22545if ${ac_cv_path_HG+:} false; then :
22546  $as_echo_n "(cached) " >&6
22547else
22548  case $HG in
22549  [\\/]* | ?:[\\/]*)
22550  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22551  ;;
22552  *)
22553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22554for as_dir in $PATH
22555do
22556  IFS=$as_save_IFS
22557  test -z "$as_dir" && as_dir=.
22558    for ac_exec_ext in '' $ac_executable_extensions; do
22559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22560    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22562    break 2
22563  fi
22564done
22565  done
22566IFS=$as_save_IFS
22567
22568  ;;
22569esac
22570fi
22571HG=$ac_cv_path_HG
22572if test -n "$HG"; then
22573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22574$as_echo "$HG" >&6; }
22575else
22576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22577$as_echo "no" >&6; }
22578fi
22579
22580
22581  test -n "$HG" && break
22582done
22583
22584    else
22585      # If it succeeded, then it was overridden by the user. We will use it
22586      # for the tool.
22587
22588      # First remove it from the list of overridden variables, so we can test
22589      # for unknown variables in the end.
22590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22591
22592      # Check if we try to supply an empty value
22593      if test "x$HG" = x; then
22594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22595$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22597$as_echo_n "checking for HG... " >&6; }
22598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22599$as_echo "disabled" >&6; }
22600      else
22601        # Check if the provided tool contains a complete path.
22602        tool_specified="$HG"
22603        tool_basename="${tool_specified##*/}"
22604        if test "x$tool_basename" = "x$tool_specified"; then
22605          # A command without a complete path is provided, search $PATH.
22606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22607$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22608          # Extract the first word of "$tool_basename", so it can be a program name with args.
22609set dummy $tool_basename; ac_word=$2
22610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22611$as_echo_n "checking for $ac_word... " >&6; }
22612if ${ac_cv_path_HG+:} false; then :
22613  $as_echo_n "(cached) " >&6
22614else
22615  case $HG in
22616  [\\/]* | ?:[\\/]*)
22617  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22618  ;;
22619  *)
22620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22621for as_dir in $PATH
22622do
22623  IFS=$as_save_IFS
22624  test -z "$as_dir" && as_dir=.
22625    for ac_exec_ext in '' $ac_executable_extensions; do
22626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22627    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22629    break 2
22630  fi
22631done
22632  done
22633IFS=$as_save_IFS
22634
22635  ;;
22636esac
22637fi
22638HG=$ac_cv_path_HG
22639if test -n "$HG"; then
22640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22641$as_echo "$HG" >&6; }
22642else
22643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22644$as_echo "no" >&6; }
22645fi
22646
22647
22648          if test "x$HG" = x; then
22649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22650          fi
22651        else
22652          # Otherwise we believe it is a complete path. Use it as it is.
22653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22654$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22656$as_echo_n "checking for HG... " >&6; }
22657          if test ! -x "$tool_specified"; then
22658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22659$as_echo "not found" >&6; }
22660            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22661          fi
22662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22663$as_echo "$tool_specified" >&6; }
22664        fi
22665      fi
22666    fi
22667
22668  fi
22669
22670
22671
22672
22673  # Publish this variable in the help.
22674
22675
22676  if [ -z "${STAT+x}" ]; then
22677    # The variable is not set by user, try to locate tool using the code snippet
22678    for ac_prog in stat
22679do
22680  # Extract the first word of "$ac_prog", so it can be a program name with args.
22681set dummy $ac_prog; ac_word=$2
22682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22683$as_echo_n "checking for $ac_word... " >&6; }
22684if ${ac_cv_path_STAT+:} false; then :
22685  $as_echo_n "(cached) " >&6
22686else
22687  case $STAT in
22688  [\\/]* | ?:[\\/]*)
22689  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22690  ;;
22691  *)
22692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22693for as_dir in $PATH
22694do
22695  IFS=$as_save_IFS
22696  test -z "$as_dir" && as_dir=.
22697    for ac_exec_ext in '' $ac_executable_extensions; do
22698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22699    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22701    break 2
22702  fi
22703done
22704  done
22705IFS=$as_save_IFS
22706
22707  ;;
22708esac
22709fi
22710STAT=$ac_cv_path_STAT
22711if test -n "$STAT"; then
22712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22713$as_echo "$STAT" >&6; }
22714else
22715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22716$as_echo "no" >&6; }
22717fi
22718
22719
22720  test -n "$STAT" && break
22721done
22722
22723  else
22724    # The variable is set, but is it from the command line or the environment?
22725
22726    # Try to remove the string !STAT! from our list.
22727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22729      # If it failed, the variable was not from the command line. Ignore it,
22730      # but warn the user (except for BASH, which is always set by the calling BASH).
22731      if test "xSTAT" != xBASH; then
22732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22733$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22734      fi
22735      # Try to locate tool using the code snippet
22736      for ac_prog in stat
22737do
22738  # Extract the first word of "$ac_prog", so it can be a program name with args.
22739set dummy $ac_prog; ac_word=$2
22740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22741$as_echo_n "checking for $ac_word... " >&6; }
22742if ${ac_cv_path_STAT+:} false; then :
22743  $as_echo_n "(cached) " >&6
22744else
22745  case $STAT in
22746  [\\/]* | ?:[\\/]*)
22747  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22748  ;;
22749  *)
22750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22751for as_dir in $PATH
22752do
22753  IFS=$as_save_IFS
22754  test -z "$as_dir" && as_dir=.
22755    for ac_exec_ext in '' $ac_executable_extensions; do
22756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22757    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22759    break 2
22760  fi
22761done
22762  done
22763IFS=$as_save_IFS
22764
22765  ;;
22766esac
22767fi
22768STAT=$ac_cv_path_STAT
22769if test -n "$STAT"; then
22770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22771$as_echo "$STAT" >&6; }
22772else
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22774$as_echo "no" >&6; }
22775fi
22776
22777
22778  test -n "$STAT" && break
22779done
22780
22781    else
22782      # If it succeeded, then it was overridden by the user. We will use it
22783      # for the tool.
22784
22785      # First remove it from the list of overridden variables, so we can test
22786      # for unknown variables in the end.
22787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22788
22789      # Check if we try to supply an empty value
22790      if test "x$STAT" = x; then
22791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22792$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22794$as_echo_n "checking for STAT... " >&6; }
22795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22796$as_echo "disabled" >&6; }
22797      else
22798        # Check if the provided tool contains a complete path.
22799        tool_specified="$STAT"
22800        tool_basename="${tool_specified##*/}"
22801        if test "x$tool_basename" = "x$tool_specified"; then
22802          # A command without a complete path is provided, search $PATH.
22803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22804$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22805          # Extract the first word of "$tool_basename", so it can be a program name with args.
22806set dummy $tool_basename; ac_word=$2
22807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22808$as_echo_n "checking for $ac_word... " >&6; }
22809if ${ac_cv_path_STAT+:} false; then :
22810  $as_echo_n "(cached) " >&6
22811else
22812  case $STAT in
22813  [\\/]* | ?:[\\/]*)
22814  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22815  ;;
22816  *)
22817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22818for as_dir in $PATH
22819do
22820  IFS=$as_save_IFS
22821  test -z "$as_dir" && as_dir=.
22822    for ac_exec_ext in '' $ac_executable_extensions; do
22823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22824    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22826    break 2
22827  fi
22828done
22829  done
22830IFS=$as_save_IFS
22831
22832  ;;
22833esac
22834fi
22835STAT=$ac_cv_path_STAT
22836if test -n "$STAT"; then
22837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22838$as_echo "$STAT" >&6; }
22839else
22840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22841$as_echo "no" >&6; }
22842fi
22843
22844
22845          if test "x$STAT" = x; then
22846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22847          fi
22848        else
22849          # Otherwise we believe it is a complete path. Use it as it is.
22850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22851$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22853$as_echo_n "checking for STAT... " >&6; }
22854          if test ! -x "$tool_specified"; then
22855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22856$as_echo "not found" >&6; }
22857            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22858          fi
22859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22860$as_echo "$tool_specified" >&6; }
22861        fi
22862      fi
22863    fi
22864
22865  fi
22866
22867
22868
22869
22870  # Publish this variable in the help.
22871
22872
22873  if [ -z "${TIME+x}" ]; then
22874    # The variable is not set by user, try to locate tool using the code snippet
22875    for ac_prog in time
22876do
22877  # Extract the first word of "$ac_prog", so it can be a program name with args.
22878set dummy $ac_prog; ac_word=$2
22879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22880$as_echo_n "checking for $ac_word... " >&6; }
22881if ${ac_cv_path_TIME+:} false; then :
22882  $as_echo_n "(cached) " >&6
22883else
22884  case $TIME in
22885  [\\/]* | ?:[\\/]*)
22886  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22887  ;;
22888  *)
22889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22890for as_dir in $PATH
22891do
22892  IFS=$as_save_IFS
22893  test -z "$as_dir" && as_dir=.
22894    for ac_exec_ext in '' $ac_executable_extensions; do
22895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22896    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22898    break 2
22899  fi
22900done
22901  done
22902IFS=$as_save_IFS
22903
22904  ;;
22905esac
22906fi
22907TIME=$ac_cv_path_TIME
22908if test -n "$TIME"; then
22909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22910$as_echo "$TIME" >&6; }
22911else
22912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22913$as_echo "no" >&6; }
22914fi
22915
22916
22917  test -n "$TIME" && break
22918done
22919
22920  else
22921    # The variable is set, but is it from the command line or the environment?
22922
22923    # Try to remove the string !TIME! from our list.
22924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22926      # If it failed, the variable was not from the command line. Ignore it,
22927      # but warn the user (except for BASH, which is always set by the calling BASH).
22928      if test "xTIME" != xBASH; then
22929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22930$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22931      fi
22932      # Try to locate tool using the code snippet
22933      for ac_prog in time
22934do
22935  # Extract the first word of "$ac_prog", so it can be a program name with args.
22936set dummy $ac_prog; ac_word=$2
22937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22938$as_echo_n "checking for $ac_word... " >&6; }
22939if ${ac_cv_path_TIME+:} false; then :
22940  $as_echo_n "(cached) " >&6
22941else
22942  case $TIME in
22943  [\\/]* | ?:[\\/]*)
22944  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22945  ;;
22946  *)
22947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22948for as_dir in $PATH
22949do
22950  IFS=$as_save_IFS
22951  test -z "$as_dir" && as_dir=.
22952    for ac_exec_ext in '' $ac_executable_extensions; do
22953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22954    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22956    break 2
22957  fi
22958done
22959  done
22960IFS=$as_save_IFS
22961
22962  ;;
22963esac
22964fi
22965TIME=$ac_cv_path_TIME
22966if test -n "$TIME"; then
22967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22968$as_echo "$TIME" >&6; }
22969else
22970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22971$as_echo "no" >&6; }
22972fi
22973
22974
22975  test -n "$TIME" && break
22976done
22977
22978    else
22979      # If it succeeded, then it was overridden by the user. We will use it
22980      # for the tool.
22981
22982      # First remove it from the list of overridden variables, so we can test
22983      # for unknown variables in the end.
22984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22985
22986      # Check if we try to supply an empty value
22987      if test "x$TIME" = x; then
22988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22989$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22991$as_echo_n "checking for TIME... " >&6; }
22992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22993$as_echo "disabled" >&6; }
22994      else
22995        # Check if the provided tool contains a complete path.
22996        tool_specified="$TIME"
22997        tool_basename="${tool_specified##*/}"
22998        if test "x$tool_basename" = "x$tool_specified"; then
22999          # A command without a complete path is provided, search $PATH.
23000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23001$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23002          # Extract the first word of "$tool_basename", so it can be a program name with args.
23003set dummy $tool_basename; ac_word=$2
23004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23005$as_echo_n "checking for $ac_word... " >&6; }
23006if ${ac_cv_path_TIME+:} false; then :
23007  $as_echo_n "(cached) " >&6
23008else
23009  case $TIME in
23010  [\\/]* | ?:[\\/]*)
23011  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23012  ;;
23013  *)
23014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23015for as_dir in $PATH
23016do
23017  IFS=$as_save_IFS
23018  test -z "$as_dir" && as_dir=.
23019    for ac_exec_ext in '' $ac_executable_extensions; do
23020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23021    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23023    break 2
23024  fi
23025done
23026  done
23027IFS=$as_save_IFS
23028
23029  ;;
23030esac
23031fi
23032TIME=$ac_cv_path_TIME
23033if test -n "$TIME"; then
23034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23035$as_echo "$TIME" >&6; }
23036else
23037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23038$as_echo "no" >&6; }
23039fi
23040
23041
23042          if test "x$TIME" = x; then
23043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23044          fi
23045        else
23046          # Otherwise we believe it is a complete path. Use it as it is.
23047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23048$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23050$as_echo_n "checking for TIME... " >&6; }
23051          if test ! -x "$tool_specified"; then
23052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23053$as_echo "not found" >&6; }
23054            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23055          fi
23056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23057$as_echo "$tool_specified" >&6; }
23058        fi
23059      fi
23060    fi
23061
23062  fi
23063
23064
23065
23066
23067  # Publish this variable in the help.
23068
23069
23070  if [ -z "${FLOCK+x}" ]; then
23071    # The variable is not set by user, try to locate tool using the code snippet
23072    for ac_prog in flock
23073do
23074  # Extract the first word of "$ac_prog", so it can be a program name with args.
23075set dummy $ac_prog; ac_word=$2
23076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23077$as_echo_n "checking for $ac_word... " >&6; }
23078if ${ac_cv_path_FLOCK+:} false; then :
23079  $as_echo_n "(cached) " >&6
23080else
23081  case $FLOCK in
23082  [\\/]* | ?:[\\/]*)
23083  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23084  ;;
23085  *)
23086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23087for as_dir in $PATH
23088do
23089  IFS=$as_save_IFS
23090  test -z "$as_dir" && as_dir=.
23091    for ac_exec_ext in '' $ac_executable_extensions; do
23092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23093    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23095    break 2
23096  fi
23097done
23098  done
23099IFS=$as_save_IFS
23100
23101  ;;
23102esac
23103fi
23104FLOCK=$ac_cv_path_FLOCK
23105if test -n "$FLOCK"; then
23106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23107$as_echo "$FLOCK" >&6; }
23108else
23109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23110$as_echo "no" >&6; }
23111fi
23112
23113
23114  test -n "$FLOCK" && break
23115done
23116
23117  else
23118    # The variable is set, but is it from the command line or the environment?
23119
23120    # Try to remove the string !FLOCK! from our list.
23121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23123      # If it failed, the variable was not from the command line. Ignore it,
23124      # but warn the user (except for BASH, which is always set by the calling BASH).
23125      if test "xFLOCK" != xBASH; then
23126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23127$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23128      fi
23129      # Try to locate tool using the code snippet
23130      for ac_prog in flock
23131do
23132  # Extract the first word of "$ac_prog", so it can be a program name with args.
23133set dummy $ac_prog; ac_word=$2
23134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23135$as_echo_n "checking for $ac_word... " >&6; }
23136if ${ac_cv_path_FLOCK+:} false; then :
23137  $as_echo_n "(cached) " >&6
23138else
23139  case $FLOCK in
23140  [\\/]* | ?:[\\/]*)
23141  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23142  ;;
23143  *)
23144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23145for as_dir in $PATH
23146do
23147  IFS=$as_save_IFS
23148  test -z "$as_dir" && as_dir=.
23149    for ac_exec_ext in '' $ac_executable_extensions; do
23150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23151    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23153    break 2
23154  fi
23155done
23156  done
23157IFS=$as_save_IFS
23158
23159  ;;
23160esac
23161fi
23162FLOCK=$ac_cv_path_FLOCK
23163if test -n "$FLOCK"; then
23164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23165$as_echo "$FLOCK" >&6; }
23166else
23167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23168$as_echo "no" >&6; }
23169fi
23170
23171
23172  test -n "$FLOCK" && break
23173done
23174
23175    else
23176      # If it succeeded, then it was overridden by the user. We will use it
23177      # for the tool.
23178
23179      # First remove it from the list of overridden variables, so we can test
23180      # for unknown variables in the end.
23181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23182
23183      # Check if we try to supply an empty value
23184      if test "x$FLOCK" = x; then
23185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23186$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23188$as_echo_n "checking for FLOCK... " >&6; }
23189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23190$as_echo "disabled" >&6; }
23191      else
23192        # Check if the provided tool contains a complete path.
23193        tool_specified="$FLOCK"
23194        tool_basename="${tool_specified##*/}"
23195        if test "x$tool_basename" = "x$tool_specified"; then
23196          # A command without a complete path is provided, search $PATH.
23197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23198$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23199          # Extract the first word of "$tool_basename", so it can be a program name with args.
23200set dummy $tool_basename; ac_word=$2
23201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23202$as_echo_n "checking for $ac_word... " >&6; }
23203if ${ac_cv_path_FLOCK+:} false; then :
23204  $as_echo_n "(cached) " >&6
23205else
23206  case $FLOCK in
23207  [\\/]* | ?:[\\/]*)
23208  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23209  ;;
23210  *)
23211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23212for as_dir in $PATH
23213do
23214  IFS=$as_save_IFS
23215  test -z "$as_dir" && as_dir=.
23216    for ac_exec_ext in '' $ac_executable_extensions; do
23217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23218    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23220    break 2
23221  fi
23222done
23223  done
23224IFS=$as_save_IFS
23225
23226  ;;
23227esac
23228fi
23229FLOCK=$ac_cv_path_FLOCK
23230if test -n "$FLOCK"; then
23231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23232$as_echo "$FLOCK" >&6; }
23233else
23234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23235$as_echo "no" >&6; }
23236fi
23237
23238
23239          if test "x$FLOCK" = x; then
23240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23241          fi
23242        else
23243          # Otherwise we believe it is a complete path. Use it as it is.
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23245$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23247$as_echo_n "checking for FLOCK... " >&6; }
23248          if test ! -x "$tool_specified"; then
23249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23250$as_echo "not found" >&6; }
23251            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23252          fi
23253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23254$as_echo "$tool_specified" >&6; }
23255        fi
23256      fi
23257    fi
23258
23259  fi
23260
23261
23262  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23263  # be in the user path.
23264
23265
23266  # Publish this variable in the help.
23267
23268
23269  if [ -z "${DTRACE+x}" ]; then
23270    # The variable is not set by user, try to locate tool using the code snippet
23271    for ac_prog in dtrace
23272do
23273  # Extract the first word of "$ac_prog", so it can be a program name with args.
23274set dummy $ac_prog; ac_word=$2
23275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23276$as_echo_n "checking for $ac_word... " >&6; }
23277if ${ac_cv_path_DTRACE+:} false; then :
23278  $as_echo_n "(cached) " >&6
23279else
23280  case $DTRACE in
23281  [\\/]* | ?:[\\/]*)
23282  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23283  ;;
23284  *)
23285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23286as_dummy="$PATH:/usr/sbin"
23287for as_dir in $as_dummy
23288do
23289  IFS=$as_save_IFS
23290  test -z "$as_dir" && as_dir=.
23291    for ac_exec_ext in '' $ac_executable_extensions; do
23292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23293    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23295    break 2
23296  fi
23297done
23298  done
23299IFS=$as_save_IFS
23300
23301  ;;
23302esac
23303fi
23304DTRACE=$ac_cv_path_DTRACE
23305if test -n "$DTRACE"; then
23306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23307$as_echo "$DTRACE" >&6; }
23308else
23309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23310$as_echo "no" >&6; }
23311fi
23312
23313
23314  test -n "$DTRACE" && break
23315done
23316
23317  else
23318    # The variable is set, but is it from the command line or the environment?
23319
23320    # Try to remove the string !DTRACE! from our list.
23321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23323      # If it failed, the variable was not from the command line. Ignore it,
23324      # but warn the user (except for BASH, which is always set by the calling BASH).
23325      if test "xDTRACE" != xBASH; then
23326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23327$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23328      fi
23329      # Try to locate tool using the code snippet
23330      for ac_prog in dtrace
23331do
23332  # Extract the first word of "$ac_prog", so it can be a program name with args.
23333set dummy $ac_prog; ac_word=$2
23334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23335$as_echo_n "checking for $ac_word... " >&6; }
23336if ${ac_cv_path_DTRACE+:} false; then :
23337  $as_echo_n "(cached) " >&6
23338else
23339  case $DTRACE in
23340  [\\/]* | ?:[\\/]*)
23341  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23342  ;;
23343  *)
23344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23345as_dummy="$PATH:/usr/sbin"
23346for as_dir in $as_dummy
23347do
23348  IFS=$as_save_IFS
23349  test -z "$as_dir" && as_dir=.
23350    for ac_exec_ext in '' $ac_executable_extensions; do
23351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23352    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23354    break 2
23355  fi
23356done
23357  done
23358IFS=$as_save_IFS
23359
23360  ;;
23361esac
23362fi
23363DTRACE=$ac_cv_path_DTRACE
23364if test -n "$DTRACE"; then
23365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23366$as_echo "$DTRACE" >&6; }
23367else
23368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23369$as_echo "no" >&6; }
23370fi
23371
23372
23373  test -n "$DTRACE" && break
23374done
23375
23376    else
23377      # If it succeeded, then it was overridden by the user. We will use it
23378      # for the tool.
23379
23380      # First remove it from the list of overridden variables, so we can test
23381      # for unknown variables in the end.
23382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23383
23384      # Check if we try to supply an empty value
23385      if test "x$DTRACE" = x; then
23386        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23387$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23389$as_echo_n "checking for DTRACE... " >&6; }
23390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23391$as_echo "disabled" >&6; }
23392      else
23393        # Check if the provided tool contains a complete path.
23394        tool_specified="$DTRACE"
23395        tool_basename="${tool_specified##*/}"
23396        if test "x$tool_basename" = "x$tool_specified"; then
23397          # A command without a complete path is provided, search $PATH.
23398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23399$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23400          # Extract the first word of "$tool_basename", so it can be a program name with args.
23401set dummy $tool_basename; ac_word=$2
23402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23403$as_echo_n "checking for $ac_word... " >&6; }
23404if ${ac_cv_path_DTRACE+:} false; then :
23405  $as_echo_n "(cached) " >&6
23406else
23407  case $DTRACE in
23408  [\\/]* | ?:[\\/]*)
23409  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23410  ;;
23411  *)
23412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23413for as_dir in $PATH
23414do
23415  IFS=$as_save_IFS
23416  test -z "$as_dir" && as_dir=.
23417    for ac_exec_ext in '' $ac_executable_extensions; do
23418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23419    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23421    break 2
23422  fi
23423done
23424  done
23425IFS=$as_save_IFS
23426
23427  ;;
23428esac
23429fi
23430DTRACE=$ac_cv_path_DTRACE
23431if test -n "$DTRACE"; then
23432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23433$as_echo "$DTRACE" >&6; }
23434else
23435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23436$as_echo "no" >&6; }
23437fi
23438
23439
23440          if test "x$DTRACE" = x; then
23441            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23442          fi
23443        else
23444          # Otherwise we believe it is a complete path. Use it as it is.
23445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23446$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23448$as_echo_n "checking for DTRACE... " >&6; }
23449          if test ! -x "$tool_specified"; then
23450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23451$as_echo "not found" >&6; }
23452            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23453          fi
23454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23455$as_echo "$tool_specified" >&6; }
23456        fi
23457      fi
23458    fi
23459
23460  fi
23461
23462
23463
23464
23465  # Publish this variable in the help.
23466
23467
23468  if [ -z "${PATCH+x}" ]; then
23469    # The variable is not set by user, try to locate tool using the code snippet
23470    for ac_prog in gpatch patch
23471do
23472  # Extract the first word of "$ac_prog", so it can be a program name with args.
23473set dummy $ac_prog; ac_word=$2
23474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23475$as_echo_n "checking for $ac_word... " >&6; }
23476if ${ac_cv_path_PATCH+:} false; then :
23477  $as_echo_n "(cached) " >&6
23478else
23479  case $PATCH in
23480  [\\/]* | ?:[\\/]*)
23481  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23482  ;;
23483  *)
23484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23485for as_dir in $PATH
23486do
23487  IFS=$as_save_IFS
23488  test -z "$as_dir" && as_dir=.
23489    for ac_exec_ext in '' $ac_executable_extensions; do
23490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23491    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23493    break 2
23494  fi
23495done
23496  done
23497IFS=$as_save_IFS
23498
23499  ;;
23500esac
23501fi
23502PATCH=$ac_cv_path_PATCH
23503if test -n "$PATCH"; then
23504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23505$as_echo "$PATCH" >&6; }
23506else
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23508$as_echo "no" >&6; }
23509fi
23510
23511
23512  test -n "$PATCH" && break
23513done
23514
23515  else
23516    # The variable is set, but is it from the command line or the environment?
23517
23518    # Try to remove the string !PATCH! from our list.
23519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23521      # If it failed, the variable was not from the command line. Ignore it,
23522      # but warn the user (except for BASH, which is always set by the calling BASH).
23523      if test "xPATCH" != xBASH; then
23524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23525$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23526      fi
23527      # Try to locate tool using the code snippet
23528      for ac_prog in gpatch patch
23529do
23530  # Extract the first word of "$ac_prog", so it can be a program name with args.
23531set dummy $ac_prog; ac_word=$2
23532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23533$as_echo_n "checking for $ac_word... " >&6; }
23534if ${ac_cv_path_PATCH+:} false; then :
23535  $as_echo_n "(cached) " >&6
23536else
23537  case $PATCH in
23538  [\\/]* | ?:[\\/]*)
23539  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23540  ;;
23541  *)
23542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23543for as_dir in $PATH
23544do
23545  IFS=$as_save_IFS
23546  test -z "$as_dir" && as_dir=.
23547    for ac_exec_ext in '' $ac_executable_extensions; do
23548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23549    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23551    break 2
23552  fi
23553done
23554  done
23555IFS=$as_save_IFS
23556
23557  ;;
23558esac
23559fi
23560PATCH=$ac_cv_path_PATCH
23561if test -n "$PATCH"; then
23562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23563$as_echo "$PATCH" >&6; }
23564else
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23566$as_echo "no" >&6; }
23567fi
23568
23569
23570  test -n "$PATCH" && break
23571done
23572
23573    else
23574      # If it succeeded, then it was overridden by the user. We will use it
23575      # for the tool.
23576
23577      # First remove it from the list of overridden variables, so we can test
23578      # for unknown variables in the end.
23579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23580
23581      # Check if we try to supply an empty value
23582      if test "x$PATCH" = x; then
23583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23584$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23586$as_echo_n "checking for PATCH... " >&6; }
23587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23588$as_echo "disabled" >&6; }
23589      else
23590        # Check if the provided tool contains a complete path.
23591        tool_specified="$PATCH"
23592        tool_basename="${tool_specified##*/}"
23593        if test "x$tool_basename" = "x$tool_specified"; then
23594          # A command without a complete path is provided, search $PATH.
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23596$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23597          # Extract the first word of "$tool_basename", so it can be a program name with args.
23598set dummy $tool_basename; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_path_PATCH+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $PATCH in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23607  ;;
23608  *)
23609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610for as_dir in $PATH
23611do
23612  IFS=$as_save_IFS
23613  test -z "$as_dir" && as_dir=.
23614    for ac_exec_ext in '' $ac_executable_extensions; do
23615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618    break 2
23619  fi
23620done
23621  done
23622IFS=$as_save_IFS
23623
23624  ;;
23625esac
23626fi
23627PATCH=$ac_cv_path_PATCH
23628if test -n "$PATCH"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23630$as_echo "$PATCH" >&6; }
23631else
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633$as_echo "no" >&6; }
23634fi
23635
23636
23637          if test "x$PATCH" = x; then
23638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23639          fi
23640        else
23641          # Otherwise we believe it is a complete path. Use it as it is.
23642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23643$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23645$as_echo_n "checking for PATCH... " >&6; }
23646          if test ! -x "$tool_specified"; then
23647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23648$as_echo "not found" >&6; }
23649            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23650          fi
23651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23652$as_echo "$tool_specified" >&6; }
23653        fi
23654      fi
23655    fi
23656
23657  fi
23658
23659
23660  # Check if it's GNU time
23661  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23662  if test "x$IS_GNU_TIME" != x; then
23663    IS_GNU_TIME=yes
23664  else
23665    IS_GNU_TIME=no
23666  fi
23667
23668
23669  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23670
23671
23672
23673  # Publish this variable in the help.
23674
23675
23676  if [ -z "${DSYMUTIL+x}" ]; then
23677    # The variable is not set by user, try to locate tool using the code snippet
23678    for ac_prog in dsymutil
23679do
23680  # Extract the first word of "$ac_prog", so it can be a program name with args.
23681set dummy $ac_prog; ac_word=$2
23682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23683$as_echo_n "checking for $ac_word... " >&6; }
23684if ${ac_cv_path_DSYMUTIL+:} false; then :
23685  $as_echo_n "(cached) " >&6
23686else
23687  case $DSYMUTIL in
23688  [\\/]* | ?:[\\/]*)
23689  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23690  ;;
23691  *)
23692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23693for as_dir in $PATH
23694do
23695  IFS=$as_save_IFS
23696  test -z "$as_dir" && as_dir=.
23697    for ac_exec_ext in '' $ac_executable_extensions; do
23698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23699    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23701    break 2
23702  fi
23703done
23704  done
23705IFS=$as_save_IFS
23706
23707  ;;
23708esac
23709fi
23710DSYMUTIL=$ac_cv_path_DSYMUTIL
23711if test -n "$DSYMUTIL"; then
23712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23713$as_echo "$DSYMUTIL" >&6; }
23714else
23715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23716$as_echo "no" >&6; }
23717fi
23718
23719
23720  test -n "$DSYMUTIL" && break
23721done
23722
23723  else
23724    # The variable is set, but is it from the command line or the environment?
23725
23726    # Try to remove the string !DSYMUTIL! from our list.
23727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23729      # If it failed, the variable was not from the command line. Ignore it,
23730      # but warn the user (except for BASH, which is always set by the calling BASH).
23731      if test "xDSYMUTIL" != xBASH; then
23732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23733$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23734      fi
23735      # Try to locate tool using the code snippet
23736      for ac_prog in dsymutil
23737do
23738  # Extract the first word of "$ac_prog", so it can be a program name with args.
23739set dummy $ac_prog; ac_word=$2
23740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23741$as_echo_n "checking for $ac_word... " >&6; }
23742if ${ac_cv_path_DSYMUTIL+:} false; then :
23743  $as_echo_n "(cached) " >&6
23744else
23745  case $DSYMUTIL in
23746  [\\/]* | ?:[\\/]*)
23747  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23748  ;;
23749  *)
23750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23751for as_dir in $PATH
23752do
23753  IFS=$as_save_IFS
23754  test -z "$as_dir" && as_dir=.
23755    for ac_exec_ext in '' $ac_executable_extensions; do
23756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23757    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23759    break 2
23760  fi
23761done
23762  done
23763IFS=$as_save_IFS
23764
23765  ;;
23766esac
23767fi
23768DSYMUTIL=$ac_cv_path_DSYMUTIL
23769if test -n "$DSYMUTIL"; then
23770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23771$as_echo "$DSYMUTIL" >&6; }
23772else
23773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23774$as_echo "no" >&6; }
23775fi
23776
23777
23778  test -n "$DSYMUTIL" && break
23779done
23780
23781    else
23782      # If it succeeded, then it was overridden by the user. We will use it
23783      # for the tool.
23784
23785      # First remove it from the list of overridden variables, so we can test
23786      # for unknown variables in the end.
23787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23788
23789      # Check if we try to supply an empty value
23790      if test "x$DSYMUTIL" = x; then
23791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23792$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23794$as_echo_n "checking for DSYMUTIL... " >&6; }
23795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23796$as_echo "disabled" >&6; }
23797      else
23798        # Check if the provided tool contains a complete path.
23799        tool_specified="$DSYMUTIL"
23800        tool_basename="${tool_specified##*/}"
23801        if test "x$tool_basename" = "x$tool_specified"; then
23802          # A command without a complete path is provided, search $PATH.
23803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23804$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23805          # Extract the first word of "$tool_basename", so it can be a program name with args.
23806set dummy $tool_basename; ac_word=$2
23807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23808$as_echo_n "checking for $ac_word... " >&6; }
23809if ${ac_cv_path_DSYMUTIL+:} false; then :
23810  $as_echo_n "(cached) " >&6
23811else
23812  case $DSYMUTIL in
23813  [\\/]* | ?:[\\/]*)
23814  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23815  ;;
23816  *)
23817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23818for as_dir in $PATH
23819do
23820  IFS=$as_save_IFS
23821  test -z "$as_dir" && as_dir=.
23822    for ac_exec_ext in '' $ac_executable_extensions; do
23823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23824    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23826    break 2
23827  fi
23828done
23829  done
23830IFS=$as_save_IFS
23831
23832  ;;
23833esac
23834fi
23835DSYMUTIL=$ac_cv_path_DSYMUTIL
23836if test -n "$DSYMUTIL"; then
23837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23838$as_echo "$DSYMUTIL" >&6; }
23839else
23840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23841$as_echo "no" >&6; }
23842fi
23843
23844
23845          if test "x$DSYMUTIL" = x; then
23846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23847          fi
23848        else
23849          # Otherwise we believe it is a complete path. Use it as it is.
23850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23851$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23853$as_echo_n "checking for DSYMUTIL... " >&6; }
23854          if test ! -x "$tool_specified"; then
23855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23856$as_echo "not found" >&6; }
23857            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23858          fi
23859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23860$as_echo "$tool_specified" >&6; }
23861        fi
23862      fi
23863    fi
23864
23865  fi
23866
23867
23868
23869  if test "x$DSYMUTIL" = x; then
23870    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23871  fi
23872
23873
23874
23875
23876
23877  # Publish this variable in the help.
23878
23879
23880  if [ -z "${XATTR+x}" ]; then
23881    # The variable is not set by user, try to locate tool using the code snippet
23882    for ac_prog in xattr
23883do
23884  # Extract the first word of "$ac_prog", so it can be a program name with args.
23885set dummy $ac_prog; ac_word=$2
23886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23887$as_echo_n "checking for $ac_word... " >&6; }
23888if ${ac_cv_path_XATTR+:} false; then :
23889  $as_echo_n "(cached) " >&6
23890else
23891  case $XATTR in
23892  [\\/]* | ?:[\\/]*)
23893  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23894  ;;
23895  *)
23896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23897for as_dir in $PATH
23898do
23899  IFS=$as_save_IFS
23900  test -z "$as_dir" && as_dir=.
23901    for ac_exec_ext in '' $ac_executable_extensions; do
23902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23903    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23905    break 2
23906  fi
23907done
23908  done
23909IFS=$as_save_IFS
23910
23911  ;;
23912esac
23913fi
23914XATTR=$ac_cv_path_XATTR
23915if test -n "$XATTR"; then
23916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23917$as_echo "$XATTR" >&6; }
23918else
23919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23920$as_echo "no" >&6; }
23921fi
23922
23923
23924  test -n "$XATTR" && break
23925done
23926
23927  else
23928    # The variable is set, but is it from the command line or the environment?
23929
23930    # Try to remove the string !XATTR! from our list.
23931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23933      # If it failed, the variable was not from the command line. Ignore it,
23934      # but warn the user (except for BASH, which is always set by the calling BASH).
23935      if test "xXATTR" != xBASH; then
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23937$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23938      fi
23939      # Try to locate tool using the code snippet
23940      for ac_prog in xattr
23941do
23942  # Extract the first word of "$ac_prog", so it can be a program name with args.
23943set dummy $ac_prog; ac_word=$2
23944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23945$as_echo_n "checking for $ac_word... " >&6; }
23946if ${ac_cv_path_XATTR+:} false; then :
23947  $as_echo_n "(cached) " >&6
23948else
23949  case $XATTR in
23950  [\\/]* | ?:[\\/]*)
23951  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23952  ;;
23953  *)
23954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23955for as_dir in $PATH
23956do
23957  IFS=$as_save_IFS
23958  test -z "$as_dir" && as_dir=.
23959    for ac_exec_ext in '' $ac_executable_extensions; do
23960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23961    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23963    break 2
23964  fi
23965done
23966  done
23967IFS=$as_save_IFS
23968
23969  ;;
23970esac
23971fi
23972XATTR=$ac_cv_path_XATTR
23973if test -n "$XATTR"; then
23974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23975$as_echo "$XATTR" >&6; }
23976else
23977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23978$as_echo "no" >&6; }
23979fi
23980
23981
23982  test -n "$XATTR" && break
23983done
23984
23985    else
23986      # If it succeeded, then it was overridden by the user. We will use it
23987      # for the tool.
23988
23989      # First remove it from the list of overridden variables, so we can test
23990      # for unknown variables in the end.
23991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23992
23993      # Check if we try to supply an empty value
23994      if test "x$XATTR" = x; then
23995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23996$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23998$as_echo_n "checking for XATTR... " >&6; }
23999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24000$as_echo "disabled" >&6; }
24001      else
24002        # Check if the provided tool contains a complete path.
24003        tool_specified="$XATTR"
24004        tool_basename="${tool_specified##*/}"
24005        if test "x$tool_basename" = "x$tool_specified"; then
24006          # A command without a complete path is provided, search $PATH.
24007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24008$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24009          # Extract the first word of "$tool_basename", so it can be a program name with args.
24010set dummy $tool_basename; ac_word=$2
24011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24012$as_echo_n "checking for $ac_word... " >&6; }
24013if ${ac_cv_path_XATTR+:} false; then :
24014  $as_echo_n "(cached) " >&6
24015else
24016  case $XATTR in
24017  [\\/]* | ?:[\\/]*)
24018  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24019  ;;
24020  *)
24021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24022for as_dir in $PATH
24023do
24024  IFS=$as_save_IFS
24025  test -z "$as_dir" && as_dir=.
24026    for ac_exec_ext in '' $ac_executable_extensions; do
24027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24028    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24030    break 2
24031  fi
24032done
24033  done
24034IFS=$as_save_IFS
24035
24036  ;;
24037esac
24038fi
24039XATTR=$ac_cv_path_XATTR
24040if test -n "$XATTR"; then
24041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24042$as_echo "$XATTR" >&6; }
24043else
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24045$as_echo "no" >&6; }
24046fi
24047
24048
24049          if test "x$XATTR" = x; then
24050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24051          fi
24052        else
24053          # Otherwise we believe it is a complete path. Use it as it is.
24054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24055$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24057$as_echo_n "checking for XATTR... " >&6; }
24058          if test ! -x "$tool_specified"; then
24059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24060$as_echo "not found" >&6; }
24061            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24062          fi
24063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24064$as_echo "$tool_specified" >&6; }
24065        fi
24066      fi
24067    fi
24068
24069  fi
24070
24071
24072
24073  if test "x$XATTR" = x; then
24074    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24075  fi
24076
24077
24078
24079
24080  # Publish this variable in the help.
24081
24082
24083  if [ -z "${CODESIGN+x}" ]; then
24084    # The variable is not set by user, try to locate tool using the code snippet
24085    for ac_prog in codesign
24086do
24087  # Extract the first word of "$ac_prog", so it can be a program name with args.
24088set dummy $ac_prog; ac_word=$2
24089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24090$as_echo_n "checking for $ac_word... " >&6; }
24091if ${ac_cv_path_CODESIGN+:} false; then :
24092  $as_echo_n "(cached) " >&6
24093else
24094  case $CODESIGN in
24095  [\\/]* | ?:[\\/]*)
24096  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24097  ;;
24098  *)
24099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24100for as_dir in $PATH
24101do
24102  IFS=$as_save_IFS
24103  test -z "$as_dir" && as_dir=.
24104    for ac_exec_ext in '' $ac_executable_extensions; do
24105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24106    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24108    break 2
24109  fi
24110done
24111  done
24112IFS=$as_save_IFS
24113
24114  ;;
24115esac
24116fi
24117CODESIGN=$ac_cv_path_CODESIGN
24118if test -n "$CODESIGN"; then
24119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24120$as_echo "$CODESIGN" >&6; }
24121else
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24123$as_echo "no" >&6; }
24124fi
24125
24126
24127  test -n "$CODESIGN" && break
24128done
24129
24130  else
24131    # The variable is set, but is it from the command line or the environment?
24132
24133    # Try to remove the string !CODESIGN! from our list.
24134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24136      # If it failed, the variable was not from the command line. Ignore it,
24137      # but warn the user (except for BASH, which is always set by the calling BASH).
24138      if test "xCODESIGN" != xBASH; then
24139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24140$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24141      fi
24142      # Try to locate tool using the code snippet
24143      for ac_prog in codesign
24144do
24145  # Extract the first word of "$ac_prog", so it can be a program name with args.
24146set dummy $ac_prog; ac_word=$2
24147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24148$as_echo_n "checking for $ac_word... " >&6; }
24149if ${ac_cv_path_CODESIGN+:} false; then :
24150  $as_echo_n "(cached) " >&6
24151else
24152  case $CODESIGN in
24153  [\\/]* | ?:[\\/]*)
24154  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24155  ;;
24156  *)
24157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24158for as_dir in $PATH
24159do
24160  IFS=$as_save_IFS
24161  test -z "$as_dir" && as_dir=.
24162    for ac_exec_ext in '' $ac_executable_extensions; do
24163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24164    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24166    break 2
24167  fi
24168done
24169  done
24170IFS=$as_save_IFS
24171
24172  ;;
24173esac
24174fi
24175CODESIGN=$ac_cv_path_CODESIGN
24176if test -n "$CODESIGN"; then
24177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24178$as_echo "$CODESIGN" >&6; }
24179else
24180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24181$as_echo "no" >&6; }
24182fi
24183
24184
24185  test -n "$CODESIGN" && break
24186done
24187
24188    else
24189      # If it succeeded, then it was overridden by the user. We will use it
24190      # for the tool.
24191
24192      # First remove it from the list of overridden variables, so we can test
24193      # for unknown variables in the end.
24194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24195
24196      # Check if we try to supply an empty value
24197      if test "x$CODESIGN" = x; then
24198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24199$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24201$as_echo_n "checking for CODESIGN... " >&6; }
24202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24203$as_echo "disabled" >&6; }
24204      else
24205        # Check if the provided tool contains a complete path.
24206        tool_specified="$CODESIGN"
24207        tool_basename="${tool_specified##*/}"
24208        if test "x$tool_basename" = "x$tool_specified"; then
24209          # A command without a complete path is provided, search $PATH.
24210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24211$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24212          # Extract the first word of "$tool_basename", so it can be a program name with args.
24213set dummy $tool_basename; ac_word=$2
24214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24215$as_echo_n "checking for $ac_word... " >&6; }
24216if ${ac_cv_path_CODESIGN+:} false; then :
24217  $as_echo_n "(cached) " >&6
24218else
24219  case $CODESIGN in
24220  [\\/]* | ?:[\\/]*)
24221  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24222  ;;
24223  *)
24224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24225for as_dir in $PATH
24226do
24227  IFS=$as_save_IFS
24228  test -z "$as_dir" && as_dir=.
24229    for ac_exec_ext in '' $ac_executable_extensions; do
24230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24231    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24233    break 2
24234  fi
24235done
24236  done
24237IFS=$as_save_IFS
24238
24239  ;;
24240esac
24241fi
24242CODESIGN=$ac_cv_path_CODESIGN
24243if test -n "$CODESIGN"; then
24244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24245$as_echo "$CODESIGN" >&6; }
24246else
24247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24248$as_echo "no" >&6; }
24249fi
24250
24251
24252          if test "x$CODESIGN" = x; then
24253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24254          fi
24255        else
24256          # Otherwise we believe it is a complete path. Use it as it is.
24257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24258$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24260$as_echo_n "checking for CODESIGN... " >&6; }
24261          if test ! -x "$tool_specified"; then
24262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24263$as_echo "not found" >&6; }
24264            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24265          fi
24266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24267$as_echo "$tool_specified" >&6; }
24268        fi
24269      fi
24270    fi
24271
24272  fi
24273
24274
24275    if test "x$CODESIGN" != "x"; then
24276      # Verify that the openjdk_codesign certificate is present
24277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24278$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24279      $RM codesign-testfile
24280      $TOUCH codesign-testfile
24281      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24282      $RM codesign-testfile
24283      if test "x$CODESIGN" = x; then
24284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24285$as_echo "no" >&6; }
24286      else
24287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24288$as_echo "yes" >&6; }
24289      fi
24290    fi
24291
24292
24293
24294  # Publish this variable in the help.
24295
24296
24297  if [ -z "${SETFILE+x}" ]; then
24298    # The variable is not set by user, try to locate tool using the code snippet
24299    for ac_prog in SetFile
24300do
24301  # Extract the first word of "$ac_prog", so it can be a program name with args.
24302set dummy $ac_prog; ac_word=$2
24303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24304$as_echo_n "checking for $ac_word... " >&6; }
24305if ${ac_cv_path_SETFILE+:} false; then :
24306  $as_echo_n "(cached) " >&6
24307else
24308  case $SETFILE in
24309  [\\/]* | ?:[\\/]*)
24310  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24311  ;;
24312  *)
24313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24314for as_dir in $PATH
24315do
24316  IFS=$as_save_IFS
24317  test -z "$as_dir" && as_dir=.
24318    for ac_exec_ext in '' $ac_executable_extensions; do
24319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24320    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24322    break 2
24323  fi
24324done
24325  done
24326IFS=$as_save_IFS
24327
24328  ;;
24329esac
24330fi
24331SETFILE=$ac_cv_path_SETFILE
24332if test -n "$SETFILE"; then
24333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24334$as_echo "$SETFILE" >&6; }
24335else
24336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24337$as_echo "no" >&6; }
24338fi
24339
24340
24341  test -n "$SETFILE" && break
24342done
24343
24344  else
24345    # The variable is set, but is it from the command line or the environment?
24346
24347    # Try to remove the string !SETFILE! from our list.
24348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24350      # If it failed, the variable was not from the command line. Ignore it,
24351      # but warn the user (except for BASH, which is always set by the calling BASH).
24352      if test "xSETFILE" != xBASH; then
24353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24354$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24355      fi
24356      # Try to locate tool using the code snippet
24357      for ac_prog in SetFile
24358do
24359  # Extract the first word of "$ac_prog", so it can be a program name with args.
24360set dummy $ac_prog; ac_word=$2
24361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24362$as_echo_n "checking for $ac_word... " >&6; }
24363if ${ac_cv_path_SETFILE+:} false; then :
24364  $as_echo_n "(cached) " >&6
24365else
24366  case $SETFILE in
24367  [\\/]* | ?:[\\/]*)
24368  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24369  ;;
24370  *)
24371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24372for as_dir in $PATH
24373do
24374  IFS=$as_save_IFS
24375  test -z "$as_dir" && as_dir=.
24376    for ac_exec_ext in '' $ac_executable_extensions; do
24377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24378    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24380    break 2
24381  fi
24382done
24383  done
24384IFS=$as_save_IFS
24385
24386  ;;
24387esac
24388fi
24389SETFILE=$ac_cv_path_SETFILE
24390if test -n "$SETFILE"; then
24391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24392$as_echo "$SETFILE" >&6; }
24393else
24394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24395$as_echo "no" >&6; }
24396fi
24397
24398
24399  test -n "$SETFILE" && break
24400done
24401
24402    else
24403      # If it succeeded, then it was overridden by the user. We will use it
24404      # for the tool.
24405
24406      # First remove it from the list of overridden variables, so we can test
24407      # for unknown variables in the end.
24408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24409
24410      # Check if we try to supply an empty value
24411      if test "x$SETFILE" = x; then
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24413$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24415$as_echo_n "checking for SETFILE... " >&6; }
24416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24417$as_echo "disabled" >&6; }
24418      else
24419        # Check if the provided tool contains a complete path.
24420        tool_specified="$SETFILE"
24421        tool_basename="${tool_specified##*/}"
24422        if test "x$tool_basename" = "x$tool_specified"; then
24423          # A command without a complete path is provided, search $PATH.
24424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24425$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24426          # Extract the first word of "$tool_basename", so it can be a program name with args.
24427set dummy $tool_basename; ac_word=$2
24428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24429$as_echo_n "checking for $ac_word... " >&6; }
24430if ${ac_cv_path_SETFILE+:} false; then :
24431  $as_echo_n "(cached) " >&6
24432else
24433  case $SETFILE in
24434  [\\/]* | ?:[\\/]*)
24435  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24436  ;;
24437  *)
24438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24439for as_dir in $PATH
24440do
24441  IFS=$as_save_IFS
24442  test -z "$as_dir" && as_dir=.
24443    for ac_exec_ext in '' $ac_executable_extensions; do
24444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24445    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24447    break 2
24448  fi
24449done
24450  done
24451IFS=$as_save_IFS
24452
24453  ;;
24454esac
24455fi
24456SETFILE=$ac_cv_path_SETFILE
24457if test -n "$SETFILE"; then
24458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24459$as_echo "$SETFILE" >&6; }
24460else
24461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24462$as_echo "no" >&6; }
24463fi
24464
24465
24466          if test "x$SETFILE" = x; then
24467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24468          fi
24469        else
24470          # Otherwise we believe it is a complete path. Use it as it is.
24471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24472$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24474$as_echo_n "checking for SETFILE... " >&6; }
24475          if test ! -x "$tool_specified"; then
24476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24477$as_echo "not found" >&6; }
24478            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24479          fi
24480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24481$as_echo "$tool_specified" >&6; }
24482        fi
24483      fi
24484    fi
24485
24486  fi
24487
24488
24489
24490  if test "x$SETFILE" = x; then
24491    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24492  fi
24493
24494
24495  fi
24496
24497
24498  # Check bash version
24499  # Extra [ ] to stop m4 mangling
24500   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24502$as_echo_n "checking bash version... " >&6; }
24503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24504$as_echo "$BASH_VER" >&6; }
24505
24506  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24507  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24508  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24509    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24510  fi
24511
24512  # Test if bash supports pipefail.
24513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24514$as_echo_n "checking if bash supports pipefail... " >&6; }
24515  if ${BASH} -c 'set -o pipefail'; then
24516    BASH_ARGS="$BASH_ARGS -o pipefail"
24517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24518$as_echo "yes" >&6; }
24519  else
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24521$as_echo "no" >&6; }
24522  fi
24523
24524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24525$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24526  if ${BASH} -e -c 'true'; then
24527    BASH_ARGS="$BASH_ARGS -e"
24528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24529$as_echo "yes" >&6; }
24530  else
24531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24532$as_echo "no" >&6; }
24533  fi
24534
24535
24536
24537
24538# Check if pkg-config is available.
24539
24540
24541if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24542	if test -n "$ac_tool_prefix"; then
24543  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24544set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24546$as_echo_n "checking for $ac_word... " >&6; }
24547if ${ac_cv_path_PKG_CONFIG+:} false; then :
24548  $as_echo_n "(cached) " >&6
24549else
24550  case $PKG_CONFIG in
24551  [\\/]* | ?:[\\/]*)
24552  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24553  ;;
24554  *)
24555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24556for as_dir in $PATH
24557do
24558  IFS=$as_save_IFS
24559  test -z "$as_dir" && as_dir=.
24560    for ac_exec_ext in '' $ac_executable_extensions; do
24561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24562    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24564    break 2
24565  fi
24566done
24567  done
24568IFS=$as_save_IFS
24569
24570  ;;
24571esac
24572fi
24573PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24574if test -n "$PKG_CONFIG"; then
24575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24576$as_echo "$PKG_CONFIG" >&6; }
24577else
24578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24579$as_echo "no" >&6; }
24580fi
24581
24582
24583fi
24584if test -z "$ac_cv_path_PKG_CONFIG"; then
24585  ac_pt_PKG_CONFIG=$PKG_CONFIG
24586  # Extract the first word of "pkg-config", so it can be a program name with args.
24587set dummy pkg-config; ac_word=$2
24588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24589$as_echo_n "checking for $ac_word... " >&6; }
24590if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24591  $as_echo_n "(cached) " >&6
24592else
24593  case $ac_pt_PKG_CONFIG in
24594  [\\/]* | ?:[\\/]*)
24595  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24596  ;;
24597  *)
24598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24599for as_dir in $PATH
24600do
24601  IFS=$as_save_IFS
24602  test -z "$as_dir" && as_dir=.
24603    for ac_exec_ext in '' $ac_executable_extensions; do
24604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24605    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24607    break 2
24608  fi
24609done
24610  done
24611IFS=$as_save_IFS
24612
24613  ;;
24614esac
24615fi
24616ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24617if test -n "$ac_pt_PKG_CONFIG"; then
24618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24619$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24620else
24621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24622$as_echo "no" >&6; }
24623fi
24624
24625  if test "x$ac_pt_PKG_CONFIG" = x; then
24626    PKG_CONFIG=""
24627  else
24628    case $cross_compiling:$ac_tool_warned in
24629yes:)
24630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24632ac_tool_warned=yes ;;
24633esac
24634    PKG_CONFIG=$ac_pt_PKG_CONFIG
24635  fi
24636else
24637  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24638fi
24639
24640fi
24641if test -n "$PKG_CONFIG"; then
24642	_pkg_min_version=0.9.0
24643	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24644$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24645	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24646		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24647$as_echo "yes" >&6; }
24648	else
24649		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24650$as_echo "no" >&6; }
24651		PKG_CONFIG=""
24652	fi
24653
24654fi
24655
24656# After basic tools have been setup, we can check build os specific details.
24657
24658  ###############################################################################
24659
24660  # Note that this is the build platform OS version!
24661
24662  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24663  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24664  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24665  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24666
24667
24668
24669
24670
24671# Misc basic settings
24672
24673
24674# Check whether --with-default-make-target was given.
24675if test "${with_default_make_target+set}" = set; then :
24676  withval=$with_default_make_target;
24677fi
24678
24679  if test "x$with_default_make_target" = "x" \
24680      || test "x$with_default_make_target" = "xyes"; then
24681    DEFAULT_MAKE_TARGET="exploded-image"
24682  elif test "x$with_default_make_target" = "xno"; then
24683    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24684  else
24685    DEFAULT_MAKE_TARGET="$with_default_make_target"
24686  fi
24687
24688
24689
24690
24691###############################################################################
24692#
24693# Determine OpenJDK variants, options and version numbers.
24694#
24695###############################################################################
24696
24697# We need build & target for this.
24698
24699  # Should we build a JDK without a graphical UI?
24700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24701$as_echo_n "checking headless only... " >&6; }
24702  # Check whether --enable-headless-only was given.
24703if test "${enable_headless_only+set}" = set; then :
24704  enableval=$enable_headless_only;
24705fi
24706
24707
24708  if test "x$enable_headless_only" = "xyes"; then
24709    ENABLE_HEADLESS_ONLY="true"
24710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24711$as_echo "yes" >&6; }
24712  elif test "x$enable_headless_only" = "xno"; then
24713    ENABLE_HEADLESS_ONLY="false"
24714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24715$as_echo "no" >&6; }
24716  elif test "x$enable_headless_only" = "x"; then
24717    ENABLE_HEADLESS_ONLY="false"
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24719$as_echo "no" >&6; }
24720  else
24721    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24722  fi
24723
24724
24725
24726  # Choose cacerts source file
24727
24728# Check whether --with-cacerts-file was given.
24729if test "${with_cacerts_file+set}" = set; then :
24730  withval=$with_cacerts_file;
24731fi
24732
24733  if test "x$with_cacerts_file" != x; then
24734    CACERTS_FILE=$with_cacerts_file
24735  fi
24736
24737
24738  # Enable or disable unlimited crypto
24739  # Check whether --enable-unlimited-crypto was given.
24740if test "${enable_unlimited_crypto+set}" = set; then :
24741  enableval=$enable_unlimited_crypto;
24742else
24743  enable_unlimited_crypto=yes
24744fi
24745
24746  if test "x$enable_unlimited_crypto" = "xyes"; then
24747    UNLIMITED_CRYPTO=true
24748  else
24749    UNLIMITED_CRYPTO=false
24750  fi
24751
24752
24753  # Should we build the serviceability agent (SA)?
24754  INCLUDE_SA=true
24755  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24756    INCLUDE_SA=false
24757  fi
24758  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24759    INCLUDE_SA=false
24760  fi
24761
24762
24763  # Compress jars
24764  COMPRESS_JARS=false
24765
24766
24767
24768  # Setup default copyright year. Mostly overridden when building close to a new year.
24769
24770# Check whether --with-copyright-year was given.
24771if test "${with_copyright_year+set}" = set; then :
24772  withval=$with_copyright_year;
24773fi
24774
24775  if test "x$with_copyright_year" = xyes; then
24776    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24777  elif test "x$with_copyright_year" != x; then
24778    COPYRIGHT_YEAR="$with_copyright_year"
24779  else
24780    COPYRIGHT_YEAR=`$DATE +'%Y'`
24781  fi
24782
24783
24784
24785  # Check whether --enable-keep-packaged-modules was given.
24786if test "${enable_keep_packaged_modules+set}" = set; then :
24787  enableval=$enable_keep_packaged_modules;
24788fi
24789
24790
24791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24792$as_echo_n "checking if packaged modules are kept... " >&6; }
24793  if test "x$enable_keep_packaged_modules" = "xyes"; then
24794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24795$as_echo "yes" >&6; }
24796    JLINK_KEEP_PACKAGED_MODULES=true
24797  elif test "x$enable_keep_packaged_modules" = "xno"; then
24798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24799$as_echo "no" >&6; }
24800    JLINK_KEEP_PACKAGED_MODULES=false
24801  elif test "x$enable_keep_packaged_modules" = "x"; then
24802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24803$as_echo "yes (default)" >&6; }
24804    JLINK_KEEP_PACKAGED_MODULES=true
24805  else
24806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24807$as_echo "error" >&6; }
24808    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24809  fi
24810
24811
24812
24813
24814  # Warn user that old version arguments are deprecated.
24815
24816
24817# Check whether --with-milestone was given.
24818if test "${with_milestone+set}" = set; then :
24819  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24820$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24821fi
24822
24823
24824
24825
24826# Check whether --with-update-version was given.
24827if test "${with_update_version+set}" = set; then :
24828  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24829$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24830fi
24831
24832
24833
24834
24835# Check whether --with-user-release-suffix was given.
24836if test "${with_user_release_suffix+set}" = set; then :
24837  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
24838$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24839fi
24840
24841
24842
24843
24844# Check whether --with-build-number was given.
24845if test "${with_build_number+set}" = set; then :
24846  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24847$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24848fi
24849
24850
24851
24852  # Source the version numbers file
24853  . $AUTOCONF_DIR/version-numbers
24854
24855  # Some non-version number information is set in that file
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865  # Override version from arguments
24866
24867  # If --with-version-string is set, process it first. It is possible to
24868  # override parts with more specific flags, since these are processed later.
24869
24870# Check whether --with-version-string was given.
24871if test "${with_version_string+set}" = set; then :
24872  withval=$with_version_string;
24873fi
24874
24875  if test "x$with_version_string" = xyes; then
24876    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24877  elif test "x$with_version_string" != x; then
24878    # Additional [] needed to keep m4 from mangling shell constructs.
24879    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24880      VERSION_MAJOR=${BASH_REMATCH[1]}
24881      VERSION_MINOR=${BASH_REMATCH[3]}
24882      VERSION_SECURITY=${BASH_REMATCH[5]}
24883      VERSION_PATCH=${BASH_REMATCH[7]}
24884      VERSION_PRE=${BASH_REMATCH[9]}
24885      version_plus_separator=${BASH_REMATCH[11]}
24886      VERSION_BUILD=${BASH_REMATCH[12]}
24887      VERSION_OPT=${BASH_REMATCH[14]}
24888      # Unspecified numerical fields are interpreted as 0.
24889      if test "x$VERSION_MINOR" = x; then
24890        VERSION_MINOR=0
24891      fi
24892      if test "x$VERSION_SECURITY" = x; then
24893        VERSION_SECURITY=0
24894      fi
24895      if test "x$VERSION_PATCH" = x; then
24896        VERSION_PATCH=0
24897      fi
24898      if test "x$version_plus_separator" != x \
24899          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24900        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24901      fi
24902      # Stop the version part process from setting default values.
24903      # We still allow them to explicitly override though.
24904      NO_DEFAULT_VERSION_PARTS=true
24905    else
24906      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24907    fi
24908  fi
24909
24910
24911# Check whether --with-version-pre was given.
24912if test "${with_version_pre+set}" = set; then :
24913  withval=$with_version_pre; with_version_pre_present=true
24914else
24915  with_version_pre_present=false
24916fi
24917
24918
24919  if test "x$with_version_pre_present" = xtrue; then
24920    if test "x$with_version_pre" = xyes; then
24921      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24922    elif test "x$with_version_pre" = xno; then
24923      # Interpret --without-* as empty string instead of the literal "no"
24924      VERSION_PRE=
24925    else
24926      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24927       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24928      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24930$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24931      fi
24932    fi
24933  else
24934    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24935      # Default is to use "internal" as pre
24936      VERSION_PRE="internal"
24937    fi
24938  fi
24939
24940
24941# Check whether --with-version-opt was given.
24942if test "${with_version_opt+set}" = set; then :
24943  withval=$with_version_opt; with_version_opt_present=true
24944else
24945  with_version_opt_present=false
24946fi
24947
24948
24949  if test "x$with_version_opt_present" = xtrue; then
24950    if test "x$with_version_opt" = xyes; then
24951      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24952    elif test "x$with_version_opt" = xno; then
24953      # Interpret --without-* as empty string instead of the literal "no"
24954      VERSION_OPT=
24955    else
24956      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24957       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24958      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24960$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24961      fi
24962    fi
24963  else
24964    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24965      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24966      # Outer [ ] to quote m4.
24967       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24968      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24969    fi
24970  fi
24971
24972
24973# Check whether --with-version-build was given.
24974if test "${with_version_build+set}" = set; then :
24975  withval=$with_version_build; with_version_build_present=true
24976else
24977  with_version_build_present=false
24978fi
24979
24980
24981  if test "x$with_version_build_present" = xtrue; then
24982    if test "x$with_version_build" = xyes; then
24983      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24984    elif test "x$with_version_build" = xno; then
24985      # Interpret --without-* as empty string instead of the literal "no"
24986      VERSION_BUILD=
24987    elif test "x$with_version_build" = x; then
24988      VERSION_BUILD=
24989    else
24990
24991  # Additional [] needed to keep m4 from mangling shell constructs.
24992  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24993    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24994  fi
24995  # Extract the version number without leading zeros.
24996  cleaned_value=${BASH_REMATCH[1]}
24997  if test "x$cleaned_value" = x; then
24998    # Special case for zero
24999    cleaned_value=${BASH_REMATCH[2]}
25000  fi
25001
25002  if test $cleaned_value -gt 255; then
25003    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25004  fi
25005  if test "x$cleaned_value" != "x$with_version_build"; then
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25007$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25008  fi
25009  VERSION_BUILD=$cleaned_value
25010
25011    fi
25012  else
25013    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25014      # Default is to not have a build number.
25015      VERSION_BUILD=""
25016      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25017      VERSION_BUILD=0
25018    fi
25019  fi
25020
25021
25022# Check whether --with-version-major was given.
25023if test "${with_version_major+set}" = set; then :
25024  withval=$with_version_major; with_version_major_present=true
25025else
25026  with_version_major_present=false
25027fi
25028
25029
25030  if test "x$with_version_major_present" = xtrue; then
25031    if test "x$with_version_major" = xyes; then
25032      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25033    else
25034
25035  # Additional [] needed to keep m4 from mangling shell constructs.
25036  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25037    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25038  fi
25039  # Extract the version number without leading zeros.
25040  cleaned_value=${BASH_REMATCH[1]}
25041  if test "x$cleaned_value" = x; then
25042    # Special case for zero
25043    cleaned_value=${BASH_REMATCH[2]}
25044  fi
25045
25046  if test $cleaned_value -gt 255; then
25047    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25048  fi
25049  if test "x$cleaned_value" != "x$with_version_major"; then
25050    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25051$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25052  fi
25053  VERSION_MAJOR=$cleaned_value
25054
25055    fi
25056  else
25057    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25058      # Default is to get value from version-numbers
25059      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25060    fi
25061  fi
25062
25063
25064# Check whether --with-version-minor was given.
25065if test "${with_version_minor+set}" = set; then :
25066  withval=$with_version_minor; with_version_minor_present=true
25067else
25068  with_version_minor_present=false
25069fi
25070
25071
25072  if test "x$with_version_minor_present" = xtrue; then
25073    if test "x$with_version_minor" = xyes; then
25074      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25075    elif test "x$with_version_minor" = xno; then
25076      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25077      VERSION_MINOR=0
25078    elif test "x$with_version_minor" = x; then
25079      VERSION_MINOR=0
25080    else
25081
25082  # Additional [] needed to keep m4 from mangling shell constructs.
25083  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25084    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25085  fi
25086  # Extract the version number without leading zeros.
25087  cleaned_value=${BASH_REMATCH[1]}
25088  if test "x$cleaned_value" = x; then
25089    # Special case for zero
25090    cleaned_value=${BASH_REMATCH[2]}
25091  fi
25092
25093  if test $cleaned_value -gt 255; then
25094    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25095  fi
25096  if test "x$cleaned_value" != "x$with_version_minor"; then
25097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25098$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25099  fi
25100  VERSION_MINOR=$cleaned_value
25101
25102    fi
25103  else
25104    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25105      # Default is 0, if unspecified
25106      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25107    fi
25108  fi
25109
25110
25111# Check whether --with-version-security was given.
25112if test "${with_version_security+set}" = set; then :
25113  withval=$with_version_security; with_version_security_present=true
25114else
25115  with_version_security_present=false
25116fi
25117
25118
25119  if test "x$with_version_security_present" = xtrue; then
25120    if test "x$with_version_security" = xyes; then
25121      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25122    elif test "x$with_version_security" = xno; then
25123      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25124      VERSION_SECURITY=0
25125    elif test "x$with_version_security" = x; then
25126      VERSION_SECURITY=0
25127    else
25128
25129  # Additional [] needed to keep m4 from mangling shell constructs.
25130  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25131    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25132  fi
25133  # Extract the version number without leading zeros.
25134  cleaned_value=${BASH_REMATCH[1]}
25135  if test "x$cleaned_value" = x; then
25136    # Special case for zero
25137    cleaned_value=${BASH_REMATCH[2]}
25138  fi
25139
25140  if test $cleaned_value -gt 255; then
25141    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25142  fi
25143  if test "x$cleaned_value" != "x$with_version_security"; then
25144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25145$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25146  fi
25147  VERSION_SECURITY=$cleaned_value
25148
25149    fi
25150  else
25151    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25152      # Default is 0, if unspecified
25153      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25154    fi
25155  fi
25156
25157
25158# Check whether --with-version-patch was given.
25159if test "${with_version_patch+set}" = set; then :
25160  withval=$with_version_patch; with_version_patch_present=true
25161else
25162  with_version_patch_present=false
25163fi
25164
25165
25166  if test "x$with_version_patch_present" = xtrue; then
25167    if test "x$with_version_patch" = xyes; then
25168      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25169    elif test "x$with_version_patch" = xno; then
25170      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25171      VERSION_PATCH=0
25172    elif test "x$with_version_patch" = x; then
25173      VERSION_PATCH=0
25174    else
25175
25176  # Additional [] needed to keep m4 from mangling shell constructs.
25177  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25178    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25179  fi
25180  # Extract the version number without leading zeros.
25181  cleaned_value=${BASH_REMATCH[1]}
25182  if test "x$cleaned_value" = x; then
25183    # Special case for zero
25184    cleaned_value=${BASH_REMATCH[2]}
25185  fi
25186
25187  if test $cleaned_value -gt 255; then
25188    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25189  fi
25190  if test "x$cleaned_value" != "x$with_version_patch"; then
25191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25192$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25193  fi
25194  VERSION_PATCH=$cleaned_value
25195
25196    fi
25197  else
25198    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25199      # Default is 0, if unspecified
25200      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25201    fi
25202  fi
25203
25204  # Calculate derived version properties
25205
25206  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25207  if test "x$VERSION_PRE" = x; then
25208    VERSION_IS_GA=true
25209  else
25210    VERSION_IS_GA=false
25211  fi
25212
25213  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25214  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25215
25216  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25217  # Strip trailing zeroes from stripped_version_number
25218  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25219  VERSION_NUMBER=$stripped_version_number
25220
25221  # The complete version string, with additional build information
25222  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25223    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25224  else
25225    # If either build or opt is set, we need a + separator
25226    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25227  fi
25228
25229  # The short version string, just VERSION_NUMBER and PRE, if present.
25230  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25231
25232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25233$as_echo_n "checking for version string... " >&6; }
25234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25235$as_echo "$VERSION_STRING" >&6; }
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251###############################################################################
25252#
25253# Setup BootJDK, used to bootstrap the build.
25254#
25255###############################################################################
25256
25257
25258  BOOT_JDK_FOUND=no
25259
25260# Check whether --with-boot-jdk was given.
25261if test "${with_boot_jdk+set}" = set; then :
25262  withval=$with_boot_jdk;
25263fi
25264
25265
25266  # We look for the Boot JDK through various means, going from more certain to
25267  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25268  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25269  # must check if this is indeed valid; otherwise we'll continue looking.
25270
25271  # Test: Is bootjdk explicitly set by command line arguments?
25272
25273  if test "x$BOOT_JDK_FOUND" = xno; then
25274    # Now execute the test
25275
25276  if test "x$with_boot_jdk" != x; then
25277    BOOT_JDK=$with_boot_jdk
25278    BOOT_JDK_FOUND=maybe
25279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25280$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25281  fi
25282
25283
25284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25286      # Do we have a bin/java?
25287      if test ! -x "$BOOT_JDK/bin/java"; then
25288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25290        BOOT_JDK_FOUND=no
25291      else
25292        # Do we have a bin/javac?
25293        if test ! -x "$BOOT_JDK/bin/javac"; then
25294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25298          BOOT_JDK_FOUND=no
25299        else
25300          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25301          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25302
25303          # Extra M4 quote needed to protect [] in grep expression.
25304          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25305          if test "x$FOUND_CORRECT_VERSION" = x; then
25306            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25308            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25309$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25310            BOOT_JDK_FOUND=no
25311          else
25312            # We're done! :-)
25313            BOOT_JDK_FOUND=yes
25314
25315  # Only process if variable expands to non-empty
25316
25317  if test "x$BOOT_JDK" != x; then
25318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25319
25320  # Input might be given as Windows format, start by converting to
25321  # unix format.
25322  path="$BOOT_JDK"
25323  new_path=`$CYGPATH -u "$path"`
25324
25325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25328  # "foo.exe" is OK but "foo" is an error.
25329  #
25330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25331  # It is also a way to make sure we got the proper file name for the real test later on.
25332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25333  if test "x$test_shortpath" = x; then
25334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25336    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25337  fi
25338
25339  # Call helper function which possibly converts this using DOS-style short mode.
25340  # If so, the updated path is stored in $new_path.
25341
25342  input_path="$new_path"
25343  # Check if we need to convert this using DOS-style short mode. If the path
25344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25345  # take no chances and rewrite it.
25346  # Note: m4 eats our [], so we need to use [ and ] instead.
25347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25348  if test "x$has_forbidden_chars" != x; then
25349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25353      # Going to short mode and back again did indeed matter. Since short mode is
25354      # case insensitive, let's make it lowercase to improve readability.
25355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25356      # Now convert it back to Unix-style (cygpath)
25357      input_path=`$CYGPATH -u "$shortmode_path"`
25358      new_path="$input_path"
25359    fi
25360  fi
25361
25362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25363  if test "x$test_cygdrive_prefix" = x; then
25364    # As a simple fix, exclude /usr/bin since it's not a real path.
25365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25367      # a path prefixed by /cygdrive for fixpath to work.
25368      new_path="$CYGWIN_ROOT_PATH$input_path"
25369    fi
25370  fi
25371
25372
25373  if test "x$path" != "x$new_path"; then
25374    BOOT_JDK="$new_path"
25375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25377  fi
25378
25379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25380
25381  path="$BOOT_JDK"
25382  has_colon=`$ECHO $path | $GREP ^.:`
25383  new_path="$path"
25384  if test "x$has_colon" = x; then
25385    # Not in mixed or Windows style, start by that.
25386    new_path=`cmd //c echo $path`
25387  fi
25388
25389
25390  input_path="$new_path"
25391  # Check if we need to convert this using DOS-style short mode. If the path
25392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25393  # take no chances and rewrite it.
25394  # Note: m4 eats our [], so we need to use [ and ] instead.
25395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25396  if test "x$has_forbidden_chars" != x; then
25397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25399  fi
25400
25401
25402  windows_path="$new_path"
25403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25404    unix_path=`$CYGPATH -u "$windows_path"`
25405    new_path="$unix_path"
25406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25408    new_path="$unix_path"
25409  fi
25410
25411  if test "x$path" != "x$new_path"; then
25412    BOOT_JDK="$new_path"
25413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25414$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25415  fi
25416
25417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25419
25420    else
25421      # We're on a unix platform. Hooray! :)
25422      path="$BOOT_JDK"
25423      has_space=`$ECHO "$path" | $GREP " "`
25424      if test "x$has_space" != x; then
25425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25428      fi
25429
25430      # Use eval to expand a potential ~
25431      eval path="$path"
25432      if test ! -f "$path" && test ! -d "$path"; then
25433        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25434      fi
25435
25436      if test -d "$path"; then
25437        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25438      else
25439        dir="`$DIRNAME "$path"`"
25440        base="`$BASENAME "$path"`"
25441        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25442      fi
25443    fi
25444  fi
25445
25446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25447$as_echo_n "checking for Boot JDK... " >&6; }
25448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25449$as_echo "$BOOT_JDK" >&6; }
25450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25451$as_echo_n "checking Boot JDK version... " >&6; }
25452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25454$as_echo "$BOOT_JDK_VERSION" >&6; }
25455          fi # end check jdk version
25456        fi # end check javac
25457      fi # end check java
25458    fi # end check boot jdk found
25459  fi
25460
25461  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25462    # Having specified an argument which is incorrect will produce an instant failure;
25463    # we should not go on looking
25464    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25465  fi
25466
25467  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25468
25469  if test "x$BOOT_JDK_FOUND" = xno; then
25470    # Now execute the test
25471
25472  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25473    # First check at user selected default
25474
25475  if test "x$BOOT_JDK_FOUND" = xno; then
25476    # Now execute the test
25477
25478  if test -x /usr/libexec/java_home; then
25479    BOOT_JDK=`/usr/libexec/java_home `
25480    BOOT_JDK_FOUND=maybe
25481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25482$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25483  fi
25484
25485
25486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25488      # Do we have a bin/java?
25489      if test ! -x "$BOOT_JDK/bin/java"; then
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25492        BOOT_JDK_FOUND=no
25493      else
25494        # Do we have a bin/javac?
25495        if test ! -x "$BOOT_JDK/bin/javac"; then
25496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25500          BOOT_JDK_FOUND=no
25501        else
25502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25504
25505          # Extra M4 quote needed to protect [] in grep expression.
25506          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25507          if test "x$FOUND_CORRECT_VERSION" = x; then
25508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25512            BOOT_JDK_FOUND=no
25513          else
25514            # We're done! :-)
25515            BOOT_JDK_FOUND=yes
25516
25517  # Only process if variable expands to non-empty
25518
25519  if test "x$BOOT_JDK" != x; then
25520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25521
25522  # Input might be given as Windows format, start by converting to
25523  # unix format.
25524  path="$BOOT_JDK"
25525  new_path=`$CYGPATH -u "$path"`
25526
25527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25530  # "foo.exe" is OK but "foo" is an error.
25531  #
25532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25533  # It is also a way to make sure we got the proper file name for the real test later on.
25534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25535  if test "x$test_shortpath" = x; then
25536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25539  fi
25540
25541  # Call helper function which possibly converts this using DOS-style short mode.
25542  # If so, the updated path is stored in $new_path.
25543
25544  input_path="$new_path"
25545  # Check if we need to convert this using DOS-style short mode. If the path
25546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25547  # take no chances and rewrite it.
25548  # Note: m4 eats our [], so we need to use [ and ] instead.
25549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25550  if test "x$has_forbidden_chars" != x; then
25551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25555      # Going to short mode and back again did indeed matter. Since short mode is
25556      # case insensitive, let's make it lowercase to improve readability.
25557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25558      # Now convert it back to Unix-style (cygpath)
25559      input_path=`$CYGPATH -u "$shortmode_path"`
25560      new_path="$input_path"
25561    fi
25562  fi
25563
25564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25565  if test "x$test_cygdrive_prefix" = x; then
25566    # As a simple fix, exclude /usr/bin since it's not a real path.
25567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25569      # a path prefixed by /cygdrive for fixpath to work.
25570      new_path="$CYGWIN_ROOT_PATH$input_path"
25571    fi
25572  fi
25573
25574
25575  if test "x$path" != "x$new_path"; then
25576    BOOT_JDK="$new_path"
25577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25579  fi
25580
25581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25582
25583  path="$BOOT_JDK"
25584  has_colon=`$ECHO $path | $GREP ^.:`
25585  new_path="$path"
25586  if test "x$has_colon" = x; then
25587    # Not in mixed or Windows style, start by that.
25588    new_path=`cmd //c echo $path`
25589  fi
25590
25591
25592  input_path="$new_path"
25593  # Check if we need to convert this using DOS-style short mode. If the path
25594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25595  # take no chances and rewrite it.
25596  # Note: m4 eats our [], so we need to use [ and ] instead.
25597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25598  if test "x$has_forbidden_chars" != x; then
25599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25601  fi
25602
25603
25604  windows_path="$new_path"
25605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25606    unix_path=`$CYGPATH -u "$windows_path"`
25607    new_path="$unix_path"
25608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25610    new_path="$unix_path"
25611  fi
25612
25613  if test "x$path" != "x$new_path"; then
25614    BOOT_JDK="$new_path"
25615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25617  fi
25618
25619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25621
25622    else
25623      # We're on a unix platform. Hooray! :)
25624      path="$BOOT_JDK"
25625      has_space=`$ECHO "$path" | $GREP " "`
25626      if test "x$has_space" != x; then
25627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25630      fi
25631
25632      # Use eval to expand a potential ~
25633      eval path="$path"
25634      if test ! -f "$path" && test ! -d "$path"; then
25635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25636      fi
25637
25638      if test -d "$path"; then
25639        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25640      else
25641        dir="`$DIRNAME "$path"`"
25642        base="`$BASENAME "$path"`"
25643        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25644      fi
25645    fi
25646  fi
25647
25648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25649$as_echo_n "checking for Boot JDK... " >&6; }
25650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25651$as_echo "$BOOT_JDK" >&6; }
25652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25653$as_echo_n "checking Boot JDK version... " >&6; }
25654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25656$as_echo "$BOOT_JDK_VERSION" >&6; }
25657          fi # end check jdk version
25658        fi # end check javac
25659      fi # end check java
25660    fi # end check boot jdk found
25661  fi
25662
25663    # If that did not work out (e.g. too old), try explicit versions instead
25664
25665  if test "x$BOOT_JDK_FOUND" = xno; then
25666    # Now execute the test
25667
25668  if test -x /usr/libexec/java_home; then
25669    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25670    BOOT_JDK_FOUND=maybe
25671    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25672$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25673  fi
25674
25675
25676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25678      # Do we have a bin/java?
25679      if test ! -x "$BOOT_JDK/bin/java"; then
25680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25682        BOOT_JDK_FOUND=no
25683      else
25684        # Do we have a bin/javac?
25685        if test ! -x "$BOOT_JDK/bin/javac"; then
25686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25690          BOOT_JDK_FOUND=no
25691        else
25692          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25693          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25694
25695          # Extra M4 quote needed to protect [] in grep expression.
25696          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25697          if test "x$FOUND_CORRECT_VERSION" = x; then
25698            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25700            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25701$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25702            BOOT_JDK_FOUND=no
25703          else
25704            # We're done! :-)
25705            BOOT_JDK_FOUND=yes
25706
25707  # Only process if variable expands to non-empty
25708
25709  if test "x$BOOT_JDK" != x; then
25710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711
25712  # Input might be given as Windows format, start by converting to
25713  # unix format.
25714  path="$BOOT_JDK"
25715  new_path=`$CYGPATH -u "$path"`
25716
25717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25720  # "foo.exe" is OK but "foo" is an error.
25721  #
25722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25723  # It is also a way to make sure we got the proper file name for the real test later on.
25724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25725  if test "x$test_shortpath" = x; then
25726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25728    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25729  fi
25730
25731  # Call helper function which possibly converts this using DOS-style short mode.
25732  # If so, the updated path is stored in $new_path.
25733
25734  input_path="$new_path"
25735  # Check if we need to convert this using DOS-style short mode. If the path
25736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25737  # take no chances and rewrite it.
25738  # Note: m4 eats our [], so we need to use [ and ] instead.
25739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25740  if test "x$has_forbidden_chars" != x; then
25741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25745      # Going to short mode and back again did indeed matter. Since short mode is
25746      # case insensitive, let's make it lowercase to improve readability.
25747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25748      # Now convert it back to Unix-style (cygpath)
25749      input_path=`$CYGPATH -u "$shortmode_path"`
25750      new_path="$input_path"
25751    fi
25752  fi
25753
25754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25755  if test "x$test_cygdrive_prefix" = x; then
25756    # As a simple fix, exclude /usr/bin since it's not a real path.
25757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25759      # a path prefixed by /cygdrive for fixpath to work.
25760      new_path="$CYGWIN_ROOT_PATH$input_path"
25761    fi
25762  fi
25763
25764
25765  if test "x$path" != "x$new_path"; then
25766    BOOT_JDK="$new_path"
25767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25769  fi
25770
25771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25772
25773  path="$BOOT_JDK"
25774  has_colon=`$ECHO $path | $GREP ^.:`
25775  new_path="$path"
25776  if test "x$has_colon" = x; then
25777    # Not in mixed or Windows style, start by that.
25778    new_path=`cmd //c echo $path`
25779  fi
25780
25781
25782  input_path="$new_path"
25783  # Check if we need to convert this using DOS-style short mode. If the path
25784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25785  # take no chances and rewrite it.
25786  # Note: m4 eats our [], so we need to use [ and ] instead.
25787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25788  if test "x$has_forbidden_chars" != x; then
25789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25791  fi
25792
25793
25794  windows_path="$new_path"
25795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25796    unix_path=`$CYGPATH -u "$windows_path"`
25797    new_path="$unix_path"
25798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25800    new_path="$unix_path"
25801  fi
25802
25803  if test "x$path" != "x$new_path"; then
25804    BOOT_JDK="$new_path"
25805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25807  fi
25808
25809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25811
25812    else
25813      # We're on a unix platform. Hooray! :)
25814      path="$BOOT_JDK"
25815      has_space=`$ECHO "$path" | $GREP " "`
25816      if test "x$has_space" != x; then
25817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25820      fi
25821
25822      # Use eval to expand a potential ~
25823      eval path="$path"
25824      if test ! -f "$path" && test ! -d "$path"; then
25825        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25826      fi
25827
25828      if test -d "$path"; then
25829        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25830      else
25831        dir="`$DIRNAME "$path"`"
25832        base="`$BASENAME "$path"`"
25833        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25834      fi
25835    fi
25836  fi
25837
25838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25839$as_echo_n "checking for Boot JDK... " >&6; }
25840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25841$as_echo "$BOOT_JDK" >&6; }
25842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25843$as_echo_n "checking Boot JDK version... " >&6; }
25844            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25846$as_echo "$BOOT_JDK_VERSION" >&6; }
25847          fi # end check jdk version
25848        fi # end check javac
25849      fi # end check java
25850    fi # end check boot jdk found
25851  fi
25852
25853
25854  if test "x$BOOT_JDK_FOUND" = xno; then
25855    # Now execute the test
25856
25857  if test -x /usr/libexec/java_home; then
25858    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25859    BOOT_JDK_FOUND=maybe
25860    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25861$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25862  fi
25863
25864
25865    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25866    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25867      # Do we have a bin/java?
25868      if test ! -x "$BOOT_JDK/bin/java"; then
25869        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25871        BOOT_JDK_FOUND=no
25872      else
25873        # Do we have a bin/javac?
25874        if test ! -x "$BOOT_JDK/bin/javac"; then
25875          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25877          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25878$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25879          BOOT_JDK_FOUND=no
25880        else
25881          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25882          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25883
25884          # Extra M4 quote needed to protect [] in grep expression.
25885          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25886          if test "x$FOUND_CORRECT_VERSION" = x; then
25887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25889            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25890$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25891            BOOT_JDK_FOUND=no
25892          else
25893            # We're done! :-)
25894            BOOT_JDK_FOUND=yes
25895
25896  # Only process if variable expands to non-empty
25897
25898  if test "x$BOOT_JDK" != x; then
25899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25900
25901  # Input might be given as Windows format, start by converting to
25902  # unix format.
25903  path="$BOOT_JDK"
25904  new_path=`$CYGPATH -u "$path"`
25905
25906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25909  # "foo.exe" is OK but "foo" is an error.
25910  #
25911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25912  # It is also a way to make sure we got the proper file name for the real test later on.
25913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25914  if test "x$test_shortpath" = x; then
25915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25917    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25918  fi
25919
25920  # Call helper function which possibly converts this using DOS-style short mode.
25921  # If so, the updated path is stored in $new_path.
25922
25923  input_path="$new_path"
25924  # Check if we need to convert this using DOS-style short mode. If the path
25925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25926  # take no chances and rewrite it.
25927  # Note: m4 eats our [], so we need to use [ and ] instead.
25928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25929  if test "x$has_forbidden_chars" != x; then
25930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25934      # Going to short mode and back again did indeed matter. Since short mode is
25935      # case insensitive, let's make it lowercase to improve readability.
25936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25937      # Now convert it back to Unix-style (cygpath)
25938      input_path=`$CYGPATH -u "$shortmode_path"`
25939      new_path="$input_path"
25940    fi
25941  fi
25942
25943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25944  if test "x$test_cygdrive_prefix" = x; then
25945    # As a simple fix, exclude /usr/bin since it's not a real path.
25946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25948      # a path prefixed by /cygdrive for fixpath to work.
25949      new_path="$CYGWIN_ROOT_PATH$input_path"
25950    fi
25951  fi
25952
25953
25954  if test "x$path" != "x$new_path"; then
25955    BOOT_JDK="$new_path"
25956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25958  fi
25959
25960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25961
25962  path="$BOOT_JDK"
25963  has_colon=`$ECHO $path | $GREP ^.:`
25964  new_path="$path"
25965  if test "x$has_colon" = x; then
25966    # Not in mixed or Windows style, start by that.
25967    new_path=`cmd //c echo $path`
25968  fi
25969
25970
25971  input_path="$new_path"
25972  # Check if we need to convert this using DOS-style short mode. If the path
25973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25974  # take no chances and rewrite it.
25975  # Note: m4 eats our [], so we need to use [ and ] instead.
25976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25977  if test "x$has_forbidden_chars" != x; then
25978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25980  fi
25981
25982
25983  windows_path="$new_path"
25984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25985    unix_path=`$CYGPATH -u "$windows_path"`
25986    new_path="$unix_path"
25987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25989    new_path="$unix_path"
25990  fi
25991
25992  if test "x$path" != "x$new_path"; then
25993    BOOT_JDK="$new_path"
25994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25996  fi
25997
25998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26000
26001    else
26002      # We're on a unix platform. Hooray! :)
26003      path="$BOOT_JDK"
26004      has_space=`$ECHO "$path" | $GREP " "`
26005      if test "x$has_space" != x; then
26006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26008        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26009      fi
26010
26011      # Use eval to expand a potential ~
26012      eval path="$path"
26013      if test ! -f "$path" && test ! -d "$path"; then
26014        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26015      fi
26016
26017      if test -d "$path"; then
26018        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26019      else
26020        dir="`$DIRNAME "$path"`"
26021        base="`$BASENAME "$path"`"
26022        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26023      fi
26024    fi
26025  fi
26026
26027            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26028$as_echo_n "checking for Boot JDK... " >&6; }
26029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26030$as_echo "$BOOT_JDK" >&6; }
26031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26032$as_echo_n "checking Boot JDK version... " >&6; }
26033            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26035$as_echo "$BOOT_JDK_VERSION" >&6; }
26036          fi # end check jdk version
26037        fi # end check javac
26038      fi # end check java
26039    fi # end check boot jdk found
26040  fi
26041
26042
26043  if test "x$BOOT_JDK_FOUND" = xno; then
26044    # Now execute the test
26045
26046  if test -x /usr/libexec/java_home; then
26047    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26048    BOOT_JDK_FOUND=maybe
26049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26050$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26051  fi
26052
26053
26054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26056      # Do we have a bin/java?
26057      if test ! -x "$BOOT_JDK/bin/java"; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26060        BOOT_JDK_FOUND=no
26061      else
26062        # Do we have a bin/javac?
26063        if test ! -x "$BOOT_JDK/bin/javac"; then
26064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26068          BOOT_JDK_FOUND=no
26069        else
26070          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26071          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26072
26073          # Extra M4 quote needed to protect [] in grep expression.
26074          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26075          if test "x$FOUND_CORRECT_VERSION" = x; then
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26078            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26079$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26080            BOOT_JDK_FOUND=no
26081          else
26082            # We're done! :-)
26083            BOOT_JDK_FOUND=yes
26084
26085  # Only process if variable expands to non-empty
26086
26087  if test "x$BOOT_JDK" != x; then
26088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26089
26090  # Input might be given as Windows format, start by converting to
26091  # unix format.
26092  path="$BOOT_JDK"
26093  new_path=`$CYGPATH -u "$path"`
26094
26095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26098  # "foo.exe" is OK but "foo" is an error.
26099  #
26100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26101  # It is also a way to make sure we got the proper file name for the real test later on.
26102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26103  if test "x$test_shortpath" = x; then
26104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26107  fi
26108
26109  # Call helper function which possibly converts this using DOS-style short mode.
26110  # If so, the updated path is stored in $new_path.
26111
26112  input_path="$new_path"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26123      # Going to short mode and back again did indeed matter. Since short mode is
26124      # case insensitive, let's make it lowercase to improve readability.
26125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26126      # Now convert it back to Unix-style (cygpath)
26127      input_path=`$CYGPATH -u "$shortmode_path"`
26128      new_path="$input_path"
26129    fi
26130  fi
26131
26132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26133  if test "x$test_cygdrive_prefix" = x; then
26134    # As a simple fix, exclude /usr/bin since it's not a real path.
26135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26137      # a path prefixed by /cygdrive for fixpath to work.
26138      new_path="$CYGWIN_ROOT_PATH$input_path"
26139    fi
26140  fi
26141
26142
26143  if test "x$path" != "x$new_path"; then
26144    BOOT_JDK="$new_path"
26145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26147  fi
26148
26149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150
26151  path="$BOOT_JDK"
26152  has_colon=`$ECHO $path | $GREP ^.:`
26153  new_path="$path"
26154  if test "x$has_colon" = x; then
26155    # Not in mixed or Windows style, start by that.
26156    new_path=`cmd //c echo $path`
26157  fi
26158
26159
26160  input_path="$new_path"
26161  # Check if we need to convert this using DOS-style short mode. If the path
26162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26163  # take no chances and rewrite it.
26164  # Note: m4 eats our [], so we need to use [ and ] instead.
26165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26166  if test "x$has_forbidden_chars" != x; then
26167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26169  fi
26170
26171
26172  windows_path="$new_path"
26173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26174    unix_path=`$CYGPATH -u "$windows_path"`
26175    new_path="$unix_path"
26176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26178    new_path="$unix_path"
26179  fi
26180
26181  if test "x$path" != "x$new_path"; then
26182    BOOT_JDK="$new_path"
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26185  fi
26186
26187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26189
26190    else
26191      # We're on a unix platform. Hooray! :)
26192      path="$BOOT_JDK"
26193      has_space=`$ECHO "$path" | $GREP " "`
26194      if test "x$has_space" != x; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26198      fi
26199
26200      # Use eval to expand a potential ~
26201      eval path="$path"
26202      if test ! -f "$path" && test ! -d "$path"; then
26203        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26204      fi
26205
26206      if test -d "$path"; then
26207        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26208      else
26209        dir="`$DIRNAME "$path"`"
26210        base="`$BASENAME "$path"`"
26211        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26212      fi
26213    fi
26214  fi
26215
26216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26217$as_echo_n "checking for Boot JDK... " >&6; }
26218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26219$as_echo "$BOOT_JDK" >&6; }
26220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26221$as_echo_n "checking Boot JDK version... " >&6; }
26222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26224$as_echo "$BOOT_JDK_VERSION" >&6; }
26225          fi # end check jdk version
26226        fi # end check javac
26227      fi # end check java
26228    fi # end check boot jdk found
26229  fi
26230
26231  fi
26232
26233
26234    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26235    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26236      # Do we have a bin/java?
26237      if test ! -x "$BOOT_JDK/bin/java"; then
26238        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26240        BOOT_JDK_FOUND=no
26241      else
26242        # Do we have a bin/javac?
26243        if test ! -x "$BOOT_JDK/bin/javac"; then
26244          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26246          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26247$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26248          BOOT_JDK_FOUND=no
26249        else
26250          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26251          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26252
26253          # Extra M4 quote needed to protect [] in grep expression.
26254          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26255          if test "x$FOUND_CORRECT_VERSION" = x; then
26256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26258            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26259$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26260            BOOT_JDK_FOUND=no
26261          else
26262            # We're done! :-)
26263            BOOT_JDK_FOUND=yes
26264
26265  # Only process if variable expands to non-empty
26266
26267  if test "x$BOOT_JDK" != x; then
26268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26269
26270  # Input might be given as Windows format, start by converting to
26271  # unix format.
26272  path="$BOOT_JDK"
26273  new_path=`$CYGPATH -u "$path"`
26274
26275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26278  # "foo.exe" is OK but "foo" is an error.
26279  #
26280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26281  # It is also a way to make sure we got the proper file name for the real test later on.
26282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26283  if test "x$test_shortpath" = x; then
26284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26287  fi
26288
26289  # Call helper function which possibly converts this using DOS-style short mode.
26290  # If so, the updated path is stored in $new_path.
26291
26292  input_path="$new_path"
26293  # Check if we need to convert this using DOS-style short mode. If the path
26294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26295  # take no chances and rewrite it.
26296  # Note: m4 eats our [], so we need to use [ and ] instead.
26297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26298  if test "x$has_forbidden_chars" != x; then
26299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26303      # Going to short mode and back again did indeed matter. Since short mode is
26304      # case insensitive, let's make it lowercase to improve readability.
26305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26306      # Now convert it back to Unix-style (cygpath)
26307      input_path=`$CYGPATH -u "$shortmode_path"`
26308      new_path="$input_path"
26309    fi
26310  fi
26311
26312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26313  if test "x$test_cygdrive_prefix" = x; then
26314    # As a simple fix, exclude /usr/bin since it's not a real path.
26315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26317      # a path prefixed by /cygdrive for fixpath to work.
26318      new_path="$CYGWIN_ROOT_PATH$input_path"
26319    fi
26320  fi
26321
26322
26323  if test "x$path" != "x$new_path"; then
26324    BOOT_JDK="$new_path"
26325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26327  fi
26328
26329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26330
26331  path="$BOOT_JDK"
26332  has_colon=`$ECHO $path | $GREP ^.:`
26333  new_path="$path"
26334  if test "x$has_colon" = x; then
26335    # Not in mixed or Windows style, start by that.
26336    new_path=`cmd //c echo $path`
26337  fi
26338
26339
26340  input_path="$new_path"
26341  # Check if we need to convert this using DOS-style short mode. If the path
26342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26343  # take no chances and rewrite it.
26344  # Note: m4 eats our [], so we need to use [ and ] instead.
26345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26346  if test "x$has_forbidden_chars" != x; then
26347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26349  fi
26350
26351
26352  windows_path="$new_path"
26353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26354    unix_path=`$CYGPATH -u "$windows_path"`
26355    new_path="$unix_path"
26356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26358    new_path="$unix_path"
26359  fi
26360
26361  if test "x$path" != "x$new_path"; then
26362    BOOT_JDK="$new_path"
26363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26365  fi
26366
26367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26369
26370    else
26371      # We're on a unix platform. Hooray! :)
26372      path="$BOOT_JDK"
26373      has_space=`$ECHO "$path" | $GREP " "`
26374      if test "x$has_space" != x; then
26375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26378      fi
26379
26380      # Use eval to expand a potential ~
26381      eval path="$path"
26382      if test ! -f "$path" && test ! -d "$path"; then
26383        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26384      fi
26385
26386      if test -d "$path"; then
26387        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26388      else
26389        dir="`$DIRNAME "$path"`"
26390        base="`$BASENAME "$path"`"
26391        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26392      fi
26393    fi
26394  fi
26395
26396            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26397$as_echo_n "checking for Boot JDK... " >&6; }
26398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26399$as_echo "$BOOT_JDK" >&6; }
26400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26401$as_echo_n "checking Boot JDK version... " >&6; }
26402            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26404$as_echo "$BOOT_JDK_VERSION" >&6; }
26405          fi # end check jdk version
26406        fi # end check javac
26407      fi # end check java
26408    fi # end check boot jdk found
26409  fi
26410
26411
26412  # Test: Is $JAVA_HOME set?
26413
26414  if test "x$BOOT_JDK_FOUND" = xno; then
26415    # Now execute the test
26416
26417  if test "x$JAVA_HOME" != x; then
26418    JAVA_HOME_PROCESSED="$JAVA_HOME"
26419
26420  # Only process if variable expands to non-empty
26421
26422  if test "x$JAVA_HOME_PROCESSED" != x; then
26423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26424
26425  # Input might be given as Windows format, start by converting to
26426  # unix format.
26427  path="$JAVA_HOME_PROCESSED"
26428  new_path=`$CYGPATH -u "$path"`
26429
26430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26433  # "foo.exe" is OK but "foo" is an error.
26434  #
26435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26436  # It is also a way to make sure we got the proper file name for the real test later on.
26437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26438  if test "x$test_shortpath" = x; then
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26440$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26441    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26442  fi
26443
26444  # Call helper function which possibly converts this using DOS-style short mode.
26445  # If so, the updated path is stored in $new_path.
26446
26447  input_path="$new_path"
26448  # Check if we need to convert this using DOS-style short mode. If the path
26449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26450  # take no chances and rewrite it.
26451  # Note: m4 eats our [], so we need to use [ and ] instead.
26452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26453  if test "x$has_forbidden_chars" != x; then
26454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26458      # Going to short mode and back again did indeed matter. Since short mode is
26459      # case insensitive, let's make it lowercase to improve readability.
26460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26461      # Now convert it back to Unix-style (cygpath)
26462      input_path=`$CYGPATH -u "$shortmode_path"`
26463      new_path="$input_path"
26464    fi
26465  fi
26466
26467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26468  if test "x$test_cygdrive_prefix" = x; then
26469    # As a simple fix, exclude /usr/bin since it's not a real path.
26470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26472      # a path prefixed by /cygdrive for fixpath to work.
26473      new_path="$CYGWIN_ROOT_PATH$input_path"
26474    fi
26475  fi
26476
26477
26478  if test "x$path" != "x$new_path"; then
26479    JAVA_HOME_PROCESSED="$new_path"
26480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26481$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26482  fi
26483
26484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485
26486  path="$JAVA_HOME_PROCESSED"
26487  has_colon=`$ECHO $path | $GREP ^.:`
26488  new_path="$path"
26489  if test "x$has_colon" = x; then
26490    # Not in mixed or Windows style, start by that.
26491    new_path=`cmd //c echo $path`
26492  fi
26493
26494
26495  input_path="$new_path"
26496  # Check if we need to convert this using DOS-style short mode. If the path
26497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26498  # take no chances and rewrite it.
26499  # Note: m4 eats our [], so we need to use [ and ] instead.
26500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26501  if test "x$has_forbidden_chars" != x; then
26502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26504  fi
26505
26506
26507  windows_path="$new_path"
26508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26509    unix_path=`$CYGPATH -u "$windows_path"`
26510    new_path="$unix_path"
26511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26513    new_path="$unix_path"
26514  fi
26515
26516  if test "x$path" != "x$new_path"; then
26517    JAVA_HOME_PROCESSED="$new_path"
26518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26519$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26520  fi
26521
26522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26524
26525    else
26526      # We're on a unix platform. Hooray! :)
26527      path="$JAVA_HOME_PROCESSED"
26528      has_space=`$ECHO "$path" | $GREP " "`
26529      if test "x$has_space" != x; then
26530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26531$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26533      fi
26534
26535      # Use eval to expand a potential ~
26536      eval path="$path"
26537      if test ! -f "$path" && test ! -d "$path"; then
26538        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26539      fi
26540
26541      if test -d "$path"; then
26542        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26543      else
26544        dir="`$DIRNAME "$path"`"
26545        base="`$BASENAME "$path"`"
26546        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26547      fi
26548    fi
26549  fi
26550
26551    if test ! -d "$JAVA_HOME_PROCESSED"; then
26552      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26553$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26554    else
26555      # Aha, the user has set a JAVA_HOME
26556      # let us use that as the Boot JDK.
26557      BOOT_JDK="$JAVA_HOME_PROCESSED"
26558      BOOT_JDK_FOUND=maybe
26559      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26560$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26561    fi
26562  fi
26563
26564
26565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26567      # Do we have a bin/java?
26568      if test ! -x "$BOOT_JDK/bin/java"; then
26569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26571        BOOT_JDK_FOUND=no
26572      else
26573        # Do we have a bin/javac?
26574        if test ! -x "$BOOT_JDK/bin/javac"; then
26575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26579          BOOT_JDK_FOUND=no
26580        else
26581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26583
26584          # Extra M4 quote needed to protect [] in grep expression.
26585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26586          if test "x$FOUND_CORRECT_VERSION" = x; then
26587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26591            BOOT_JDK_FOUND=no
26592          else
26593            # We're done! :-)
26594            BOOT_JDK_FOUND=yes
26595
26596  # Only process if variable expands to non-empty
26597
26598  if test "x$BOOT_JDK" != x; then
26599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600
26601  # Input might be given as Windows format, start by converting to
26602  # unix format.
26603  path="$BOOT_JDK"
26604  new_path=`$CYGPATH -u "$path"`
26605
26606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26609  # "foo.exe" is OK but "foo" is an error.
26610  #
26611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26612  # It is also a way to make sure we got the proper file name for the real test later on.
26613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26614  if test "x$test_shortpath" = x; then
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26618  fi
26619
26620  # Call helper function which possibly converts this using DOS-style short mode.
26621  # If so, the updated path is stored in $new_path.
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26634      # Going to short mode and back again did indeed matter. Since short mode is
26635      # case insensitive, let's make it lowercase to improve readability.
26636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26637      # Now convert it back to Unix-style (cygpath)
26638      input_path=`$CYGPATH -u "$shortmode_path"`
26639      new_path="$input_path"
26640    fi
26641  fi
26642
26643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26644  if test "x$test_cygdrive_prefix" = x; then
26645    # As a simple fix, exclude /usr/bin since it's not a real path.
26646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26648      # a path prefixed by /cygdrive for fixpath to work.
26649      new_path="$CYGWIN_ROOT_PATH$input_path"
26650    fi
26651  fi
26652
26653
26654  if test "x$path" != "x$new_path"; then
26655    BOOT_JDK="$new_path"
26656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26658  fi
26659
26660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661
26662  path="$BOOT_JDK"
26663  has_colon=`$ECHO $path | $GREP ^.:`
26664  new_path="$path"
26665  if test "x$has_colon" = x; then
26666    # Not in mixed or Windows style, start by that.
26667    new_path=`cmd //c echo $path`
26668  fi
26669
26670
26671  input_path="$new_path"
26672  # Check if we need to convert this using DOS-style short mode. If the path
26673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674  # take no chances and rewrite it.
26675  # Note: m4 eats our [], so we need to use [ and ] instead.
26676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26677  if test "x$has_forbidden_chars" != x; then
26678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26680  fi
26681
26682
26683  windows_path="$new_path"
26684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685    unix_path=`$CYGPATH -u "$windows_path"`
26686    new_path="$unix_path"
26687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26689    new_path="$unix_path"
26690  fi
26691
26692  if test "x$path" != "x$new_path"; then
26693    BOOT_JDK="$new_path"
26694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26696  fi
26697
26698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26700
26701    else
26702      # We're on a unix platform. Hooray! :)
26703      path="$BOOT_JDK"
26704      has_space=`$ECHO "$path" | $GREP " "`
26705      if test "x$has_space" != x; then
26706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26709      fi
26710
26711      # Use eval to expand a potential ~
26712      eval path="$path"
26713      if test ! -f "$path" && test ! -d "$path"; then
26714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26715      fi
26716
26717      if test -d "$path"; then
26718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26719      else
26720        dir="`$DIRNAME "$path"`"
26721        base="`$BASENAME "$path"`"
26722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26723      fi
26724    fi
26725  fi
26726
26727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26728$as_echo_n "checking for Boot JDK... " >&6; }
26729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26730$as_echo "$BOOT_JDK" >&6; }
26731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26732$as_echo_n "checking Boot JDK version... " >&6; }
26733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26735$as_echo "$BOOT_JDK_VERSION" >&6; }
26736          fi # end check jdk version
26737        fi # end check javac
26738      fi # end check java
26739    fi # end check boot jdk found
26740  fi
26741
26742
26743  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26744
26745  if test "x$BOOT_JDK_FOUND" = xno; then
26746    # Now execute the test
26747
26748  # Extract the first word of "javac", so it can be a program name with args.
26749set dummy javac; ac_word=$2
26750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26751$as_echo_n "checking for $ac_word... " >&6; }
26752if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26753  $as_echo_n "(cached) " >&6
26754else
26755  case $JAVAC_CHECK in
26756  [\\/]* | ?:[\\/]*)
26757  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26758  ;;
26759  *)
26760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26761for as_dir in $PATH
26762do
26763  IFS=$as_save_IFS
26764  test -z "$as_dir" && as_dir=.
26765    for ac_exec_ext in '' $ac_executable_extensions; do
26766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26767    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26769    break 2
26770  fi
26771done
26772  done
26773IFS=$as_save_IFS
26774
26775  ;;
26776esac
26777fi
26778JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26779if test -n "$JAVAC_CHECK"; then
26780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26781$as_echo "$JAVAC_CHECK" >&6; }
26782else
26783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26784$as_echo "no" >&6; }
26785fi
26786
26787
26788  # Extract the first word of "java", so it can be a program name with args.
26789set dummy java; ac_word=$2
26790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26791$as_echo_n "checking for $ac_word... " >&6; }
26792if ${ac_cv_path_JAVA_CHECK+:} false; then :
26793  $as_echo_n "(cached) " >&6
26794else
26795  case $JAVA_CHECK in
26796  [\\/]* | ?:[\\/]*)
26797  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26798  ;;
26799  *)
26800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26801for as_dir in $PATH
26802do
26803  IFS=$as_save_IFS
26804  test -z "$as_dir" && as_dir=.
26805    for ac_exec_ext in '' $ac_executable_extensions; do
26806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26807    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26809    break 2
26810  fi
26811done
26812  done
26813IFS=$as_save_IFS
26814
26815  ;;
26816esac
26817fi
26818JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26819if test -n "$JAVA_CHECK"; then
26820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26821$as_echo "$JAVA_CHECK" >&6; }
26822else
26823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26824$as_echo "no" >&6; }
26825fi
26826
26827
26828  BINARY="$JAVAC_CHECK"
26829  if test "x$JAVAC_CHECK" = x; then
26830    BINARY="$JAVA_CHECK"
26831  fi
26832  if test "x$BINARY" != x; then
26833    # So there is a java(c) binary, it might be part of a JDK.
26834    # Lets find the JDK/JRE directory by following symbolic links.
26835    # Linux/GNU systems often have links from /usr/bin/java to
26836    # /etc/alternatives/java to the real JDK binary.
26837
26838  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26839    # Follow a chain of symbolic links. Use readlink
26840    # where it exists, else fall back to horribly
26841    # complicated shell code.
26842    if test "x$READLINK_TESTED" != yes; then
26843      # On MacOSX there is a readlink tool with a different
26844      # purpose than the GNU readlink tool. Check the found readlink.
26845      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26846      if test "x$ISGNU" = x; then
26847        # A readlink that we do not know how to use.
26848        # Are there other non-GNU readlinks out there?
26849        READLINK_TESTED=yes
26850        READLINK=
26851      fi
26852    fi
26853
26854    if test "x$READLINK" != x; then
26855      BINARY=`$READLINK -f $BINARY`
26856    else
26857      # Save the current directory for restoring afterwards
26858      STARTDIR=$PWD
26859      COUNTER=0
26860      sym_link_dir=`$DIRNAME $BINARY`
26861      sym_link_file=`$BASENAME $BINARY`
26862      cd $sym_link_dir
26863      # Use -P flag to resolve symlinks in directories.
26864      cd `$THEPWDCMD -P`
26865      sym_link_dir=`$THEPWDCMD -P`
26866      # Resolve file symlinks
26867      while test $COUNTER -lt 20; do
26868        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26869        if test "x$ISLINK" == x; then
26870          # This is not a symbolic link! We are done!
26871          break
26872        fi
26873        # Again resolve directory symlinks since the target of the just found
26874        # link could be in a different directory
26875        cd `$DIRNAME $ISLINK`
26876        sym_link_dir=`$THEPWDCMD -P`
26877        sym_link_file=`$BASENAME $ISLINK`
26878        let COUNTER=COUNTER+1
26879      done
26880      cd $STARTDIR
26881      BINARY=$sym_link_dir/$sym_link_file
26882    fi
26883  fi
26884
26885    BOOT_JDK=`dirname "$BINARY"`
26886    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26887    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26888      # Looks like we found ourselves an JDK
26889      BOOT_JDK_FOUND=maybe
26890      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26891$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26892    fi
26893  fi
26894
26895
26896    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26897    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26898      # Do we have a bin/java?
26899      if test ! -x "$BOOT_JDK/bin/java"; then
26900        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26902        BOOT_JDK_FOUND=no
26903      else
26904        # Do we have a bin/javac?
26905        if test ! -x "$BOOT_JDK/bin/javac"; then
26906          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26908          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26909$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26910          BOOT_JDK_FOUND=no
26911        else
26912          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26913          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26914
26915          # Extra M4 quote needed to protect [] in grep expression.
26916          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26917          if test "x$FOUND_CORRECT_VERSION" = x; then
26918            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26920            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26921$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26922            BOOT_JDK_FOUND=no
26923          else
26924            # We're done! :-)
26925            BOOT_JDK_FOUND=yes
26926
26927  # Only process if variable expands to non-empty
26928
26929  if test "x$BOOT_JDK" != x; then
26930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26931
26932  # Input might be given as Windows format, start by converting to
26933  # unix format.
26934  path="$BOOT_JDK"
26935  new_path=`$CYGPATH -u "$path"`
26936
26937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26940  # "foo.exe" is OK but "foo" is an error.
26941  #
26942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26943  # It is also a way to make sure we got the proper file name for the real test later on.
26944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26945  if test "x$test_shortpath" = x; then
26946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26948    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26949  fi
26950
26951  # Call helper function which possibly converts this using DOS-style short mode.
26952  # If so, the updated path is stored in $new_path.
26953
26954  input_path="$new_path"
26955  # Check if we need to convert this using DOS-style short mode. If the path
26956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26957  # take no chances and rewrite it.
26958  # Note: m4 eats our [], so we need to use [ and ] instead.
26959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26960  if test "x$has_forbidden_chars" != x; then
26961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26965      # Going to short mode and back again did indeed matter. Since short mode is
26966      # case insensitive, let's make it lowercase to improve readability.
26967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26968      # Now convert it back to Unix-style (cygpath)
26969      input_path=`$CYGPATH -u "$shortmode_path"`
26970      new_path="$input_path"
26971    fi
26972  fi
26973
26974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26975  if test "x$test_cygdrive_prefix" = x; then
26976    # As a simple fix, exclude /usr/bin since it's not a real path.
26977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26979      # a path prefixed by /cygdrive for fixpath to work.
26980      new_path="$CYGWIN_ROOT_PATH$input_path"
26981    fi
26982  fi
26983
26984
26985  if test "x$path" != "x$new_path"; then
26986    BOOT_JDK="$new_path"
26987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26989  fi
26990
26991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26992
26993  path="$BOOT_JDK"
26994  has_colon=`$ECHO $path | $GREP ^.:`
26995  new_path="$path"
26996  if test "x$has_colon" = x; then
26997    # Not in mixed or Windows style, start by that.
26998    new_path=`cmd //c echo $path`
26999  fi
27000
27001
27002  input_path="$new_path"
27003  # Check if we need to convert this using DOS-style short mode. If the path
27004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27005  # take no chances and rewrite it.
27006  # Note: m4 eats our [], so we need to use [ and ] instead.
27007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27008  if test "x$has_forbidden_chars" != x; then
27009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27011  fi
27012
27013
27014  windows_path="$new_path"
27015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27016    unix_path=`$CYGPATH -u "$windows_path"`
27017    new_path="$unix_path"
27018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27020    new_path="$unix_path"
27021  fi
27022
27023  if test "x$path" != "x$new_path"; then
27024    BOOT_JDK="$new_path"
27025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27027  fi
27028
27029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27031
27032    else
27033      # We're on a unix platform. Hooray! :)
27034      path="$BOOT_JDK"
27035      has_space=`$ECHO "$path" | $GREP " "`
27036      if test "x$has_space" != x; then
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27040      fi
27041
27042      # Use eval to expand a potential ~
27043      eval path="$path"
27044      if test ! -f "$path" && test ! -d "$path"; then
27045        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27046      fi
27047
27048      if test -d "$path"; then
27049        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27050      else
27051        dir="`$DIRNAME "$path"`"
27052        base="`$BASENAME "$path"`"
27053        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27054      fi
27055    fi
27056  fi
27057
27058            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27059$as_echo_n "checking for Boot JDK... " >&6; }
27060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27061$as_echo "$BOOT_JDK" >&6; }
27062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27063$as_echo_n "checking Boot JDK version... " >&6; }
27064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27066$as_echo "$BOOT_JDK_VERSION" >&6; }
27067          fi # end check jdk version
27068        fi # end check javac
27069      fi # end check java
27070    fi # end check boot jdk found
27071  fi
27072
27073
27074  # Test: Is there a JDK installed in default, well-known locations?
27075
27076  if test "x$BOOT_JDK_FOUND" = xno; then
27077    # Now execute the test
27078
27079  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27080
27081  if test "x$BOOT_JDK_FOUND" = xno; then
27082    # Now execute the test
27083
27084  if test "x$ProgramW6432" != x; then
27085    VIRTUAL_DIR="$ProgramW6432/Java"
27086
27087  windows_path="$VIRTUAL_DIR"
27088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27089    unix_path=`$CYGPATH -u "$windows_path"`
27090    VIRTUAL_DIR="$unix_path"
27091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27093    VIRTUAL_DIR="$unix_path"
27094  fi
27095
27096
27097  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27098  BOOT_JDK_SUFFIX=""
27099  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27100  if test "x$ALL_JDKS_FOUND" != x; then
27101    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27102
27103  if test "x$BOOT_JDK_FOUND" = xno; then
27104    # Now execute the test
27105
27106        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27107        if test -d "$BOOT_JDK"; then
27108          BOOT_JDK_FOUND=maybe
27109          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27110$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27111        fi
27112
27113
27114    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27115    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27116      # Do we have a bin/java?
27117      if test ! -x "$BOOT_JDK/bin/java"; then
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27120        BOOT_JDK_FOUND=no
27121      else
27122        # Do we have a bin/javac?
27123        if test ! -x "$BOOT_JDK/bin/javac"; then
27124          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27126          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27127$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27128          BOOT_JDK_FOUND=no
27129        else
27130          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27131          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27132
27133          # Extra M4 quote needed to protect [] in grep expression.
27134          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27135          if test "x$FOUND_CORRECT_VERSION" = x; then
27136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27138            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27139$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27140            BOOT_JDK_FOUND=no
27141          else
27142            # We're done! :-)
27143            BOOT_JDK_FOUND=yes
27144
27145  # Only process if variable expands to non-empty
27146
27147  if test "x$BOOT_JDK" != x; then
27148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27149
27150  # Input might be given as Windows format, start by converting to
27151  # unix format.
27152  path="$BOOT_JDK"
27153  new_path=`$CYGPATH -u "$path"`
27154
27155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27158  # "foo.exe" is OK but "foo" is an error.
27159  #
27160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27161  # It is also a way to make sure we got the proper file name for the real test later on.
27162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27163  if test "x$test_shortpath" = x; then
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27166    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27167  fi
27168
27169  # Call helper function which possibly converts this using DOS-style short mode.
27170  # If so, the updated path is stored in $new_path.
27171
27172  input_path="$new_path"
27173  # Check if we need to convert this using DOS-style short mode. If the path
27174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27175  # take no chances and rewrite it.
27176  # Note: m4 eats our [], so we need to use [ and ] instead.
27177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27178  if test "x$has_forbidden_chars" != x; then
27179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27183      # Going to short mode and back again did indeed matter. Since short mode is
27184      # case insensitive, let's make it lowercase to improve readability.
27185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27186      # Now convert it back to Unix-style (cygpath)
27187      input_path=`$CYGPATH -u "$shortmode_path"`
27188      new_path="$input_path"
27189    fi
27190  fi
27191
27192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27193  if test "x$test_cygdrive_prefix" = x; then
27194    # As a simple fix, exclude /usr/bin since it's not a real path.
27195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27197      # a path prefixed by /cygdrive for fixpath to work.
27198      new_path="$CYGWIN_ROOT_PATH$input_path"
27199    fi
27200  fi
27201
27202
27203  if test "x$path" != "x$new_path"; then
27204    BOOT_JDK="$new_path"
27205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27207  fi
27208
27209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27210
27211  path="$BOOT_JDK"
27212  has_colon=`$ECHO $path | $GREP ^.:`
27213  new_path="$path"
27214  if test "x$has_colon" = x; then
27215    # Not in mixed or Windows style, start by that.
27216    new_path=`cmd //c echo $path`
27217  fi
27218
27219
27220  input_path="$new_path"
27221  # Check if we need to convert this using DOS-style short mode. If the path
27222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27223  # take no chances and rewrite it.
27224  # Note: m4 eats our [], so we need to use [ and ] instead.
27225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27226  if test "x$has_forbidden_chars" != x; then
27227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27229  fi
27230
27231
27232  windows_path="$new_path"
27233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234    unix_path=`$CYGPATH -u "$windows_path"`
27235    new_path="$unix_path"
27236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27238    new_path="$unix_path"
27239  fi
27240
27241  if test "x$path" != "x$new_path"; then
27242    BOOT_JDK="$new_path"
27243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27245  fi
27246
27247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27249
27250    else
27251      # We're on a unix platform. Hooray! :)
27252      path="$BOOT_JDK"
27253      has_space=`$ECHO "$path" | $GREP " "`
27254      if test "x$has_space" != x; then
27255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27258      fi
27259
27260      # Use eval to expand a potential ~
27261      eval path="$path"
27262      if test ! -f "$path" && test ! -d "$path"; then
27263        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27264      fi
27265
27266      if test -d "$path"; then
27267        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27268      else
27269        dir="`$DIRNAME "$path"`"
27270        base="`$BASENAME "$path"`"
27271        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27272      fi
27273    fi
27274  fi
27275
27276            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27277$as_echo_n "checking for Boot JDK... " >&6; }
27278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27279$as_echo "$BOOT_JDK" >&6; }
27280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27281$as_echo_n "checking Boot JDK version... " >&6; }
27282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27284$as_echo "$BOOT_JDK_VERSION" >&6; }
27285          fi # end check jdk version
27286        fi # end check javac
27287      fi # end check java
27288    fi # end check boot jdk found
27289  fi
27290
27291    done
27292  fi
27293
27294  fi
27295
27296
27297    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27298    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27299      # Do we have a bin/java?
27300      if test ! -x "$BOOT_JDK/bin/java"; then
27301        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27303        BOOT_JDK_FOUND=no
27304      else
27305        # Do we have a bin/javac?
27306        if test ! -x "$BOOT_JDK/bin/javac"; then
27307          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27309          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27310$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27311          BOOT_JDK_FOUND=no
27312        else
27313          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27314          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27315
27316          # Extra M4 quote needed to protect [] in grep expression.
27317          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27318          if test "x$FOUND_CORRECT_VERSION" = x; then
27319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27321            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27322$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27323            BOOT_JDK_FOUND=no
27324          else
27325            # We're done! :-)
27326            BOOT_JDK_FOUND=yes
27327
27328  # Only process if variable expands to non-empty
27329
27330  if test "x$BOOT_JDK" != x; then
27331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27332
27333  # Input might be given as Windows format, start by converting to
27334  # unix format.
27335  path="$BOOT_JDK"
27336  new_path=`$CYGPATH -u "$path"`
27337
27338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27341  # "foo.exe" is OK but "foo" is an error.
27342  #
27343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27344  # It is also a way to make sure we got the proper file name for the real test later on.
27345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27346  if test "x$test_shortpath" = x; then
27347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27348$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27349    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27350  fi
27351
27352  # Call helper function which possibly converts this using DOS-style short mode.
27353  # If so, the updated path is stored in $new_path.
27354
27355  input_path="$new_path"
27356  # Check if we need to convert this using DOS-style short mode. If the path
27357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27358  # take no chances and rewrite it.
27359  # Note: m4 eats our [], so we need to use [ and ] instead.
27360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27361  if test "x$has_forbidden_chars" != x; then
27362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27366      # Going to short mode and back again did indeed matter. Since short mode is
27367      # case insensitive, let's make it lowercase to improve readability.
27368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27369      # Now convert it back to Unix-style (cygpath)
27370      input_path=`$CYGPATH -u "$shortmode_path"`
27371      new_path="$input_path"
27372    fi
27373  fi
27374
27375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27376  if test "x$test_cygdrive_prefix" = x; then
27377    # As a simple fix, exclude /usr/bin since it's not a real path.
27378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27380      # a path prefixed by /cygdrive for fixpath to work.
27381      new_path="$CYGWIN_ROOT_PATH$input_path"
27382    fi
27383  fi
27384
27385
27386  if test "x$path" != "x$new_path"; then
27387    BOOT_JDK="$new_path"
27388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27390  fi
27391
27392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27393
27394  path="$BOOT_JDK"
27395  has_colon=`$ECHO $path | $GREP ^.:`
27396  new_path="$path"
27397  if test "x$has_colon" = x; then
27398    # Not in mixed or Windows style, start by that.
27399    new_path=`cmd //c echo $path`
27400  fi
27401
27402
27403  input_path="$new_path"
27404  # Check if we need to convert this using DOS-style short mode. If the path
27405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27406  # take no chances and rewrite it.
27407  # Note: m4 eats our [], so we need to use [ and ] instead.
27408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27409  if test "x$has_forbidden_chars" != x; then
27410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27412  fi
27413
27414
27415  windows_path="$new_path"
27416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27417    unix_path=`$CYGPATH -u "$windows_path"`
27418    new_path="$unix_path"
27419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27421    new_path="$unix_path"
27422  fi
27423
27424  if test "x$path" != "x$new_path"; then
27425    BOOT_JDK="$new_path"
27426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27428  fi
27429
27430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27432
27433    else
27434      # We're on a unix platform. Hooray! :)
27435      path="$BOOT_JDK"
27436      has_space=`$ECHO "$path" | $GREP " "`
27437      if test "x$has_space" != x; then
27438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27439$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27441      fi
27442
27443      # Use eval to expand a potential ~
27444      eval path="$path"
27445      if test ! -f "$path" && test ! -d "$path"; then
27446        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27447      fi
27448
27449      if test -d "$path"; then
27450        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27451      else
27452        dir="`$DIRNAME "$path"`"
27453        base="`$BASENAME "$path"`"
27454        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27455      fi
27456    fi
27457  fi
27458
27459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27460$as_echo_n "checking for Boot JDK... " >&6; }
27461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27462$as_echo "$BOOT_JDK" >&6; }
27463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27464$as_echo_n "checking Boot JDK version... " >&6; }
27465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27467$as_echo "$BOOT_JDK_VERSION" >&6; }
27468          fi # end check jdk version
27469        fi # end check javac
27470      fi # end check java
27471    fi # end check boot jdk found
27472  fi
27473
27474
27475  if test "x$BOOT_JDK_FOUND" = xno; then
27476    # Now execute the test
27477
27478  if test "x$PROGRAMW6432" != x; then
27479    VIRTUAL_DIR="$PROGRAMW6432/Java"
27480
27481  windows_path="$VIRTUAL_DIR"
27482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27483    unix_path=`$CYGPATH -u "$windows_path"`
27484    VIRTUAL_DIR="$unix_path"
27485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27487    VIRTUAL_DIR="$unix_path"
27488  fi
27489
27490
27491  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27492  BOOT_JDK_SUFFIX=""
27493  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27494  if test "x$ALL_JDKS_FOUND" != x; then
27495    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27496
27497  if test "x$BOOT_JDK_FOUND" = xno; then
27498    # Now execute the test
27499
27500        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27501        if test -d "$BOOT_JDK"; then
27502          BOOT_JDK_FOUND=maybe
27503          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27504$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27505        fi
27506
27507
27508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27510      # Do we have a bin/java?
27511      if test ! -x "$BOOT_JDK/bin/java"; then
27512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27514        BOOT_JDK_FOUND=no
27515      else
27516        # Do we have a bin/javac?
27517        if test ! -x "$BOOT_JDK/bin/javac"; then
27518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27522          BOOT_JDK_FOUND=no
27523        else
27524          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27525          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27526
27527          # Extra M4 quote needed to protect [] in grep expression.
27528          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27529          if test "x$FOUND_CORRECT_VERSION" = x; then
27530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27532            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27533$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27534            BOOT_JDK_FOUND=no
27535          else
27536            # We're done! :-)
27537            BOOT_JDK_FOUND=yes
27538
27539  # Only process if variable expands to non-empty
27540
27541  if test "x$BOOT_JDK" != x; then
27542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27543
27544  # Input might be given as Windows format, start by converting to
27545  # unix format.
27546  path="$BOOT_JDK"
27547  new_path=`$CYGPATH -u "$path"`
27548
27549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27552  # "foo.exe" is OK but "foo" is an error.
27553  #
27554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27555  # It is also a way to make sure we got the proper file name for the real test later on.
27556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27557  if test "x$test_shortpath" = x; then
27558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27561  fi
27562
27563  # Call helper function which possibly converts this using DOS-style short mode.
27564  # If so, the updated path is stored in $new_path.
27565
27566  input_path="$new_path"
27567  # Check if we need to convert this using DOS-style short mode. If the path
27568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27569  # take no chances and rewrite it.
27570  # Note: m4 eats our [], so we need to use [ and ] instead.
27571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27572  if test "x$has_forbidden_chars" != x; then
27573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27577      # Going to short mode and back again did indeed matter. Since short mode is
27578      # case insensitive, let's make it lowercase to improve readability.
27579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27580      # Now convert it back to Unix-style (cygpath)
27581      input_path=`$CYGPATH -u "$shortmode_path"`
27582      new_path="$input_path"
27583    fi
27584  fi
27585
27586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27587  if test "x$test_cygdrive_prefix" = x; then
27588    # As a simple fix, exclude /usr/bin since it's not a real path.
27589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27591      # a path prefixed by /cygdrive for fixpath to work.
27592      new_path="$CYGWIN_ROOT_PATH$input_path"
27593    fi
27594  fi
27595
27596
27597  if test "x$path" != "x$new_path"; then
27598    BOOT_JDK="$new_path"
27599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27601  fi
27602
27603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27604
27605  path="$BOOT_JDK"
27606  has_colon=`$ECHO $path | $GREP ^.:`
27607  new_path="$path"
27608  if test "x$has_colon" = x; then
27609    # Not in mixed or Windows style, start by that.
27610    new_path=`cmd //c echo $path`
27611  fi
27612
27613
27614  input_path="$new_path"
27615  # Check if we need to convert this using DOS-style short mode. If the path
27616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27617  # take no chances and rewrite it.
27618  # Note: m4 eats our [], so we need to use [ and ] instead.
27619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27620  if test "x$has_forbidden_chars" != x; then
27621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27623  fi
27624
27625
27626  windows_path="$new_path"
27627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628    unix_path=`$CYGPATH -u "$windows_path"`
27629    new_path="$unix_path"
27630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27632    new_path="$unix_path"
27633  fi
27634
27635  if test "x$path" != "x$new_path"; then
27636    BOOT_JDK="$new_path"
27637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27639  fi
27640
27641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27643
27644    else
27645      # We're on a unix platform. Hooray! :)
27646      path="$BOOT_JDK"
27647      has_space=`$ECHO "$path" | $GREP " "`
27648      if test "x$has_space" != x; then
27649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27652      fi
27653
27654      # Use eval to expand a potential ~
27655      eval path="$path"
27656      if test ! -f "$path" && test ! -d "$path"; then
27657        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27658      fi
27659
27660      if test -d "$path"; then
27661        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27662      else
27663        dir="`$DIRNAME "$path"`"
27664        base="`$BASENAME "$path"`"
27665        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27666      fi
27667    fi
27668  fi
27669
27670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27671$as_echo_n "checking for Boot JDK... " >&6; }
27672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27673$as_echo "$BOOT_JDK" >&6; }
27674            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27675$as_echo_n "checking Boot JDK version... " >&6; }
27676            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27678$as_echo "$BOOT_JDK_VERSION" >&6; }
27679          fi # end check jdk version
27680        fi # end check javac
27681      fi # end check java
27682    fi # end check boot jdk found
27683  fi
27684
27685    done
27686  fi
27687
27688  fi
27689
27690
27691    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27692    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27693      # Do we have a bin/java?
27694      if test ! -x "$BOOT_JDK/bin/java"; then
27695        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27697        BOOT_JDK_FOUND=no
27698      else
27699        # Do we have a bin/javac?
27700        if test ! -x "$BOOT_JDK/bin/javac"; then
27701          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27703          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27704$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27705          BOOT_JDK_FOUND=no
27706        else
27707          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27708          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27709
27710          # Extra M4 quote needed to protect [] in grep expression.
27711          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27712          if test "x$FOUND_CORRECT_VERSION" = x; then
27713            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27715            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27716$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27717            BOOT_JDK_FOUND=no
27718          else
27719            # We're done! :-)
27720            BOOT_JDK_FOUND=yes
27721
27722  # Only process if variable expands to non-empty
27723
27724  if test "x$BOOT_JDK" != x; then
27725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27726
27727  # Input might be given as Windows format, start by converting to
27728  # unix format.
27729  path="$BOOT_JDK"
27730  new_path=`$CYGPATH -u "$path"`
27731
27732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27735  # "foo.exe" is OK but "foo" is an error.
27736  #
27737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27738  # It is also a way to make sure we got the proper file name for the real test later on.
27739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27740  if test "x$test_shortpath" = x; then
27741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27743    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27744  fi
27745
27746  # Call helper function which possibly converts this using DOS-style short mode.
27747  # If so, the updated path is stored in $new_path.
27748
27749  input_path="$new_path"
27750  # Check if we need to convert this using DOS-style short mode. If the path
27751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27752  # take no chances and rewrite it.
27753  # Note: m4 eats our [], so we need to use [ and ] instead.
27754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27755  if test "x$has_forbidden_chars" != x; then
27756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27760      # Going to short mode and back again did indeed matter. Since short mode is
27761      # case insensitive, let's make it lowercase to improve readability.
27762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27763      # Now convert it back to Unix-style (cygpath)
27764      input_path=`$CYGPATH -u "$shortmode_path"`
27765      new_path="$input_path"
27766    fi
27767  fi
27768
27769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27770  if test "x$test_cygdrive_prefix" = x; then
27771    # As a simple fix, exclude /usr/bin since it's not a real path.
27772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27774      # a path prefixed by /cygdrive for fixpath to work.
27775      new_path="$CYGWIN_ROOT_PATH$input_path"
27776    fi
27777  fi
27778
27779
27780  if test "x$path" != "x$new_path"; then
27781    BOOT_JDK="$new_path"
27782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27784  fi
27785
27786    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27787
27788  path="$BOOT_JDK"
27789  has_colon=`$ECHO $path | $GREP ^.:`
27790  new_path="$path"
27791  if test "x$has_colon" = x; then
27792    # Not in mixed or Windows style, start by that.
27793    new_path=`cmd //c echo $path`
27794  fi
27795
27796
27797  input_path="$new_path"
27798  # Check if we need to convert this using DOS-style short mode. If the path
27799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27800  # take no chances and rewrite it.
27801  # Note: m4 eats our [], so we need to use [ and ] instead.
27802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27803  if test "x$has_forbidden_chars" != x; then
27804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27806  fi
27807
27808
27809  windows_path="$new_path"
27810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27811    unix_path=`$CYGPATH -u "$windows_path"`
27812    new_path="$unix_path"
27813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27815    new_path="$unix_path"
27816  fi
27817
27818  if test "x$path" != "x$new_path"; then
27819    BOOT_JDK="$new_path"
27820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27822  fi
27823
27824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27826
27827    else
27828      # We're on a unix platform. Hooray! :)
27829      path="$BOOT_JDK"
27830      has_space=`$ECHO "$path" | $GREP " "`
27831      if test "x$has_space" != x; then
27832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27834        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27835      fi
27836
27837      # Use eval to expand a potential ~
27838      eval path="$path"
27839      if test ! -f "$path" && test ! -d "$path"; then
27840        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27841      fi
27842
27843      if test -d "$path"; then
27844        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27845      else
27846        dir="`$DIRNAME "$path"`"
27847        base="`$BASENAME "$path"`"
27848        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27849      fi
27850    fi
27851  fi
27852
27853            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27854$as_echo_n "checking for Boot JDK... " >&6; }
27855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27856$as_echo "$BOOT_JDK" >&6; }
27857            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27858$as_echo_n "checking Boot JDK version... " >&6; }
27859            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27861$as_echo "$BOOT_JDK_VERSION" >&6; }
27862          fi # end check jdk version
27863        fi # end check javac
27864      fi # end check java
27865    fi # end check boot jdk found
27866  fi
27867
27868
27869  if test "x$BOOT_JDK_FOUND" = xno; then
27870    # Now execute the test
27871
27872  if test "x$PROGRAMFILES" != x; then
27873    VIRTUAL_DIR="$PROGRAMFILES/Java"
27874
27875  windows_path="$VIRTUAL_DIR"
27876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27877    unix_path=`$CYGPATH -u "$windows_path"`
27878    VIRTUAL_DIR="$unix_path"
27879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27881    VIRTUAL_DIR="$unix_path"
27882  fi
27883
27884
27885  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27886  BOOT_JDK_SUFFIX=""
27887  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27888  if test "x$ALL_JDKS_FOUND" != x; then
27889    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27890
27891  if test "x$BOOT_JDK_FOUND" = xno; then
27892    # Now execute the test
27893
27894        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27895        if test -d "$BOOT_JDK"; then
27896          BOOT_JDK_FOUND=maybe
27897          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27898$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27899        fi
27900
27901
27902    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27903    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27904      # Do we have a bin/java?
27905      if test ! -x "$BOOT_JDK/bin/java"; then
27906        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27908        BOOT_JDK_FOUND=no
27909      else
27910        # Do we have a bin/javac?
27911        if test ! -x "$BOOT_JDK/bin/javac"; then
27912          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27914          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27915$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27916          BOOT_JDK_FOUND=no
27917        else
27918          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27919          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27920
27921          # Extra M4 quote needed to protect [] in grep expression.
27922          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27923          if test "x$FOUND_CORRECT_VERSION" = x; then
27924            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27926            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27927$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27928            BOOT_JDK_FOUND=no
27929          else
27930            # We're done! :-)
27931            BOOT_JDK_FOUND=yes
27932
27933  # Only process if variable expands to non-empty
27934
27935  if test "x$BOOT_JDK" != x; then
27936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27937
27938  # Input might be given as Windows format, start by converting to
27939  # unix format.
27940  path="$BOOT_JDK"
27941  new_path=`$CYGPATH -u "$path"`
27942
27943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27946  # "foo.exe" is OK but "foo" is an error.
27947  #
27948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27949  # It is also a way to make sure we got the proper file name for the real test later on.
27950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27951  if test "x$test_shortpath" = x; then
27952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27955  fi
27956
27957  # Call helper function which possibly converts this using DOS-style short mode.
27958  # If so, the updated path is stored in $new_path.
27959
27960  input_path="$new_path"
27961  # Check if we need to convert this using DOS-style short mode. If the path
27962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27963  # take no chances and rewrite it.
27964  # Note: m4 eats our [], so we need to use [ and ] instead.
27965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27966  if test "x$has_forbidden_chars" != x; then
27967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27971      # Going to short mode and back again did indeed matter. Since short mode is
27972      # case insensitive, let's make it lowercase to improve readability.
27973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27974      # Now convert it back to Unix-style (cygpath)
27975      input_path=`$CYGPATH -u "$shortmode_path"`
27976      new_path="$input_path"
27977    fi
27978  fi
27979
27980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27981  if test "x$test_cygdrive_prefix" = x; then
27982    # As a simple fix, exclude /usr/bin since it's not a real path.
27983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27985      # a path prefixed by /cygdrive for fixpath to work.
27986      new_path="$CYGWIN_ROOT_PATH$input_path"
27987    fi
27988  fi
27989
27990
27991  if test "x$path" != "x$new_path"; then
27992    BOOT_JDK="$new_path"
27993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27995  fi
27996
27997    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27998
27999  path="$BOOT_JDK"
28000  has_colon=`$ECHO $path | $GREP ^.:`
28001  new_path="$path"
28002  if test "x$has_colon" = x; then
28003    # Not in mixed or Windows style, start by that.
28004    new_path=`cmd //c echo $path`
28005  fi
28006
28007
28008  input_path="$new_path"
28009  # Check if we need to convert this using DOS-style short mode. If the path
28010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28011  # take no chances and rewrite it.
28012  # Note: m4 eats our [], so we need to use [ and ] instead.
28013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28014  if test "x$has_forbidden_chars" != x; then
28015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28017  fi
28018
28019
28020  windows_path="$new_path"
28021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022    unix_path=`$CYGPATH -u "$windows_path"`
28023    new_path="$unix_path"
28024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28026    new_path="$unix_path"
28027  fi
28028
28029  if test "x$path" != "x$new_path"; then
28030    BOOT_JDK="$new_path"
28031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28033  fi
28034
28035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28037
28038    else
28039      # We're on a unix platform. Hooray! :)
28040      path="$BOOT_JDK"
28041      has_space=`$ECHO "$path" | $GREP " "`
28042      if test "x$has_space" != x; then
28043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28045        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28046      fi
28047
28048      # Use eval to expand a potential ~
28049      eval path="$path"
28050      if test ! -f "$path" && test ! -d "$path"; then
28051        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28052      fi
28053
28054      if test -d "$path"; then
28055        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28056      else
28057        dir="`$DIRNAME "$path"`"
28058        base="`$BASENAME "$path"`"
28059        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28060      fi
28061    fi
28062  fi
28063
28064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28065$as_echo_n "checking for Boot JDK... " >&6; }
28066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28067$as_echo "$BOOT_JDK" >&6; }
28068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28069$as_echo_n "checking Boot JDK version... " >&6; }
28070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28072$as_echo "$BOOT_JDK_VERSION" >&6; }
28073          fi # end check jdk version
28074        fi # end check javac
28075      fi # end check java
28076    fi # end check boot jdk found
28077  fi
28078
28079    done
28080  fi
28081
28082  fi
28083
28084
28085    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28086    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28087      # Do we have a bin/java?
28088      if test ! -x "$BOOT_JDK/bin/java"; then
28089        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28091        BOOT_JDK_FOUND=no
28092      else
28093        # Do we have a bin/javac?
28094        if test ! -x "$BOOT_JDK/bin/javac"; then
28095          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28097          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28098$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28099          BOOT_JDK_FOUND=no
28100        else
28101          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28102          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28103
28104          # Extra M4 quote needed to protect [] in grep expression.
28105          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28106          if test "x$FOUND_CORRECT_VERSION" = x; then
28107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28110$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28111            BOOT_JDK_FOUND=no
28112          else
28113            # We're done! :-)
28114            BOOT_JDK_FOUND=yes
28115
28116  # Only process if variable expands to non-empty
28117
28118  if test "x$BOOT_JDK" != x; then
28119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28120
28121  # Input might be given as Windows format, start by converting to
28122  # unix format.
28123  path="$BOOT_JDK"
28124  new_path=`$CYGPATH -u "$path"`
28125
28126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28129  # "foo.exe" is OK but "foo" is an error.
28130  #
28131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28132  # It is also a way to make sure we got the proper file name for the real test later on.
28133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28134  if test "x$test_shortpath" = x; then
28135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28138  fi
28139
28140  # Call helper function which possibly converts this using DOS-style short mode.
28141  # If so, the updated path is stored in $new_path.
28142
28143  input_path="$new_path"
28144  # Check if we need to convert this using DOS-style short mode. If the path
28145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28146  # take no chances and rewrite it.
28147  # Note: m4 eats our [], so we need to use [ and ] instead.
28148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28149  if test "x$has_forbidden_chars" != x; then
28150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28154      # Going to short mode and back again did indeed matter. Since short mode is
28155      # case insensitive, let's make it lowercase to improve readability.
28156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157      # Now convert it back to Unix-style (cygpath)
28158      input_path=`$CYGPATH -u "$shortmode_path"`
28159      new_path="$input_path"
28160    fi
28161  fi
28162
28163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28164  if test "x$test_cygdrive_prefix" = x; then
28165    # As a simple fix, exclude /usr/bin since it's not a real path.
28166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28168      # a path prefixed by /cygdrive for fixpath to work.
28169      new_path="$CYGWIN_ROOT_PATH$input_path"
28170    fi
28171  fi
28172
28173
28174  if test "x$path" != "x$new_path"; then
28175    BOOT_JDK="$new_path"
28176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28178  fi
28179
28180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28181
28182  path="$BOOT_JDK"
28183  has_colon=`$ECHO $path | $GREP ^.:`
28184  new_path="$path"
28185  if test "x$has_colon" = x; then
28186    # Not in mixed or Windows style, start by that.
28187    new_path=`cmd //c echo $path`
28188  fi
28189
28190
28191  input_path="$new_path"
28192  # Check if we need to convert this using DOS-style short mode. If the path
28193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28194  # take no chances and rewrite it.
28195  # Note: m4 eats our [], so we need to use [ and ] instead.
28196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28197  if test "x$has_forbidden_chars" != x; then
28198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28200  fi
28201
28202
28203  windows_path="$new_path"
28204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28205    unix_path=`$CYGPATH -u "$windows_path"`
28206    new_path="$unix_path"
28207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28209    new_path="$unix_path"
28210  fi
28211
28212  if test "x$path" != "x$new_path"; then
28213    BOOT_JDK="$new_path"
28214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28216  fi
28217
28218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28220
28221    else
28222      # We're on a unix platform. Hooray! :)
28223      path="$BOOT_JDK"
28224      has_space=`$ECHO "$path" | $GREP " "`
28225      if test "x$has_space" != x; then
28226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28229      fi
28230
28231      # Use eval to expand a potential ~
28232      eval path="$path"
28233      if test ! -f "$path" && test ! -d "$path"; then
28234        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28235      fi
28236
28237      if test -d "$path"; then
28238        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28239      else
28240        dir="`$DIRNAME "$path"`"
28241        base="`$BASENAME "$path"`"
28242        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28243      fi
28244    fi
28245  fi
28246
28247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28248$as_echo_n "checking for Boot JDK... " >&6; }
28249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28250$as_echo "$BOOT_JDK" >&6; }
28251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28252$as_echo_n "checking Boot JDK version... " >&6; }
28253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28255$as_echo "$BOOT_JDK_VERSION" >&6; }
28256          fi # end check jdk version
28257        fi # end check javac
28258      fi # end check java
28259    fi # end check boot jdk found
28260  fi
28261
28262
28263  if test "x$BOOT_JDK_FOUND" = xno; then
28264    # Now execute the test
28265
28266  if test "x$ProgramFiles" != x; then
28267    VIRTUAL_DIR="$ProgramFiles/Java"
28268
28269  windows_path="$VIRTUAL_DIR"
28270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28271    unix_path=`$CYGPATH -u "$windows_path"`
28272    VIRTUAL_DIR="$unix_path"
28273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28275    VIRTUAL_DIR="$unix_path"
28276  fi
28277
28278
28279  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28280  BOOT_JDK_SUFFIX=""
28281  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28282  if test "x$ALL_JDKS_FOUND" != x; then
28283    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28284
28285  if test "x$BOOT_JDK_FOUND" = xno; then
28286    # Now execute the test
28287
28288        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28289        if test -d "$BOOT_JDK"; then
28290          BOOT_JDK_FOUND=maybe
28291          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28292$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28293        fi
28294
28295
28296    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28297    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28298      # Do we have a bin/java?
28299      if test ! -x "$BOOT_JDK/bin/java"; then
28300        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28302        BOOT_JDK_FOUND=no
28303      else
28304        # Do we have a bin/javac?
28305        if test ! -x "$BOOT_JDK/bin/javac"; then
28306          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28308          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28309$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28310          BOOT_JDK_FOUND=no
28311        else
28312          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28313          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28314
28315          # Extra M4 quote needed to protect [] in grep expression.
28316          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28317          if test "x$FOUND_CORRECT_VERSION" = x; then
28318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28320            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28321$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28322            BOOT_JDK_FOUND=no
28323          else
28324            # We're done! :-)
28325            BOOT_JDK_FOUND=yes
28326
28327  # Only process if variable expands to non-empty
28328
28329  if test "x$BOOT_JDK" != x; then
28330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28331
28332  # Input might be given as Windows format, start by converting to
28333  # unix format.
28334  path="$BOOT_JDK"
28335  new_path=`$CYGPATH -u "$path"`
28336
28337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28340  # "foo.exe" is OK but "foo" is an error.
28341  #
28342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28343  # It is also a way to make sure we got the proper file name for the real test later on.
28344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28345  if test "x$test_shortpath" = x; then
28346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28348    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28349  fi
28350
28351  # Call helper function which possibly converts this using DOS-style short mode.
28352  # If so, the updated path is stored in $new_path.
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28365      # Going to short mode and back again did indeed matter. Since short mode is
28366      # case insensitive, let's make it lowercase to improve readability.
28367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28368      # Now convert it back to Unix-style (cygpath)
28369      input_path=`$CYGPATH -u "$shortmode_path"`
28370      new_path="$input_path"
28371    fi
28372  fi
28373
28374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28375  if test "x$test_cygdrive_prefix" = x; then
28376    # As a simple fix, exclude /usr/bin since it's not a real path.
28377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28379      # a path prefixed by /cygdrive for fixpath to work.
28380      new_path="$CYGWIN_ROOT_PATH$input_path"
28381    fi
28382  fi
28383
28384
28385  if test "x$path" != "x$new_path"; then
28386    BOOT_JDK="$new_path"
28387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28389  fi
28390
28391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28392
28393  path="$BOOT_JDK"
28394  has_colon=`$ECHO $path | $GREP ^.:`
28395  new_path="$path"
28396  if test "x$has_colon" = x; then
28397    # Not in mixed or Windows style, start by that.
28398    new_path=`cmd //c echo $path`
28399  fi
28400
28401
28402  input_path="$new_path"
28403  # Check if we need to convert this using DOS-style short mode. If the path
28404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28405  # take no chances and rewrite it.
28406  # Note: m4 eats our [], so we need to use [ and ] instead.
28407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28408  if test "x$has_forbidden_chars" != x; then
28409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28411  fi
28412
28413
28414  windows_path="$new_path"
28415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416    unix_path=`$CYGPATH -u "$windows_path"`
28417    new_path="$unix_path"
28418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28420    new_path="$unix_path"
28421  fi
28422
28423  if test "x$path" != "x$new_path"; then
28424    BOOT_JDK="$new_path"
28425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28427  fi
28428
28429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28431
28432    else
28433      # We're on a unix platform. Hooray! :)
28434      path="$BOOT_JDK"
28435      has_space=`$ECHO "$path" | $GREP " "`
28436      if test "x$has_space" != x; then
28437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28440      fi
28441
28442      # Use eval to expand a potential ~
28443      eval path="$path"
28444      if test ! -f "$path" && test ! -d "$path"; then
28445        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28446      fi
28447
28448      if test -d "$path"; then
28449        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28450      else
28451        dir="`$DIRNAME "$path"`"
28452        base="`$BASENAME "$path"`"
28453        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28454      fi
28455    fi
28456  fi
28457
28458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28459$as_echo_n "checking for Boot JDK... " >&6; }
28460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28461$as_echo "$BOOT_JDK" >&6; }
28462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28463$as_echo_n "checking Boot JDK version... " >&6; }
28464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28466$as_echo "$BOOT_JDK_VERSION" >&6; }
28467          fi # end check jdk version
28468        fi # end check javac
28469      fi # end check java
28470    fi # end check boot jdk found
28471  fi
28472
28473    done
28474  fi
28475
28476  fi
28477
28478
28479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28481      # Do we have a bin/java?
28482      if test ! -x "$BOOT_JDK/bin/java"; then
28483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28485        BOOT_JDK_FOUND=no
28486      else
28487        # Do we have a bin/javac?
28488        if test ! -x "$BOOT_JDK/bin/javac"; then
28489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28493          BOOT_JDK_FOUND=no
28494        else
28495          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28496          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28497
28498          # Extra M4 quote needed to protect [] in grep expression.
28499          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28500          if test "x$FOUND_CORRECT_VERSION" = x; then
28501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28503            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28504$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28505            BOOT_JDK_FOUND=no
28506          else
28507            # We're done! :-)
28508            BOOT_JDK_FOUND=yes
28509
28510  # Only process if variable expands to non-empty
28511
28512  if test "x$BOOT_JDK" != x; then
28513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28514
28515  # Input might be given as Windows format, start by converting to
28516  # unix format.
28517  path="$BOOT_JDK"
28518  new_path=`$CYGPATH -u "$path"`
28519
28520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28523  # "foo.exe" is OK but "foo" is an error.
28524  #
28525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28526  # It is also a way to make sure we got the proper file name for the real test later on.
28527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28528  if test "x$test_shortpath" = x; then
28529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28531    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28532  fi
28533
28534  # Call helper function which possibly converts this using DOS-style short mode.
28535  # If so, the updated path is stored in $new_path.
28536
28537  input_path="$new_path"
28538  # Check if we need to convert this using DOS-style short mode. If the path
28539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28540  # take no chances and rewrite it.
28541  # Note: m4 eats our [], so we need to use [ and ] instead.
28542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28543  if test "x$has_forbidden_chars" != x; then
28544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28548      # Going to short mode and back again did indeed matter. Since short mode is
28549      # case insensitive, let's make it lowercase to improve readability.
28550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28551      # Now convert it back to Unix-style (cygpath)
28552      input_path=`$CYGPATH -u "$shortmode_path"`
28553      new_path="$input_path"
28554    fi
28555  fi
28556
28557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28558  if test "x$test_cygdrive_prefix" = x; then
28559    # As a simple fix, exclude /usr/bin since it's not a real path.
28560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28562      # a path prefixed by /cygdrive for fixpath to work.
28563      new_path="$CYGWIN_ROOT_PATH$input_path"
28564    fi
28565  fi
28566
28567
28568  if test "x$path" != "x$new_path"; then
28569    BOOT_JDK="$new_path"
28570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28572  fi
28573
28574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28575
28576  path="$BOOT_JDK"
28577  has_colon=`$ECHO $path | $GREP ^.:`
28578  new_path="$path"
28579  if test "x$has_colon" = x; then
28580    # Not in mixed or Windows style, start by that.
28581    new_path=`cmd //c echo $path`
28582  fi
28583
28584
28585  input_path="$new_path"
28586  # Check if we need to convert this using DOS-style short mode. If the path
28587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28588  # take no chances and rewrite it.
28589  # Note: m4 eats our [], so we need to use [ and ] instead.
28590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28591  if test "x$has_forbidden_chars" != x; then
28592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28594  fi
28595
28596
28597  windows_path="$new_path"
28598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28599    unix_path=`$CYGPATH -u "$windows_path"`
28600    new_path="$unix_path"
28601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28603    new_path="$unix_path"
28604  fi
28605
28606  if test "x$path" != "x$new_path"; then
28607    BOOT_JDK="$new_path"
28608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28610  fi
28611
28612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28614
28615    else
28616      # We're on a unix platform. Hooray! :)
28617      path="$BOOT_JDK"
28618      has_space=`$ECHO "$path" | $GREP " "`
28619      if test "x$has_space" != x; then
28620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28622        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28623      fi
28624
28625      # Use eval to expand a potential ~
28626      eval path="$path"
28627      if test ! -f "$path" && test ! -d "$path"; then
28628        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28629      fi
28630
28631      if test -d "$path"; then
28632        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28633      else
28634        dir="`$DIRNAME "$path"`"
28635        base="`$BASENAME "$path"`"
28636        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28637      fi
28638    fi
28639  fi
28640
28641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28642$as_echo_n "checking for Boot JDK... " >&6; }
28643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28644$as_echo "$BOOT_JDK" >&6; }
28645            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28646$as_echo_n "checking Boot JDK version... " >&6; }
28647            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28649$as_echo "$BOOT_JDK_VERSION" >&6; }
28650          fi # end check jdk version
28651        fi # end check javac
28652      fi # end check java
28653    fi # end check boot jdk found
28654  fi
28655
28656
28657  if test "x$BOOT_JDK_FOUND" = xno; then
28658    # Now execute the test
28659
28660  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28661  BOOT_JDK_SUFFIX=""
28662  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28663  if test "x$ALL_JDKS_FOUND" != x; then
28664    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28665
28666  if test "x$BOOT_JDK_FOUND" = xno; then
28667    # Now execute the test
28668
28669        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28670        if test -d "$BOOT_JDK"; then
28671          BOOT_JDK_FOUND=maybe
28672          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28673$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28674        fi
28675
28676
28677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28679      # Do we have a bin/java?
28680      if test ! -x "$BOOT_JDK/bin/java"; then
28681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28683        BOOT_JDK_FOUND=no
28684      else
28685        # Do we have a bin/javac?
28686        if test ! -x "$BOOT_JDK/bin/javac"; then
28687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28691          BOOT_JDK_FOUND=no
28692        else
28693          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28694          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28695
28696          # Extra M4 quote needed to protect [] in grep expression.
28697          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28698          if test "x$FOUND_CORRECT_VERSION" = x; then
28699            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28701            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28702$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28703            BOOT_JDK_FOUND=no
28704          else
28705            # We're done! :-)
28706            BOOT_JDK_FOUND=yes
28707
28708  # Only process if variable expands to non-empty
28709
28710  if test "x$BOOT_JDK" != x; then
28711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28712
28713  # Input might be given as Windows format, start by converting to
28714  # unix format.
28715  path="$BOOT_JDK"
28716  new_path=`$CYGPATH -u "$path"`
28717
28718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28721  # "foo.exe" is OK but "foo" is an error.
28722  #
28723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28724  # It is also a way to make sure we got the proper file name for the real test later on.
28725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28726  if test "x$test_shortpath" = x; then
28727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28730  fi
28731
28732  # Call helper function which possibly converts this using DOS-style short mode.
28733  # If so, the updated path is stored in $new_path.
28734
28735  input_path="$new_path"
28736  # Check if we need to convert this using DOS-style short mode. If the path
28737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28738  # take no chances and rewrite it.
28739  # Note: m4 eats our [], so we need to use [ and ] instead.
28740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28741  if test "x$has_forbidden_chars" != x; then
28742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28746      # Going to short mode and back again did indeed matter. Since short mode is
28747      # case insensitive, let's make it lowercase to improve readability.
28748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28749      # Now convert it back to Unix-style (cygpath)
28750      input_path=`$CYGPATH -u "$shortmode_path"`
28751      new_path="$input_path"
28752    fi
28753  fi
28754
28755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28756  if test "x$test_cygdrive_prefix" = x; then
28757    # As a simple fix, exclude /usr/bin since it's not a real path.
28758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28760      # a path prefixed by /cygdrive for fixpath to work.
28761      new_path="$CYGWIN_ROOT_PATH$input_path"
28762    fi
28763  fi
28764
28765
28766  if test "x$path" != "x$new_path"; then
28767    BOOT_JDK="$new_path"
28768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28770  fi
28771
28772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28773
28774  path="$BOOT_JDK"
28775  has_colon=`$ECHO $path | $GREP ^.:`
28776  new_path="$path"
28777  if test "x$has_colon" = x; then
28778    # Not in mixed or Windows style, start by that.
28779    new_path=`cmd //c echo $path`
28780  fi
28781
28782
28783  input_path="$new_path"
28784  # Check if we need to convert this using DOS-style short mode. If the path
28785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28786  # take no chances and rewrite it.
28787  # Note: m4 eats our [], so we need to use [ and ] instead.
28788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28789  if test "x$has_forbidden_chars" != x; then
28790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28792  fi
28793
28794
28795  windows_path="$new_path"
28796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28797    unix_path=`$CYGPATH -u "$windows_path"`
28798    new_path="$unix_path"
28799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28801    new_path="$unix_path"
28802  fi
28803
28804  if test "x$path" != "x$new_path"; then
28805    BOOT_JDK="$new_path"
28806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28808  fi
28809
28810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28812
28813    else
28814      # We're on a unix platform. Hooray! :)
28815      path="$BOOT_JDK"
28816      has_space=`$ECHO "$path" | $GREP " "`
28817      if test "x$has_space" != x; then
28818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28821      fi
28822
28823      # Use eval to expand a potential ~
28824      eval path="$path"
28825      if test ! -f "$path" && test ! -d "$path"; then
28826        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28827      fi
28828
28829      if test -d "$path"; then
28830        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28831      else
28832        dir="`$DIRNAME "$path"`"
28833        base="`$BASENAME "$path"`"
28834        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28835      fi
28836    fi
28837  fi
28838
28839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28840$as_echo_n "checking for Boot JDK... " >&6; }
28841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28842$as_echo "$BOOT_JDK" >&6; }
28843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28844$as_echo_n "checking Boot JDK version... " >&6; }
28845            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28847$as_echo "$BOOT_JDK_VERSION" >&6; }
28848          fi # end check jdk version
28849        fi # end check javac
28850      fi # end check java
28851    fi # end check boot jdk found
28852  fi
28853
28854    done
28855  fi
28856
28857
28858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28860      # Do we have a bin/java?
28861      if test ! -x "$BOOT_JDK/bin/java"; then
28862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28864        BOOT_JDK_FOUND=no
28865      else
28866        # Do we have a bin/javac?
28867        if test ! -x "$BOOT_JDK/bin/javac"; then
28868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28872          BOOT_JDK_FOUND=no
28873        else
28874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28876
28877          # Extra M4 quote needed to protect [] in grep expression.
28878          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28879          if test "x$FOUND_CORRECT_VERSION" = x; then
28880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28884            BOOT_JDK_FOUND=no
28885          else
28886            # We're done! :-)
28887            BOOT_JDK_FOUND=yes
28888
28889  # Only process if variable expands to non-empty
28890
28891  if test "x$BOOT_JDK" != x; then
28892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28893
28894  # Input might be given as Windows format, start by converting to
28895  # unix format.
28896  path="$BOOT_JDK"
28897  new_path=`$CYGPATH -u "$path"`
28898
28899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28902  # "foo.exe" is OK but "foo" is an error.
28903  #
28904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28905  # It is also a way to make sure we got the proper file name for the real test later on.
28906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28907  if test "x$test_shortpath" = x; then
28908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28911  fi
28912
28913  # Call helper function which possibly converts this using DOS-style short mode.
28914  # If so, the updated path is stored in $new_path.
28915
28916  input_path="$new_path"
28917  # Check if we need to convert this using DOS-style short mode. If the path
28918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28919  # take no chances and rewrite it.
28920  # Note: m4 eats our [], so we need to use [ and ] instead.
28921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28922  if test "x$has_forbidden_chars" != x; then
28923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28927      # Going to short mode and back again did indeed matter. Since short mode is
28928      # case insensitive, let's make it lowercase to improve readability.
28929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28930      # Now convert it back to Unix-style (cygpath)
28931      input_path=`$CYGPATH -u "$shortmode_path"`
28932      new_path="$input_path"
28933    fi
28934  fi
28935
28936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28937  if test "x$test_cygdrive_prefix" = x; then
28938    # As a simple fix, exclude /usr/bin since it's not a real path.
28939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28941      # a path prefixed by /cygdrive for fixpath to work.
28942      new_path="$CYGWIN_ROOT_PATH$input_path"
28943    fi
28944  fi
28945
28946
28947  if test "x$path" != "x$new_path"; then
28948    BOOT_JDK="$new_path"
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28951  fi
28952
28953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28954
28955  path="$BOOT_JDK"
28956  has_colon=`$ECHO $path | $GREP ^.:`
28957  new_path="$path"
28958  if test "x$has_colon" = x; then
28959    # Not in mixed or Windows style, start by that.
28960    new_path=`cmd //c echo $path`
28961  fi
28962
28963
28964  input_path="$new_path"
28965  # Check if we need to convert this using DOS-style short mode. If the path
28966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28967  # take no chances and rewrite it.
28968  # Note: m4 eats our [], so we need to use [ and ] instead.
28969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28970  if test "x$has_forbidden_chars" != x; then
28971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28973  fi
28974
28975
28976  windows_path="$new_path"
28977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28978    unix_path=`$CYGPATH -u "$windows_path"`
28979    new_path="$unix_path"
28980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28982    new_path="$unix_path"
28983  fi
28984
28985  if test "x$path" != "x$new_path"; then
28986    BOOT_JDK="$new_path"
28987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28989  fi
28990
28991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28993
28994    else
28995      # We're on a unix platform. Hooray! :)
28996      path="$BOOT_JDK"
28997      has_space=`$ECHO "$path" | $GREP " "`
28998      if test "x$has_space" != x; then
28999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29002      fi
29003
29004      # Use eval to expand a potential ~
29005      eval path="$path"
29006      if test ! -f "$path" && test ! -d "$path"; then
29007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29008      fi
29009
29010      if test -d "$path"; then
29011        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29012      else
29013        dir="`$DIRNAME "$path"`"
29014        base="`$BASENAME "$path"`"
29015        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29016      fi
29017    fi
29018  fi
29019
29020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29021$as_echo_n "checking for Boot JDK... " >&6; }
29022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29023$as_echo "$BOOT_JDK" >&6; }
29024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29025$as_echo_n "checking Boot JDK version... " >&6; }
29026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29028$as_echo "$BOOT_JDK_VERSION" >&6; }
29029          fi # end check jdk version
29030        fi # end check javac
29031      fi # end check java
29032    fi # end check boot jdk found
29033  fi
29034
29035  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29036
29037  if test "x$BOOT_JDK_FOUND" = xno; then
29038    # Now execute the test
29039
29040  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29041  BOOT_JDK_SUFFIX="/Contents/Home"
29042  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29043  if test "x$ALL_JDKS_FOUND" != x; then
29044    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29045
29046  if test "x$BOOT_JDK_FOUND" = xno; then
29047    # Now execute the test
29048
29049        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29050        if test -d "$BOOT_JDK"; then
29051          BOOT_JDK_FOUND=maybe
29052          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29053$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29054        fi
29055
29056
29057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29059      # Do we have a bin/java?
29060      if test ! -x "$BOOT_JDK/bin/java"; then
29061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29063        BOOT_JDK_FOUND=no
29064      else
29065        # Do we have a bin/javac?
29066        if test ! -x "$BOOT_JDK/bin/javac"; then
29067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29071          BOOT_JDK_FOUND=no
29072        else
29073          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29074          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29075
29076          # Extra M4 quote needed to protect [] in grep expression.
29077          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29078          if test "x$FOUND_CORRECT_VERSION" = x; then
29079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29081            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29082$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29083            BOOT_JDK_FOUND=no
29084          else
29085            # We're done! :-)
29086            BOOT_JDK_FOUND=yes
29087
29088  # Only process if variable expands to non-empty
29089
29090  if test "x$BOOT_JDK" != x; then
29091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29092
29093  # Input might be given as Windows format, start by converting to
29094  # unix format.
29095  path="$BOOT_JDK"
29096  new_path=`$CYGPATH -u "$path"`
29097
29098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29101  # "foo.exe" is OK but "foo" is an error.
29102  #
29103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29104  # It is also a way to make sure we got the proper file name for the real test later on.
29105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29106  if test "x$test_shortpath" = x; then
29107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29109    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29110  fi
29111
29112  # Call helper function which possibly converts this using DOS-style short mode.
29113  # If so, the updated path is stored in $new_path.
29114
29115  input_path="$new_path"
29116  # Check if we need to convert this using DOS-style short mode. If the path
29117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29118  # take no chances and rewrite it.
29119  # Note: m4 eats our [], so we need to use [ and ] instead.
29120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29121  if test "x$has_forbidden_chars" != x; then
29122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29126      # Going to short mode and back again did indeed matter. Since short mode is
29127      # case insensitive, let's make it lowercase to improve readability.
29128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29129      # Now convert it back to Unix-style (cygpath)
29130      input_path=`$CYGPATH -u "$shortmode_path"`
29131      new_path="$input_path"
29132    fi
29133  fi
29134
29135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29136  if test "x$test_cygdrive_prefix" = x; then
29137    # As a simple fix, exclude /usr/bin since it's not a real path.
29138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29140      # a path prefixed by /cygdrive for fixpath to work.
29141      new_path="$CYGWIN_ROOT_PATH$input_path"
29142    fi
29143  fi
29144
29145
29146  if test "x$path" != "x$new_path"; then
29147    BOOT_JDK="$new_path"
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29150  fi
29151
29152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29153
29154  path="$BOOT_JDK"
29155  has_colon=`$ECHO $path | $GREP ^.:`
29156  new_path="$path"
29157  if test "x$has_colon" = x; then
29158    # Not in mixed or Windows style, start by that.
29159    new_path=`cmd //c echo $path`
29160  fi
29161
29162
29163  input_path="$new_path"
29164  # Check if we need to convert this using DOS-style short mode. If the path
29165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29166  # take no chances and rewrite it.
29167  # Note: m4 eats our [], so we need to use [ and ] instead.
29168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29169  if test "x$has_forbidden_chars" != x; then
29170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29172  fi
29173
29174
29175  windows_path="$new_path"
29176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29177    unix_path=`$CYGPATH -u "$windows_path"`
29178    new_path="$unix_path"
29179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29181    new_path="$unix_path"
29182  fi
29183
29184  if test "x$path" != "x$new_path"; then
29185    BOOT_JDK="$new_path"
29186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29187$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29188  fi
29189
29190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29192
29193    else
29194      # We're on a unix platform. Hooray! :)
29195      path="$BOOT_JDK"
29196      has_space=`$ECHO "$path" | $GREP " "`
29197      if test "x$has_space" != x; then
29198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29201      fi
29202
29203      # Use eval to expand a potential ~
29204      eval path="$path"
29205      if test ! -f "$path" && test ! -d "$path"; then
29206        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29207      fi
29208
29209      if test -d "$path"; then
29210        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29211      else
29212        dir="`$DIRNAME "$path"`"
29213        base="`$BASENAME "$path"`"
29214        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29215      fi
29216    fi
29217  fi
29218
29219            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29220$as_echo_n "checking for Boot JDK... " >&6; }
29221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29222$as_echo "$BOOT_JDK" >&6; }
29223            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29224$as_echo_n "checking Boot JDK version... " >&6; }
29225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29227$as_echo "$BOOT_JDK_VERSION" >&6; }
29228          fi # end check jdk version
29229        fi # end check javac
29230      fi # end check java
29231    fi # end check boot jdk found
29232  fi
29233
29234    done
29235  fi
29236
29237
29238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29240      # Do we have a bin/java?
29241      if test ! -x "$BOOT_JDK/bin/java"; then
29242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29244        BOOT_JDK_FOUND=no
29245      else
29246        # Do we have a bin/javac?
29247        if test ! -x "$BOOT_JDK/bin/javac"; then
29248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29252          BOOT_JDK_FOUND=no
29253        else
29254          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29255          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29256
29257          # Extra M4 quote needed to protect [] in grep expression.
29258          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29259          if test "x$FOUND_CORRECT_VERSION" = x; then
29260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29262            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29263$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29264            BOOT_JDK_FOUND=no
29265          else
29266            # We're done! :-)
29267            BOOT_JDK_FOUND=yes
29268
29269  # Only process if variable expands to non-empty
29270
29271  if test "x$BOOT_JDK" != x; then
29272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29273
29274  # Input might be given as Windows format, start by converting to
29275  # unix format.
29276  path="$BOOT_JDK"
29277  new_path=`$CYGPATH -u "$path"`
29278
29279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29282  # "foo.exe" is OK but "foo" is an error.
29283  #
29284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29285  # It is also a way to make sure we got the proper file name for the real test later on.
29286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29287  if test "x$test_shortpath" = x; then
29288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29291  fi
29292
29293  # Call helper function which possibly converts this using DOS-style short mode.
29294  # If so, the updated path is stored in $new_path.
29295
29296  input_path="$new_path"
29297  # Check if we need to convert this using DOS-style short mode. If the path
29298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29299  # take no chances and rewrite it.
29300  # Note: m4 eats our [], so we need to use [ and ] instead.
29301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29302  if test "x$has_forbidden_chars" != x; then
29303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29307      # Going to short mode and back again did indeed matter. Since short mode is
29308      # case insensitive, let's make it lowercase to improve readability.
29309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29310      # Now convert it back to Unix-style (cygpath)
29311      input_path=`$CYGPATH -u "$shortmode_path"`
29312      new_path="$input_path"
29313    fi
29314  fi
29315
29316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29317  if test "x$test_cygdrive_prefix" = x; then
29318    # As a simple fix, exclude /usr/bin since it's not a real path.
29319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29321      # a path prefixed by /cygdrive for fixpath to work.
29322      new_path="$CYGWIN_ROOT_PATH$input_path"
29323    fi
29324  fi
29325
29326
29327  if test "x$path" != "x$new_path"; then
29328    BOOT_JDK="$new_path"
29329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29331  fi
29332
29333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29334
29335  path="$BOOT_JDK"
29336  has_colon=`$ECHO $path | $GREP ^.:`
29337  new_path="$path"
29338  if test "x$has_colon" = x; then
29339    # Not in mixed or Windows style, start by that.
29340    new_path=`cmd //c echo $path`
29341  fi
29342
29343
29344  input_path="$new_path"
29345  # Check if we need to convert this using DOS-style short mode. If the path
29346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29347  # take no chances and rewrite it.
29348  # Note: m4 eats our [], so we need to use [ and ] instead.
29349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29350  if test "x$has_forbidden_chars" != x; then
29351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29353  fi
29354
29355
29356  windows_path="$new_path"
29357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29358    unix_path=`$CYGPATH -u "$windows_path"`
29359    new_path="$unix_path"
29360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29362    new_path="$unix_path"
29363  fi
29364
29365  if test "x$path" != "x$new_path"; then
29366    BOOT_JDK="$new_path"
29367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29369  fi
29370
29371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29373
29374    else
29375      # We're on a unix platform. Hooray! :)
29376      path="$BOOT_JDK"
29377      has_space=`$ECHO "$path" | $GREP " "`
29378      if test "x$has_space" != x; then
29379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29382      fi
29383
29384      # Use eval to expand a potential ~
29385      eval path="$path"
29386      if test ! -f "$path" && test ! -d "$path"; then
29387        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29388      fi
29389
29390      if test -d "$path"; then
29391        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29392      else
29393        dir="`$DIRNAME "$path"`"
29394        base="`$BASENAME "$path"`"
29395        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29396      fi
29397    fi
29398  fi
29399
29400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29401$as_echo_n "checking for Boot JDK... " >&6; }
29402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29403$as_echo "$BOOT_JDK" >&6; }
29404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29405$as_echo_n "checking Boot JDK version... " >&6; }
29406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29408$as_echo "$BOOT_JDK_VERSION" >&6; }
29409          fi # end check jdk version
29410        fi # end check javac
29411      fi # end check java
29412    fi # end check boot jdk found
29413  fi
29414
29415
29416  if test "x$BOOT_JDK_FOUND" = xno; then
29417    # Now execute the test
29418
29419  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29420  BOOT_JDK_SUFFIX="/Contents/Home"
29421  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29422  if test "x$ALL_JDKS_FOUND" != x; then
29423    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29424
29425  if test "x$BOOT_JDK_FOUND" = xno; then
29426    # Now execute the test
29427
29428        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29429        if test -d "$BOOT_JDK"; then
29430          BOOT_JDK_FOUND=maybe
29431          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29432$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29433        fi
29434
29435
29436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29438      # Do we have a bin/java?
29439      if test ! -x "$BOOT_JDK/bin/java"; then
29440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29442        BOOT_JDK_FOUND=no
29443      else
29444        # Do we have a bin/javac?
29445        if test ! -x "$BOOT_JDK/bin/javac"; then
29446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29450          BOOT_JDK_FOUND=no
29451        else
29452          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29453          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29454
29455          # Extra M4 quote needed to protect [] in grep expression.
29456          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29457          if test "x$FOUND_CORRECT_VERSION" = x; then
29458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29460            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29461$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29462            BOOT_JDK_FOUND=no
29463          else
29464            # We're done! :-)
29465            BOOT_JDK_FOUND=yes
29466
29467  # Only process if variable expands to non-empty
29468
29469  if test "x$BOOT_JDK" != x; then
29470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29471
29472  # Input might be given as Windows format, start by converting to
29473  # unix format.
29474  path="$BOOT_JDK"
29475  new_path=`$CYGPATH -u "$path"`
29476
29477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29480  # "foo.exe" is OK but "foo" is an error.
29481  #
29482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29483  # It is also a way to make sure we got the proper file name for the real test later on.
29484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29485  if test "x$test_shortpath" = x; then
29486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29489  fi
29490
29491  # Call helper function which possibly converts this using DOS-style short mode.
29492  # If so, the updated path is stored in $new_path.
29493
29494  input_path="$new_path"
29495  # Check if we need to convert this using DOS-style short mode. If the path
29496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29497  # take no chances and rewrite it.
29498  # Note: m4 eats our [], so we need to use [ and ] instead.
29499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29500  if test "x$has_forbidden_chars" != x; then
29501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29505      # Going to short mode and back again did indeed matter. Since short mode is
29506      # case insensitive, let's make it lowercase to improve readability.
29507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29508      # Now convert it back to Unix-style (cygpath)
29509      input_path=`$CYGPATH -u "$shortmode_path"`
29510      new_path="$input_path"
29511    fi
29512  fi
29513
29514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29515  if test "x$test_cygdrive_prefix" = x; then
29516    # As a simple fix, exclude /usr/bin since it's not a real path.
29517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29519      # a path prefixed by /cygdrive for fixpath to work.
29520      new_path="$CYGWIN_ROOT_PATH$input_path"
29521    fi
29522  fi
29523
29524
29525  if test "x$path" != "x$new_path"; then
29526    BOOT_JDK="$new_path"
29527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29529  fi
29530
29531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29532
29533  path="$BOOT_JDK"
29534  has_colon=`$ECHO $path | $GREP ^.:`
29535  new_path="$path"
29536  if test "x$has_colon" = x; then
29537    # Not in mixed or Windows style, start by that.
29538    new_path=`cmd //c echo $path`
29539  fi
29540
29541
29542  input_path="$new_path"
29543  # Check if we need to convert this using DOS-style short mode. If the path
29544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29545  # take no chances and rewrite it.
29546  # Note: m4 eats our [], so we need to use [ and ] instead.
29547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29548  if test "x$has_forbidden_chars" != x; then
29549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29551  fi
29552
29553
29554  windows_path="$new_path"
29555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29556    unix_path=`$CYGPATH -u "$windows_path"`
29557    new_path="$unix_path"
29558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29560    new_path="$unix_path"
29561  fi
29562
29563  if test "x$path" != "x$new_path"; then
29564    BOOT_JDK="$new_path"
29565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29567  fi
29568
29569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29571
29572    else
29573      # We're on a unix platform. Hooray! :)
29574      path="$BOOT_JDK"
29575      has_space=`$ECHO "$path" | $GREP " "`
29576      if test "x$has_space" != x; then
29577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29580      fi
29581
29582      # Use eval to expand a potential ~
29583      eval path="$path"
29584      if test ! -f "$path" && test ! -d "$path"; then
29585        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29586      fi
29587
29588      if test -d "$path"; then
29589        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29590      else
29591        dir="`$DIRNAME "$path"`"
29592        base="`$BASENAME "$path"`"
29593        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29594      fi
29595    fi
29596  fi
29597
29598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29599$as_echo_n "checking for Boot JDK... " >&6; }
29600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29601$as_echo "$BOOT_JDK" >&6; }
29602            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29603$as_echo_n "checking Boot JDK version... " >&6; }
29604            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29606$as_echo "$BOOT_JDK_VERSION" >&6; }
29607          fi # end check jdk version
29608        fi # end check javac
29609      fi # end check java
29610    fi # end check boot jdk found
29611  fi
29612
29613    done
29614  fi
29615
29616
29617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29619      # Do we have a bin/java?
29620      if test ! -x "$BOOT_JDK/bin/java"; then
29621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29623        BOOT_JDK_FOUND=no
29624      else
29625        # Do we have a bin/javac?
29626        if test ! -x "$BOOT_JDK/bin/javac"; then
29627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29631          BOOT_JDK_FOUND=no
29632        else
29633          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29634          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29635
29636          # Extra M4 quote needed to protect [] in grep expression.
29637          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29638          if test "x$FOUND_CORRECT_VERSION" = x; then
29639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29641            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29642$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29643            BOOT_JDK_FOUND=no
29644          else
29645            # We're done! :-)
29646            BOOT_JDK_FOUND=yes
29647
29648  # Only process if variable expands to non-empty
29649
29650  if test "x$BOOT_JDK" != x; then
29651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29652
29653  # Input might be given as Windows format, start by converting to
29654  # unix format.
29655  path="$BOOT_JDK"
29656  new_path=`$CYGPATH -u "$path"`
29657
29658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29661  # "foo.exe" is OK but "foo" is an error.
29662  #
29663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29664  # It is also a way to make sure we got the proper file name for the real test later on.
29665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29666  if test "x$test_shortpath" = x; then
29667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29670  fi
29671
29672  # Call helper function which possibly converts this using DOS-style short mode.
29673  # If so, the updated path is stored in $new_path.
29674
29675  input_path="$new_path"
29676  # Check if we need to convert this using DOS-style short mode. If the path
29677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29678  # take no chances and rewrite it.
29679  # Note: m4 eats our [], so we need to use [ and ] instead.
29680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29681  if test "x$has_forbidden_chars" != x; then
29682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29686      # Going to short mode and back again did indeed matter. Since short mode is
29687      # case insensitive, let's make it lowercase to improve readability.
29688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29689      # Now convert it back to Unix-style (cygpath)
29690      input_path=`$CYGPATH -u "$shortmode_path"`
29691      new_path="$input_path"
29692    fi
29693  fi
29694
29695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29696  if test "x$test_cygdrive_prefix" = x; then
29697    # As a simple fix, exclude /usr/bin since it's not a real path.
29698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29700      # a path prefixed by /cygdrive for fixpath to work.
29701      new_path="$CYGWIN_ROOT_PATH$input_path"
29702    fi
29703  fi
29704
29705
29706  if test "x$path" != "x$new_path"; then
29707    BOOT_JDK="$new_path"
29708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29710  fi
29711
29712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29713
29714  path="$BOOT_JDK"
29715  has_colon=`$ECHO $path | $GREP ^.:`
29716  new_path="$path"
29717  if test "x$has_colon" = x; then
29718    # Not in mixed or Windows style, start by that.
29719    new_path=`cmd //c echo $path`
29720  fi
29721
29722
29723  input_path="$new_path"
29724  # Check if we need to convert this using DOS-style short mode. If the path
29725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29726  # take no chances and rewrite it.
29727  # Note: m4 eats our [], so we need to use [ and ] instead.
29728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29729  if test "x$has_forbidden_chars" != x; then
29730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29732  fi
29733
29734
29735  windows_path="$new_path"
29736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29737    unix_path=`$CYGPATH -u "$windows_path"`
29738    new_path="$unix_path"
29739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29741    new_path="$unix_path"
29742  fi
29743
29744  if test "x$path" != "x$new_path"; then
29745    BOOT_JDK="$new_path"
29746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29748  fi
29749
29750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29752
29753    else
29754      # We're on a unix platform. Hooray! :)
29755      path="$BOOT_JDK"
29756      has_space=`$ECHO "$path" | $GREP " "`
29757      if test "x$has_space" != x; then
29758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29761      fi
29762
29763      # Use eval to expand a potential ~
29764      eval path="$path"
29765      if test ! -f "$path" && test ! -d "$path"; then
29766        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29767      fi
29768
29769      if test -d "$path"; then
29770        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29771      else
29772        dir="`$DIRNAME "$path"`"
29773        base="`$BASENAME "$path"`"
29774        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29775      fi
29776    fi
29777  fi
29778
29779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29780$as_echo_n "checking for Boot JDK... " >&6; }
29781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29782$as_echo "$BOOT_JDK" >&6; }
29783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29784$as_echo_n "checking Boot JDK version... " >&6; }
29785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29787$as_echo "$BOOT_JDK_VERSION" >&6; }
29788          fi # end check jdk version
29789        fi # end check javac
29790      fi # end check java
29791    fi # end check boot jdk found
29792  fi
29793
29794  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29795
29796  if test "x$BOOT_JDK_FOUND" = xno; then
29797    # Now execute the test
29798
29799  BOOT_JDK_PREFIX="/usr/lib/jvm"
29800  BOOT_JDK_SUFFIX=""
29801  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29802  if test "x$ALL_JDKS_FOUND" != x; then
29803    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29804
29805  if test "x$BOOT_JDK_FOUND" = xno; then
29806    # Now execute the test
29807
29808        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29809        if test -d "$BOOT_JDK"; then
29810          BOOT_JDK_FOUND=maybe
29811          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29812$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29813        fi
29814
29815
29816    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29817    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29818      # Do we have a bin/java?
29819      if test ! -x "$BOOT_JDK/bin/java"; then
29820        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29822        BOOT_JDK_FOUND=no
29823      else
29824        # Do we have a bin/javac?
29825        if test ! -x "$BOOT_JDK/bin/javac"; then
29826          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29828          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29829$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29830          BOOT_JDK_FOUND=no
29831        else
29832          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29833          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29834
29835          # Extra M4 quote needed to protect [] in grep expression.
29836          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29837          if test "x$FOUND_CORRECT_VERSION" = x; then
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29841$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29842            BOOT_JDK_FOUND=no
29843          else
29844            # We're done! :-)
29845            BOOT_JDK_FOUND=yes
29846
29847  # Only process if variable expands to non-empty
29848
29849  if test "x$BOOT_JDK" != x; then
29850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29851
29852  # Input might be given as Windows format, start by converting to
29853  # unix format.
29854  path="$BOOT_JDK"
29855  new_path=`$CYGPATH -u "$path"`
29856
29857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29860  # "foo.exe" is OK but "foo" is an error.
29861  #
29862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29863  # It is also a way to make sure we got the proper file name for the real test later on.
29864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29865  if test "x$test_shortpath" = x; then
29866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29868    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29869  fi
29870
29871  # Call helper function which possibly converts this using DOS-style short mode.
29872  # If so, the updated path is stored in $new_path.
29873
29874  input_path="$new_path"
29875  # Check if we need to convert this using DOS-style short mode. If the path
29876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29877  # take no chances and rewrite it.
29878  # Note: m4 eats our [], so we need to use [ and ] instead.
29879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29880  if test "x$has_forbidden_chars" != x; then
29881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29885      # Going to short mode and back again did indeed matter. Since short mode is
29886      # case insensitive, let's make it lowercase to improve readability.
29887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29888      # Now convert it back to Unix-style (cygpath)
29889      input_path=`$CYGPATH -u "$shortmode_path"`
29890      new_path="$input_path"
29891    fi
29892  fi
29893
29894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29895  if test "x$test_cygdrive_prefix" = x; then
29896    # As a simple fix, exclude /usr/bin since it's not a real path.
29897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29899      # a path prefixed by /cygdrive for fixpath to work.
29900      new_path="$CYGWIN_ROOT_PATH$input_path"
29901    fi
29902  fi
29903
29904
29905  if test "x$path" != "x$new_path"; then
29906    BOOT_JDK="$new_path"
29907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29909  fi
29910
29911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29912
29913  path="$BOOT_JDK"
29914  has_colon=`$ECHO $path | $GREP ^.:`
29915  new_path="$path"
29916  if test "x$has_colon" = x; then
29917    # Not in mixed or Windows style, start by that.
29918    new_path=`cmd //c echo $path`
29919  fi
29920
29921
29922  input_path="$new_path"
29923  # Check if we need to convert this using DOS-style short mode. If the path
29924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29925  # take no chances and rewrite it.
29926  # Note: m4 eats our [], so we need to use [ and ] instead.
29927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29928  if test "x$has_forbidden_chars" != x; then
29929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29931  fi
29932
29933
29934  windows_path="$new_path"
29935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29936    unix_path=`$CYGPATH -u "$windows_path"`
29937    new_path="$unix_path"
29938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29940    new_path="$unix_path"
29941  fi
29942
29943  if test "x$path" != "x$new_path"; then
29944    BOOT_JDK="$new_path"
29945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29947  fi
29948
29949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29951
29952    else
29953      # We're on a unix platform. Hooray! :)
29954      path="$BOOT_JDK"
29955      has_space=`$ECHO "$path" | $GREP " "`
29956      if test "x$has_space" != x; then
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29960      fi
29961
29962      # Use eval to expand a potential ~
29963      eval path="$path"
29964      if test ! -f "$path" && test ! -d "$path"; then
29965        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29966      fi
29967
29968      if test -d "$path"; then
29969        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29970      else
29971        dir="`$DIRNAME "$path"`"
29972        base="`$BASENAME "$path"`"
29973        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29974      fi
29975    fi
29976  fi
29977
29978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29979$as_echo_n "checking for Boot JDK... " >&6; }
29980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29981$as_echo "$BOOT_JDK" >&6; }
29982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29983$as_echo_n "checking Boot JDK version... " >&6; }
29984            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29986$as_echo "$BOOT_JDK_VERSION" >&6; }
29987          fi # end check jdk version
29988        fi # end check javac
29989      fi # end check java
29990    fi # end check boot jdk found
29991  fi
29992
29993    done
29994  fi
29995
29996
29997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29999      # Do we have a bin/java?
30000      if test ! -x "$BOOT_JDK/bin/java"; then
30001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30003        BOOT_JDK_FOUND=no
30004      else
30005        # Do we have a bin/javac?
30006        if test ! -x "$BOOT_JDK/bin/javac"; then
30007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30011          BOOT_JDK_FOUND=no
30012        else
30013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30015
30016          # Extra M4 quote needed to protect [] in grep expression.
30017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30018          if test "x$FOUND_CORRECT_VERSION" = x; then
30019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30023            BOOT_JDK_FOUND=no
30024          else
30025            # We're done! :-)
30026            BOOT_JDK_FOUND=yes
30027
30028  # Only process if variable expands to non-empty
30029
30030  if test "x$BOOT_JDK" != x; then
30031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30032
30033  # Input might be given as Windows format, start by converting to
30034  # unix format.
30035  path="$BOOT_JDK"
30036  new_path=`$CYGPATH -u "$path"`
30037
30038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30041  # "foo.exe" is OK but "foo" is an error.
30042  #
30043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30044  # It is also a way to make sure we got the proper file name for the real test later on.
30045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30046  if test "x$test_shortpath" = x; then
30047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30050  fi
30051
30052  # Call helper function which possibly converts this using DOS-style short mode.
30053  # If so, the updated path is stored in $new_path.
30054
30055  input_path="$new_path"
30056  # Check if we need to convert this using DOS-style short mode. If the path
30057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30058  # take no chances and rewrite it.
30059  # Note: m4 eats our [], so we need to use [ and ] instead.
30060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30061  if test "x$has_forbidden_chars" != x; then
30062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30066      # Going to short mode and back again did indeed matter. Since short mode is
30067      # case insensitive, let's make it lowercase to improve readability.
30068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30069      # Now convert it back to Unix-style (cygpath)
30070      input_path=`$CYGPATH -u "$shortmode_path"`
30071      new_path="$input_path"
30072    fi
30073  fi
30074
30075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30076  if test "x$test_cygdrive_prefix" = x; then
30077    # As a simple fix, exclude /usr/bin since it's not a real path.
30078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30080      # a path prefixed by /cygdrive for fixpath to work.
30081      new_path="$CYGWIN_ROOT_PATH$input_path"
30082    fi
30083  fi
30084
30085
30086  if test "x$path" != "x$new_path"; then
30087    BOOT_JDK="$new_path"
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30090  fi
30091
30092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30093
30094  path="$BOOT_JDK"
30095  has_colon=`$ECHO $path | $GREP ^.:`
30096  new_path="$path"
30097  if test "x$has_colon" = x; then
30098    # Not in mixed or Windows style, start by that.
30099    new_path=`cmd //c echo $path`
30100  fi
30101
30102
30103  input_path="$new_path"
30104  # Check if we need to convert this using DOS-style short mode. If the path
30105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30106  # take no chances and rewrite it.
30107  # Note: m4 eats our [], so we need to use [ and ] instead.
30108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30109  if test "x$has_forbidden_chars" != x; then
30110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30112  fi
30113
30114
30115  windows_path="$new_path"
30116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30117    unix_path=`$CYGPATH -u "$windows_path"`
30118    new_path="$unix_path"
30119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30121    new_path="$unix_path"
30122  fi
30123
30124  if test "x$path" != "x$new_path"; then
30125    BOOT_JDK="$new_path"
30126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30128  fi
30129
30130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30132
30133    else
30134      # We're on a unix platform. Hooray! :)
30135      path="$BOOT_JDK"
30136      has_space=`$ECHO "$path" | $GREP " "`
30137      if test "x$has_space" != x; then
30138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30141      fi
30142
30143      # Use eval to expand a potential ~
30144      eval path="$path"
30145      if test ! -f "$path" && test ! -d "$path"; then
30146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30147      fi
30148
30149      if test -d "$path"; then
30150        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30151      else
30152        dir="`$DIRNAME "$path"`"
30153        base="`$BASENAME "$path"`"
30154        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30155      fi
30156    fi
30157  fi
30158
30159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30160$as_echo_n "checking for Boot JDK... " >&6; }
30161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30162$as_echo "$BOOT_JDK" >&6; }
30163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30164$as_echo_n "checking Boot JDK version... " >&6; }
30165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30167$as_echo "$BOOT_JDK_VERSION" >&6; }
30168          fi # end check jdk version
30169        fi # end check javac
30170      fi # end check java
30171    fi # end check boot jdk found
30172  fi
30173
30174  fi
30175
30176
30177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30179      # Do we have a bin/java?
30180      if test ! -x "$BOOT_JDK/bin/java"; then
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30183        BOOT_JDK_FOUND=no
30184      else
30185        # Do we have a bin/javac?
30186        if test ! -x "$BOOT_JDK/bin/javac"; then
30187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30191          BOOT_JDK_FOUND=no
30192        else
30193          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30194          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30195
30196          # Extra M4 quote needed to protect [] in grep expression.
30197          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30198          if test "x$FOUND_CORRECT_VERSION" = x; then
30199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30201            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30202$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30203            BOOT_JDK_FOUND=no
30204          else
30205            # We're done! :-)
30206            BOOT_JDK_FOUND=yes
30207
30208  # Only process if variable expands to non-empty
30209
30210  if test "x$BOOT_JDK" != x; then
30211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30212
30213  # Input might be given as Windows format, start by converting to
30214  # unix format.
30215  path="$BOOT_JDK"
30216  new_path=`$CYGPATH -u "$path"`
30217
30218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30221  # "foo.exe" is OK but "foo" is an error.
30222  #
30223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30224  # It is also a way to make sure we got the proper file name for the real test later on.
30225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30226  if test "x$test_shortpath" = x; then
30227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30230  fi
30231
30232  # Call helper function which possibly converts this using DOS-style short mode.
30233  # If so, the updated path is stored in $new_path.
30234
30235  input_path="$new_path"
30236  # Check if we need to convert this using DOS-style short mode. If the path
30237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30238  # take no chances and rewrite it.
30239  # Note: m4 eats our [], so we need to use [ and ] instead.
30240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30241  if test "x$has_forbidden_chars" != x; then
30242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30246      # Going to short mode and back again did indeed matter. Since short mode is
30247      # case insensitive, let's make it lowercase to improve readability.
30248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30249      # Now convert it back to Unix-style (cygpath)
30250      input_path=`$CYGPATH -u "$shortmode_path"`
30251      new_path="$input_path"
30252    fi
30253  fi
30254
30255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30256  if test "x$test_cygdrive_prefix" = x; then
30257    # As a simple fix, exclude /usr/bin since it's not a real path.
30258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30260      # a path prefixed by /cygdrive for fixpath to work.
30261      new_path="$CYGWIN_ROOT_PATH$input_path"
30262    fi
30263  fi
30264
30265
30266  if test "x$path" != "x$new_path"; then
30267    BOOT_JDK="$new_path"
30268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30270  fi
30271
30272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30273
30274  path="$BOOT_JDK"
30275  has_colon=`$ECHO $path | $GREP ^.:`
30276  new_path="$path"
30277  if test "x$has_colon" = x; then
30278    # Not in mixed or Windows style, start by that.
30279    new_path=`cmd //c echo $path`
30280  fi
30281
30282
30283  input_path="$new_path"
30284  # Check if we need to convert this using DOS-style short mode. If the path
30285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30286  # take no chances and rewrite it.
30287  # Note: m4 eats our [], so we need to use [ and ] instead.
30288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30289  if test "x$has_forbidden_chars" != x; then
30290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30292  fi
30293
30294
30295  windows_path="$new_path"
30296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30297    unix_path=`$CYGPATH -u "$windows_path"`
30298    new_path="$unix_path"
30299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30301    new_path="$unix_path"
30302  fi
30303
30304  if test "x$path" != "x$new_path"; then
30305    BOOT_JDK="$new_path"
30306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30308  fi
30309
30310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30312
30313    else
30314      # We're on a unix platform. Hooray! :)
30315      path="$BOOT_JDK"
30316      has_space=`$ECHO "$path" | $GREP " "`
30317      if test "x$has_space" != x; then
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30321      fi
30322
30323      # Use eval to expand a potential ~
30324      eval path="$path"
30325      if test ! -f "$path" && test ! -d "$path"; then
30326        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30327      fi
30328
30329      if test -d "$path"; then
30330        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30331      else
30332        dir="`$DIRNAME "$path"`"
30333        base="`$BASENAME "$path"`"
30334        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30335      fi
30336    fi
30337  fi
30338
30339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30340$as_echo_n "checking for Boot JDK... " >&6; }
30341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30342$as_echo "$BOOT_JDK" >&6; }
30343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30344$as_echo_n "checking Boot JDK version... " >&6; }
30345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30347$as_echo "$BOOT_JDK_VERSION" >&6; }
30348          fi # end check jdk version
30349        fi # end check javac
30350      fi # end check java
30351    fi # end check boot jdk found
30352  fi
30353
30354
30355  # If we haven't found anything yet, we've truly lost. Give up.
30356  if test "x$BOOT_JDK_FOUND" = xno; then
30357
30358  # Print a helpful message on how to acquire the necessary build dependency.
30359  # openjdk is the help tag: freetype, cups, alsa etc
30360  MISSING_DEPENDENCY=openjdk
30361
30362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30363    cygwin_help $MISSING_DEPENDENCY
30364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30365    msys_help $MISSING_DEPENDENCY
30366  else
30367    PKGHANDLER_COMMAND=
30368
30369    case $PKGHANDLER in
30370      apt-get)
30371        apt_help     $MISSING_DEPENDENCY ;;
30372      yum)
30373        yum_help     $MISSING_DEPENDENCY ;;
30374      brew)
30375        brew_help    $MISSING_DEPENDENCY ;;
30376      port)
30377        port_help    $MISSING_DEPENDENCY ;;
30378      pkgutil)
30379        pkgutil_help $MISSING_DEPENDENCY ;;
30380      pkgadd)
30381        pkgadd_help  $MISSING_DEPENDENCY ;;
30382    esac
30383
30384    if test "x$PKGHANDLER_COMMAND" != x; then
30385      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30386    fi
30387  fi
30388
30389    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30390$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30391    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30392$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30393    as_fn_error $? "Cannot continue" "$LINENO" 5
30394  fi
30395
30396
30397
30398  # Setup tools from the Boot JDK.
30399
30400  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30401
30402  # Publish this variable in the help.
30403
30404
30405  if [ -z "${JAVA+x}" ]; then
30406    # The variable is not set by user, try to locate tool using the code snippet
30407
30408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30409$as_echo_n "checking for java in Boot JDK... " >&6; }
30410      JAVA=$BOOT_JDK/bin/java
30411      if test ! -x $JAVA; then
30412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30413$as_echo "not found" >&6; }
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30415$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30416        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30417      fi
30418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30419$as_echo "ok" >&6; }
30420
30421
30422  else
30423    # The variable is set, but is it from the command line or the environment?
30424
30425    # Try to remove the string !JAVA! from our list.
30426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30428      # If it failed, the variable was not from the command line. Ignore it,
30429      # but warn the user (except for BASH, which is always set by the calling BASH).
30430      if test "xJAVA" != xBASH; then
30431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30432$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30433      fi
30434      # Try to locate tool using the code snippet
30435
30436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30437$as_echo_n "checking for java in Boot JDK... " >&6; }
30438      JAVA=$BOOT_JDK/bin/java
30439      if test ! -x $JAVA; then
30440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30441$as_echo "not found" >&6; }
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30443$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30444        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30445      fi
30446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30447$as_echo "ok" >&6; }
30448
30449
30450    else
30451      # If it succeeded, then it was overridden by the user. We will use it
30452      # for the tool.
30453
30454      # First remove it from the list of overridden variables, so we can test
30455      # for unknown variables in the end.
30456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30457
30458      # Check if we try to supply an empty value
30459      if test "x$JAVA" = x; then
30460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30461$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30463$as_echo_n "checking for JAVA... " >&6; }
30464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30465$as_echo "disabled" >&6; }
30466      else
30467        # Check if the provided tool contains a complete path.
30468        tool_specified="$JAVA"
30469        tool_basename="${tool_specified##*/}"
30470        if test "x$tool_basename" = "x$tool_specified"; then
30471          # A command without a complete path is provided, search $PATH.
30472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30473$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30474          # Extract the first word of "$tool_basename", so it can be a program name with args.
30475set dummy $tool_basename; ac_word=$2
30476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30477$as_echo_n "checking for $ac_word... " >&6; }
30478if ${ac_cv_path_JAVA+:} false; then :
30479  $as_echo_n "(cached) " >&6
30480else
30481  case $JAVA in
30482  [\\/]* | ?:[\\/]*)
30483  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30484  ;;
30485  *)
30486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30487for as_dir in $PATH
30488do
30489  IFS=$as_save_IFS
30490  test -z "$as_dir" && as_dir=.
30491    for ac_exec_ext in '' $ac_executable_extensions; do
30492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30493    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30495    break 2
30496  fi
30497done
30498  done
30499IFS=$as_save_IFS
30500
30501  ;;
30502esac
30503fi
30504JAVA=$ac_cv_path_JAVA
30505if test -n "$JAVA"; then
30506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30507$as_echo "$JAVA" >&6; }
30508else
30509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30510$as_echo "no" >&6; }
30511fi
30512
30513
30514          if test "x$JAVA" = x; then
30515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30516          fi
30517        else
30518          # Otherwise we believe it is a complete path. Use it as it is.
30519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30520$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30522$as_echo_n "checking for JAVA... " >&6; }
30523          if test ! -x "$tool_specified"; then
30524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30525$as_echo "not found" >&6; }
30526            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30527          fi
30528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30529$as_echo "$tool_specified" >&6; }
30530        fi
30531      fi
30532    fi
30533
30534  fi
30535
30536
30537
30538  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30539
30540  # Publish this variable in the help.
30541
30542
30543  if [ -z "${JAVAC+x}" ]; then
30544    # The variable is not set by user, try to locate tool using the code snippet
30545
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30547$as_echo_n "checking for javac in Boot JDK... " >&6; }
30548      JAVAC=$BOOT_JDK/bin/javac
30549      if test ! -x $JAVAC; then
30550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30551$as_echo "not found" >&6; }
30552        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30553$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30554        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30555      fi
30556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30557$as_echo "ok" >&6; }
30558
30559
30560  else
30561    # The variable is set, but is it from the command line or the environment?
30562
30563    # Try to remove the string !JAVAC! from our list.
30564    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30565    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30566      # If it failed, the variable was not from the command line. Ignore it,
30567      # but warn the user (except for BASH, which is always set by the calling BASH).
30568      if test "xJAVAC" != xBASH; then
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30570$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30571      fi
30572      # Try to locate tool using the code snippet
30573
30574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30575$as_echo_n "checking for javac in Boot JDK... " >&6; }
30576      JAVAC=$BOOT_JDK/bin/javac
30577      if test ! -x $JAVAC; then
30578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30579$as_echo "not found" >&6; }
30580        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30581$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30582        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30583      fi
30584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30585$as_echo "ok" >&6; }
30586
30587
30588    else
30589      # If it succeeded, then it was overridden by the user. We will use it
30590      # for the tool.
30591
30592      # First remove it from the list of overridden variables, so we can test
30593      # for unknown variables in the end.
30594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30595
30596      # Check if we try to supply an empty value
30597      if test "x$JAVAC" = x; then
30598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30599$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30601$as_echo_n "checking for JAVAC... " >&6; }
30602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30603$as_echo "disabled" >&6; }
30604      else
30605        # Check if the provided tool contains a complete path.
30606        tool_specified="$JAVAC"
30607        tool_basename="${tool_specified##*/}"
30608        if test "x$tool_basename" = "x$tool_specified"; then
30609          # A command without a complete path is provided, search $PATH.
30610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30611$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30612          # Extract the first word of "$tool_basename", so it can be a program name with args.
30613set dummy $tool_basename; ac_word=$2
30614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30615$as_echo_n "checking for $ac_word... " >&6; }
30616if ${ac_cv_path_JAVAC+:} false; then :
30617  $as_echo_n "(cached) " >&6
30618else
30619  case $JAVAC in
30620  [\\/]* | ?:[\\/]*)
30621  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30622  ;;
30623  *)
30624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30625for as_dir in $PATH
30626do
30627  IFS=$as_save_IFS
30628  test -z "$as_dir" && as_dir=.
30629    for ac_exec_ext in '' $ac_executable_extensions; do
30630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30631    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30633    break 2
30634  fi
30635done
30636  done
30637IFS=$as_save_IFS
30638
30639  ;;
30640esac
30641fi
30642JAVAC=$ac_cv_path_JAVAC
30643if test -n "$JAVAC"; then
30644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30645$as_echo "$JAVAC" >&6; }
30646else
30647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30648$as_echo "no" >&6; }
30649fi
30650
30651
30652          if test "x$JAVAC" = x; then
30653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30654          fi
30655        else
30656          # Otherwise we believe it is a complete path. Use it as it is.
30657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30658$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30660$as_echo_n "checking for JAVAC... " >&6; }
30661          if test ! -x "$tool_specified"; then
30662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30663$as_echo "not found" >&6; }
30664            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30665          fi
30666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30667$as_echo "$tool_specified" >&6; }
30668        fi
30669      fi
30670    fi
30671
30672  fi
30673
30674
30675
30676  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30677
30678  # Publish this variable in the help.
30679
30680
30681  if [ -z "${JAVAH+x}" ]; then
30682    # The variable is not set by user, try to locate tool using the code snippet
30683
30684      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30685$as_echo_n "checking for javah in Boot JDK... " >&6; }
30686      JAVAH=$BOOT_JDK/bin/javah
30687      if test ! -x $JAVAH; then
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30689$as_echo "not found" >&6; }
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30691$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30692        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30693      fi
30694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30695$as_echo "ok" >&6; }
30696
30697
30698  else
30699    # The variable is set, but is it from the command line or the environment?
30700
30701    # Try to remove the string !JAVAH! from our list.
30702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30704      # If it failed, the variable was not from the command line. Ignore it,
30705      # but warn the user (except for BASH, which is always set by the calling BASH).
30706      if test "xJAVAH" != xBASH; then
30707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30708$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30709      fi
30710      # Try to locate tool using the code snippet
30711
30712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30713$as_echo_n "checking for javah in Boot JDK... " >&6; }
30714      JAVAH=$BOOT_JDK/bin/javah
30715      if test ! -x $JAVAH; then
30716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30717$as_echo "not found" >&6; }
30718        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30720        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30721      fi
30722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30723$as_echo "ok" >&6; }
30724
30725
30726    else
30727      # If it succeeded, then it was overridden by the user. We will use it
30728      # for the tool.
30729
30730      # First remove it from the list of overridden variables, so we can test
30731      # for unknown variables in the end.
30732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30733
30734      # Check if we try to supply an empty value
30735      if test "x$JAVAH" = x; then
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30737$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30739$as_echo_n "checking for JAVAH... " >&6; }
30740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30741$as_echo "disabled" >&6; }
30742      else
30743        # Check if the provided tool contains a complete path.
30744        tool_specified="$JAVAH"
30745        tool_basename="${tool_specified##*/}"
30746        if test "x$tool_basename" = "x$tool_specified"; then
30747          # A command without a complete path is provided, search $PATH.
30748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30749$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30750          # Extract the first word of "$tool_basename", so it can be a program name with args.
30751set dummy $tool_basename; ac_word=$2
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30753$as_echo_n "checking for $ac_word... " >&6; }
30754if ${ac_cv_path_JAVAH+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  case $JAVAH in
30758  [\\/]* | ?:[\\/]*)
30759  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30760  ;;
30761  *)
30762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30763for as_dir in $PATH
30764do
30765  IFS=$as_save_IFS
30766  test -z "$as_dir" && as_dir=.
30767    for ac_exec_ext in '' $ac_executable_extensions; do
30768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30769    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30771    break 2
30772  fi
30773done
30774  done
30775IFS=$as_save_IFS
30776
30777  ;;
30778esac
30779fi
30780JAVAH=$ac_cv_path_JAVAH
30781if test -n "$JAVAH"; then
30782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30783$as_echo "$JAVAH" >&6; }
30784else
30785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30786$as_echo "no" >&6; }
30787fi
30788
30789
30790          if test "x$JAVAH" = x; then
30791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30792          fi
30793        else
30794          # Otherwise we believe it is a complete path. Use it as it is.
30795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30796$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30798$as_echo_n "checking for JAVAH... " >&6; }
30799          if test ! -x "$tool_specified"; then
30800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30801$as_echo "not found" >&6; }
30802            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30803          fi
30804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30805$as_echo "$tool_specified" >&6; }
30806        fi
30807      fi
30808    fi
30809
30810  fi
30811
30812
30813
30814  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30815
30816  # Publish this variable in the help.
30817
30818
30819  if [ -z "${JAR+x}" ]; then
30820    # The variable is not set by user, try to locate tool using the code snippet
30821
30822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30823$as_echo_n "checking for jar in Boot JDK... " >&6; }
30824      JAR=$BOOT_JDK/bin/jar
30825      if test ! -x $JAR; then
30826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30827$as_echo "not found" >&6; }
30828        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30829$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30830        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30831      fi
30832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30833$as_echo "ok" >&6; }
30834
30835
30836  else
30837    # The variable is set, but is it from the command line or the environment?
30838
30839    # Try to remove the string !JAR! from our list.
30840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30842      # If it failed, the variable was not from the command line. Ignore it,
30843      # but warn the user (except for BASH, which is always set by the calling BASH).
30844      if test "xJAR" != xBASH; then
30845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30846$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30847      fi
30848      # Try to locate tool using the code snippet
30849
30850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30851$as_echo_n "checking for jar in Boot JDK... " >&6; }
30852      JAR=$BOOT_JDK/bin/jar
30853      if test ! -x $JAR; then
30854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30855$as_echo "not found" >&6; }
30856        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30857$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30858        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30859      fi
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30861$as_echo "ok" >&6; }
30862
30863
30864    else
30865      # If it succeeded, then it was overridden by the user. We will use it
30866      # for the tool.
30867
30868      # First remove it from the list of overridden variables, so we can test
30869      # for unknown variables in the end.
30870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30871
30872      # Check if we try to supply an empty value
30873      if test "x$JAR" = x; then
30874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30875$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30877$as_echo_n "checking for JAR... " >&6; }
30878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30879$as_echo "disabled" >&6; }
30880      else
30881        # Check if the provided tool contains a complete path.
30882        tool_specified="$JAR"
30883        tool_basename="${tool_specified##*/}"
30884        if test "x$tool_basename" = "x$tool_specified"; then
30885          # A command without a complete path is provided, search $PATH.
30886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30887$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30888          # Extract the first word of "$tool_basename", so it can be a program name with args.
30889set dummy $tool_basename; ac_word=$2
30890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30891$as_echo_n "checking for $ac_word... " >&6; }
30892if ${ac_cv_path_JAR+:} false; then :
30893  $as_echo_n "(cached) " >&6
30894else
30895  case $JAR in
30896  [\\/]* | ?:[\\/]*)
30897  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30898  ;;
30899  *)
30900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30901for as_dir in $PATH
30902do
30903  IFS=$as_save_IFS
30904  test -z "$as_dir" && as_dir=.
30905    for ac_exec_ext in '' $ac_executable_extensions; do
30906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30907    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30909    break 2
30910  fi
30911done
30912  done
30913IFS=$as_save_IFS
30914
30915  ;;
30916esac
30917fi
30918JAR=$ac_cv_path_JAR
30919if test -n "$JAR"; then
30920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30921$as_echo "$JAR" >&6; }
30922else
30923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30924$as_echo "no" >&6; }
30925fi
30926
30927
30928          if test "x$JAR" = x; then
30929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30930          fi
30931        else
30932          # Otherwise we believe it is a complete path. Use it as it is.
30933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30934$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30936$as_echo_n "checking for JAR... " >&6; }
30937          if test ! -x "$tool_specified"; then
30938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30939$as_echo "not found" >&6; }
30940            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30941          fi
30942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30943$as_echo "$tool_specified" >&6; }
30944        fi
30945      fi
30946    fi
30947
30948  fi
30949
30950
30951
30952  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30953
30954  # Publish this variable in the help.
30955
30956
30957  if [ -z "${JARSIGNER+x}" ]; then
30958    # The variable is not set by user, try to locate tool using the code snippet
30959
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30961$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30962      JARSIGNER=$BOOT_JDK/bin/jarsigner
30963      if test ! -x $JARSIGNER; then
30964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30965$as_echo "not found" >&6; }
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30967$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30968        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30969      fi
30970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30971$as_echo "ok" >&6; }
30972
30973
30974  else
30975    # The variable is set, but is it from the command line or the environment?
30976
30977    # Try to remove the string !JARSIGNER! from our list.
30978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30980      # If it failed, the variable was not from the command line. Ignore it,
30981      # but warn the user (except for BASH, which is always set by the calling BASH).
30982      if test "xJARSIGNER" != xBASH; then
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30984$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30985      fi
30986      # Try to locate tool using the code snippet
30987
30988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30989$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30990      JARSIGNER=$BOOT_JDK/bin/jarsigner
30991      if test ! -x $JARSIGNER; then
30992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30993$as_echo "not found" >&6; }
30994        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30995$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30996        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30997      fi
30998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30999$as_echo "ok" >&6; }
31000
31001
31002    else
31003      # If it succeeded, then it was overridden by the user. We will use it
31004      # for the tool.
31005
31006      # First remove it from the list of overridden variables, so we can test
31007      # for unknown variables in the end.
31008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31009
31010      # Check if we try to supply an empty value
31011      if test "x$JARSIGNER" = x; then
31012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31013$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31015$as_echo_n "checking for JARSIGNER... " >&6; }
31016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31017$as_echo "disabled" >&6; }
31018      else
31019        # Check if the provided tool contains a complete path.
31020        tool_specified="$JARSIGNER"
31021        tool_basename="${tool_specified##*/}"
31022        if test "x$tool_basename" = "x$tool_specified"; then
31023          # A command without a complete path is provided, search $PATH.
31024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31025$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31026          # Extract the first word of "$tool_basename", so it can be a program name with args.
31027set dummy $tool_basename; ac_word=$2
31028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31029$as_echo_n "checking for $ac_word... " >&6; }
31030if ${ac_cv_path_JARSIGNER+:} false; then :
31031  $as_echo_n "(cached) " >&6
31032else
31033  case $JARSIGNER in
31034  [\\/]* | ?:[\\/]*)
31035  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31036  ;;
31037  *)
31038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31039for as_dir in $PATH
31040do
31041  IFS=$as_save_IFS
31042  test -z "$as_dir" && as_dir=.
31043    for ac_exec_ext in '' $ac_executable_extensions; do
31044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31045    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31047    break 2
31048  fi
31049done
31050  done
31051IFS=$as_save_IFS
31052
31053  ;;
31054esac
31055fi
31056JARSIGNER=$ac_cv_path_JARSIGNER
31057if test -n "$JARSIGNER"; then
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31059$as_echo "$JARSIGNER" >&6; }
31060else
31061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31062$as_echo "no" >&6; }
31063fi
31064
31065
31066          if test "x$JARSIGNER" = x; then
31067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31068          fi
31069        else
31070          # Otherwise we believe it is a complete path. Use it as it is.
31071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31072$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31074$as_echo_n "checking for JARSIGNER... " >&6; }
31075          if test ! -x "$tool_specified"; then
31076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31077$as_echo "not found" >&6; }
31078            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31079          fi
31080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31081$as_echo "$tool_specified" >&6; }
31082        fi
31083      fi
31084    fi
31085
31086  fi
31087
31088
31089
31090  # Finally, set some other options...
31091
31092  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31093  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31094
31095
31096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31097$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31098  if "$JAVA" --list-modules > /dev/null 2>&1; then
31099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31100$as_echo "yes" >&6; }
31101    BOOT_JDK_MODULAR="true"
31102  else
31103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31104$as_echo "no" >&6; }
31105    BOOT_JDK_MODULAR="false"
31106  fi
31107
31108
31109
31110
31111  # Check if the boot jdk is 32 or 64 bit
31112  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31113    BOOT_JDK_BITS="64"
31114  else
31115    BOOT_JDK_BITS="32"
31116  fi
31117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31118$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31120$as_echo "$BOOT_JDK_BITS" >&6; }
31121
31122
31123
31124# Check whether --with-build-jdk was given.
31125if test "${with_build_jdk+set}" = set; then :
31126  withval=$with_build_jdk;
31127fi
31128
31129
31130  CREATE_BUILDJDK=false
31131  EXTERNAL_BUILDJDK=false
31132  BUILD_JDK_FOUND="no"
31133  if test "x$with_build_jdk" != "x"; then
31134
31135  if test "x$BUILD_JDK_FOUND" = xno; then
31136    # Execute the test
31137
31138       if test "x$with_build_jdk" != x; then
31139         BUILD_JDK=$with_build_jdk
31140         BUILD_JDK_FOUND=maybe
31141         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31142$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31143       fi
31144
31145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31146    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31147      # Do we have a bin/java?
31148      if test ! -x "$BUILD_JDK/bin/java"; then
31149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31150$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31151        BUILD_JDK_FOUND=no
31152      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31154$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31155        BUILD_JDK_FOUND=no
31156      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31157        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31158$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31159        BUILD_JDK_FOUND=no
31160      elif test ! -x "$BUILD_JDK/bin/javac"; then
31161        # Do we have a bin/javac?
31162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31163$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31164        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31165$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31166        BUILD_JDK_FOUND=no
31167      else
31168        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31169        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31170
31171        # Extra M4 quote needed to protect [] in grep expression.
31172        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31173        if test "x$FOUND_CORRECT_VERSION" = x; then
31174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31175$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31176          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31177$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31178          BUILD_JDK_FOUND=no
31179        else
31180          # We're done!
31181          BUILD_JDK_FOUND=yes
31182
31183  # Only process if variable expands to non-empty
31184
31185  if test "x$BUILD_JDK" != x; then
31186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31187
31188  # Input might be given as Windows format, start by converting to
31189  # unix format.
31190  path="$BUILD_JDK"
31191  new_path=`$CYGPATH -u "$path"`
31192
31193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31196  # "foo.exe" is OK but "foo" is an error.
31197  #
31198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31199  # It is also a way to make sure we got the proper file name for the real test later on.
31200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31201  if test "x$test_shortpath" = x; then
31202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31203$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31204    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31205  fi
31206
31207  # Call helper function which possibly converts this using DOS-style short mode.
31208  # If so, the updated path is stored in $new_path.
31209
31210  input_path="$new_path"
31211  # Check if we need to convert this using DOS-style short mode. If the path
31212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31213  # take no chances and rewrite it.
31214  # Note: m4 eats our [], so we need to use [ and ] instead.
31215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31216  if test "x$has_forbidden_chars" != x; then
31217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31221      # Going to short mode and back again did indeed matter. Since short mode is
31222      # case insensitive, let's make it lowercase to improve readability.
31223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31224      # Now convert it back to Unix-style (cygpath)
31225      input_path=`$CYGPATH -u "$shortmode_path"`
31226      new_path="$input_path"
31227    fi
31228  fi
31229
31230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31231  if test "x$test_cygdrive_prefix" = x; then
31232    # As a simple fix, exclude /usr/bin since it's not a real path.
31233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31235      # a path prefixed by /cygdrive for fixpath to work.
31236      new_path="$CYGWIN_ROOT_PATH$input_path"
31237    fi
31238  fi
31239
31240
31241  if test "x$path" != "x$new_path"; then
31242    BUILD_JDK="$new_path"
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31244$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31245  fi
31246
31247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31248
31249  path="$BUILD_JDK"
31250  has_colon=`$ECHO $path | $GREP ^.:`
31251  new_path="$path"
31252  if test "x$has_colon" = x; then
31253    # Not in mixed or Windows style, start by that.
31254    new_path=`cmd //c echo $path`
31255  fi
31256
31257
31258  input_path="$new_path"
31259  # Check if we need to convert this using DOS-style short mode. If the path
31260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31261  # take no chances and rewrite it.
31262  # Note: m4 eats our [], so we need to use [ and ] instead.
31263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31264  if test "x$has_forbidden_chars" != x; then
31265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31267  fi
31268
31269
31270  windows_path="$new_path"
31271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31272    unix_path=`$CYGPATH -u "$windows_path"`
31273    new_path="$unix_path"
31274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31276    new_path="$unix_path"
31277  fi
31278
31279  if test "x$path" != "x$new_path"; then
31280    BUILD_JDK="$new_path"
31281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31282$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31283  fi
31284
31285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31287
31288    else
31289      # We're on a unix platform. Hooray! :)
31290      path="$BUILD_JDK"
31291      has_space=`$ECHO "$path" | $GREP " "`
31292      if test "x$has_space" != x; then
31293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31294$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31296      fi
31297
31298      # Use eval to expand a potential ~
31299      eval path="$path"
31300      if test ! -f "$path" && test ! -d "$path"; then
31301        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31302      fi
31303
31304      if test -d "$path"; then
31305        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31306      else
31307        dir="`$DIRNAME "$path"`"
31308        base="`$BASENAME "$path"`"
31309        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31310      fi
31311    fi
31312  fi
31313
31314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31315$as_echo_n "checking for Build JDK... " >&6; }
31316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31317$as_echo "$BUILD_JDK" >&6; }
31318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31319$as_echo_n "checking Build JDK version... " >&6; }
31320          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31322$as_echo "$BUILD_JDK_VERSION" >&6; }
31323        fi # end check jdk version
31324      fi # end check java
31325    fi # end check build jdk found
31326  fi
31327
31328    EXTERNAL_BUILDJDK=true
31329  else
31330    if test "x$COMPILE_TYPE" = "xcross"; then
31331      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31332      BUILD_JDK_FOUND=yes
31333      CREATE_BUILDJDK=true
31334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31335$as_echo_n "checking for Build JDK... " >&6; }
31336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31337$as_echo "yes, will build it for the host platform" >&6; }
31338    else
31339      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31340      BUILD_JDK_FOUND=yes
31341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31342$as_echo_n "checking for Build JDK... " >&6; }
31343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31344$as_echo "yes, will use output dir" >&6; }
31345    fi
31346  fi
31347
31348  JMOD="$BUILD_JDK/bin/jmod"
31349  JLINK="$BUILD_JDK/bin/jlink"
31350
31351
31352
31353  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31355$as_echo_n "checking for Build JDK... " >&6; }
31356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31357$as_echo "no" >&6; }
31358    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31359  fi
31360
31361
31362
31363
31364
31365
31366###############################################################################
31367#
31368# Configure the sources to use. We can add or override individual directories.
31369#
31370###############################################################################
31371
31372
31373  # Where are the sources.
31374  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31375  CORBA_TOPDIR="$SRC_ROOT/corba"
31376  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31377  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31378  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31379  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31380  JDK_TOPDIR="$SRC_ROOT/jdk"
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390  # This feature is no longer supported.
31391
31392
31393
31394# Check whether --with-add-source-root was given.
31395if test "${with_add_source_root+set}" = set; then :
31396  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
31397$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31398fi
31399
31400
31401
31402
31403# Check whether --with-override-source-root was given.
31404if test "${with_override_source_root+set}" = set; then :
31405  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
31406$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31407fi
31408
31409
31410
31411
31412# Check whether --with-adds-and-overrides was given.
31413if test "${with_adds_and_overrides+set}" = set; then :
31414  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
31415$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31416fi
31417
31418
31419
31420
31421# Check whether --with-override-langtools was given.
31422if test "${with_override_langtools+set}" = set; then :
31423  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31424$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31425fi
31426
31427
31428
31429
31430# Check whether --with-override-corba was given.
31431if test "${with_override_corba+set}" = set; then :
31432  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31433$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31434fi
31435
31436
31437
31438
31439# Check whether --with-override-jaxp was given.
31440if test "${with_override_jaxp+set}" = set; then :
31441  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31442$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31443fi
31444
31445
31446
31447
31448# Check whether --with-override-jaxws was given.
31449if test "${with_override_jaxws+set}" = set; then :
31450  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31451$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31452fi
31453
31454
31455
31456
31457# Check whether --with-override-hotspot was given.
31458if test "${with_override_hotspot+set}" = set; then :
31459  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31460$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31461fi
31462
31463
31464
31465
31466# Check whether --with-override-nashorn was given.
31467if test "${with_override_nashorn+set}" = set; then :
31468  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31469$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31470fi
31471
31472
31473
31474
31475# Check whether --with-override-jdk was given.
31476if test "${with_override_jdk+set}" = set; then :
31477  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31478$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31479fi
31480
31481
31482
31483
31484  BUILD_OUTPUT="$OUTPUT_ROOT"
31485
31486  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31487
31488
31489
31490# Check whether --with-import_hotspot was given.
31491if test "${with_import_hotspot+set}" = set; then :
31492  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31493$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31494fi
31495
31496
31497
31498
31499
31500
31501# Check whether --with-import-modules was given.
31502if test "${with_import_modules+set}" = set; then :
31503  withval=$with_import_modules;
31504fi
31505
31506
31507  if test "x$with_import_modules" != x \
31508      && test "x$with_import_modules" != "xno"; then
31509    if test -d "$with_import_modules"; then
31510      IMPORT_MODULES_TOPDIR="$with_import_modules"
31511
31512  # Only process if variable expands to non-empty
31513
31514  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31516
31517  # Input might be given as Windows format, start by converting to
31518  # unix format.
31519  path="$IMPORT_MODULES_TOPDIR"
31520  new_path=`$CYGPATH -u "$path"`
31521
31522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31525  # "foo.exe" is OK but "foo" is an error.
31526  #
31527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31528  # It is also a way to make sure we got the proper file name for the real test later on.
31529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31530  if test "x$test_shortpath" = x; then
31531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31532$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31533    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31534  fi
31535
31536  # Call helper function which possibly converts this using DOS-style short mode.
31537  # If so, the updated path is stored in $new_path.
31538
31539  input_path="$new_path"
31540  # Check if we need to convert this using DOS-style short mode. If the path
31541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31542  # take no chances and rewrite it.
31543  # Note: m4 eats our [], so we need to use [ and ] instead.
31544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31545  if test "x$has_forbidden_chars" != x; then
31546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31550      # Going to short mode and back again did indeed matter. Since short mode is
31551      # case insensitive, let's make it lowercase to improve readability.
31552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31553      # Now convert it back to Unix-style (cygpath)
31554      input_path=`$CYGPATH -u "$shortmode_path"`
31555      new_path="$input_path"
31556    fi
31557  fi
31558
31559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31560  if test "x$test_cygdrive_prefix" = x; then
31561    # As a simple fix, exclude /usr/bin since it's not a real path.
31562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31564      # a path prefixed by /cygdrive for fixpath to work.
31565      new_path="$CYGWIN_ROOT_PATH$input_path"
31566    fi
31567  fi
31568
31569
31570  if test "x$path" != "x$new_path"; then
31571    IMPORT_MODULES_TOPDIR="$new_path"
31572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31573$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31574  fi
31575
31576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31577
31578  path="$IMPORT_MODULES_TOPDIR"
31579  has_colon=`$ECHO $path | $GREP ^.:`
31580  new_path="$path"
31581  if test "x$has_colon" = x; then
31582    # Not in mixed or Windows style, start by that.
31583    new_path=`cmd //c echo $path`
31584  fi
31585
31586
31587  input_path="$new_path"
31588  # Check if we need to convert this using DOS-style short mode. If the path
31589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31590  # take no chances and rewrite it.
31591  # Note: m4 eats our [], so we need to use [ and ] instead.
31592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31593  if test "x$has_forbidden_chars" != x; then
31594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31596  fi
31597
31598
31599  windows_path="$new_path"
31600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31601    unix_path=`$CYGPATH -u "$windows_path"`
31602    new_path="$unix_path"
31603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31605    new_path="$unix_path"
31606  fi
31607
31608  if test "x$path" != "x$new_path"; then
31609    IMPORT_MODULES_TOPDIR="$new_path"
31610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31611$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31612  fi
31613
31614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31616
31617    else
31618      # We're on a unix platform. Hooray! :)
31619      path="$IMPORT_MODULES_TOPDIR"
31620      has_space=`$ECHO "$path" | $GREP " "`
31621      if test "x$has_space" != x; then
31622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31623$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31625      fi
31626
31627      # Use eval to expand a potential ~
31628      eval path="$path"
31629      if test ! -f "$path" && test ! -d "$path"; then
31630        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31631      fi
31632
31633      if test -d "$path"; then
31634        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31635      else
31636        dir="`$DIRNAME "$path"`"
31637        base="`$BASENAME "$path"`"
31638        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31639      fi
31640    fi
31641  fi
31642
31643    elif test -e "$with_import_modules"; then
31644      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31645      $RM -rf "$IMPORT_MODULES_TOPDIR"
31646      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31647      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31648        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31649      fi
31650    else
31651      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31652    fi
31653  fi
31654
31655  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31656    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31657  fi
31658  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31659    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31660  fi
31661  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31662    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31663  fi
31664  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31665    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31666  fi
31667  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31668    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31669  fi
31670  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31671    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31672  fi
31673  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31674    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31675  fi
31676  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31677    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31678  fi
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690###############################################################################
31691#
31692# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31693# native code.
31694#
31695###############################################################################
31696
31697# See if we are doing a complete static build or not
31698
31699  # Check whether --enable-static-build was given.
31700if test "${enable_static_build+set}" = set; then :
31701  enableval=$enable_static_build;
31702fi
31703
31704  STATIC_BUILD=false
31705  if test "x$enable_static_build" = "xyes"; then
31706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31707$as_echo_n "checking if static build is enabled... " >&6; }
31708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31709$as_echo "yes" >&6; }
31710    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31711      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31712    fi
31713    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31714    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31715    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31716    STATIC_BUILD=true
31717  elif test "x$enable_static_build" = "xno"; then
31718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31719$as_echo_n "checking if static build is enabled... " >&6; }
31720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31721$as_echo "no" >&6; }
31722  elif test "x$enable_static_build" != "x"; then
31723    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31724  fi
31725
31726
31727
31728
31729# First determine the toolchain type (compiler family)
31730
31731
31732# Check whether --with-toolchain-type was given.
31733if test "${with_toolchain_type+set}" = set; then :
31734  withval=$with_toolchain_type;
31735fi
31736
31737
31738  # Use indirect variable referencing
31739  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31740  VALID_TOOLCHAINS=${!toolchain_var_name}
31741
31742  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31743    if test -n "$XCODEBUILD"; then
31744      # On Mac OS X, default toolchain to clang after Xcode 5
31745      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31746      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31747      if test $? -ne 0; then
31748        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31749      fi
31750      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31751          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31752          $CUT -f 1 -d .`
31753      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31754$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31755      if test $XCODE_MAJOR_VERSION -ge 5; then
31756          DEFAULT_TOOLCHAIN="clang"
31757      else
31758          DEFAULT_TOOLCHAIN="gcc"
31759      fi
31760    else
31761      # If Xcode is not installed, but the command line tools are
31762      # then we can't run xcodebuild. On these systems we should
31763      # default to clang
31764      DEFAULT_TOOLCHAIN="clang"
31765    fi
31766  else
31767    # First toolchain type in the list is the default
31768    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31769  fi
31770
31771  if test "x$with_toolchain_type" = xlist; then
31772    # List all toolchains
31773    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31774$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31775    for toolchain in $VALID_TOOLCHAINS; do
31776      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31777      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31778      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31779    done
31780
31781    exit 0
31782  elif test "x$with_toolchain_type" != x; then
31783    # User override; check that it is valid
31784    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31785      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31786$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31787      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31788$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31789      as_fn_error $? "Cannot continue." "$LINENO" 5
31790    fi
31791    TOOLCHAIN_TYPE=$with_toolchain_type
31792  else
31793    # No flag given, use default
31794    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31795  fi
31796
31797
31798  TOOLCHAIN_CC_BINARY_clang="clang"
31799  TOOLCHAIN_CC_BINARY_gcc="gcc"
31800  TOOLCHAIN_CC_BINARY_microsoft="cl"
31801  TOOLCHAIN_CC_BINARY_solstudio="cc"
31802  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31803
31804  TOOLCHAIN_CXX_BINARY_clang="clang++"
31805  TOOLCHAIN_CXX_BINARY_gcc="g++"
31806  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31807  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31808  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31809
31810  # Use indirect variable referencing
31811  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31812  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31813  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31814  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31815  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31816  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31817  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31818  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31819
31820
31821  # Define filename patterns
31822  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31823    LIBRARY_PREFIX=
31824    SHARED_LIBRARY_SUFFIX='.dll'
31825    STATIC_LIBRARY_SUFFIX='.lib'
31826    SHARED_LIBRARY='$1.dll'
31827    STATIC_LIBRARY='$1.lib'
31828    OBJ_SUFFIX='.obj'
31829    EXE_SUFFIX='.exe'
31830  else
31831    LIBRARY_PREFIX=lib
31832    SHARED_LIBRARY_SUFFIX='.so'
31833    STATIC_LIBRARY_SUFFIX='.a'
31834    SHARED_LIBRARY='lib$1.so'
31835    STATIC_LIBRARY='lib$1.a'
31836    OBJ_SUFFIX='.o'
31837    EXE_SUFFIX=''
31838    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31839      # For full static builds, we're overloading the SHARED_LIBRARY
31840      # variables in order to limit the amount of changes required.
31841      # It would be better to remove SHARED and just use LIBRARY and
31842      # LIBRARY_SUFFIX for libraries that can be built either
31843      # shared or static and use STATIC_* for libraries that are
31844      # always built statically.
31845      if test "x$STATIC_BUILD" = xtrue; then
31846        SHARED_LIBRARY='lib$1.a'
31847        SHARED_LIBRARY_SUFFIX='.a'
31848      else
31849        SHARED_LIBRARY='lib$1.dylib'
31850        SHARED_LIBRARY_SUFFIX='.dylib'
31851      fi
31852    fi
31853  fi
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31865    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31866$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31867  else
31868    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31869$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31870  fi
31871
31872
31873# User supplied flags should be used when configure detects compilers
31874
31875  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31876    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31877$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31878  fi
31879
31880  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31881    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31882$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31883  fi
31884
31885  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31886    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31887$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31888  fi
31889
31890
31891# Check whether --with-extra-cflags was given.
31892if test "${with_extra_cflags+set}" = set; then :
31893  withval=$with_extra_cflags;
31894fi
31895
31896
31897
31898# Check whether --with-extra-cxxflags was given.
31899if test "${with_extra_cxxflags+set}" = set; then :
31900  withval=$with_extra_cxxflags;
31901fi
31902
31903
31904
31905# Check whether --with-extra-ldflags was given.
31906if test "${with_extra_ldflags+set}" = set; then :
31907  withval=$with_extra_ldflags;
31908fi
31909
31910
31911  EXTRA_CFLAGS="$with_extra_cflags"
31912  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31913  EXTRA_LDFLAGS="$with_extra_ldflags"
31914
31915
31916
31917
31918
31919  # The global CFLAGS and LDLAGS variables are used by configure tests and
31920  # should include the extra parameters
31921  CFLAGS="$EXTRA_CFLAGS"
31922  CXXFLAGS="$EXTRA_CXXFLAGS"
31923  LDFLAGS="$EXTRA_LDFLAGS"
31924  CPPFLAGS=""
31925
31926# The sysroot cflags are needed for configure to be able to run the compilers
31927
31928  if test "x$SYSROOT" != "x"; then
31929    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31930      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31931        # Solaris Studio does not have a concept of sysroot. Instead we must
31932        # make sure the default include and lib dirs are appended to each
31933        # compile and link command line. Must also add -I-xbuiltin to enable
31934        # inlining of system functions and intrinsics.
31935        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31936        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31937            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31938      fi
31939    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31940      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31941      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31942    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31943      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31944      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31945    fi
31946    # The global CFLAGS and LDFLAGS variables need these for configure to function
31947    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31948    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31949    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31950    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31951  fi
31952
31953  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31954    # We also need -iframework<path>/System/Library/Frameworks
31955    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31956    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31957    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31958    # set this here so it doesn't have to be peppered throughout the forest
31959    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31960    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31961  fi
31962
31963
31964
31965
31966
31967# Then detect the actual binaries needed
31968
31969  # FIXME: Is this needed?
31970  ac_ext=cpp
31971ac_cpp='$CXXCPP $CPPFLAGS'
31972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31975
31976
31977  # Store the CFLAGS etc passed to the configure script.
31978  ORG_CFLAGS="$CFLAGS"
31979  ORG_CXXFLAGS="$CXXFLAGS"
31980
31981  # autoconf magic only relies on PATH, so update it if tools dir is specified
31982  OLD_PATH="$PATH"
31983
31984  # On Windows, we need to detect the visual studio installation first.
31985  # This will change the PATH, but we need to keep that new PATH even
31986  # after toolchain detection is done, since the compiler (on x86) uses
31987  # it for DLL resolution in runtime.
31988  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31989      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31990
31991  # Store path to cygwin link.exe to help excluding it when searching for
31992  # VS linker. This must be done before changing the PATH when looking for VS.
31993  # Extract the first word of "link", so it can be a program name with args.
31994set dummy link; ac_word=$2
31995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31996$as_echo_n "checking for $ac_word... " >&6; }
31997if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31998  $as_echo_n "(cached) " >&6
31999else
32000  case $CYGWIN_LINK in
32001  [\\/]* | ?:[\\/]*)
32002  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32003  ;;
32004  *)
32005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32006for as_dir in $PATH
32007do
32008  IFS=$as_save_IFS
32009  test -z "$as_dir" && as_dir=.
32010    for ac_exec_ext in '' $ac_executable_extensions; do
32011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32012    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32014    break 2
32015  fi
32016done
32017  done
32018IFS=$as_save_IFS
32019
32020  ;;
32021esac
32022fi
32023CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32024if test -n "$CYGWIN_LINK"; then
32025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32026$as_echo "$CYGWIN_LINK" >&6; }
32027else
32028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32029$as_echo "no" >&6; }
32030fi
32031
32032
32033  if test "x$CYGWIN_LINK" != x; then
32034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32035$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32036    "$CYGWIN_LINK" --version > /dev/null
32037    if test $? -eq 0 ; then
32038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32039$as_echo "yes" >&6; }
32040    else
32041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32042$as_echo "no" >&6; }
32043      # This might be the VS linker. Don't exclude it later on.
32044      CYGWIN_LINK=""
32045    fi
32046  fi
32047
32048  # First-hand choice is to locate and run the vsvars bat file.
32049
32050
32051# Check whether --with-toolchain-version was given.
32052if test "${with_toolchain_version+set}" = set; then :
32053  withval=$with_toolchain_version;
32054fi
32055
32056
32057  if test "x$with_toolchain_version" = xlist; then
32058    # List all toolchains
32059    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32060$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32061    for version in $VALID_VS_VERSIONS; do
32062      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32063      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32064    done
32065
32066    exit 0
32067  elif test "x$DEVKIT_VS_VERSION" != x; then
32068    VS_VERSION=$DEVKIT_VS_VERSION
32069    TOOLCHAIN_VERSION=$VS_VERSION
32070    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32071    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32072    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32073    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32074    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32075    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32076
32077    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32078    # can still be exported as INCLUDE for compiler invocations without
32079    # SYSROOT_CFLAGS
32080    OLDIFS="$IFS"
32081    IFS=";"
32082    for i in $DEVKIT_VS_INCLUDE; do
32083      ipath=$i
32084
32085  unix_path="$ipath"
32086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32087    windows_path=`$CYGPATH -m "$unix_path"`
32088    ipath="$windows_path"
32089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32090    windows_path=`cmd //c echo $unix_path`
32091    ipath="$windows_path"
32092  fi
32093
32094      VS_INCLUDE="$VS_INCLUDE;$ipath"
32095    done
32096    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32097    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32098    for i in $DEVKIT_VS_LIB; do
32099      libpath=$i
32100
32101  unix_path="$libpath"
32102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32103    windows_path=`$CYGPATH -m "$unix_path"`
32104    libpath="$windows_path"
32105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32106    windows_path=`cmd //c echo $unix_path`
32107    libpath="$windows_path"
32108  fi
32109
32110      VS_LIB="$VS_LIB;$libpath"
32111    done
32112    IFS="$OLDIFS"
32113
32114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32115$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32116
32117  elif test "x$with_toolchain_version" != x; then
32118    # User override; check that it is valid
32119    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32120      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32121$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32122      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32123$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32124      as_fn_error $? "Cannot continue." "$LINENO" 5
32125    fi
32126    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32127  else
32128    # No flag given, use default
32129    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32130  fi
32131
32132  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32133
32134  VS_VERSION="$VS_VERSION"
32135  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32136  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32137  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32138  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32139
32140  # When using --with-tools-dir, assume it points to the correct and default
32141  # version of Visual Studio or that --with-toolchain-version was also set.
32142  if test "x$with_tools_dir" != x; then
32143
32144  if test "x$VS_ENV_CMD" = x; then
32145    VS_VERSION="${VS_VERSION}"
32146    VS_BASE="$with_tools_dir/../.."
32147    METHOD="--with-tools-dir"
32148
32149    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32150      VCVARSFILE="vc/bin/vcvars32.bat"
32151    else
32152      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32153    fi
32154
32155
32156  windows_path="$VS_BASE"
32157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32158    unix_path=`$CYGPATH -u "$windows_path"`
32159    VS_BASE="$unix_path"
32160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32162    VS_BASE="$unix_path"
32163  fi
32164
32165    if test -d "$VS_BASE"; then
32166      if test -f "$VS_BASE/$VCVARSFILE"; then
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32168$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32169        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32170        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32171        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32172        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32173      else
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32175$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32176        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32177$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32178      fi
32179    fi
32180  fi
32181
32182
32183  if test "x$VS_ENV_CMD" = x; then
32184    VS_VERSION="${VS_VERSION}"
32185    VS_BASE="$with_tools_dir/../../.."
32186    METHOD="--with-tools-dir"
32187
32188    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32189      VCVARSFILE="vc/bin/vcvars32.bat"
32190    else
32191      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32192    fi
32193
32194
32195  windows_path="$VS_BASE"
32196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32197    unix_path=`$CYGPATH -u "$windows_path"`
32198    VS_BASE="$unix_path"
32199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32201    VS_BASE="$unix_path"
32202  fi
32203
32204    if test -d "$VS_BASE"; then
32205      if test -f "$VS_BASE/$VCVARSFILE"; then
32206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32207$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32208        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32209        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32210        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32211        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32212      else
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32214$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32215        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32216$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32217      fi
32218    fi
32219  fi
32220
32221    if test "x$VS_ENV_CMD" = x; then
32222      # Having specified an argument which is incorrect will produce an instant failure;
32223      # we should not go on looking
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32225$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32226      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32227$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32228      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32229$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32230      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32231    fi
32232  fi
32233
32234  VS_ENV_CMD=""
32235  VS_ENV_ARGS=""
32236
32237  if test "x$VS_COMNTOOLS" != x; then
32238
32239  if test "x$VS_ENV_CMD" = x; then
32240    VS_VERSION="${VS_VERSION}"
32241    VS_BASE="$VS_COMNTOOLS/../.."
32242    METHOD="$VS_COMNTOOLS_VAR variable"
32243
32244    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32245      VCVARSFILE="vc/bin/vcvars32.bat"
32246    else
32247      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32248    fi
32249
32250
32251  windows_path="$VS_BASE"
32252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32253    unix_path=`$CYGPATH -u "$windows_path"`
32254    VS_BASE="$unix_path"
32255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32257    VS_BASE="$unix_path"
32258  fi
32259
32260    if test -d "$VS_BASE"; then
32261      if test -f "$VS_BASE/$VCVARSFILE"; then
32262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32263$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32264        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32265        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32266        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32267        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32268      else
32269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32270$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32272$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32273      fi
32274    fi
32275  fi
32276
32277  fi
32278  if test "x$PROGRAMFILES" != x; then
32279
32280  if test "x$VS_ENV_CMD" = x; then
32281    VS_VERSION="${VS_VERSION}"
32282    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32283    METHOD="well-known name"
32284
32285    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32286      VCVARSFILE="vc/bin/vcvars32.bat"
32287    else
32288      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32289    fi
32290
32291
32292  windows_path="$VS_BASE"
32293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32294    unix_path=`$CYGPATH -u "$windows_path"`
32295    VS_BASE="$unix_path"
32296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32298    VS_BASE="$unix_path"
32299  fi
32300
32301    if test -d "$VS_BASE"; then
32302      if test -f "$VS_BASE/$VCVARSFILE"; then
32303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32304$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32305        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32306        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32307        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32308        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32309      else
32310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32311$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32312        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32313$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32314      fi
32315    fi
32316  fi
32317
32318  fi
32319  # Work around the insanely named ProgramFiles(x86) env variable
32320  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32321  if test "x$PROGRAMFILES_X86" != x; then
32322
32323  if test "x$VS_ENV_CMD" = x; then
32324    VS_VERSION="${VS_VERSION}"
32325    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32326    METHOD="well-known name"
32327
32328    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32329      VCVARSFILE="vc/bin/vcvars32.bat"
32330    else
32331      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32332    fi
32333
32334
32335  windows_path="$VS_BASE"
32336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32337    unix_path=`$CYGPATH -u "$windows_path"`
32338    VS_BASE="$unix_path"
32339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32341    VS_BASE="$unix_path"
32342  fi
32343
32344    if test -d "$VS_BASE"; then
32345      if test -f "$VS_BASE/$VCVARSFILE"; then
32346        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32347$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32348        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32349        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32350        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32351        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32352      else
32353        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32354$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32355        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32356$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32357      fi
32358    fi
32359  fi
32360
32361  fi
32362
32363  if test "x$VS_ENV_CMD" = x; then
32364    VS_VERSION="${VS_VERSION}"
32365    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32366    METHOD="well-known name"
32367
32368    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32369      VCVARSFILE="vc/bin/vcvars32.bat"
32370    else
32371      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32372    fi
32373
32374
32375  windows_path="$VS_BASE"
32376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32377    unix_path=`$CYGPATH -u "$windows_path"`
32378    VS_BASE="$unix_path"
32379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32381    VS_BASE="$unix_path"
32382  fi
32383
32384    if test -d "$VS_BASE"; then
32385      if test -f "$VS_BASE/$VCVARSFILE"; then
32386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32387$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32388        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32389        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32390        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32391        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32392      else
32393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32394$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32395        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32396$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32397      fi
32398    fi
32399  fi
32400
32401
32402  if test "x$VS_ENV_CMD" = x; then
32403    VS_VERSION="${VS_VERSION}"
32404    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32405    METHOD="well-known name"
32406
32407    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32408      VCVARSFILE="vc/bin/vcvars32.bat"
32409    else
32410      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32411    fi
32412
32413
32414  windows_path="$VS_BASE"
32415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32416    unix_path=`$CYGPATH -u "$windows_path"`
32417    VS_BASE="$unix_path"
32418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32420    VS_BASE="$unix_path"
32421  fi
32422
32423    if test -d "$VS_BASE"; then
32424      if test -f "$VS_BASE/$VCVARSFILE"; then
32425        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32426$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32427        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32428        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32429        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32430        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32431      else
32432        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32433$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32434        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32435$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32436      fi
32437    fi
32438  fi
32439
32440
32441  if test "x$SDK_INSTALL_DIR" != x; then
32442    if test "x$ProgramW6432" != x; then
32443
32444  if test "x$VS_ENV_CMD" = x; then
32445    VS_VERSION="${VS_VERSION}"
32446    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32447    METHOD="well-known name"
32448
32449  windows_path="$WIN_SDK_BASE"
32450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32451    unix_path=`$CYGPATH -u "$windows_path"`
32452    WIN_SDK_BASE="$unix_path"
32453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32455    WIN_SDK_BASE="$unix_path"
32456  fi
32457
32458    if test -d "$WIN_SDK_BASE"; then
32459      # There have been cases of partial or broken SDK installations. A missing
32460      # lib dir is not going to work.
32461      if test ! -d "$WIN_SDK_BASE/lib"; then
32462        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32463$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32464        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32465$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32466      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32467        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32468$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32469        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32470        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32471          VS_ENV_ARGS="/x86"
32472        else
32473          VS_ENV_ARGS="/x64"
32474        fi
32475        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32476        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32477        # TODO: improve detection for other versions of SDK
32478        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32479      else
32480        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32481$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32482        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32483$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32484      fi
32485    fi
32486  fi
32487
32488    fi
32489    if test "x$PROGRAMW6432" != x; then
32490
32491  if test "x$VS_ENV_CMD" = x; then
32492    VS_VERSION="${VS_VERSION}"
32493    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32494    METHOD="well-known name"
32495
32496  windows_path="$WIN_SDK_BASE"
32497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32498    unix_path=`$CYGPATH -u "$windows_path"`
32499    WIN_SDK_BASE="$unix_path"
32500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32502    WIN_SDK_BASE="$unix_path"
32503  fi
32504
32505    if test -d "$WIN_SDK_BASE"; then
32506      # There have been cases of partial or broken SDK installations. A missing
32507      # lib dir is not going to work.
32508      if test ! -d "$WIN_SDK_BASE/lib"; then
32509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32510$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32511        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32512$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32513      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32514        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32515$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32516        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32517        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32518          VS_ENV_ARGS="/x86"
32519        else
32520          VS_ENV_ARGS="/x64"
32521        fi
32522        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32523        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32524        # TODO: improve detection for other versions of SDK
32525        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32526      else
32527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32528$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32529        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32530$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32531      fi
32532    fi
32533  fi
32534
32535    fi
32536    if test "x$PROGRAMFILES" != x; then
32537
32538  if test "x$VS_ENV_CMD" = x; then
32539    VS_VERSION="${VS_VERSION}"
32540    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32541    METHOD="well-known name"
32542
32543  windows_path="$WIN_SDK_BASE"
32544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32545    unix_path=`$CYGPATH -u "$windows_path"`
32546    WIN_SDK_BASE="$unix_path"
32547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32549    WIN_SDK_BASE="$unix_path"
32550  fi
32551
32552    if test -d "$WIN_SDK_BASE"; then
32553      # There have been cases of partial or broken SDK installations. A missing
32554      # lib dir is not going to work.
32555      if test ! -d "$WIN_SDK_BASE/lib"; then
32556        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32557$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32558        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32559$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32560      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32561        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32562$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32563        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32564        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32565          VS_ENV_ARGS="/x86"
32566        else
32567          VS_ENV_ARGS="/x64"
32568        fi
32569        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32570        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32571        # TODO: improve detection for other versions of SDK
32572        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32573      else
32574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32575$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32576        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32577$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32578      fi
32579    fi
32580  fi
32581
32582    fi
32583
32584  if test "x$VS_ENV_CMD" = x; then
32585    VS_VERSION="${VS_VERSION}"
32586    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32587    METHOD="well-known name"
32588
32589  windows_path="$WIN_SDK_BASE"
32590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32591    unix_path=`$CYGPATH -u "$windows_path"`
32592    WIN_SDK_BASE="$unix_path"
32593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32595    WIN_SDK_BASE="$unix_path"
32596  fi
32597
32598    if test -d "$WIN_SDK_BASE"; then
32599      # There have been cases of partial or broken SDK installations. A missing
32600      # lib dir is not going to work.
32601      if test ! -d "$WIN_SDK_BASE/lib"; then
32602        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32603$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32604        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32605$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32606      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32607        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32608$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32609        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32610        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32611          VS_ENV_ARGS="/x86"
32612        else
32613          VS_ENV_ARGS="/x64"
32614        fi
32615        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32616        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32617        # TODO: improve detection for other versions of SDK
32618        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32619      else
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, SetEnv.Cmd is missing. Ignoring" >&5
32623$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32624      fi
32625    fi
32626  fi
32627
32628
32629  if test "x$VS_ENV_CMD" = x; then
32630    VS_VERSION="${VS_VERSION}"
32631    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32632    METHOD="well-known name"
32633
32634  windows_path="$WIN_SDK_BASE"
32635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32636    unix_path=`$CYGPATH -u "$windows_path"`
32637    WIN_SDK_BASE="$unix_path"
32638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32640    WIN_SDK_BASE="$unix_path"
32641  fi
32642
32643    if test -d "$WIN_SDK_BASE"; then
32644      # There have been cases of partial or broken SDK installations. A missing
32645      # lib dir is not going to work.
32646      if test ! -d "$WIN_SDK_BASE/lib"; then
32647        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32648$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32649        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32650$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32651      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32653$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32654        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32655        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32656          VS_ENV_ARGS="/x86"
32657        else
32658          VS_ENV_ARGS="/x64"
32659        fi
32660        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32661        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32662        # TODO: improve detection for other versions of SDK
32663        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32664      else
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32666$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32668$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32669      fi
32670    fi
32671  fi
32672
32673  fi
32674
32675    if test "x$VS_ENV_CMD" != x; then
32676      TOOLCHAIN_VERSION=$VS_VERSION
32677      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32678      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32679      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32680      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32681      # The rest of the variables are already evaled while probing
32682      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32683$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32684      break
32685    fi
32686  done
32687
32688
32689  # If we have a devkit, skip all of the below.
32690  if test "x$DEVKIT_VS_VERSION" = x; then
32691    if test "x$VS_ENV_CMD" != x; then
32692      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32693
32694  # Only process if variable expands to non-empty
32695
32696  if test "x$VS_ENV_CMD" != x; then
32697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32698
32699  # First separate the path from the arguments. This will split at the first
32700  # space.
32701  complete="$VS_ENV_CMD"
32702  path="${complete%% *}"
32703  tmp="$complete EOL"
32704  arguments="${tmp#* }"
32705
32706  # Input might be given as Windows format, start by converting to
32707  # unix format.
32708  new_path=`$CYGPATH -u "$path"`
32709
32710  # Now try to locate executable using which
32711  new_path=`$WHICH "$new_path" 2> /dev/null`
32712  # bat and cmd files are not always considered executable in cygwin causing which
32713  # to not find them
32714  if test "x$new_path" = x \
32715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32717    new_path=`$CYGPATH -u "$path"`
32718  fi
32719  if test "x$new_path" = x; then
32720    # Oops. Which didn't find the executable.
32721    # The splitting of arguments from the executable at a space might have been incorrect,
32722    # since paths with space are more likely in Windows. Give it another try with the whole
32723    # argument.
32724    path="$complete"
32725    arguments="EOL"
32726    new_path=`$CYGPATH -u "$path"`
32727    new_path=`$WHICH "$new_path" 2> /dev/null`
32728    # bat and cmd files are not always considered executable in cygwin causing which
32729    # to not find them
32730    if test "x$new_path" = x \
32731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32733      new_path=`$CYGPATH -u "$path"`
32734    fi
32735    if test "x$new_path" = x; then
32736      # It's still not found. Now this is an unrecoverable error.
32737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32738$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32739      has_space=`$ECHO "$complete" | $GREP " "`
32740      if test "x$has_space" != x; then
32741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32743      fi
32744      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32745    fi
32746  fi
32747
32748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32751  # "foo.exe" is OK but "foo" is an error.
32752  #
32753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32754  # It is also a way to make sure we got the proper file name for the real test later on.
32755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32756  if test "x$test_shortpath" = x; then
32757    # Short path failed, file does not exist as specified.
32758    # Try adding .exe or .cmd
32759    if test -f "${new_path}.exe"; then
32760      input_to_shortpath="${new_path}.exe"
32761    elif test -f "${new_path}.cmd"; then
32762      input_to_shortpath="${new_path}.cmd"
32763    else
32764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32765$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32768      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32769    fi
32770  else
32771    input_to_shortpath="$new_path"
32772  fi
32773
32774  # Call helper function which possibly converts this using DOS-style short mode.
32775  # If so, the updated path is stored in $new_path.
32776  new_path="$input_to_shortpath"
32777
32778  input_path="$input_to_shortpath"
32779  # Check if we need to convert this using DOS-style short mode. If the path
32780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32781  # take no chances and rewrite it.
32782  # Note: m4 eats our [], so we need to use [ and ] instead.
32783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32784  if test "x$has_forbidden_chars" != x; then
32785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32789      # Going to short mode and back again did indeed matter. Since short mode is
32790      # case insensitive, let's make it lowercase to improve readability.
32791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32792      # Now convert it back to Unix-style (cygpath)
32793      input_path=`$CYGPATH -u "$shortmode_path"`
32794      new_path="$input_path"
32795    fi
32796  fi
32797
32798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32799  if test "x$test_cygdrive_prefix" = x; then
32800    # As a simple fix, exclude /usr/bin since it's not a real path.
32801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32803      # a path prefixed by /cygdrive for fixpath to work.
32804      new_path="$CYGWIN_ROOT_PATH$input_path"
32805    fi
32806  fi
32807
32808  # remove trailing .exe if any
32809  new_path="${new_path/%.exe/}"
32810
32811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32812
32813  # First separate the path from the arguments. This will split at the first
32814  # space.
32815  complete="$VS_ENV_CMD"
32816  path="${complete%% *}"
32817  tmp="$complete EOL"
32818  arguments="${tmp#* }"
32819
32820  # Input might be given as Windows format, start by converting to
32821  # unix format.
32822  new_path="$path"
32823
32824  windows_path="$new_path"
32825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32826    unix_path=`$CYGPATH -u "$windows_path"`
32827    new_path="$unix_path"
32828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32830    new_path="$unix_path"
32831  fi
32832
32833
32834  # Now try to locate executable using which
32835  new_path=`$WHICH "$new_path" 2> /dev/null`
32836
32837  if test "x$new_path" = x; then
32838    # Oops. Which didn't find the executable.
32839    # The splitting of arguments from the executable at a space might have been incorrect,
32840    # since paths with space are more likely in Windows. Give it another try with the whole
32841    # argument.
32842    path="$complete"
32843    arguments="EOL"
32844    new_path="$path"
32845
32846  windows_path="$new_path"
32847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32848    unix_path=`$CYGPATH -u "$windows_path"`
32849    new_path="$unix_path"
32850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32852    new_path="$unix_path"
32853  fi
32854
32855
32856    new_path=`$WHICH "$new_path" 2> /dev/null`
32857    # bat and cmd files are not always considered executable in MSYS causing which
32858    # to not find them
32859    if test "x$new_path" = x \
32860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32862      new_path="$path"
32863
32864  windows_path="$new_path"
32865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32866    unix_path=`$CYGPATH -u "$windows_path"`
32867    new_path="$unix_path"
32868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32870    new_path="$unix_path"
32871  fi
32872
32873    fi
32874
32875    if test "x$new_path" = x; then
32876      # It's still not found. Now this is an unrecoverable error.
32877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32878$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32879      has_space=`$ECHO "$complete" | $GREP " "`
32880      if test "x$has_space" != x; then
32881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32883      fi
32884      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32885    fi
32886  fi
32887
32888  # Now new_path has a complete unix path to the binary
32889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32890    # Keep paths in /bin as-is, but remove trailing .exe if any
32891    new_path="${new_path/%.exe/}"
32892    # Do not save /bin paths to all_fixpath_prefixes!
32893  else
32894    # Not in mixed or Windows style, start by that.
32895    new_path=`cmd //c echo $new_path`
32896
32897  input_path="$new_path"
32898  # Check if we need to convert this using DOS-style short mode. If the path
32899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32900  # take no chances and rewrite it.
32901  # Note: m4 eats our [], so we need to use [ and ] instead.
32902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32903  if test "x$has_forbidden_chars" != x; then
32904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32906  fi
32907
32908    # Output is in $new_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    # remove trailing .exe if any
32920    new_path="${new_path/%.exe/}"
32921
32922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32924  fi
32925
32926    else
32927      # We're on a unix platform. Hooray! :)
32928      # First separate the path from the arguments. This will split at the first
32929      # space.
32930      complete="$VS_ENV_CMD"
32931      path="${complete%% *}"
32932      tmp="$complete EOL"
32933      arguments="${tmp#* }"
32934
32935      # Cannot rely on the command "which" here since it doesn't always work.
32936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32937      if test -z "$is_absolute_path"; then
32938        # Path to executable is not absolute. Find it.
32939        IFS_save="$IFS"
32940        IFS=:
32941        for p in $PATH; do
32942          if test -f "$p/$path" && test -x "$p/$path"; then
32943            new_path="$p/$path"
32944            break
32945          fi
32946        done
32947        IFS="$IFS_save"
32948      else
32949        # This is an absolute path, we can use it without further modifications.
32950        new_path="$path"
32951      fi
32952
32953      if test "x$new_path" = x; then
32954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32955$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32956        has_space=`$ECHO "$complete" | $GREP " "`
32957        if test "x$has_space" != x; then
32958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32960        fi
32961        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32962      fi
32963    fi
32964
32965    # Now join together the path and the arguments once again
32966    if test "x$arguments" != xEOL; then
32967      new_complete="$new_path ${arguments% *}"
32968    else
32969      new_complete="$new_path"
32970    fi
32971
32972    if test "x$complete" != "x$new_complete"; then
32973      VS_ENV_CMD="$new_complete"
32974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32975$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32976    fi
32977  fi
32978
32979
32980      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32981      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32982$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32983
32984      # We need to create a couple of temporary files.
32985      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32986      $MKDIR -p $VS_ENV_TMP_DIR
32987
32988      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32989      # Instead create a shell script which will set the relevant variables when run.
32990      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32991
32992  unix_path="$WINPATH_VS_ENV_CMD"
32993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32994    windows_path=`$CYGPATH -m "$unix_path"`
32995    WINPATH_VS_ENV_CMD="$windows_path"
32996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32997    windows_path=`cmd //c echo $unix_path`
32998    WINPATH_VS_ENV_CMD="$windows_path"
32999  fi
33000
33001      WINPATH_BASH="$BASH"
33002
33003  unix_path="$WINPATH_BASH"
33004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33005    windows_path=`$CYGPATH -m "$unix_path"`
33006    WINPATH_BASH="$windows_path"
33007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33008    windows_path=`cmd //c echo $unix_path`
33009    WINPATH_BASH="$windows_path"
33010  fi
33011
33012
33013      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33014      # script (executable by bash) that will setup the important variables.
33015      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33016      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33017      # This will end up something like:
33018      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33019      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33020      # These will end up something like:
33021      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33022      # The trailing space for everyone except PATH is no typo, but is needed due
33023      # to trailing \ in the Windows paths. These will be stripped later.
33024      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33025          >> $EXTRACT_VC_ENV_BAT_FILE
33026      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33027          >> $EXTRACT_VC_ENV_BAT_FILE
33028      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33029          >> $EXTRACT_VC_ENV_BAT_FILE
33030      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33031          >> $EXTRACT_VC_ENV_BAT_FILE
33032      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33033          >> $EXTRACT_VC_ENV_BAT_FILE
33034      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33035          >> $EXTRACT_VC_ENV_BAT_FILE
33036
33037      # Now execute the newly created bat file.
33038      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33039      # Change directory so we don't need to mess with Windows paths in redirects.
33040      cd $VS_ENV_TMP_DIR
33041      cmd /c extract-vs-env.bat | $CAT
33042      cd $CURDIR
33043
33044      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33045        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33046$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33047        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33048$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33049        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33050$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33051        as_fn_error $? "Cannot continue" "$LINENO" 5
33052      fi
33053
33054      # Now set all paths and other env variables. This will allow the rest of
33055      # the configure script to find and run the compiler in the proper way.
33056      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33057$as_echo "$as_me: Setting extracted environment variables" >&6;}
33058      . $VS_ENV_TMP_DIR/set-vs-env.sh
33059      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33060      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33061    else
33062      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33063      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33064$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33065    fi
33066  fi
33067
33068  # At this point, we should have correct variables in the environment, or we can't continue.
33069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33070$as_echo_n "checking for Visual Studio variables... " >&6; }
33071
33072  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33073      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33074    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33076$as_echo "present but broken" >&6; }
33077      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33078    else
33079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33080$as_echo "ok" >&6; }
33081      # Remove any trailing "\" ";" and " " from the variables.
33082      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33083      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33084      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33085      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33086      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33087      # Remove any paths containing # (typically F#) as that messes up make. This
33088      # is needed if visual studio was installed with F# support.
33089      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33090
33091
33092
33093
33094
33095      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33096      OLDIFS="$IFS"
33097      IFS=";"
33098      for i in $VS_INCLUDE; do
33099        ipath=$i
33100        # Only process non-empty elements
33101        if test "x$ipath" != x; then
33102          IFS="$OLDIFS"
33103          # Check that directory exists before calling fixup_path
33104          testpath=$ipath
33105
33106  windows_path="$testpath"
33107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33108    unix_path=`$CYGPATH -u "$windows_path"`
33109    testpath="$unix_path"
33110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33112    testpath="$unix_path"
33113  fi
33114
33115          if test -d "$testpath"; then
33116
33117  # Only process if variable expands to non-empty
33118
33119  if test "x$ipath" != x; then
33120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33121
33122  # Input might be given as Windows format, start by converting to
33123  # unix format.
33124  path="$ipath"
33125  new_path=`$CYGPATH -u "$path"`
33126
33127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33130  # "foo.exe" is OK but "foo" is an error.
33131  #
33132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33133  # It is also a way to make sure we got the proper file name for the real test later on.
33134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33135  if test "x$test_shortpath" = x; then
33136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33137$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33138    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33139  fi
33140
33141  # Call helper function which possibly converts this using DOS-style short mode.
33142  # If so, the updated path is stored in $new_path.
33143
33144  input_path="$new_path"
33145  # Check if we need to convert this using DOS-style short mode. If the path
33146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33147  # take no chances and rewrite it.
33148  # Note: m4 eats our [], so we need to use [ and ] instead.
33149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33150  if test "x$has_forbidden_chars" != x; then
33151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33155      # Going to short mode and back again did indeed matter. Since short mode is
33156      # case insensitive, let's make it lowercase to improve readability.
33157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33158      # Now convert it back to Unix-style (cygpath)
33159      input_path=`$CYGPATH -u "$shortmode_path"`
33160      new_path="$input_path"
33161    fi
33162  fi
33163
33164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33165  if test "x$test_cygdrive_prefix" = x; then
33166    # As a simple fix, exclude /usr/bin since it's not a real path.
33167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33169      # a path prefixed by /cygdrive for fixpath to work.
33170      new_path="$CYGWIN_ROOT_PATH$input_path"
33171    fi
33172  fi
33173
33174
33175  if test "x$path" != "x$new_path"; then
33176    ipath="$new_path"
33177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33178$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33179  fi
33180
33181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33182
33183  path="$ipath"
33184  has_colon=`$ECHO $path | $GREP ^.:`
33185  new_path="$path"
33186  if test "x$has_colon" = x; then
33187    # Not in mixed or Windows style, start by that.
33188    new_path=`cmd //c echo $path`
33189  fi
33190
33191
33192  input_path="$new_path"
33193  # Check if we need to convert this using DOS-style short mode. If the path
33194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33195  # take no chances and rewrite it.
33196  # Note: m4 eats our [], so we need to use [ and ] instead.
33197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33198  if test "x$has_forbidden_chars" != x; then
33199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33201  fi
33202
33203
33204  windows_path="$new_path"
33205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33206    unix_path=`$CYGPATH -u "$windows_path"`
33207    new_path="$unix_path"
33208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33210    new_path="$unix_path"
33211  fi
33212
33213  if test "x$path" != "x$new_path"; then
33214    ipath="$new_path"
33215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33216$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33217  fi
33218
33219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33221
33222    else
33223      # We're on a unix platform. Hooray! :)
33224      path="$ipath"
33225      has_space=`$ECHO "$path" | $GREP " "`
33226      if test "x$has_space" != x; then
33227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33228$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33230      fi
33231
33232      # Use eval to expand a potential ~
33233      eval path="$path"
33234      if test ! -f "$path" && test ! -d "$path"; then
33235        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33236      fi
33237
33238      if test -d "$path"; then
33239        ipath="`cd "$path"; $THEPWDCMD -L`"
33240      else
33241        dir="`$DIRNAME "$path"`"
33242        base="`$BASENAME "$path"`"
33243        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33244      fi
33245    fi
33246  fi
33247
33248            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33249          fi
33250          IFS=";"
33251        fi
33252      done
33253      # Convert VS_LIB into SYSROOT_LDFLAGS
33254      for i in $VS_LIB; do
33255        libpath=$i
33256        # Only process non-empty elements
33257        if test "x$libpath" != x; then
33258          IFS="$OLDIFS"
33259          # Check that directory exists before calling fixup_path
33260          testpath=$libpath
33261
33262  windows_path="$testpath"
33263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33264    unix_path=`$CYGPATH -u "$windows_path"`
33265    testpath="$unix_path"
33266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33268    testpath="$unix_path"
33269  fi
33270
33271          if test -d "$testpath"; then
33272
33273  # Only process if variable expands to non-empty
33274
33275  if test "x$libpath" != x; then
33276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277
33278  # Input might be given as Windows format, start by converting to
33279  # unix format.
33280  path="$libpath"
33281  new_path=`$CYGPATH -u "$path"`
33282
33283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33286  # "foo.exe" is OK but "foo" is an error.
33287  #
33288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33289  # It is also a way to make sure we got the proper file name for the real test later on.
33290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33291  if test "x$test_shortpath" = x; then
33292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33293$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33294    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33295  fi
33296
33297  # Call helper function which possibly converts this using DOS-style short mode.
33298  # If so, the updated path is stored in $new_path.
33299
33300  input_path="$new_path"
33301  # Check if we need to convert this using DOS-style short mode. If the path
33302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33303  # take no chances and rewrite it.
33304  # Note: m4 eats our [], so we need to use [ and ] instead.
33305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33306  if test "x$has_forbidden_chars" != x; then
33307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33311      # Going to short mode and back again did indeed matter. Since short mode is
33312      # case insensitive, let's make it lowercase to improve readability.
33313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33314      # Now convert it back to Unix-style (cygpath)
33315      input_path=`$CYGPATH -u "$shortmode_path"`
33316      new_path="$input_path"
33317    fi
33318  fi
33319
33320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33321  if test "x$test_cygdrive_prefix" = x; then
33322    # As a simple fix, exclude /usr/bin since it's not a real path.
33323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33325      # a path prefixed by /cygdrive for fixpath to work.
33326      new_path="$CYGWIN_ROOT_PATH$input_path"
33327    fi
33328  fi
33329
33330
33331  if test "x$path" != "x$new_path"; then
33332    libpath="$new_path"
33333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33334$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33335  fi
33336
33337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33338
33339  path="$libpath"
33340  has_colon=`$ECHO $path | $GREP ^.:`
33341  new_path="$path"
33342  if test "x$has_colon" = x; then
33343    # Not in mixed or Windows style, start by that.
33344    new_path=`cmd //c echo $path`
33345  fi
33346
33347
33348  input_path="$new_path"
33349  # Check if we need to convert this using DOS-style short mode. If the path
33350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33351  # take no chances and rewrite it.
33352  # Note: m4 eats our [], so we need to use [ and ] instead.
33353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33354  if test "x$has_forbidden_chars" != x; then
33355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33357  fi
33358
33359
33360  windows_path="$new_path"
33361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362    unix_path=`$CYGPATH -u "$windows_path"`
33363    new_path="$unix_path"
33364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33366    new_path="$unix_path"
33367  fi
33368
33369  if test "x$path" != "x$new_path"; then
33370    libpath="$new_path"
33371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33372$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33373  fi
33374
33375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33377
33378    else
33379      # We're on a unix platform. Hooray! :)
33380      path="$libpath"
33381      has_space=`$ECHO "$path" | $GREP " "`
33382      if test "x$has_space" != x; then
33383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33384$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33386      fi
33387
33388      # Use eval to expand a potential ~
33389      eval path="$path"
33390      if test ! -f "$path" && test ! -d "$path"; then
33391        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33392      fi
33393
33394      if test -d "$path"; then
33395        libpath="`cd "$path"; $THEPWDCMD -L`"
33396      else
33397        dir="`$DIRNAME "$path"`"
33398        base="`$BASENAME "$path"`"
33399        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33400      fi
33401    fi
33402  fi
33403
33404            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33405          fi
33406          IFS=";"
33407        fi
33408      done
33409      IFS="$OLDIFS"
33410    fi
33411  else
33412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33413$as_echo "not found" >&6; }
33414
33415    if test "x$VS_ENV_CMD" = x; then
33416      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33417$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33419$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33420    else
33421      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33422$as_echo "$as_me: Running the extraction script failed." >&6;}
33423    fi
33424    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33425$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33426    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33427$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33428    as_fn_error $? "Cannot continue" "$LINENO" 5
33429  fi
33430
33431    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33432    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33433    PATH="$VS_PATH"
33434    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33435    export INCLUDE="$VS_INCLUDE"
33436    export LIB="$VS_LIB"
33437  else
33438    if test "x$XCODE_VERSION_OUTPUT" != x; then
33439      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33440      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33441      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33442    else
33443      # Currently we do not define this for other toolchains. This might change as the need arise.
33444      TOOLCHAIN_VERSION=
33445    fi
33446  fi
33447
33448
33449  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33450  # override all other locations.
33451  if test "x$TOOLCHAIN_PATH" != x; then
33452    PATH=$TOOLCHAIN_PATH:$PATH
33453  fi
33454
33455
33456  #
33457  # Setup the compilers (CC and CXX)
33458  #
33459
33460  COMPILER_NAME=C
33461  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33462
33463  if test "x$CC" != x; then
33464    # User has supplied compiler name already, always let that override.
33465    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33466$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33467    if test "x`basename $CC`" = "x$CC"; then
33468      # A command without a complete path is provided, search $PATH.
33469
33470      for ac_prog in $CC
33471do
33472  # Extract the first word of "$ac_prog", so it can be a program name with args.
33473set dummy $ac_prog; ac_word=$2
33474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33475$as_echo_n "checking for $ac_word... " >&6; }
33476if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33477  $as_echo_n "(cached) " >&6
33478else
33479  case $POTENTIAL_CC in
33480  [\\/]* | ?:[\\/]*)
33481  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33482  ;;
33483  *)
33484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33485for as_dir in $PATH
33486do
33487  IFS=$as_save_IFS
33488  test -z "$as_dir" && as_dir=.
33489    for ac_exec_ext in '' $ac_executable_extensions; do
33490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33491    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33493    break 2
33494  fi
33495done
33496  done
33497IFS=$as_save_IFS
33498
33499  ;;
33500esac
33501fi
33502POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33503if test -n "$POTENTIAL_CC"; then
33504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33505$as_echo "$POTENTIAL_CC" >&6; }
33506else
33507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33508$as_echo "no" >&6; }
33509fi
33510
33511
33512  test -n "$POTENTIAL_CC" && break
33513done
33514
33515      if test "x$POTENTIAL_CC" != x; then
33516        CC=$POTENTIAL_CC
33517      else
33518        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33519      fi
33520    else
33521      # Otherwise it might already be a complete path
33522      if test ! -x "$CC"; then
33523        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33524      fi
33525    fi
33526  else
33527    # No user supplied value. Locate compiler ourselves.
33528
33529    # If we are cross compiling, assume cross compilation tools follows the
33530    # cross compilation standard where they are prefixed with the autoconf
33531    # standard name for the target. For example the binary
33532    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33533    # If we are not cross compiling, then the default compiler name will be
33534    # used.
33535
33536    CC=
33537    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33538    # before checking the rest of the PATH.
33539    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33540    # step, this should not be necessary.
33541    if test -n "$TOOLCHAIN_PATH"; then
33542      PATH_save="$PATH"
33543      PATH="$TOOLCHAIN_PATH"
33544      if test -n "$ac_tool_prefix"; then
33545  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33546set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33548$as_echo_n "checking for $ac_word... " >&6; }
33549if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33550  $as_echo_n "(cached) " >&6
33551else
33552  case $TOOLCHAIN_PATH_CC in
33553  [\\/]* | ?:[\\/]*)
33554  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33555  ;;
33556  *)
33557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33558for as_dir in $PATH
33559do
33560  IFS=$as_save_IFS
33561  test -z "$as_dir" && as_dir=.
33562    for ac_exec_ext in '' $ac_executable_extensions; do
33563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33564    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33566    break 2
33567  fi
33568done
33569  done
33570IFS=$as_save_IFS
33571
33572  ;;
33573esac
33574fi
33575TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33576if test -n "$TOOLCHAIN_PATH_CC"; then
33577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33578$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33579else
33580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33581$as_echo "no" >&6; }
33582fi
33583
33584
33585fi
33586if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33587  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33588  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33589set dummy $SEARCH_LIST; ac_word=$2
33590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33591$as_echo_n "checking for $ac_word... " >&6; }
33592if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33593  $as_echo_n "(cached) " >&6
33594else
33595  case $ac_pt_TOOLCHAIN_PATH_CC in
33596  [\\/]* | ?:[\\/]*)
33597  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33598  ;;
33599  *)
33600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33601for as_dir in $PATH
33602do
33603  IFS=$as_save_IFS
33604  test -z "$as_dir" && as_dir=.
33605    for ac_exec_ext in '' $ac_executable_extensions; do
33606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33607    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33609    break 2
33610  fi
33611done
33612  done
33613IFS=$as_save_IFS
33614
33615  ;;
33616esac
33617fi
33618ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33619if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33621$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33622else
33623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33624$as_echo "no" >&6; }
33625fi
33626
33627  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33628    TOOLCHAIN_PATH_CC=""
33629  else
33630    case $cross_compiling:$ac_tool_warned in
33631yes:)
33632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33634ac_tool_warned=yes ;;
33635esac
33636    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33637  fi
33638else
33639  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33640fi
33641
33642      CC=$TOOLCHAIN_PATH_CC
33643      PATH="$PATH_save"
33644    fi
33645
33646    # AC_PATH_TOOL can't be run multiple times with the same variable,
33647    # so create a new name for this run.
33648    if test "x$CC" = x; then
33649      if test -n "$ac_tool_prefix"; then
33650  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33651set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33653$as_echo_n "checking for $ac_word... " >&6; }
33654if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33655  $as_echo_n "(cached) " >&6
33656else
33657  case $POTENTIAL_CC in
33658  [\\/]* | ?:[\\/]*)
33659  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33660  ;;
33661  *)
33662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33663for as_dir in $PATH
33664do
33665  IFS=$as_save_IFS
33666  test -z "$as_dir" && as_dir=.
33667    for ac_exec_ext in '' $ac_executable_extensions; do
33668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33669    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33671    break 2
33672  fi
33673done
33674  done
33675IFS=$as_save_IFS
33676
33677  ;;
33678esac
33679fi
33680POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33681if test -n "$POTENTIAL_CC"; then
33682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33683$as_echo "$POTENTIAL_CC" >&6; }
33684else
33685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33686$as_echo "no" >&6; }
33687fi
33688
33689
33690fi
33691if test -z "$ac_cv_path_POTENTIAL_CC"; then
33692  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33693  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33694set dummy $SEARCH_LIST; ac_word=$2
33695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33696$as_echo_n "checking for $ac_word... " >&6; }
33697if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33698  $as_echo_n "(cached) " >&6
33699else
33700  case $ac_pt_POTENTIAL_CC in
33701  [\\/]* | ?:[\\/]*)
33702  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33703  ;;
33704  *)
33705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33706for as_dir in $PATH
33707do
33708  IFS=$as_save_IFS
33709  test -z "$as_dir" && as_dir=.
33710    for ac_exec_ext in '' $ac_executable_extensions; do
33711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33712    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33714    break 2
33715  fi
33716done
33717  done
33718IFS=$as_save_IFS
33719
33720  ;;
33721esac
33722fi
33723ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33724if test -n "$ac_pt_POTENTIAL_CC"; then
33725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33726$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33727else
33728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33729$as_echo "no" >&6; }
33730fi
33731
33732  if test "x$ac_pt_POTENTIAL_CC" = x; then
33733    POTENTIAL_CC=""
33734  else
33735    case $cross_compiling:$ac_tool_warned in
33736yes:)
33737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33739ac_tool_warned=yes ;;
33740esac
33741    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33742  fi
33743else
33744  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33745fi
33746
33747      CC=$POTENTIAL_CC
33748    fi
33749
33750    if test "x$CC" = x; then
33751
33752  # Print a helpful message on how to acquire the necessary build dependency.
33753  # devkit is the help tag: freetype, cups, alsa etc
33754  MISSING_DEPENDENCY=devkit
33755
33756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757    cygwin_help $MISSING_DEPENDENCY
33758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33759    msys_help $MISSING_DEPENDENCY
33760  else
33761    PKGHANDLER_COMMAND=
33762
33763    case $PKGHANDLER in
33764      apt-get)
33765        apt_help     $MISSING_DEPENDENCY ;;
33766      yum)
33767        yum_help     $MISSING_DEPENDENCY ;;
33768      brew)
33769        brew_help    $MISSING_DEPENDENCY ;;
33770      port)
33771        port_help    $MISSING_DEPENDENCY ;;
33772      pkgutil)
33773        pkgutil_help $MISSING_DEPENDENCY ;;
33774      pkgadd)
33775        pkgadd_help  $MISSING_DEPENDENCY ;;
33776    esac
33777
33778    if test "x$PKGHANDLER_COMMAND" != x; then
33779      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33780    fi
33781  fi
33782
33783      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33784    fi
33785  fi
33786
33787  # Now we have a compiler binary in CC. Make sure it's okay.
33788
33789  # Only process if variable expands to non-empty
33790
33791  if test "x$CC" != x; then
33792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33793
33794  # First separate the path from the arguments. This will split at the first
33795  # space.
33796  complete="$CC"
33797  path="${complete%% *}"
33798  tmp="$complete EOL"
33799  arguments="${tmp#* }"
33800
33801  # Input might be given as Windows format, start by converting to
33802  # unix format.
33803  new_path=`$CYGPATH -u "$path"`
33804
33805  # Now try to locate executable using which
33806  new_path=`$WHICH "$new_path" 2> /dev/null`
33807  # bat and cmd files are not always considered executable in cygwin causing which
33808  # to not find them
33809  if test "x$new_path" = x \
33810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33812    new_path=`$CYGPATH -u "$path"`
33813  fi
33814  if test "x$new_path" = x; then
33815    # Oops. Which didn't find the executable.
33816    # The splitting of arguments from the executable at a space might have been incorrect,
33817    # since paths with space are more likely in Windows. Give it another try with the whole
33818    # argument.
33819    path="$complete"
33820    arguments="EOL"
33821    new_path=`$CYGPATH -u "$path"`
33822    new_path=`$WHICH "$new_path" 2> /dev/null`
33823    # bat and cmd files are not always considered executable in cygwin causing which
33824    # to not find them
33825    if test "x$new_path" = x \
33826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33828      new_path=`$CYGPATH -u "$path"`
33829    fi
33830    if test "x$new_path" = x; then
33831      # It's still not found. Now this is an unrecoverable error.
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33833$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33834      has_space=`$ECHO "$complete" | $GREP " "`
33835      if test "x$has_space" != x; then
33836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33838      fi
33839      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33840    fi
33841  fi
33842
33843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33846  # "foo.exe" is OK but "foo" is an error.
33847  #
33848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33849  # It is also a way to make sure we got the proper file name for the real test later on.
33850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33851  if test "x$test_shortpath" = x; then
33852    # Short path failed, file does not exist as specified.
33853    # Try adding .exe or .cmd
33854    if test -f "${new_path}.exe"; then
33855      input_to_shortpath="${new_path}.exe"
33856    elif test -f "${new_path}.cmd"; then
33857      input_to_shortpath="${new_path}.cmd"
33858    else
33859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33860$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33863      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33864    fi
33865  else
33866    input_to_shortpath="$new_path"
33867  fi
33868
33869  # Call helper function which possibly converts this using DOS-style short mode.
33870  # If so, the updated path is stored in $new_path.
33871  new_path="$input_to_shortpath"
33872
33873  input_path="$input_to_shortpath"
33874  # Check if we need to convert this using DOS-style short mode. If the path
33875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33876  # take no chances and rewrite it.
33877  # Note: m4 eats our [], so we need to use [ and ] instead.
33878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33879  if test "x$has_forbidden_chars" != x; then
33880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33884      # Going to short mode and back again did indeed matter. Since short mode is
33885      # case insensitive, let's make it lowercase to improve readability.
33886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33887      # Now convert it back to Unix-style (cygpath)
33888      input_path=`$CYGPATH -u "$shortmode_path"`
33889      new_path="$input_path"
33890    fi
33891  fi
33892
33893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33894  if test "x$test_cygdrive_prefix" = x; then
33895    # As a simple fix, exclude /usr/bin since it's not a real path.
33896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33898      # a path prefixed by /cygdrive for fixpath to work.
33899      new_path="$CYGWIN_ROOT_PATH$input_path"
33900    fi
33901  fi
33902
33903  # remove trailing .exe if any
33904  new_path="${new_path/%.exe/}"
33905
33906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907
33908  # First separate the path from the arguments. This will split at the first
33909  # space.
33910  complete="$CC"
33911  path="${complete%% *}"
33912  tmp="$complete EOL"
33913  arguments="${tmp#* }"
33914
33915  # Input might be given as Windows format, start by converting to
33916  # unix format.
33917  new_path="$path"
33918
33919  windows_path="$new_path"
33920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33921    unix_path=`$CYGPATH -u "$windows_path"`
33922    new_path="$unix_path"
33923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33925    new_path="$unix_path"
33926  fi
33927
33928
33929  # Now try to locate executable using which
33930  new_path=`$WHICH "$new_path" 2> /dev/null`
33931
33932  if test "x$new_path" = x; then
33933    # Oops. Which didn't find the executable.
33934    # The splitting of arguments from the executable at a space might have been incorrect,
33935    # since paths with space are more likely in Windows. Give it another try with the whole
33936    # argument.
33937    path="$complete"
33938    arguments="EOL"
33939    new_path="$path"
33940
33941  windows_path="$new_path"
33942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33943    unix_path=`$CYGPATH -u "$windows_path"`
33944    new_path="$unix_path"
33945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33947    new_path="$unix_path"
33948  fi
33949
33950
33951    new_path=`$WHICH "$new_path" 2> /dev/null`
33952    # bat and cmd files are not always considered executable in MSYS causing which
33953    # to not find them
33954    if test "x$new_path" = x \
33955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33957      new_path="$path"
33958
33959  windows_path="$new_path"
33960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33961    unix_path=`$CYGPATH -u "$windows_path"`
33962    new_path="$unix_path"
33963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33965    new_path="$unix_path"
33966  fi
33967
33968    fi
33969
33970    if test "x$new_path" = x; then
33971      # It's still not found. Now this is an unrecoverable error.
33972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33973$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33974      has_space=`$ECHO "$complete" | $GREP " "`
33975      if test "x$has_space" != x; then
33976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33978      fi
33979      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33980    fi
33981  fi
33982
33983  # Now new_path has a complete unix path to the binary
33984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33985    # Keep paths in /bin as-is, but remove trailing .exe if any
33986    new_path="${new_path/%.exe/}"
33987    # Do not save /bin paths to all_fixpath_prefixes!
33988  else
33989    # Not in mixed or Windows style, start by that.
33990    new_path=`cmd //c echo $new_path`
33991
33992  input_path="$new_path"
33993  # Check if we need to convert this using DOS-style short mode. If the path
33994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33995  # take no chances and rewrite it.
33996  # Note: m4 eats our [], so we need to use [ and ] instead.
33997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33998  if test "x$has_forbidden_chars" != x; then
33999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34001  fi
34002
34003    # Output is in $new_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    # remove trailing .exe if any
34015    new_path="${new_path/%.exe/}"
34016
34017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34019  fi
34020
34021    else
34022      # We're on a unix platform. Hooray! :)
34023      # First separate the path from the arguments. This will split at the first
34024      # space.
34025      complete="$CC"
34026      path="${complete%% *}"
34027      tmp="$complete EOL"
34028      arguments="${tmp#* }"
34029
34030      # Cannot rely on the command "which" here since it doesn't always work.
34031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34032      if test -z "$is_absolute_path"; then
34033        # Path to executable is not absolute. Find it.
34034        IFS_save="$IFS"
34035        IFS=:
34036        for p in $PATH; do
34037          if test -f "$p/$path" && test -x "$p/$path"; then
34038            new_path="$p/$path"
34039            break
34040          fi
34041        done
34042        IFS="$IFS_save"
34043      else
34044        # This is an absolute path, we can use it without further modifications.
34045        new_path="$path"
34046      fi
34047
34048      if test "x$new_path" = x; then
34049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34050$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34051        has_space=`$ECHO "$complete" | $GREP " "`
34052        if test "x$has_space" != x; then
34053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34055        fi
34056        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34057      fi
34058    fi
34059
34060    # Now join together the path and the arguments once again
34061    if test "x$arguments" != xEOL; then
34062      new_complete="$new_path ${arguments% *}"
34063    else
34064      new_complete="$new_path"
34065    fi
34066
34067    if test "x$complete" != "x$new_complete"; then
34068      CC="$new_complete"
34069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34070$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34071    fi
34072  fi
34073
34074  TEST_COMPILER="$CC"
34075
34076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34077$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34078  SYMLINK_ORIGINAL="$TEST_COMPILER"
34079
34080  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34081    # Follow a chain of symbolic links. Use readlink
34082    # where it exists, else fall back to horribly
34083    # complicated shell code.
34084    if test "x$READLINK_TESTED" != yes; then
34085      # On MacOSX there is a readlink tool with a different
34086      # purpose than the GNU readlink tool. Check the found readlink.
34087      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34088      if test "x$ISGNU" = x; then
34089        # A readlink that we do not know how to use.
34090        # Are there other non-GNU readlinks out there?
34091        READLINK_TESTED=yes
34092        READLINK=
34093      fi
34094    fi
34095
34096    if test "x$READLINK" != x; then
34097      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34098    else
34099      # Save the current directory for restoring afterwards
34100      STARTDIR=$PWD
34101      COUNTER=0
34102      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34103      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34104      cd $sym_link_dir
34105      # Use -P flag to resolve symlinks in directories.
34106      cd `$THEPWDCMD -P`
34107      sym_link_dir=`$THEPWDCMD -P`
34108      # Resolve file symlinks
34109      while test $COUNTER -lt 20; do
34110        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34111        if test "x$ISLINK" == x; then
34112          # This is not a symbolic link! We are done!
34113          break
34114        fi
34115        # Again resolve directory symlinks since the target of the just found
34116        # link could be in a different directory
34117        cd `$DIRNAME $ISLINK`
34118        sym_link_dir=`$THEPWDCMD -P`
34119        sym_link_file=`$BASENAME $ISLINK`
34120        let COUNTER=COUNTER+1
34121      done
34122      cd $STARTDIR
34123      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34124    fi
34125  fi
34126
34127  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34129$as_echo "no symlink" >&6; }
34130  else
34131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34132$as_echo "$SYMLINK_ORIGINAL" >&6; }
34133
34134    # We can't handle ccache by gcc wrappers, since we need to know if we're
34135    # using ccache. Instead ccache usage must be controlled by a configure option.
34136    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34137    if test "x$COMPILER_BASENAME" = "xccache"; then
34138      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34139$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34140      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34141    fi
34142  fi
34143
34144
34145  COMPILER=$CC
34146  COMPILER_NAME=$COMPILER_NAME
34147
34148  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34149    # cc -V output typically looks like
34150    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34151    # or
34152    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34153    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34154    # Check that this is likely to be the Solaris Studio cc.
34155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34156    if test $? -ne 0; then
34157      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34158      { $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
34159$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34160      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34161$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34163$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34164      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34165    fi
34166    # Remove usage instructions (if present), and
34167    # collapse compiler output into a single line
34168    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34169        $SED -e 's/ *[Uu]sage:.*//'`
34170    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34171        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34172  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34173    # xlc -qversion output typically looks like
34174    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34175    #     Version: 11.01.0000.0015
34176    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34177    # Check that this is likely to be the IBM XL C compiler.
34178    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34179    if test $? -ne 0; then
34180      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34181      { $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
34182$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34184$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34185      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34186$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34187      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34188    fi
34189    # Collapse compiler output into a single line
34190    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34191    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34192        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34193  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34194    # There is no specific version flag, but all output starts with a version string.
34195    # First line typically looks something like:
34196    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34197    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34198    # Check that this is likely to be Microsoft CL.EXE.
34199    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34200    if test $? -ne 0; then
34201      { $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
34202$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34204$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34205      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34206    fi
34207    # Collapse compiler output into a single line
34208    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34209    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34210        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34211  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34212    # gcc --version output typically looks like
34213    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34214    #     Copyright (C) 2013 Free Software Foundation, Inc.
34215    #     This is free software; see the source for copying conditions.  There is NO
34216    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34217    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34218    # Check that this is likely to be GCC.
34219    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34220    if test $? -ne 0; then
34221      { $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
34222$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34223      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34224$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34225      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34226    fi
34227    # Remove Copyright and legalese from version string, and
34228    # collapse into a single line
34229    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34230        $SED -e 's/ *Copyright .*//'`
34231    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34232        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34233  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34234    # clang --version output typically looks like
34235    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34236    #    clang version 3.3 (tags/RELEASE_33/final)
34237    # or
34238    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34239    #    Target: x86_64-pc-linux-gnu
34240    #    Thread model: posix
34241    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34242    # Check that this is likely to be clang
34243    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34244    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34248$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34249      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34250    fi
34251    # Collapse compiler output into a single line
34252    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34253    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34254        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34255  else
34256      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34257  fi
34258  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34259  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34260  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34261  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34262
34263  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34264$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34265
34266
34267  # Now that we have resolved CC ourself, let autoconf have its go at it
34268  ac_ext=c
34269ac_cpp='$CPP $CPPFLAGS'
34270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34272ac_compiler_gnu=$ac_cv_c_compiler_gnu
34273if test -n "$ac_tool_prefix"; then
34274  for ac_prog in $CC
34275  do
34276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34279$as_echo_n "checking for $ac_word... " >&6; }
34280if ${ac_cv_prog_CC+:} false; then :
34281  $as_echo_n "(cached) " >&6
34282else
34283  if test -n "$CC"; then
34284  ac_cv_prog_CC="$CC" # Let the user override the test.
34285else
34286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34287for as_dir in $PATH
34288do
34289  IFS=$as_save_IFS
34290  test -z "$as_dir" && as_dir=.
34291    for ac_exec_ext in '' $ac_executable_extensions; do
34292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34293    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34295    break 2
34296  fi
34297done
34298  done
34299IFS=$as_save_IFS
34300
34301fi
34302fi
34303CC=$ac_cv_prog_CC
34304if test -n "$CC"; then
34305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34306$as_echo "$CC" >&6; }
34307else
34308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34309$as_echo "no" >&6; }
34310fi
34311
34312
34313    test -n "$CC" && break
34314  done
34315fi
34316if test -z "$CC"; then
34317  ac_ct_CC=$CC
34318  for ac_prog in $CC
34319do
34320  # Extract the first word of "$ac_prog", so it can be a program name with args.
34321set dummy $ac_prog; ac_word=$2
34322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34323$as_echo_n "checking for $ac_word... " >&6; }
34324if ${ac_cv_prog_ac_ct_CC+:} false; then :
34325  $as_echo_n "(cached) " >&6
34326else
34327  if test -n "$ac_ct_CC"; then
34328  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34329else
34330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34331for as_dir in $PATH
34332do
34333  IFS=$as_save_IFS
34334  test -z "$as_dir" && as_dir=.
34335    for ac_exec_ext in '' $ac_executable_extensions; do
34336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34337    ac_cv_prog_ac_ct_CC="$ac_prog"
34338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34339    break 2
34340  fi
34341done
34342  done
34343IFS=$as_save_IFS
34344
34345fi
34346fi
34347ac_ct_CC=$ac_cv_prog_ac_ct_CC
34348if test -n "$ac_ct_CC"; then
34349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34350$as_echo "$ac_ct_CC" >&6; }
34351else
34352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34353$as_echo "no" >&6; }
34354fi
34355
34356
34357  test -n "$ac_ct_CC" && break
34358done
34359
34360  if test "x$ac_ct_CC" = x; then
34361    CC=""
34362  else
34363    case $cross_compiling:$ac_tool_warned in
34364yes:)
34365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34367ac_tool_warned=yes ;;
34368esac
34369    CC=$ac_ct_CC
34370  fi
34371fi
34372
34373
34374test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34376as_fn_error $? "no acceptable C compiler found in \$PATH
34377See \`config.log' for more details" "$LINENO" 5; }
34378
34379# Provide some information about the compiler.
34380$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34381set X $ac_compile
34382ac_compiler=$2
34383for ac_option in --version -v -V -qversion; do
34384  { { ac_try="$ac_compiler $ac_option >&5"
34385case "(($ac_try" in
34386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34387  *) ac_try_echo=$ac_try;;
34388esac
34389eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34390$as_echo "$ac_try_echo"; } >&5
34391  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34392  ac_status=$?
34393  if test -s conftest.err; then
34394    sed '10a\
34395... rest of stderr output deleted ...
34396         10q' conftest.err >conftest.er1
34397    cat conftest.er1 >&5
34398  fi
34399  rm -f conftest.er1 conftest.err
34400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34401  test $ac_status = 0; }
34402done
34403
34404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34405/* end confdefs.h.  */
34406
34407int
34408main ()
34409{
34410
34411  ;
34412  return 0;
34413}
34414_ACEOF
34415ac_clean_files_save=$ac_clean_files
34416ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34417# Try to create an executable without -o first, disregard a.out.
34418# It will help us diagnose broken compilers, and finding out an intuition
34419# of exeext.
34420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34421$as_echo_n "checking whether the C compiler works... " >&6; }
34422ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34423
34424# The possible output files:
34425ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34426
34427ac_rmfiles=
34428for ac_file in $ac_files
34429do
34430  case $ac_file in
34431    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34432    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34433  esac
34434done
34435rm -f $ac_rmfiles
34436
34437if { { ac_try="$ac_link_default"
34438case "(($ac_try" in
34439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34440  *) ac_try_echo=$ac_try;;
34441esac
34442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34443$as_echo "$ac_try_echo"; } >&5
34444  (eval "$ac_link_default") 2>&5
34445  ac_status=$?
34446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34447  test $ac_status = 0; }; then :
34448  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34449# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34450# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34451# so that the user can short-circuit this test for compilers unknown to
34452# Autoconf.
34453for ac_file in $ac_files ''
34454do
34455  test -f "$ac_file" || continue
34456  case $ac_file in
34457    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34458	;;
34459    [ab].out )
34460	# We found the default executable, but exeext='' is most
34461	# certainly right.
34462	break;;
34463    *.* )
34464	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34465	then :; else
34466	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34467	fi
34468	# We set ac_cv_exeext here because the later test for it is not
34469	# safe: cross compilers may not add the suffix if given an `-o'
34470	# argument, so we may need to know it at that point already.
34471	# Even if this section looks crufty: it has the advantage of
34472	# actually working.
34473	break;;
34474    * )
34475	break;;
34476  esac
34477done
34478test "$ac_cv_exeext" = no && ac_cv_exeext=
34479
34480else
34481  ac_file=''
34482fi
34483if test -z "$ac_file"; then :
34484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34485$as_echo "no" >&6; }
34486$as_echo "$as_me: failed program was:" >&5
34487sed 's/^/| /' conftest.$ac_ext >&5
34488
34489{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34491as_fn_error 77 "C compiler cannot create executables
34492See \`config.log' for more details" "$LINENO" 5; }
34493else
34494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34495$as_echo "yes" >&6; }
34496fi
34497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34498$as_echo_n "checking for C compiler default output file name... " >&6; }
34499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34500$as_echo "$ac_file" >&6; }
34501ac_exeext=$ac_cv_exeext
34502
34503rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34504ac_clean_files=$ac_clean_files_save
34505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34506$as_echo_n "checking for suffix of executables... " >&6; }
34507if { { ac_try="$ac_link"
34508case "(($ac_try" in
34509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34510  *) ac_try_echo=$ac_try;;
34511esac
34512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34513$as_echo "$ac_try_echo"; } >&5
34514  (eval "$ac_link") 2>&5
34515  ac_status=$?
34516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34517  test $ac_status = 0; }; then :
34518  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34519# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34520# work properly (i.e., refer to `conftest.exe'), while it won't with
34521# `rm'.
34522for ac_file in conftest.exe conftest conftest.*; do
34523  test -f "$ac_file" || continue
34524  case $ac_file in
34525    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34526    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34527	  break;;
34528    * ) break;;
34529  esac
34530done
34531else
34532  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34534as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34535See \`config.log' for more details" "$LINENO" 5; }
34536fi
34537rm -f conftest conftest$ac_cv_exeext
34538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34539$as_echo "$ac_cv_exeext" >&6; }
34540
34541rm -f conftest.$ac_ext
34542EXEEXT=$ac_cv_exeext
34543ac_exeext=$EXEEXT
34544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34545/* end confdefs.h.  */
34546#include <stdio.h>
34547int
34548main ()
34549{
34550FILE *f = fopen ("conftest.out", "w");
34551 return ferror (f) || fclose (f) != 0;
34552
34553  ;
34554  return 0;
34555}
34556_ACEOF
34557ac_clean_files="$ac_clean_files conftest.out"
34558# Check that the compiler produces executables we can run.  If not, either
34559# the compiler is broken, or we cross compile.
34560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34561$as_echo_n "checking whether we are cross compiling... " >&6; }
34562if test "$cross_compiling" != yes; then
34563  { { ac_try="$ac_link"
34564case "(($ac_try" in
34565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34566  *) ac_try_echo=$ac_try;;
34567esac
34568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34569$as_echo "$ac_try_echo"; } >&5
34570  (eval "$ac_link") 2>&5
34571  ac_status=$?
34572  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34573  test $ac_status = 0; }
34574  if { ac_try='./conftest$ac_cv_exeext'
34575  { { case "(($ac_try" in
34576  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34577  *) ac_try_echo=$ac_try;;
34578esac
34579eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34580$as_echo "$ac_try_echo"; } >&5
34581  (eval "$ac_try") 2>&5
34582  ac_status=$?
34583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34584  test $ac_status = 0; }; }; then
34585    cross_compiling=no
34586  else
34587    if test "$cross_compiling" = maybe; then
34588	cross_compiling=yes
34589    else
34590	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34592as_fn_error $? "cannot run C compiled programs.
34593If you meant to cross compile, use \`--host'.
34594See \`config.log' for more details" "$LINENO" 5; }
34595    fi
34596  fi
34597fi
34598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34599$as_echo "$cross_compiling" >&6; }
34600
34601rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34602ac_clean_files=$ac_clean_files_save
34603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34604$as_echo_n "checking for suffix of object files... " >&6; }
34605if ${ac_cv_objext+:} false; then :
34606  $as_echo_n "(cached) " >&6
34607else
34608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34609/* end confdefs.h.  */
34610
34611int
34612main ()
34613{
34614
34615  ;
34616  return 0;
34617}
34618_ACEOF
34619rm -f conftest.o conftest.obj
34620if { { ac_try="$ac_compile"
34621case "(($ac_try" in
34622  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34623  *) ac_try_echo=$ac_try;;
34624esac
34625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34626$as_echo "$ac_try_echo"; } >&5
34627  (eval "$ac_compile") 2>&5
34628  ac_status=$?
34629  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34630  test $ac_status = 0; }; then :
34631  for ac_file in conftest.o conftest.obj conftest.*; do
34632  test -f "$ac_file" || continue;
34633  case $ac_file in
34634    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34635    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34636       break;;
34637  esac
34638done
34639else
34640  $as_echo "$as_me: failed program was:" >&5
34641sed 's/^/| /' conftest.$ac_ext >&5
34642
34643{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34645as_fn_error $? "cannot compute suffix of object files: cannot compile
34646See \`config.log' for more details" "$LINENO" 5; }
34647fi
34648rm -f conftest.$ac_cv_objext conftest.$ac_ext
34649fi
34650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34651$as_echo "$ac_cv_objext" >&6; }
34652OBJEXT=$ac_cv_objext
34653ac_objext=$OBJEXT
34654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34655$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34656if ${ac_cv_c_compiler_gnu+:} false; then :
34657  $as_echo_n "(cached) " >&6
34658else
34659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34660/* end confdefs.h.  */
34661
34662int
34663main ()
34664{
34665#ifndef __GNUC__
34666       choke me
34667#endif
34668
34669  ;
34670  return 0;
34671}
34672_ACEOF
34673if ac_fn_c_try_compile "$LINENO"; then :
34674  ac_compiler_gnu=yes
34675else
34676  ac_compiler_gnu=no
34677fi
34678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34679ac_cv_c_compiler_gnu=$ac_compiler_gnu
34680
34681fi
34682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34683$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34684if test $ac_compiler_gnu = yes; then
34685  GCC=yes
34686else
34687  GCC=
34688fi
34689ac_test_CFLAGS=${CFLAGS+set}
34690ac_save_CFLAGS=$CFLAGS
34691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34692$as_echo_n "checking whether $CC accepts -g... " >&6; }
34693if ${ac_cv_prog_cc_g+:} false; then :
34694  $as_echo_n "(cached) " >&6
34695else
34696  ac_save_c_werror_flag=$ac_c_werror_flag
34697   ac_c_werror_flag=yes
34698   ac_cv_prog_cc_g=no
34699   CFLAGS="-g"
34700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34701/* end confdefs.h.  */
34702
34703int
34704main ()
34705{
34706
34707  ;
34708  return 0;
34709}
34710_ACEOF
34711if ac_fn_c_try_compile "$LINENO"; then :
34712  ac_cv_prog_cc_g=yes
34713else
34714  CFLAGS=""
34715      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34716/* end confdefs.h.  */
34717
34718int
34719main ()
34720{
34721
34722  ;
34723  return 0;
34724}
34725_ACEOF
34726if ac_fn_c_try_compile "$LINENO"; then :
34727
34728else
34729  ac_c_werror_flag=$ac_save_c_werror_flag
34730	 CFLAGS="-g"
34731	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34732/* end confdefs.h.  */
34733
34734int
34735main ()
34736{
34737
34738  ;
34739  return 0;
34740}
34741_ACEOF
34742if ac_fn_c_try_compile "$LINENO"; then :
34743  ac_cv_prog_cc_g=yes
34744fi
34745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34746fi
34747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34748fi
34749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34750   ac_c_werror_flag=$ac_save_c_werror_flag
34751fi
34752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34753$as_echo "$ac_cv_prog_cc_g" >&6; }
34754if test "$ac_test_CFLAGS" = set; then
34755  CFLAGS=$ac_save_CFLAGS
34756elif test $ac_cv_prog_cc_g = yes; then
34757  if test "$GCC" = yes; then
34758    CFLAGS="-g -O2"
34759  else
34760    CFLAGS="-g"
34761  fi
34762else
34763  if test "$GCC" = yes; then
34764    CFLAGS="-O2"
34765  else
34766    CFLAGS=
34767  fi
34768fi
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34770$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34771if ${ac_cv_prog_cc_c89+:} false; then :
34772  $as_echo_n "(cached) " >&6
34773else
34774  ac_cv_prog_cc_c89=no
34775ac_save_CC=$CC
34776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34777/* end confdefs.h.  */
34778#include <stdarg.h>
34779#include <stdio.h>
34780struct stat;
34781/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34782struct buf { int x; };
34783FILE * (*rcsopen) (struct buf *, struct stat *, int);
34784static char *e (p, i)
34785     char **p;
34786     int i;
34787{
34788  return p[i];
34789}
34790static char *f (char * (*g) (char **, int), char **p, ...)
34791{
34792  char *s;
34793  va_list v;
34794  va_start (v,p);
34795  s = g (p, va_arg (v,int));
34796  va_end (v);
34797  return s;
34798}
34799
34800/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34801   function prototypes and stuff, but not '\xHH' hex character constants.
34802   These don't provoke an error unfortunately, instead are silently treated
34803   as 'x'.  The following induces an error, until -std is added to get
34804   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34805   array size at least.  It's necessary to write '\x00'==0 to get something
34806   that's true only with -std.  */
34807int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34808
34809/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34810   inside strings and character constants.  */
34811#define FOO(x) 'x'
34812int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34813
34814int test (int i, double x);
34815struct s1 {int (*f) (int a);};
34816struct s2 {int (*f) (double a);};
34817int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34818int argc;
34819char **argv;
34820int
34821main ()
34822{
34823return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34824  ;
34825  return 0;
34826}
34827_ACEOF
34828for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34829	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34830do
34831  CC="$ac_save_CC $ac_arg"
34832  if ac_fn_c_try_compile "$LINENO"; then :
34833  ac_cv_prog_cc_c89=$ac_arg
34834fi
34835rm -f core conftest.err conftest.$ac_objext
34836  test "x$ac_cv_prog_cc_c89" != "xno" && break
34837done
34838rm -f conftest.$ac_ext
34839CC=$ac_save_CC
34840
34841fi
34842# AC_CACHE_VAL
34843case "x$ac_cv_prog_cc_c89" in
34844  x)
34845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34846$as_echo "none needed" >&6; } ;;
34847  xno)
34848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34849$as_echo "unsupported" >&6; } ;;
34850  *)
34851    CC="$CC $ac_cv_prog_cc_c89"
34852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34853$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34854esac
34855if test "x$ac_cv_prog_cc_c89" != xno; then :
34856
34857fi
34858
34859ac_ext=cpp
34860ac_cpp='$CXXCPP $CPPFLAGS'
34861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34864
34865
34866
34867  COMPILER_NAME=C++
34868  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34869
34870  if test "x$CXX" != x; then
34871    # User has supplied compiler name already, always let that override.
34872    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34873$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34874    if test "x`basename $CXX`" = "x$CXX"; then
34875      # A command without a complete path is provided, search $PATH.
34876
34877      for ac_prog in $CXX
34878do
34879  # Extract the first word of "$ac_prog", so it can be a program name with args.
34880set dummy $ac_prog; ac_word=$2
34881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34882$as_echo_n "checking for $ac_word... " >&6; }
34883if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34884  $as_echo_n "(cached) " >&6
34885else
34886  case $POTENTIAL_CXX in
34887  [\\/]* | ?:[\\/]*)
34888  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34889  ;;
34890  *)
34891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34892for as_dir in $PATH
34893do
34894  IFS=$as_save_IFS
34895  test -z "$as_dir" && as_dir=.
34896    for ac_exec_ext in '' $ac_executable_extensions; do
34897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34898    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34900    break 2
34901  fi
34902done
34903  done
34904IFS=$as_save_IFS
34905
34906  ;;
34907esac
34908fi
34909POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34910if test -n "$POTENTIAL_CXX"; then
34911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34912$as_echo "$POTENTIAL_CXX" >&6; }
34913else
34914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34915$as_echo "no" >&6; }
34916fi
34917
34918
34919  test -n "$POTENTIAL_CXX" && break
34920done
34921
34922      if test "x$POTENTIAL_CXX" != x; then
34923        CXX=$POTENTIAL_CXX
34924      else
34925        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34926      fi
34927    else
34928      # Otherwise it might already be a complete path
34929      if test ! -x "$CXX"; then
34930        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34931      fi
34932    fi
34933  else
34934    # No user supplied value. Locate compiler ourselves.
34935
34936    # If we are cross compiling, assume cross compilation tools follows the
34937    # cross compilation standard where they are prefixed with the autoconf
34938    # standard name for the target. For example the binary
34939    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34940    # If we are not cross compiling, then the default compiler name will be
34941    # used.
34942
34943    CXX=
34944    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34945    # before checking the rest of the PATH.
34946    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34947    # step, this should not be necessary.
34948    if test -n "$TOOLCHAIN_PATH"; then
34949      PATH_save="$PATH"
34950      PATH="$TOOLCHAIN_PATH"
34951      if test -n "$ac_tool_prefix"; then
34952  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34953set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34955$as_echo_n "checking for $ac_word... " >&6; }
34956if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34957  $as_echo_n "(cached) " >&6
34958else
34959  case $TOOLCHAIN_PATH_CXX in
34960  [\\/]* | ?:[\\/]*)
34961  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34962  ;;
34963  *)
34964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34965for as_dir in $PATH
34966do
34967  IFS=$as_save_IFS
34968  test -z "$as_dir" && as_dir=.
34969    for ac_exec_ext in '' $ac_executable_extensions; do
34970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34971    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34973    break 2
34974  fi
34975done
34976  done
34977IFS=$as_save_IFS
34978
34979  ;;
34980esac
34981fi
34982TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34983if test -n "$TOOLCHAIN_PATH_CXX"; then
34984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34985$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34986else
34987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34988$as_echo "no" >&6; }
34989fi
34990
34991
34992fi
34993if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34994  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34995  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34996set dummy $SEARCH_LIST; ac_word=$2
34997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34998$as_echo_n "checking for $ac_word... " >&6; }
34999if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35000  $as_echo_n "(cached) " >&6
35001else
35002  case $ac_pt_TOOLCHAIN_PATH_CXX in
35003  [\\/]* | ?:[\\/]*)
35004  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35005  ;;
35006  *)
35007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35008for as_dir in $PATH
35009do
35010  IFS=$as_save_IFS
35011  test -z "$as_dir" && as_dir=.
35012    for ac_exec_ext in '' $ac_executable_extensions; do
35013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35014    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35016    break 2
35017  fi
35018done
35019  done
35020IFS=$as_save_IFS
35021
35022  ;;
35023esac
35024fi
35025ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35026if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35028$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35029else
35030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35031$as_echo "no" >&6; }
35032fi
35033
35034  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35035    TOOLCHAIN_PATH_CXX=""
35036  else
35037    case $cross_compiling:$ac_tool_warned in
35038yes:)
35039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35041ac_tool_warned=yes ;;
35042esac
35043    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35044  fi
35045else
35046  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35047fi
35048
35049      CXX=$TOOLCHAIN_PATH_CXX
35050      PATH="$PATH_save"
35051    fi
35052
35053    # AC_PATH_TOOL can't be run multiple times with the same variable,
35054    # so create a new name for this run.
35055    if test "x$CXX" = x; then
35056      if test -n "$ac_tool_prefix"; then
35057  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35058set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35060$as_echo_n "checking for $ac_word... " >&6; }
35061if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35062  $as_echo_n "(cached) " >&6
35063else
35064  case $POTENTIAL_CXX in
35065  [\\/]* | ?:[\\/]*)
35066  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35067  ;;
35068  *)
35069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35070for as_dir in $PATH
35071do
35072  IFS=$as_save_IFS
35073  test -z "$as_dir" && as_dir=.
35074    for ac_exec_ext in '' $ac_executable_extensions; do
35075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35076    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35078    break 2
35079  fi
35080done
35081  done
35082IFS=$as_save_IFS
35083
35084  ;;
35085esac
35086fi
35087POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35088if test -n "$POTENTIAL_CXX"; then
35089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35090$as_echo "$POTENTIAL_CXX" >&6; }
35091else
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35093$as_echo "no" >&6; }
35094fi
35095
35096
35097fi
35098if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35099  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35100  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35101set dummy $SEARCH_LIST; ac_word=$2
35102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35103$as_echo_n "checking for $ac_word... " >&6; }
35104if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35105  $as_echo_n "(cached) " >&6
35106else
35107  case $ac_pt_POTENTIAL_CXX in
35108  [\\/]* | ?:[\\/]*)
35109  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35110  ;;
35111  *)
35112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35113for as_dir in $PATH
35114do
35115  IFS=$as_save_IFS
35116  test -z "$as_dir" && as_dir=.
35117    for ac_exec_ext in '' $ac_executable_extensions; do
35118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35119    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35121    break 2
35122  fi
35123done
35124  done
35125IFS=$as_save_IFS
35126
35127  ;;
35128esac
35129fi
35130ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35131if test -n "$ac_pt_POTENTIAL_CXX"; then
35132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35133$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35134else
35135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35136$as_echo "no" >&6; }
35137fi
35138
35139  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35140    POTENTIAL_CXX=""
35141  else
35142    case $cross_compiling:$ac_tool_warned in
35143yes:)
35144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35146ac_tool_warned=yes ;;
35147esac
35148    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35149  fi
35150else
35151  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35152fi
35153
35154      CXX=$POTENTIAL_CXX
35155    fi
35156
35157    if test "x$CXX" = x; then
35158
35159  # Print a helpful message on how to acquire the necessary build dependency.
35160  # devkit is the help tag: freetype, cups, alsa etc
35161  MISSING_DEPENDENCY=devkit
35162
35163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35164    cygwin_help $MISSING_DEPENDENCY
35165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35166    msys_help $MISSING_DEPENDENCY
35167  else
35168    PKGHANDLER_COMMAND=
35169
35170    case $PKGHANDLER in
35171      apt-get)
35172        apt_help     $MISSING_DEPENDENCY ;;
35173      yum)
35174        yum_help     $MISSING_DEPENDENCY ;;
35175      brew)
35176        brew_help    $MISSING_DEPENDENCY ;;
35177      port)
35178        port_help    $MISSING_DEPENDENCY ;;
35179      pkgutil)
35180        pkgutil_help $MISSING_DEPENDENCY ;;
35181      pkgadd)
35182        pkgadd_help  $MISSING_DEPENDENCY ;;
35183    esac
35184
35185    if test "x$PKGHANDLER_COMMAND" != x; then
35186      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35187    fi
35188  fi
35189
35190      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35191    fi
35192  fi
35193
35194  # Now we have a compiler binary in CXX. Make sure it's okay.
35195
35196  # Only process if variable expands to non-empty
35197
35198  if test "x$CXX" != x; then
35199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35200
35201  # First separate the path from the arguments. This will split at the first
35202  # space.
35203  complete="$CXX"
35204  path="${complete%% *}"
35205  tmp="$complete EOL"
35206  arguments="${tmp#* }"
35207
35208  # Input might be given as Windows format, start by converting to
35209  # unix format.
35210  new_path=`$CYGPATH -u "$path"`
35211
35212  # Now try to locate executable using which
35213  new_path=`$WHICH "$new_path" 2> /dev/null`
35214  # bat and cmd files are not always considered executable in cygwin causing which
35215  # to not find them
35216  if test "x$new_path" = x \
35217      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35218      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35219    new_path=`$CYGPATH -u "$path"`
35220  fi
35221  if test "x$new_path" = x; then
35222    # Oops. Which didn't find the executable.
35223    # The splitting of arguments from the executable at a space might have been incorrect,
35224    # since paths with space are more likely in Windows. Give it another try with the whole
35225    # argument.
35226    path="$complete"
35227    arguments="EOL"
35228    new_path=`$CYGPATH -u "$path"`
35229    new_path=`$WHICH "$new_path" 2> /dev/null`
35230    # bat and cmd files are not always considered executable in cygwin causing which
35231    # to not find them
35232    if test "x$new_path" = x \
35233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35235      new_path=`$CYGPATH -u "$path"`
35236    fi
35237    if test "x$new_path" = x; then
35238      # It's still not found. Now this is an unrecoverable error.
35239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35240$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35241      has_space=`$ECHO "$complete" | $GREP " "`
35242      if test "x$has_space" != x; then
35243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35245      fi
35246      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35247    fi
35248  fi
35249
35250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35253  # "foo.exe" is OK but "foo" is an error.
35254  #
35255  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35256  # It is also a way to make sure we got the proper file name for the real test later on.
35257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35258  if test "x$test_shortpath" = x; then
35259    # Short path failed, file does not exist as specified.
35260    # Try adding .exe or .cmd
35261    if test -f "${new_path}.exe"; then
35262      input_to_shortpath="${new_path}.exe"
35263    elif test -f "${new_path}.cmd"; then
35264      input_to_shortpath="${new_path}.cmd"
35265    else
35266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35267$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35268      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35269$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35270      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35271    fi
35272  else
35273    input_to_shortpath="$new_path"
35274  fi
35275
35276  # Call helper function which possibly converts this using DOS-style short mode.
35277  # If so, the updated path is stored in $new_path.
35278  new_path="$input_to_shortpath"
35279
35280  input_path="$input_to_shortpath"
35281  # Check if we need to convert this using DOS-style short mode. If the path
35282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35283  # take no chances and rewrite it.
35284  # Note: m4 eats our [], so we need to use [ and ] instead.
35285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35286  if test "x$has_forbidden_chars" != x; then
35287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35291      # Going to short mode and back again did indeed matter. Since short mode is
35292      # case insensitive, let's make it lowercase to improve readability.
35293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35294      # Now convert it back to Unix-style (cygpath)
35295      input_path=`$CYGPATH -u "$shortmode_path"`
35296      new_path="$input_path"
35297    fi
35298  fi
35299
35300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35301  if test "x$test_cygdrive_prefix" = x; then
35302    # As a simple fix, exclude /usr/bin since it's not a real path.
35303    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35305      # a path prefixed by /cygdrive for fixpath to work.
35306      new_path="$CYGWIN_ROOT_PATH$input_path"
35307    fi
35308  fi
35309
35310  # remove trailing .exe if any
35311  new_path="${new_path/%.exe/}"
35312
35313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35314
35315  # First separate the path from the arguments. This will split at the first
35316  # space.
35317  complete="$CXX"
35318  path="${complete%% *}"
35319  tmp="$complete EOL"
35320  arguments="${tmp#* }"
35321
35322  # Input might be given as Windows format, start by converting to
35323  # unix format.
35324  new_path="$path"
35325
35326  windows_path="$new_path"
35327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35328    unix_path=`$CYGPATH -u "$windows_path"`
35329    new_path="$unix_path"
35330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35332    new_path="$unix_path"
35333  fi
35334
35335
35336  # Now try to locate executable using which
35337  new_path=`$WHICH "$new_path" 2> /dev/null`
35338
35339  if test "x$new_path" = x; then
35340    # Oops. Which didn't find the executable.
35341    # The splitting of arguments from the executable at a space might have been incorrect,
35342    # since paths with space are more likely in Windows. Give it another try with the whole
35343    # argument.
35344    path="$complete"
35345    arguments="EOL"
35346    new_path="$path"
35347
35348  windows_path="$new_path"
35349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35350    unix_path=`$CYGPATH -u "$windows_path"`
35351    new_path="$unix_path"
35352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35354    new_path="$unix_path"
35355  fi
35356
35357
35358    new_path=`$WHICH "$new_path" 2> /dev/null`
35359    # bat and cmd files are not always considered executable in MSYS causing which
35360    # to not find them
35361    if test "x$new_path" = x \
35362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35364      new_path="$path"
35365
35366  windows_path="$new_path"
35367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35368    unix_path=`$CYGPATH -u "$windows_path"`
35369    new_path="$unix_path"
35370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35372    new_path="$unix_path"
35373  fi
35374
35375    fi
35376
35377    if test "x$new_path" = x; then
35378      # It's still not found. Now this is an unrecoverable error.
35379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35380$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35381      has_space=`$ECHO "$complete" | $GREP " "`
35382      if test "x$has_space" != x; then
35383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35385      fi
35386      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35387    fi
35388  fi
35389
35390  # Now new_path has a complete unix path to the binary
35391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35392    # Keep paths in /bin as-is, but remove trailing .exe if any
35393    new_path="${new_path/%.exe/}"
35394    # Do not save /bin paths to all_fixpath_prefixes!
35395  else
35396    # Not in mixed or Windows style, start by that.
35397    new_path=`cmd //c echo $new_path`
35398
35399  input_path="$new_path"
35400  # Check if we need to convert this using DOS-style short mode. If the path
35401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35402  # take no chances and rewrite it.
35403  # Note: m4 eats our [], so we need to use [ and ] instead.
35404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35405  if test "x$has_forbidden_chars" != x; then
35406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35408  fi
35409
35410    # Output is in $new_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    # remove trailing .exe if any
35422    new_path="${new_path/%.exe/}"
35423
35424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35426  fi
35427
35428    else
35429      # We're on a unix platform. Hooray! :)
35430      # First separate the path from the arguments. This will split at the first
35431      # space.
35432      complete="$CXX"
35433      path="${complete%% *}"
35434      tmp="$complete EOL"
35435      arguments="${tmp#* }"
35436
35437      # Cannot rely on the command "which" here since it doesn't always work.
35438      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35439      if test -z "$is_absolute_path"; then
35440        # Path to executable is not absolute. Find it.
35441        IFS_save="$IFS"
35442        IFS=:
35443        for p in $PATH; do
35444          if test -f "$p/$path" && test -x "$p/$path"; then
35445            new_path="$p/$path"
35446            break
35447          fi
35448        done
35449        IFS="$IFS_save"
35450      else
35451        # This is an absolute path, we can use it without further modifications.
35452        new_path="$path"
35453      fi
35454
35455      if test "x$new_path" = x; then
35456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35457$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35458        has_space=`$ECHO "$complete" | $GREP " "`
35459        if test "x$has_space" != x; then
35460          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35462        fi
35463        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35464      fi
35465    fi
35466
35467    # Now join together the path and the arguments once again
35468    if test "x$arguments" != xEOL; then
35469      new_complete="$new_path ${arguments% *}"
35470    else
35471      new_complete="$new_path"
35472    fi
35473
35474    if test "x$complete" != "x$new_complete"; then
35475      CXX="$new_complete"
35476      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35477$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35478    fi
35479  fi
35480
35481  TEST_COMPILER="$CXX"
35482
35483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35484$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35485  SYMLINK_ORIGINAL="$TEST_COMPILER"
35486
35487  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35488    # Follow a chain of symbolic links. Use readlink
35489    # where it exists, else fall back to horribly
35490    # complicated shell code.
35491    if test "x$READLINK_TESTED" != yes; then
35492      # On MacOSX there is a readlink tool with a different
35493      # purpose than the GNU readlink tool. Check the found readlink.
35494      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35495      if test "x$ISGNU" = x; then
35496        # A readlink that we do not know how to use.
35497        # Are there other non-GNU readlinks out there?
35498        READLINK_TESTED=yes
35499        READLINK=
35500      fi
35501    fi
35502
35503    if test "x$READLINK" != x; then
35504      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35505    else
35506      # Save the current directory for restoring afterwards
35507      STARTDIR=$PWD
35508      COUNTER=0
35509      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35510      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35511      cd $sym_link_dir
35512      # Use -P flag to resolve symlinks in directories.
35513      cd `$THEPWDCMD -P`
35514      sym_link_dir=`$THEPWDCMD -P`
35515      # Resolve file symlinks
35516      while test $COUNTER -lt 20; do
35517        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35518        if test "x$ISLINK" == x; then
35519          # This is not a symbolic link! We are done!
35520          break
35521        fi
35522        # Again resolve directory symlinks since the target of the just found
35523        # link could be in a different directory
35524        cd `$DIRNAME $ISLINK`
35525        sym_link_dir=`$THEPWDCMD -P`
35526        sym_link_file=`$BASENAME $ISLINK`
35527        let COUNTER=COUNTER+1
35528      done
35529      cd $STARTDIR
35530      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35531    fi
35532  fi
35533
35534  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35536$as_echo "no symlink" >&6; }
35537  else
35538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35539$as_echo "$SYMLINK_ORIGINAL" >&6; }
35540
35541    # We can't handle ccache by gcc wrappers, since we need to know if we're
35542    # using ccache. Instead ccache usage must be controlled by a configure option.
35543    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35544    if test "x$COMPILER_BASENAME" = "xccache"; then
35545      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35546$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35547      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35548    fi
35549  fi
35550
35551
35552  COMPILER=$CXX
35553  COMPILER_NAME=$COMPILER_NAME
35554
35555  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35556    # cc -V output typically looks like
35557    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35558    # or
35559    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35560    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35561    # Check that this is likely to be the Solaris Studio cc.
35562    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35563    if test $? -ne 0; then
35564      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35565      { $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
35566$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35567      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35568$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35569      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35570$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35571      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35572    fi
35573    # Remove usage instructions (if present), and
35574    # collapse compiler output into a single line
35575    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35576        $SED -e 's/ *[Uu]sage:.*//'`
35577    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35578        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35579  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35580    # xlc -qversion output typically looks like
35581    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35582    #     Version: 11.01.0000.0015
35583    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35584    # Check that this is likely to be the IBM XL C compiler.
35585    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35586    if test $? -ne 0; then
35587      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35588      { $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
35589$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35591$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35593$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35595    fi
35596    # Collapse compiler output into a single line
35597    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35599        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35600  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35601    # There is no specific version flag, but all output starts with a version string.
35602    # First line typically looks something like:
35603    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35604    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35605    # Check that this is likely to be Microsoft CL.EXE.
35606    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35607    if test $? -ne 0; then
35608      { $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
35609$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35611$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35612      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35613    fi
35614    # Collapse compiler output into a single line
35615    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35616    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35617        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35618  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35619    # gcc --version output typically looks like
35620    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35621    #     Copyright (C) 2013 Free Software Foundation, Inc.
35622    #     This is free software; see the source for copying conditions.  There is NO
35623    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35624    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35625    # Check that this is likely to be GCC.
35626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35627    if test $? -ne 0; then
35628      { $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
35629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35631$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35632      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35633    fi
35634    # Remove Copyright and legalese from version string, and
35635    # collapse into a single line
35636    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35637        $SED -e 's/ *Copyright .*//'`
35638    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35639        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35640  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35641    # clang --version output typically looks like
35642    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35643    #    clang version 3.3 (tags/RELEASE_33/final)
35644    # or
35645    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35646    #    Target: x86_64-pc-linux-gnu
35647    #    Thread model: posix
35648    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35649    # Check that this is likely to be clang
35650    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35651    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35655$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35656      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35657    fi
35658    # Collapse compiler output into a single line
35659    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35660    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35661        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35662  else
35663      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35664  fi
35665  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35666  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35667  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35668  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35669
35670  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35671$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35672
35673
35674  # Now that we have resolved CXX ourself, let autoconf have its go at it
35675  ac_ext=cpp
35676ac_cpp='$CXXCPP $CPPFLAGS'
35677ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35678ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35679ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35680if test -z "$CXX"; then
35681  if test -n "$CCC"; then
35682    CXX=$CCC
35683  else
35684    if test -n "$ac_tool_prefix"; then
35685  for ac_prog in $CXX
35686  do
35687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35690$as_echo_n "checking for $ac_word... " >&6; }
35691if ${ac_cv_prog_CXX+:} false; then :
35692  $as_echo_n "(cached) " >&6
35693else
35694  if test -n "$CXX"; then
35695  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35696else
35697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35698for as_dir in $PATH
35699do
35700  IFS=$as_save_IFS
35701  test -z "$as_dir" && as_dir=.
35702    for ac_exec_ext in '' $ac_executable_extensions; do
35703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35704    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35706    break 2
35707  fi
35708done
35709  done
35710IFS=$as_save_IFS
35711
35712fi
35713fi
35714CXX=$ac_cv_prog_CXX
35715if test -n "$CXX"; then
35716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35717$as_echo "$CXX" >&6; }
35718else
35719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35720$as_echo "no" >&6; }
35721fi
35722
35723
35724    test -n "$CXX" && break
35725  done
35726fi
35727if test -z "$CXX"; then
35728  ac_ct_CXX=$CXX
35729  for ac_prog in $CXX
35730do
35731  # Extract the first word of "$ac_prog", so it can be a program name with args.
35732set dummy $ac_prog; ac_word=$2
35733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35734$as_echo_n "checking for $ac_word... " >&6; }
35735if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35736  $as_echo_n "(cached) " >&6
35737else
35738  if test -n "$ac_ct_CXX"; then
35739  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35740else
35741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35742for as_dir in $PATH
35743do
35744  IFS=$as_save_IFS
35745  test -z "$as_dir" && as_dir=.
35746    for ac_exec_ext in '' $ac_executable_extensions; do
35747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35748    ac_cv_prog_ac_ct_CXX="$ac_prog"
35749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35750    break 2
35751  fi
35752done
35753  done
35754IFS=$as_save_IFS
35755
35756fi
35757fi
35758ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35759if test -n "$ac_ct_CXX"; then
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35761$as_echo "$ac_ct_CXX" >&6; }
35762else
35763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764$as_echo "no" >&6; }
35765fi
35766
35767
35768  test -n "$ac_ct_CXX" && break
35769done
35770
35771  if test "x$ac_ct_CXX" = x; then
35772    CXX="g++"
35773  else
35774    case $cross_compiling:$ac_tool_warned in
35775yes:)
35776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35778ac_tool_warned=yes ;;
35779esac
35780    CXX=$ac_ct_CXX
35781  fi
35782fi
35783
35784  fi
35785fi
35786# Provide some information about the compiler.
35787$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35788set X $ac_compile
35789ac_compiler=$2
35790for ac_option in --version -v -V -qversion; do
35791  { { ac_try="$ac_compiler $ac_option >&5"
35792case "(($ac_try" in
35793  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35794  *) ac_try_echo=$ac_try;;
35795esac
35796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35797$as_echo "$ac_try_echo"; } >&5
35798  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35799  ac_status=$?
35800  if test -s conftest.err; then
35801    sed '10a\
35802... rest of stderr output deleted ...
35803         10q' conftest.err >conftest.er1
35804    cat conftest.er1 >&5
35805  fi
35806  rm -f conftest.er1 conftest.err
35807  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35808  test $ac_status = 0; }
35809done
35810
35811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35812$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35813if ${ac_cv_cxx_compiler_gnu+:} false; then :
35814  $as_echo_n "(cached) " >&6
35815else
35816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35817/* end confdefs.h.  */
35818
35819int
35820main ()
35821{
35822#ifndef __GNUC__
35823       choke me
35824#endif
35825
35826  ;
35827  return 0;
35828}
35829_ACEOF
35830if ac_fn_cxx_try_compile "$LINENO"; then :
35831  ac_compiler_gnu=yes
35832else
35833  ac_compiler_gnu=no
35834fi
35835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35836ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35837
35838fi
35839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35840$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35841if test $ac_compiler_gnu = yes; then
35842  GXX=yes
35843else
35844  GXX=
35845fi
35846ac_test_CXXFLAGS=${CXXFLAGS+set}
35847ac_save_CXXFLAGS=$CXXFLAGS
35848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35849$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35850if ${ac_cv_prog_cxx_g+:} false; then :
35851  $as_echo_n "(cached) " >&6
35852else
35853  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35854   ac_cxx_werror_flag=yes
35855   ac_cv_prog_cxx_g=no
35856   CXXFLAGS="-g"
35857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35858/* end confdefs.h.  */
35859
35860int
35861main ()
35862{
35863
35864  ;
35865  return 0;
35866}
35867_ACEOF
35868if ac_fn_cxx_try_compile "$LINENO"; then :
35869  ac_cv_prog_cxx_g=yes
35870else
35871  CXXFLAGS=""
35872      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35873/* end confdefs.h.  */
35874
35875int
35876main ()
35877{
35878
35879  ;
35880  return 0;
35881}
35882_ACEOF
35883if ac_fn_cxx_try_compile "$LINENO"; then :
35884
35885else
35886  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35887	 CXXFLAGS="-g"
35888	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35889/* end confdefs.h.  */
35890
35891int
35892main ()
35893{
35894
35895  ;
35896  return 0;
35897}
35898_ACEOF
35899if ac_fn_cxx_try_compile "$LINENO"; then :
35900  ac_cv_prog_cxx_g=yes
35901fi
35902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35903fi
35904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35905fi
35906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35907   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35908fi
35909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35910$as_echo "$ac_cv_prog_cxx_g" >&6; }
35911if test "$ac_test_CXXFLAGS" = set; then
35912  CXXFLAGS=$ac_save_CXXFLAGS
35913elif test $ac_cv_prog_cxx_g = yes; then
35914  if test "$GXX" = yes; then
35915    CXXFLAGS="-g -O2"
35916  else
35917    CXXFLAGS="-g"
35918  fi
35919else
35920  if test "$GXX" = yes; then
35921    CXXFLAGS="-O2"
35922  else
35923    CXXFLAGS=
35924  fi
35925fi
35926ac_ext=cpp
35927ac_cpp='$CXXCPP $CPPFLAGS'
35928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35931
35932
35933  # This is the compiler version number on the form X.Y[.Z]
35934
35935
35936
35937
35938  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35939    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35940$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35942$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35943  fi
35944
35945  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35946  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35947    { $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
35948$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;}
35949  fi
35950
35951  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35952    { $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
35953$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35954  fi
35955
35956  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35957
35958
35959  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009    # Execute function body
36010
36011  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36012  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36013
36014  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36015    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36016  fi
36017
36018  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36019    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36020  fi
36021
36022  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36023  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36024
36025  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36026    :
36027
36028  else
36029    :
36030
36031          { $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
36032$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36033
36034
36035  fi
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050  fi
36051
36052  #
36053  # Setup the preprocessor (CPP and CXXCPP)
36054  #
36055  ac_ext=c
36056ac_cpp='$CPP $CPPFLAGS'
36057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36059ac_compiler_gnu=$ac_cv_c_compiler_gnu
36060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36061$as_echo_n "checking how to run the C preprocessor... " >&6; }
36062# On Suns, sometimes $CPP names a directory.
36063if test -n "$CPP" && test -d "$CPP"; then
36064  CPP=
36065fi
36066if test -z "$CPP"; then
36067  if ${ac_cv_prog_CPP+:} false; then :
36068  $as_echo_n "(cached) " >&6
36069else
36070      # Double quotes because CPP needs to be expanded
36071    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36072    do
36073      ac_preproc_ok=false
36074for ac_c_preproc_warn_flag in '' yes
36075do
36076  # Use a header file that comes with gcc, so configuring glibc
36077  # with a fresh cross-compiler works.
36078  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36079  # <limits.h> exists even on freestanding compilers.
36080  # On the NeXT, cc -E runs the code through the compiler's parser,
36081  # not just through cpp. "Syntax error" is here to catch this case.
36082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36083/* end confdefs.h.  */
36084#ifdef __STDC__
36085# include <limits.h>
36086#else
36087# include <assert.h>
36088#endif
36089		     Syntax error
36090_ACEOF
36091if ac_fn_c_try_cpp "$LINENO"; then :
36092
36093else
36094  # Broken: fails on valid input.
36095continue
36096fi
36097rm -f conftest.err conftest.i conftest.$ac_ext
36098
36099  # OK, works on sane cases.  Now check whether nonexistent headers
36100  # can be detected and how.
36101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36102/* end confdefs.h.  */
36103#include <ac_nonexistent.h>
36104_ACEOF
36105if ac_fn_c_try_cpp "$LINENO"; then :
36106  # Broken: success on invalid input.
36107continue
36108else
36109  # Passes both tests.
36110ac_preproc_ok=:
36111break
36112fi
36113rm -f conftest.err conftest.i conftest.$ac_ext
36114
36115done
36116# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36117rm -f conftest.i conftest.err conftest.$ac_ext
36118if $ac_preproc_ok; then :
36119  break
36120fi
36121
36122    done
36123    ac_cv_prog_CPP=$CPP
36124
36125fi
36126  CPP=$ac_cv_prog_CPP
36127else
36128  ac_cv_prog_CPP=$CPP
36129fi
36130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36131$as_echo "$CPP" >&6; }
36132ac_preproc_ok=false
36133for ac_c_preproc_warn_flag in '' yes
36134do
36135  # Use a header file that comes with gcc, so configuring glibc
36136  # with a fresh cross-compiler works.
36137  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36138  # <limits.h> exists even on freestanding compilers.
36139  # On the NeXT, cc -E runs the code through the compiler's parser,
36140  # not just through cpp. "Syntax error" is here to catch this case.
36141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36142/* end confdefs.h.  */
36143#ifdef __STDC__
36144# include <limits.h>
36145#else
36146# include <assert.h>
36147#endif
36148		     Syntax error
36149_ACEOF
36150if ac_fn_c_try_cpp "$LINENO"; then :
36151
36152else
36153  # Broken: fails on valid input.
36154continue
36155fi
36156rm -f conftest.err conftest.i conftest.$ac_ext
36157
36158  # OK, works on sane cases.  Now check whether nonexistent headers
36159  # can be detected and how.
36160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161/* end confdefs.h.  */
36162#include <ac_nonexistent.h>
36163_ACEOF
36164if ac_fn_c_try_cpp "$LINENO"; then :
36165  # Broken: success on invalid input.
36166continue
36167else
36168  # Passes both tests.
36169ac_preproc_ok=:
36170break
36171fi
36172rm -f conftest.err conftest.i conftest.$ac_ext
36173
36174done
36175# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36176rm -f conftest.i conftest.err conftest.$ac_ext
36177if $ac_preproc_ok; then :
36178
36179else
36180  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36182as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36183See \`config.log' for more details" "$LINENO" 5; }
36184fi
36185
36186ac_ext=cpp
36187ac_cpp='$CXXCPP $CPPFLAGS'
36188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36191
36192
36193  # Only process if variable expands to non-empty
36194
36195  if test "x$CPP" != x; then
36196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36197
36198  # First separate the path from the arguments. This will split at the first
36199  # space.
36200  complete="$CPP"
36201  path="${complete%% *}"
36202  tmp="$complete EOL"
36203  arguments="${tmp#* }"
36204
36205  # Input might be given as Windows format, start by converting to
36206  # unix format.
36207  new_path=`$CYGPATH -u "$path"`
36208
36209  # Now try to locate executable using which
36210  new_path=`$WHICH "$new_path" 2> /dev/null`
36211  # bat and cmd files are not always considered executable in cygwin causing which
36212  # to not find them
36213  if test "x$new_path" = x \
36214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36216    new_path=`$CYGPATH -u "$path"`
36217  fi
36218  if test "x$new_path" = x; then
36219    # Oops. Which didn't find the executable.
36220    # The splitting of arguments from the executable at a space might have been incorrect,
36221    # since paths with space are more likely in Windows. Give it another try with the whole
36222    # argument.
36223    path="$complete"
36224    arguments="EOL"
36225    new_path=`$CYGPATH -u "$path"`
36226    new_path=`$WHICH "$new_path" 2> /dev/null`
36227    # bat and cmd files are not always considered executable in cygwin causing which
36228    # to not find them
36229    if test "x$new_path" = x \
36230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36232      new_path=`$CYGPATH -u "$path"`
36233    fi
36234    if test "x$new_path" = x; then
36235      # It's still not found. Now this is an unrecoverable error.
36236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36237$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36238      has_space=`$ECHO "$complete" | $GREP " "`
36239      if test "x$has_space" != x; then
36240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36242      fi
36243      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36244    fi
36245  fi
36246
36247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36250  # "foo.exe" is OK but "foo" is an error.
36251  #
36252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36253  # It is also a way to make sure we got the proper file name for the real test later on.
36254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36255  if test "x$test_shortpath" = x; then
36256    # Short path failed, file does not exist as specified.
36257    # Try adding .exe or .cmd
36258    if test -f "${new_path}.exe"; then
36259      input_to_shortpath="${new_path}.exe"
36260    elif test -f "${new_path}.cmd"; then
36261      input_to_shortpath="${new_path}.cmd"
36262    else
36263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36264$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36267      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36268    fi
36269  else
36270    input_to_shortpath="$new_path"
36271  fi
36272
36273  # Call helper function which possibly converts this using DOS-style short mode.
36274  # If so, the updated path is stored in $new_path.
36275  new_path="$input_to_shortpath"
36276
36277  input_path="$input_to_shortpath"
36278  # Check if we need to convert this using DOS-style short mode. If the path
36279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36280  # take no chances and rewrite it.
36281  # Note: m4 eats our [], so we need to use [ and ] instead.
36282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36283  if test "x$has_forbidden_chars" != x; then
36284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36288      # Going to short mode and back again did indeed matter. Since short mode is
36289      # case insensitive, let's make it lowercase to improve readability.
36290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36291      # Now convert it back to Unix-style (cygpath)
36292      input_path=`$CYGPATH -u "$shortmode_path"`
36293      new_path="$input_path"
36294    fi
36295  fi
36296
36297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36298  if test "x$test_cygdrive_prefix" = x; then
36299    # As a simple fix, exclude /usr/bin since it's not a real path.
36300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36302      # a path prefixed by /cygdrive for fixpath to work.
36303      new_path="$CYGWIN_ROOT_PATH$input_path"
36304    fi
36305  fi
36306
36307  # remove trailing .exe if any
36308  new_path="${new_path/%.exe/}"
36309
36310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36311
36312  # First separate the path from the arguments. This will split at the first
36313  # space.
36314  complete="$CPP"
36315  path="${complete%% *}"
36316  tmp="$complete EOL"
36317  arguments="${tmp#* }"
36318
36319  # Input might be given as Windows format, start by converting to
36320  # unix format.
36321  new_path="$path"
36322
36323  windows_path="$new_path"
36324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36325    unix_path=`$CYGPATH -u "$windows_path"`
36326    new_path="$unix_path"
36327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36329    new_path="$unix_path"
36330  fi
36331
36332
36333  # Now try to locate executable using which
36334  new_path=`$WHICH "$new_path" 2> /dev/null`
36335
36336  if test "x$new_path" = x; then
36337    # Oops. Which didn't find the executable.
36338    # The splitting of arguments from the executable at a space might have been incorrect,
36339    # since paths with space are more likely in Windows. Give it another try with the whole
36340    # argument.
36341    path="$complete"
36342    arguments="EOL"
36343    new_path="$path"
36344
36345  windows_path="$new_path"
36346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36347    unix_path=`$CYGPATH -u "$windows_path"`
36348    new_path="$unix_path"
36349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36351    new_path="$unix_path"
36352  fi
36353
36354
36355    new_path=`$WHICH "$new_path" 2> /dev/null`
36356    # bat and cmd files are not always considered executable in MSYS causing which
36357    # to not find them
36358    if test "x$new_path" = x \
36359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36361      new_path="$path"
36362
36363  windows_path="$new_path"
36364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36365    unix_path=`$CYGPATH -u "$windows_path"`
36366    new_path="$unix_path"
36367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36369    new_path="$unix_path"
36370  fi
36371
36372    fi
36373
36374    if test "x$new_path" = x; then
36375      # It's still not found. Now this is an unrecoverable error.
36376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36377$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36378      has_space=`$ECHO "$complete" | $GREP " "`
36379      if test "x$has_space" != x; then
36380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36382      fi
36383      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36384    fi
36385  fi
36386
36387  # Now new_path has a complete unix path to the binary
36388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36389    # Keep paths in /bin as-is, but remove trailing .exe if any
36390    new_path="${new_path/%.exe/}"
36391    # Do not save /bin paths to all_fixpath_prefixes!
36392  else
36393    # Not in mixed or Windows style, start by that.
36394    new_path=`cmd //c echo $new_path`
36395
36396  input_path="$new_path"
36397  # Check if we need to convert this using DOS-style short mode. If the path
36398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36399  # take no chances and rewrite it.
36400  # Note: m4 eats our [], so we need to use [ and ] instead.
36401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36402  if test "x$has_forbidden_chars" != x; then
36403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36405  fi
36406
36407    # Output is in $new_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    # remove trailing .exe if any
36419    new_path="${new_path/%.exe/}"
36420
36421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36423  fi
36424
36425    else
36426      # We're on a unix platform. Hooray! :)
36427      # First separate the path from the arguments. This will split at the first
36428      # space.
36429      complete="$CPP"
36430      path="${complete%% *}"
36431      tmp="$complete EOL"
36432      arguments="${tmp#* }"
36433
36434      # Cannot rely on the command "which" here since it doesn't always work.
36435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36436      if test -z "$is_absolute_path"; then
36437        # Path to executable is not absolute. Find it.
36438        IFS_save="$IFS"
36439        IFS=:
36440        for p in $PATH; do
36441          if test -f "$p/$path" && test -x "$p/$path"; then
36442            new_path="$p/$path"
36443            break
36444          fi
36445        done
36446        IFS="$IFS_save"
36447      else
36448        # This is an absolute path, we can use it without further modifications.
36449        new_path="$path"
36450      fi
36451
36452      if test "x$new_path" = x; then
36453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36454$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36455        has_space=`$ECHO "$complete" | $GREP " "`
36456        if test "x$has_space" != x; then
36457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36459        fi
36460        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36461      fi
36462    fi
36463
36464    # Now join together the path and the arguments once again
36465    if test "x$arguments" != xEOL; then
36466      new_complete="$new_path ${arguments% *}"
36467    else
36468      new_complete="$new_path"
36469    fi
36470
36471    if test "x$complete" != "x$new_complete"; then
36472      CPP="$new_complete"
36473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36474$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36475    fi
36476  fi
36477
36478  ac_ext=cpp
36479ac_cpp='$CXXCPP $CPPFLAGS'
36480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36484$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36485if test -z "$CXXCPP"; then
36486  if ${ac_cv_prog_CXXCPP+:} false; then :
36487  $as_echo_n "(cached) " >&6
36488else
36489      # Double quotes because CXXCPP needs to be expanded
36490    for CXXCPP in "$CXX -E" "/lib/cpp"
36491    do
36492      ac_preproc_ok=false
36493for ac_cxx_preproc_warn_flag in '' yes
36494do
36495  # Use a header file that comes with gcc, so configuring glibc
36496  # with a fresh cross-compiler works.
36497  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36498  # <limits.h> exists even on freestanding compilers.
36499  # On the NeXT, cc -E runs the code through the compiler's parser,
36500  # not just through cpp. "Syntax error" is here to catch this case.
36501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36502/* end confdefs.h.  */
36503#ifdef __STDC__
36504# include <limits.h>
36505#else
36506# include <assert.h>
36507#endif
36508		     Syntax error
36509_ACEOF
36510if ac_fn_cxx_try_cpp "$LINENO"; then :
36511
36512else
36513  # Broken: fails on valid input.
36514continue
36515fi
36516rm -f conftest.err conftest.i conftest.$ac_ext
36517
36518  # OK, works on sane cases.  Now check whether nonexistent headers
36519  # can be detected and how.
36520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36521/* end confdefs.h.  */
36522#include <ac_nonexistent.h>
36523_ACEOF
36524if ac_fn_cxx_try_cpp "$LINENO"; then :
36525  # Broken: success on invalid input.
36526continue
36527else
36528  # Passes both tests.
36529ac_preproc_ok=:
36530break
36531fi
36532rm -f conftest.err conftest.i conftest.$ac_ext
36533
36534done
36535# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36536rm -f conftest.i conftest.err conftest.$ac_ext
36537if $ac_preproc_ok; then :
36538  break
36539fi
36540
36541    done
36542    ac_cv_prog_CXXCPP=$CXXCPP
36543
36544fi
36545  CXXCPP=$ac_cv_prog_CXXCPP
36546else
36547  ac_cv_prog_CXXCPP=$CXXCPP
36548fi
36549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36550$as_echo "$CXXCPP" >&6; }
36551ac_preproc_ok=false
36552for ac_cxx_preproc_warn_flag in '' yes
36553do
36554  # Use a header file that comes with gcc, so configuring glibc
36555  # with a fresh cross-compiler works.
36556  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36557  # <limits.h> exists even on freestanding compilers.
36558  # On the NeXT, cc -E runs the code through the compiler's parser,
36559  # not just through cpp. "Syntax error" is here to catch this case.
36560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36561/* end confdefs.h.  */
36562#ifdef __STDC__
36563# include <limits.h>
36564#else
36565# include <assert.h>
36566#endif
36567		     Syntax error
36568_ACEOF
36569if ac_fn_cxx_try_cpp "$LINENO"; then :
36570
36571else
36572  # Broken: fails on valid input.
36573continue
36574fi
36575rm -f conftest.err conftest.i conftest.$ac_ext
36576
36577  # OK, works on sane cases.  Now check whether nonexistent headers
36578  # can be detected and how.
36579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36580/* end confdefs.h.  */
36581#include <ac_nonexistent.h>
36582_ACEOF
36583if ac_fn_cxx_try_cpp "$LINENO"; then :
36584  # Broken: success on invalid input.
36585continue
36586else
36587  # Passes both tests.
36588ac_preproc_ok=:
36589break
36590fi
36591rm -f conftest.err conftest.i conftest.$ac_ext
36592
36593done
36594# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36595rm -f conftest.i conftest.err conftest.$ac_ext
36596if $ac_preproc_ok; then :
36597
36598else
36599  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36601as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36602See \`config.log' for more details" "$LINENO" 5; }
36603fi
36604
36605ac_ext=cpp
36606ac_cpp='$CXXCPP $CPPFLAGS'
36607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36610
36611
36612  # Only process if variable expands to non-empty
36613
36614  if test "x$CXXCPP" != x; then
36615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36616
36617  # First separate the path from the arguments. This will split at the first
36618  # space.
36619  complete="$CXXCPP"
36620  path="${complete%% *}"
36621  tmp="$complete EOL"
36622  arguments="${tmp#* }"
36623
36624  # Input might be given as Windows format, start by converting to
36625  # unix format.
36626  new_path=`$CYGPATH -u "$path"`
36627
36628  # Now try to locate executable using which
36629  new_path=`$WHICH "$new_path" 2> /dev/null`
36630  # bat and cmd files are not always considered executable in cygwin causing which
36631  # to not find them
36632  if test "x$new_path" = x \
36633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36635    new_path=`$CYGPATH -u "$path"`
36636  fi
36637  if test "x$new_path" = x; then
36638    # Oops. Which didn't find the executable.
36639    # The splitting of arguments from the executable at a space might have been incorrect,
36640    # since paths with space are more likely in Windows. Give it another try with the whole
36641    # argument.
36642    path="$complete"
36643    arguments="EOL"
36644    new_path=`$CYGPATH -u "$path"`
36645    new_path=`$WHICH "$new_path" 2> /dev/null`
36646    # bat and cmd files are not always considered executable in cygwin causing which
36647    # to not find them
36648    if test "x$new_path" = x \
36649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36651      new_path=`$CYGPATH -u "$path"`
36652    fi
36653    if test "x$new_path" = x; then
36654      # It's still not found. Now this is an unrecoverable error.
36655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36656$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36657      has_space=`$ECHO "$complete" | $GREP " "`
36658      if test "x$has_space" != x; then
36659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36661      fi
36662      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36663    fi
36664  fi
36665
36666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36669  # "foo.exe" is OK but "foo" is an error.
36670  #
36671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36672  # It is also a way to make sure we got the proper file name for the real test later on.
36673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36674  if test "x$test_shortpath" = x; then
36675    # Short path failed, file does not exist as specified.
36676    # Try adding .exe or .cmd
36677    if test -f "${new_path}.exe"; then
36678      input_to_shortpath="${new_path}.exe"
36679    elif test -f "${new_path}.cmd"; then
36680      input_to_shortpath="${new_path}.cmd"
36681    else
36682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36683$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36686      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36687    fi
36688  else
36689    input_to_shortpath="$new_path"
36690  fi
36691
36692  # Call helper function which possibly converts this using DOS-style short mode.
36693  # If so, the updated path is stored in $new_path.
36694  new_path="$input_to_shortpath"
36695
36696  input_path="$input_to_shortpath"
36697  # Check if we need to convert this using DOS-style short mode. If the path
36698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36699  # take no chances and rewrite it.
36700  # Note: m4 eats our [], so we need to use [ and ] instead.
36701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36702  if test "x$has_forbidden_chars" != x; then
36703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36707      # Going to short mode and back again did indeed matter. Since short mode is
36708      # case insensitive, let's make it lowercase to improve readability.
36709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36710      # Now convert it back to Unix-style (cygpath)
36711      input_path=`$CYGPATH -u "$shortmode_path"`
36712      new_path="$input_path"
36713    fi
36714  fi
36715
36716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36717  if test "x$test_cygdrive_prefix" = x; then
36718    # As a simple fix, exclude /usr/bin since it's not a real path.
36719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36721      # a path prefixed by /cygdrive for fixpath to work.
36722      new_path="$CYGWIN_ROOT_PATH$input_path"
36723    fi
36724  fi
36725
36726  # remove trailing .exe if any
36727  new_path="${new_path/%.exe/}"
36728
36729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36730
36731  # First separate the path from the arguments. This will split at the first
36732  # space.
36733  complete="$CXXCPP"
36734  path="${complete%% *}"
36735  tmp="$complete EOL"
36736  arguments="${tmp#* }"
36737
36738  # Input might be given as Windows format, start by converting to
36739  # unix format.
36740  new_path="$path"
36741
36742  windows_path="$new_path"
36743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36744    unix_path=`$CYGPATH -u "$windows_path"`
36745    new_path="$unix_path"
36746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36748    new_path="$unix_path"
36749  fi
36750
36751
36752  # Now try to locate executable using which
36753  new_path=`$WHICH "$new_path" 2> /dev/null`
36754
36755  if test "x$new_path" = x; then
36756    # Oops. Which didn't find the executable.
36757    # The splitting of arguments from the executable at a space might have been incorrect,
36758    # since paths with space are more likely in Windows. Give it another try with the whole
36759    # argument.
36760    path="$complete"
36761    arguments="EOL"
36762    new_path="$path"
36763
36764  windows_path="$new_path"
36765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36766    unix_path=`$CYGPATH -u "$windows_path"`
36767    new_path="$unix_path"
36768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36770    new_path="$unix_path"
36771  fi
36772
36773
36774    new_path=`$WHICH "$new_path" 2> /dev/null`
36775    # bat and cmd files are not always considered executable in MSYS causing which
36776    # to not find them
36777    if test "x$new_path" = x \
36778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36780      new_path="$path"
36781
36782  windows_path="$new_path"
36783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36784    unix_path=`$CYGPATH -u "$windows_path"`
36785    new_path="$unix_path"
36786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36788    new_path="$unix_path"
36789  fi
36790
36791    fi
36792
36793    if test "x$new_path" = x; then
36794      # It's still not found. Now this is an unrecoverable error.
36795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36796$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36797      has_space=`$ECHO "$complete" | $GREP " "`
36798      if test "x$has_space" != x; then
36799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36801      fi
36802      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36803    fi
36804  fi
36805
36806  # Now new_path has a complete unix path to the binary
36807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36808    # Keep paths in /bin as-is, but remove trailing .exe if any
36809    new_path="${new_path/%.exe/}"
36810    # Do not save /bin paths to all_fixpath_prefixes!
36811  else
36812    # Not in mixed or Windows style, start by that.
36813    new_path=`cmd //c echo $new_path`
36814
36815  input_path="$new_path"
36816  # Check if we need to convert this using DOS-style short mode. If the path
36817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36818  # take no chances and rewrite it.
36819  # Note: m4 eats our [], so we need to use [ and ] instead.
36820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36821  if test "x$has_forbidden_chars" != x; then
36822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36824  fi
36825
36826    # Output is in $new_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    # remove trailing .exe if any
36838    new_path="${new_path/%.exe/}"
36839
36840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36842  fi
36843
36844    else
36845      # We're on a unix platform. Hooray! :)
36846      # First separate the path from the arguments. This will split at the first
36847      # space.
36848      complete="$CXXCPP"
36849      path="${complete%% *}"
36850      tmp="$complete EOL"
36851      arguments="${tmp#* }"
36852
36853      # Cannot rely on the command "which" here since it doesn't always work.
36854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36855      if test -z "$is_absolute_path"; then
36856        # Path to executable is not absolute. Find it.
36857        IFS_save="$IFS"
36858        IFS=:
36859        for p in $PATH; do
36860          if test -f "$p/$path" && test -x "$p/$path"; then
36861            new_path="$p/$path"
36862            break
36863          fi
36864        done
36865        IFS="$IFS_save"
36866      else
36867        # This is an absolute path, we can use it without further modifications.
36868        new_path="$path"
36869      fi
36870
36871      if test "x$new_path" = x; then
36872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36873$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36874        has_space=`$ECHO "$complete" | $GREP " "`
36875        if test "x$has_space" != x; then
36876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36878        fi
36879        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36880      fi
36881    fi
36882
36883    # Now join together the path and the arguments once again
36884    if test "x$arguments" != xEOL; then
36885      new_complete="$new_path ${arguments% *}"
36886    else
36887      new_complete="$new_path"
36888    fi
36889
36890    if test "x$complete" != "x$new_complete"; then
36891      CXXCPP="$new_complete"
36892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36893$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36894    fi
36895  fi
36896
36897
36898  #
36899  # Setup the linker (LD)
36900  #
36901  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36902    # In the Microsoft toolchain we have a separate LD command "link".
36903    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36904    # a cygwin program for something completely different.
36905    # Extract the first word of "link", so it can be a program name with args.
36906set dummy link; ac_word=$2
36907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36908$as_echo_n "checking for $ac_word... " >&6; }
36909if ${ac_cv_prog_LD+:} false; then :
36910  $as_echo_n "(cached) " >&6
36911else
36912  if test -n "$LD"; then
36913  ac_cv_prog_LD="$LD" # Let the user override the test.
36914else
36915  ac_prog_rejected=no
36916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36917for as_dir in $PATH
36918do
36919  IFS=$as_save_IFS
36920  test -z "$as_dir" && as_dir=.
36921    for ac_exec_ext in '' $ac_executable_extensions; do
36922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36923    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36924       ac_prog_rejected=yes
36925       continue
36926     fi
36927    ac_cv_prog_LD="link"
36928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36929    break 2
36930  fi
36931done
36932  done
36933IFS=$as_save_IFS
36934
36935if test $ac_prog_rejected = yes; then
36936  # We found a bogon in the path, so make sure we never use it.
36937  set dummy $ac_cv_prog_LD
36938  shift
36939  if test $# != 0; then
36940    # We chose a different compiler from the bogus one.
36941    # However, it has the same basename, so the bogon will be chosen
36942    # first if we set LD to just the basename; use the full file name.
36943    shift
36944    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36945  fi
36946fi
36947fi
36948fi
36949LD=$ac_cv_prog_LD
36950if test -n "$LD"; then
36951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36952$as_echo "$LD" >&6; }
36953else
36954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36955$as_echo "no" >&6; }
36956fi
36957
36958
36959
36960  # Only process if variable expands to non-empty
36961
36962  if test "x$LD" != x; then
36963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964
36965  # First separate the path from the arguments. This will split at the first
36966  # space.
36967  complete="$LD"
36968  path="${complete%% *}"
36969  tmp="$complete EOL"
36970  arguments="${tmp#* }"
36971
36972  # Input might be given as Windows format, start by converting to
36973  # unix format.
36974  new_path=`$CYGPATH -u "$path"`
36975
36976  # Now try to locate executable using which
36977  new_path=`$WHICH "$new_path" 2> /dev/null`
36978  # bat and cmd files are not always considered executable in cygwin causing which
36979  # to not find them
36980  if test "x$new_path" = x \
36981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36983    new_path=`$CYGPATH -u "$path"`
36984  fi
36985  if test "x$new_path" = x; then
36986    # Oops. Which didn't find the executable.
36987    # The splitting of arguments from the executable at a space might have been incorrect,
36988    # since paths with space are more likely in Windows. Give it another try with the whole
36989    # argument.
36990    path="$complete"
36991    arguments="EOL"
36992    new_path=`$CYGPATH -u "$path"`
36993    new_path=`$WHICH "$new_path" 2> /dev/null`
36994    # bat and cmd files are not always considered executable in cygwin causing which
36995    # to not find them
36996    if test "x$new_path" = x \
36997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36999      new_path=`$CYGPATH -u "$path"`
37000    fi
37001    if test "x$new_path" = x; then
37002      # It's still not found. Now this is an unrecoverable error.
37003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37004$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37005      has_space=`$ECHO "$complete" | $GREP " "`
37006      if test "x$has_space" != x; then
37007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37009      fi
37010      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37011    fi
37012  fi
37013
37014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37017  # "foo.exe" is OK but "foo" is an error.
37018  #
37019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37020  # It is also a way to make sure we got the proper file name for the real test later on.
37021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37022  if test "x$test_shortpath" = x; then
37023    # Short path failed, file does not exist as specified.
37024    # Try adding .exe or .cmd
37025    if test -f "${new_path}.exe"; then
37026      input_to_shortpath="${new_path}.exe"
37027    elif test -f "${new_path}.cmd"; then
37028      input_to_shortpath="${new_path}.cmd"
37029    else
37030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37031$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37034      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37035    fi
37036  else
37037    input_to_shortpath="$new_path"
37038  fi
37039
37040  # Call helper function which possibly converts this using DOS-style short mode.
37041  # If so, the updated path is stored in $new_path.
37042  new_path="$input_to_shortpath"
37043
37044  input_path="$input_to_shortpath"
37045  # Check if we need to convert this using DOS-style short mode. If the path
37046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37047  # take no chances and rewrite it.
37048  # Note: m4 eats our [], so we need to use [ and ] instead.
37049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37050  if test "x$has_forbidden_chars" != x; then
37051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37055      # Going to short mode and back again did indeed matter. Since short mode is
37056      # case insensitive, let's make it lowercase to improve readability.
37057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37058      # Now convert it back to Unix-style (cygpath)
37059      input_path=`$CYGPATH -u "$shortmode_path"`
37060      new_path="$input_path"
37061    fi
37062  fi
37063
37064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37065  if test "x$test_cygdrive_prefix" = x; then
37066    # As a simple fix, exclude /usr/bin since it's not a real path.
37067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37069      # a path prefixed by /cygdrive for fixpath to work.
37070      new_path="$CYGWIN_ROOT_PATH$input_path"
37071    fi
37072  fi
37073
37074  # remove trailing .exe if any
37075  new_path="${new_path/%.exe/}"
37076
37077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37078
37079  # First separate the path from the arguments. This will split at the first
37080  # space.
37081  complete="$LD"
37082  path="${complete%% *}"
37083  tmp="$complete EOL"
37084  arguments="${tmp#* }"
37085
37086  # Input might be given as Windows format, start by converting to
37087  # unix format.
37088  new_path="$path"
37089
37090  windows_path="$new_path"
37091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37092    unix_path=`$CYGPATH -u "$windows_path"`
37093    new_path="$unix_path"
37094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37096    new_path="$unix_path"
37097  fi
37098
37099
37100  # Now try to locate executable using which
37101  new_path=`$WHICH "$new_path" 2> /dev/null`
37102
37103  if test "x$new_path" = x; then
37104    # Oops. Which didn't find the executable.
37105    # The splitting of arguments from the executable at a space might have been incorrect,
37106    # since paths with space are more likely in Windows. Give it another try with the whole
37107    # argument.
37108    path="$complete"
37109    arguments="EOL"
37110    new_path="$path"
37111
37112  windows_path="$new_path"
37113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37114    unix_path=`$CYGPATH -u "$windows_path"`
37115    new_path="$unix_path"
37116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37118    new_path="$unix_path"
37119  fi
37120
37121
37122    new_path=`$WHICH "$new_path" 2> /dev/null`
37123    # bat and cmd files are not always considered executable in MSYS causing which
37124    # to not find them
37125    if test "x$new_path" = x \
37126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37128      new_path="$path"
37129
37130  windows_path="$new_path"
37131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37132    unix_path=`$CYGPATH -u "$windows_path"`
37133    new_path="$unix_path"
37134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37136    new_path="$unix_path"
37137  fi
37138
37139    fi
37140
37141    if test "x$new_path" = x; then
37142      # It's still not found. Now this is an unrecoverable error.
37143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37144$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37145      has_space=`$ECHO "$complete" | $GREP " "`
37146      if test "x$has_space" != x; then
37147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37149      fi
37150      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37151    fi
37152  fi
37153
37154  # Now new_path has a complete unix path to the binary
37155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37156    # Keep paths in /bin as-is, but remove trailing .exe if any
37157    new_path="${new_path/%.exe/}"
37158    # Do not save /bin paths to all_fixpath_prefixes!
37159  else
37160    # Not in mixed or Windows style, start by that.
37161    new_path=`cmd //c echo $new_path`
37162
37163  input_path="$new_path"
37164  # Check if we need to convert this using DOS-style short mode. If the path
37165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37166  # take no chances and rewrite it.
37167  # Note: m4 eats our [], so we need to use [ and ] instead.
37168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37169  if test "x$has_forbidden_chars" != x; then
37170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37172  fi
37173
37174    # Output is in $new_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    # remove trailing .exe if any
37186    new_path="${new_path/%.exe/}"
37187
37188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37190  fi
37191
37192    else
37193      # We're on a unix platform. Hooray! :)
37194      # First separate the path from the arguments. This will split at the first
37195      # space.
37196      complete="$LD"
37197      path="${complete%% *}"
37198      tmp="$complete EOL"
37199      arguments="${tmp#* }"
37200
37201      # Cannot rely on the command "which" here since it doesn't always work.
37202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37203      if test -z "$is_absolute_path"; then
37204        # Path to executable is not absolute. Find it.
37205        IFS_save="$IFS"
37206        IFS=:
37207        for p in $PATH; do
37208          if test -f "$p/$path" && test -x "$p/$path"; then
37209            new_path="$p/$path"
37210            break
37211          fi
37212        done
37213        IFS="$IFS_save"
37214      else
37215        # This is an absolute path, we can use it without further modifications.
37216        new_path="$path"
37217      fi
37218
37219      if test "x$new_path" = x; then
37220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37221$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37222        has_space=`$ECHO "$complete" | $GREP " "`
37223        if test "x$has_space" != x; then
37224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37226        fi
37227        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37228      fi
37229    fi
37230
37231    # Now join together the path and the arguments once again
37232    if test "x$arguments" != xEOL; then
37233      new_complete="$new_path ${arguments% *}"
37234    else
37235      new_complete="$new_path"
37236    fi
37237
37238    if test "x$complete" != "x$new_complete"; then
37239      LD="$new_complete"
37240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37241$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37242    fi
37243  fi
37244
37245    # Verify that we indeed succeeded with this trick.
37246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37247$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37248    "$LD" --version > /dev/null
37249    if test $? -eq 0 ; then
37250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37251$as_echo "no" >&6; }
37252      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37253    else
37254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37255$as_echo "yes" >&6; }
37256    fi
37257    LDCXX="$LD"
37258  else
37259    # All other toolchains use the compiler to link.
37260    LD="$CC"
37261    LDCXX="$CXX"
37262  fi
37263
37264  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37265
37266
37267  #
37268  # Setup the assembler (AS)
37269  #
37270  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37271
37272
37273  # Publish this variable in the help.
37274
37275
37276  if [ -z "${AS+x}" ]; then
37277    # The variable is not set by user, try to locate tool using the code snippet
37278    for ac_prog in as
37279do
37280  # Extract the first word of "$ac_prog", so it can be a program name with args.
37281set dummy $ac_prog; ac_word=$2
37282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37283$as_echo_n "checking for $ac_word... " >&6; }
37284if ${ac_cv_path_AS+:} false; then :
37285  $as_echo_n "(cached) " >&6
37286else
37287  case $AS in
37288  [\\/]* | ?:[\\/]*)
37289  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37290  ;;
37291  *)
37292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37293for as_dir in $PATH
37294do
37295  IFS=$as_save_IFS
37296  test -z "$as_dir" && as_dir=.
37297    for ac_exec_ext in '' $ac_executable_extensions; do
37298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37299    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37301    break 2
37302  fi
37303done
37304  done
37305IFS=$as_save_IFS
37306
37307  ;;
37308esac
37309fi
37310AS=$ac_cv_path_AS
37311if test -n "$AS"; then
37312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37313$as_echo "$AS" >&6; }
37314else
37315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37316$as_echo "no" >&6; }
37317fi
37318
37319
37320  test -n "$AS" && break
37321done
37322
37323  else
37324    # The variable is set, but is it from the command line or the environment?
37325
37326    # Try to remove the string !AS! from our list.
37327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37329      # If it failed, the variable was not from the command line. Ignore it,
37330      # but warn the user (except for BASH, which is always set by the calling BASH).
37331      if test "xAS" != xBASH; then
37332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37333$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37334      fi
37335      # Try to locate tool using the code snippet
37336      for ac_prog in as
37337do
37338  # Extract the first word of "$ac_prog", so it can be a program name with args.
37339set dummy $ac_prog; ac_word=$2
37340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37341$as_echo_n "checking for $ac_word... " >&6; }
37342if ${ac_cv_path_AS+:} false; then :
37343  $as_echo_n "(cached) " >&6
37344else
37345  case $AS in
37346  [\\/]* | ?:[\\/]*)
37347  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37348  ;;
37349  *)
37350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37351for as_dir in $PATH
37352do
37353  IFS=$as_save_IFS
37354  test -z "$as_dir" && as_dir=.
37355    for ac_exec_ext in '' $ac_executable_extensions; do
37356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37357    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37359    break 2
37360  fi
37361done
37362  done
37363IFS=$as_save_IFS
37364
37365  ;;
37366esac
37367fi
37368AS=$ac_cv_path_AS
37369if test -n "$AS"; then
37370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37371$as_echo "$AS" >&6; }
37372else
37373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37374$as_echo "no" >&6; }
37375fi
37376
37377
37378  test -n "$AS" && break
37379done
37380
37381    else
37382      # If it succeeded, then it was overridden by the user. We will use it
37383      # for the tool.
37384
37385      # First remove it from the list of overridden variables, so we can test
37386      # for unknown variables in the end.
37387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37388
37389      # Check if we try to supply an empty value
37390      if test "x$AS" = x; then
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37392$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37394$as_echo_n "checking for AS... " >&6; }
37395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37396$as_echo "disabled" >&6; }
37397      else
37398        # Check if the provided tool contains a complete path.
37399        tool_specified="$AS"
37400        tool_basename="${tool_specified##*/}"
37401        if test "x$tool_basename" = "x$tool_specified"; then
37402          # A command without a complete path is provided, search $PATH.
37403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37404$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37405          # Extract the first word of "$tool_basename", so it can be a program name with args.
37406set dummy $tool_basename; ac_word=$2
37407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37408$as_echo_n "checking for $ac_word... " >&6; }
37409if ${ac_cv_path_AS+:} false; then :
37410  $as_echo_n "(cached) " >&6
37411else
37412  case $AS in
37413  [\\/]* | ?:[\\/]*)
37414  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37415  ;;
37416  *)
37417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37418for as_dir in $PATH
37419do
37420  IFS=$as_save_IFS
37421  test -z "$as_dir" && as_dir=.
37422    for ac_exec_ext in '' $ac_executable_extensions; do
37423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37424    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37426    break 2
37427  fi
37428done
37429  done
37430IFS=$as_save_IFS
37431
37432  ;;
37433esac
37434fi
37435AS=$ac_cv_path_AS
37436if test -n "$AS"; then
37437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37438$as_echo "$AS" >&6; }
37439else
37440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37441$as_echo "no" >&6; }
37442fi
37443
37444
37445          if test "x$AS" = x; then
37446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37447          fi
37448        else
37449          # Otherwise we believe it is a complete path. Use it as it is.
37450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37451$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37453$as_echo_n "checking for AS... " >&6; }
37454          if test ! -x "$tool_specified"; then
37455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37456$as_echo "not found" >&6; }
37457            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37458          fi
37459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37460$as_echo "$tool_specified" >&6; }
37461        fi
37462      fi
37463    fi
37464
37465  fi
37466
37467
37468
37469  # Only process if variable expands to non-empty
37470
37471  if test "x$AS" != x; then
37472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37473
37474  # First separate the path from the arguments. This will split at the first
37475  # space.
37476  complete="$AS"
37477  path="${complete%% *}"
37478  tmp="$complete EOL"
37479  arguments="${tmp#* }"
37480
37481  # Input might be given as Windows format, start by converting to
37482  # unix format.
37483  new_path=`$CYGPATH -u "$path"`
37484
37485  # Now try to locate executable using which
37486  new_path=`$WHICH "$new_path" 2> /dev/null`
37487  # bat and cmd files are not always considered executable in cygwin causing which
37488  # to not find them
37489  if test "x$new_path" = x \
37490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37492    new_path=`$CYGPATH -u "$path"`
37493  fi
37494  if test "x$new_path" = x; then
37495    # Oops. Which didn't find the executable.
37496    # The splitting of arguments from the executable at a space might have been incorrect,
37497    # since paths with space are more likely in Windows. Give it another try with the whole
37498    # argument.
37499    path="$complete"
37500    arguments="EOL"
37501    new_path=`$CYGPATH -u "$path"`
37502    new_path=`$WHICH "$new_path" 2> /dev/null`
37503    # bat and cmd files are not always considered executable in cygwin causing which
37504    # to not find them
37505    if test "x$new_path" = x \
37506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37508      new_path=`$CYGPATH -u "$path"`
37509    fi
37510    if test "x$new_path" = x; then
37511      # It's still not found. Now this is an unrecoverable error.
37512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37513$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37514      has_space=`$ECHO "$complete" | $GREP " "`
37515      if test "x$has_space" != x; then
37516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37518      fi
37519      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37520    fi
37521  fi
37522
37523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37526  # "foo.exe" is OK but "foo" is an error.
37527  #
37528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37529  # It is also a way to make sure we got the proper file name for the real test later on.
37530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37531  if test "x$test_shortpath" = x; then
37532    # Short path failed, file does not exist as specified.
37533    # Try adding .exe or .cmd
37534    if test -f "${new_path}.exe"; then
37535      input_to_shortpath="${new_path}.exe"
37536    elif test -f "${new_path}.cmd"; then
37537      input_to_shortpath="${new_path}.cmd"
37538    else
37539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37540$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37543      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37544    fi
37545  else
37546    input_to_shortpath="$new_path"
37547  fi
37548
37549  # Call helper function which possibly converts this using DOS-style short mode.
37550  # If so, the updated path is stored in $new_path.
37551  new_path="$input_to_shortpath"
37552
37553  input_path="$input_to_shortpath"
37554  # Check if we need to convert this using DOS-style short mode. If the path
37555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37556  # take no chances and rewrite it.
37557  # Note: m4 eats our [], so we need to use [ and ] instead.
37558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37559  if test "x$has_forbidden_chars" != x; then
37560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37564      # Going to short mode and back again did indeed matter. Since short mode is
37565      # case insensitive, let's make it lowercase to improve readability.
37566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37567      # Now convert it back to Unix-style (cygpath)
37568      input_path=`$CYGPATH -u "$shortmode_path"`
37569      new_path="$input_path"
37570    fi
37571  fi
37572
37573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37574  if test "x$test_cygdrive_prefix" = x; then
37575    # As a simple fix, exclude /usr/bin since it's not a real path.
37576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37578      # a path prefixed by /cygdrive for fixpath to work.
37579      new_path="$CYGWIN_ROOT_PATH$input_path"
37580    fi
37581  fi
37582
37583  # remove trailing .exe if any
37584  new_path="${new_path/%.exe/}"
37585
37586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37587
37588  # First separate the path from the arguments. This will split at the first
37589  # space.
37590  complete="$AS"
37591  path="${complete%% *}"
37592  tmp="$complete EOL"
37593  arguments="${tmp#* }"
37594
37595  # Input might be given as Windows format, start by converting to
37596  # unix format.
37597  new_path="$path"
37598
37599  windows_path="$new_path"
37600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37601    unix_path=`$CYGPATH -u "$windows_path"`
37602    new_path="$unix_path"
37603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37605    new_path="$unix_path"
37606  fi
37607
37608
37609  # Now try to locate executable using which
37610  new_path=`$WHICH "$new_path" 2> /dev/null`
37611
37612  if test "x$new_path" = x; then
37613    # Oops. Which didn't find the executable.
37614    # The splitting of arguments from the executable at a space might have been incorrect,
37615    # since paths with space are more likely in Windows. Give it another try with the whole
37616    # argument.
37617    path="$complete"
37618    arguments="EOL"
37619    new_path="$path"
37620
37621  windows_path="$new_path"
37622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37623    unix_path=`$CYGPATH -u "$windows_path"`
37624    new_path="$unix_path"
37625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37627    new_path="$unix_path"
37628  fi
37629
37630
37631    new_path=`$WHICH "$new_path" 2> /dev/null`
37632    # bat and cmd files are not always considered executable in MSYS causing which
37633    # to not find them
37634    if test "x$new_path" = x \
37635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37637      new_path="$path"
37638
37639  windows_path="$new_path"
37640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37641    unix_path=`$CYGPATH -u "$windows_path"`
37642    new_path="$unix_path"
37643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37645    new_path="$unix_path"
37646  fi
37647
37648    fi
37649
37650    if test "x$new_path" = x; then
37651      # It's still not found. Now this is an unrecoverable error.
37652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37653$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37654      has_space=`$ECHO "$complete" | $GREP " "`
37655      if test "x$has_space" != x; then
37656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37658      fi
37659      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37660    fi
37661  fi
37662
37663  # Now new_path has a complete unix path to the binary
37664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37665    # Keep paths in /bin as-is, but remove trailing .exe if any
37666    new_path="${new_path/%.exe/}"
37667    # Do not save /bin paths to all_fixpath_prefixes!
37668  else
37669    # Not in mixed or Windows style, start by that.
37670    new_path=`cmd //c echo $new_path`
37671
37672  input_path="$new_path"
37673  # Check if we need to convert this using DOS-style short mode. If the path
37674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37675  # take no chances and rewrite it.
37676  # Note: m4 eats our [], so we need to use [ and ] instead.
37677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37678  if test "x$has_forbidden_chars" != x; then
37679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37681  fi
37682
37683    # Output is in $new_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    # remove trailing .exe if any
37695    new_path="${new_path/%.exe/}"
37696
37697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37699  fi
37700
37701    else
37702      # We're on a unix platform. Hooray! :)
37703      # First separate the path from the arguments. This will split at the first
37704      # space.
37705      complete="$AS"
37706      path="${complete%% *}"
37707      tmp="$complete EOL"
37708      arguments="${tmp#* }"
37709
37710      # Cannot rely on the command "which" here since it doesn't always work.
37711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37712      if test -z "$is_absolute_path"; then
37713        # Path to executable is not absolute. Find it.
37714        IFS_save="$IFS"
37715        IFS=:
37716        for p in $PATH; do
37717          if test -f "$p/$path" && test -x "$p/$path"; then
37718            new_path="$p/$path"
37719            break
37720          fi
37721        done
37722        IFS="$IFS_save"
37723      else
37724        # This is an absolute path, we can use it without further modifications.
37725        new_path="$path"
37726      fi
37727
37728      if test "x$new_path" = x; then
37729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37730$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37731        has_space=`$ECHO "$complete" | $GREP " "`
37732        if test "x$has_space" != x; then
37733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37735        fi
37736        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37737      fi
37738    fi
37739
37740    # Now join together the path and the arguments once again
37741    if test "x$arguments" != xEOL; then
37742      new_complete="$new_path ${arguments% *}"
37743    else
37744      new_complete="$new_path"
37745    fi
37746
37747    if test "x$complete" != "x$new_complete"; then
37748      AS="$new_complete"
37749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37750$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37751    fi
37752  fi
37753
37754    if test "x$AS" = x; then
37755      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37756    fi
37757  else
37758    # FIXME: is this correct for microsoft?
37759    AS="$CC -c"
37760  fi
37761
37762
37763  #
37764  # Setup the archiver (AR)
37765  #
37766  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37767    # The corresponding ar tool is lib.exe (used to create static libraries)
37768    # Extract the first word of "lib", so it can be a program name with args.
37769set dummy lib; ac_word=$2
37770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37771$as_echo_n "checking for $ac_word... " >&6; }
37772if ${ac_cv_prog_AR+:} false; then :
37773  $as_echo_n "(cached) " >&6
37774else
37775  if test -n "$AR"; then
37776  ac_cv_prog_AR="$AR" # Let the user override the test.
37777else
37778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37779for as_dir in $PATH
37780do
37781  IFS=$as_save_IFS
37782  test -z "$as_dir" && as_dir=.
37783    for ac_exec_ext in '' $ac_executable_extensions; do
37784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37785    ac_cv_prog_AR="lib"
37786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37787    break 2
37788  fi
37789done
37790  done
37791IFS=$as_save_IFS
37792
37793fi
37794fi
37795AR=$ac_cv_prog_AR
37796if test -n "$AR"; then
37797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37798$as_echo "$AR" >&6; }
37799else
37800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37801$as_echo "no" >&6; }
37802fi
37803
37804
37805  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37806
37807
37808  # Publish this variable in the help.
37809
37810
37811  if [ -z "${AR+x}" ]; then
37812    # The variable is not set by user, try to locate tool using the code snippet
37813    if test -n "$ac_tool_prefix"; then
37814  for ac_prog in ar gcc-ar
37815  do
37816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37819$as_echo_n "checking for $ac_word... " >&6; }
37820if ${ac_cv_prog_AR+:} false; then :
37821  $as_echo_n "(cached) " >&6
37822else
37823  if test -n "$AR"; then
37824  ac_cv_prog_AR="$AR" # Let the user override the test.
37825else
37826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37827for as_dir in $PATH
37828do
37829  IFS=$as_save_IFS
37830  test -z "$as_dir" && as_dir=.
37831    for ac_exec_ext in '' $ac_executable_extensions; do
37832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37833    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37835    break 2
37836  fi
37837done
37838  done
37839IFS=$as_save_IFS
37840
37841fi
37842fi
37843AR=$ac_cv_prog_AR
37844if test -n "$AR"; then
37845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37846$as_echo "$AR" >&6; }
37847else
37848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37849$as_echo "no" >&6; }
37850fi
37851
37852
37853    test -n "$AR" && break
37854  done
37855fi
37856if test -z "$AR"; then
37857  ac_ct_AR=$AR
37858  for ac_prog in ar gcc-ar
37859do
37860  # Extract the first word of "$ac_prog", so it can be a program name with args.
37861set dummy $ac_prog; ac_word=$2
37862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37863$as_echo_n "checking for $ac_word... " >&6; }
37864if ${ac_cv_prog_ac_ct_AR+:} false; then :
37865  $as_echo_n "(cached) " >&6
37866else
37867  if test -n "$ac_ct_AR"; then
37868  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37869else
37870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37871for as_dir in $PATH
37872do
37873  IFS=$as_save_IFS
37874  test -z "$as_dir" && as_dir=.
37875    for ac_exec_ext in '' $ac_executable_extensions; do
37876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37877    ac_cv_prog_ac_ct_AR="$ac_prog"
37878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37879    break 2
37880  fi
37881done
37882  done
37883IFS=$as_save_IFS
37884
37885fi
37886fi
37887ac_ct_AR=$ac_cv_prog_ac_ct_AR
37888if test -n "$ac_ct_AR"; then
37889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37890$as_echo "$ac_ct_AR" >&6; }
37891else
37892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37893$as_echo "no" >&6; }
37894fi
37895
37896
37897  test -n "$ac_ct_AR" && break
37898done
37899
37900  if test "x$ac_ct_AR" = x; then
37901    AR=""
37902  else
37903    case $cross_compiling:$ac_tool_warned in
37904yes:)
37905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37907ac_tool_warned=yes ;;
37908esac
37909    AR=$ac_ct_AR
37910  fi
37911fi
37912
37913  else
37914    # The variable is set, but is it from the command line or the environment?
37915
37916    # Try to remove the string !AR! from our list.
37917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37919      # If it failed, the variable was not from the command line. Ignore it,
37920      # but warn the user (except for BASH, which is always set by the calling BASH).
37921      if test "xAR" != xBASH; then
37922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37923$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37924      fi
37925      # Try to locate tool using the code snippet
37926      if test -n "$ac_tool_prefix"; then
37927  for ac_prog in ar gcc-ar
37928  do
37929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37932$as_echo_n "checking for $ac_word... " >&6; }
37933if ${ac_cv_prog_AR+:} false; then :
37934  $as_echo_n "(cached) " >&6
37935else
37936  if test -n "$AR"; then
37937  ac_cv_prog_AR="$AR" # Let the user override the test.
37938else
37939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37940for as_dir in $PATH
37941do
37942  IFS=$as_save_IFS
37943  test -z "$as_dir" && as_dir=.
37944    for ac_exec_ext in '' $ac_executable_extensions; do
37945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37946    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37948    break 2
37949  fi
37950done
37951  done
37952IFS=$as_save_IFS
37953
37954fi
37955fi
37956AR=$ac_cv_prog_AR
37957if test -n "$AR"; then
37958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37959$as_echo "$AR" >&6; }
37960else
37961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37962$as_echo "no" >&6; }
37963fi
37964
37965
37966    test -n "$AR" && break
37967  done
37968fi
37969if test -z "$AR"; then
37970  ac_ct_AR=$AR
37971  for ac_prog in ar gcc-ar
37972do
37973  # Extract the first word of "$ac_prog", so it can be a program name with args.
37974set dummy $ac_prog; ac_word=$2
37975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37976$as_echo_n "checking for $ac_word... " >&6; }
37977if ${ac_cv_prog_ac_ct_AR+:} false; then :
37978  $as_echo_n "(cached) " >&6
37979else
37980  if test -n "$ac_ct_AR"; then
37981  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37982else
37983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37984for as_dir in $PATH
37985do
37986  IFS=$as_save_IFS
37987  test -z "$as_dir" && as_dir=.
37988    for ac_exec_ext in '' $ac_executable_extensions; do
37989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37990    ac_cv_prog_ac_ct_AR="$ac_prog"
37991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37992    break 2
37993  fi
37994done
37995  done
37996IFS=$as_save_IFS
37997
37998fi
37999fi
38000ac_ct_AR=$ac_cv_prog_ac_ct_AR
38001if test -n "$ac_ct_AR"; then
38002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38003$as_echo "$ac_ct_AR" >&6; }
38004else
38005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38006$as_echo "no" >&6; }
38007fi
38008
38009
38010  test -n "$ac_ct_AR" && break
38011done
38012
38013  if test "x$ac_ct_AR" = x; then
38014    AR=""
38015  else
38016    case $cross_compiling:$ac_tool_warned in
38017yes:)
38018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38020ac_tool_warned=yes ;;
38021esac
38022    AR=$ac_ct_AR
38023  fi
38024fi
38025
38026    else
38027      # If it succeeded, then it was overridden by the user. We will use it
38028      # for the tool.
38029
38030      # First remove it from the list of overridden variables, so we can test
38031      # for unknown variables in the end.
38032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38033
38034      # Check if we try to supply an empty value
38035      if test "x$AR" = x; then
38036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38037$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38039$as_echo_n "checking for AR... " >&6; }
38040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38041$as_echo "disabled" >&6; }
38042      else
38043        # Check if the provided tool contains a complete path.
38044        tool_specified="$AR"
38045        tool_basename="${tool_specified##*/}"
38046        if test "x$tool_basename" = "x$tool_specified"; then
38047          # A command without a complete path is provided, search $PATH.
38048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38049$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38050          # Extract the first word of "$tool_basename", so it can be a program name with args.
38051set dummy $tool_basename; ac_word=$2
38052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38053$as_echo_n "checking for $ac_word... " >&6; }
38054if ${ac_cv_path_AR+:} false; then :
38055  $as_echo_n "(cached) " >&6
38056else
38057  case $AR in
38058  [\\/]* | ?:[\\/]*)
38059  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38060  ;;
38061  *)
38062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38063for as_dir in $PATH
38064do
38065  IFS=$as_save_IFS
38066  test -z "$as_dir" && as_dir=.
38067    for ac_exec_ext in '' $ac_executable_extensions; do
38068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38069    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38071    break 2
38072  fi
38073done
38074  done
38075IFS=$as_save_IFS
38076
38077  ;;
38078esac
38079fi
38080AR=$ac_cv_path_AR
38081if test -n "$AR"; then
38082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38083$as_echo "$AR" >&6; }
38084else
38085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38086$as_echo "no" >&6; }
38087fi
38088
38089
38090          if test "x$AR" = x; then
38091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38092          fi
38093        else
38094          # Otherwise we believe it is a complete path. Use it as it is.
38095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38096$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38098$as_echo_n "checking for AR... " >&6; }
38099          if test ! -x "$tool_specified"; then
38100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38101$as_echo "not found" >&6; }
38102            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38103          fi
38104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38105$as_echo "$tool_specified" >&6; }
38106        fi
38107      fi
38108    fi
38109
38110  fi
38111
38112
38113  else
38114
38115
38116  # Publish this variable in the help.
38117
38118
38119  if [ -z "${AR+x}" ]; then
38120    # The variable is not set by user, try to locate tool using the code snippet
38121    if test -n "$ac_tool_prefix"; then
38122  for ac_prog in ar
38123  do
38124    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38125set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38127$as_echo_n "checking for $ac_word... " >&6; }
38128if ${ac_cv_prog_AR+:} false; then :
38129  $as_echo_n "(cached) " >&6
38130else
38131  if test -n "$AR"; then
38132  ac_cv_prog_AR="$AR" # Let the user override the test.
38133else
38134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38135for as_dir in $PATH
38136do
38137  IFS=$as_save_IFS
38138  test -z "$as_dir" && as_dir=.
38139    for ac_exec_ext in '' $ac_executable_extensions; do
38140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38141    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38143    break 2
38144  fi
38145done
38146  done
38147IFS=$as_save_IFS
38148
38149fi
38150fi
38151AR=$ac_cv_prog_AR
38152if test -n "$AR"; then
38153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38154$as_echo "$AR" >&6; }
38155else
38156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38157$as_echo "no" >&6; }
38158fi
38159
38160
38161    test -n "$AR" && break
38162  done
38163fi
38164if test -z "$AR"; then
38165  ac_ct_AR=$AR
38166  for ac_prog in ar
38167do
38168  # Extract the first word of "$ac_prog", so it can be a program name with args.
38169set dummy $ac_prog; ac_word=$2
38170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38171$as_echo_n "checking for $ac_word... " >&6; }
38172if ${ac_cv_prog_ac_ct_AR+:} false; then :
38173  $as_echo_n "(cached) " >&6
38174else
38175  if test -n "$ac_ct_AR"; then
38176  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38177else
38178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38179for as_dir in $PATH
38180do
38181  IFS=$as_save_IFS
38182  test -z "$as_dir" && as_dir=.
38183    for ac_exec_ext in '' $ac_executable_extensions; do
38184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38185    ac_cv_prog_ac_ct_AR="$ac_prog"
38186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38187    break 2
38188  fi
38189done
38190  done
38191IFS=$as_save_IFS
38192
38193fi
38194fi
38195ac_ct_AR=$ac_cv_prog_ac_ct_AR
38196if test -n "$ac_ct_AR"; then
38197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38198$as_echo "$ac_ct_AR" >&6; }
38199else
38200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38201$as_echo "no" >&6; }
38202fi
38203
38204
38205  test -n "$ac_ct_AR" && break
38206done
38207
38208  if test "x$ac_ct_AR" = x; then
38209    AR=""
38210  else
38211    case $cross_compiling:$ac_tool_warned in
38212yes:)
38213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38215ac_tool_warned=yes ;;
38216esac
38217    AR=$ac_ct_AR
38218  fi
38219fi
38220
38221  else
38222    # The variable is set, but is it from the command line or the environment?
38223
38224    # Try to remove the string !AR! from our list.
38225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38227      # If it failed, the variable was not from the command line. Ignore it,
38228      # but warn the user (except for BASH, which is always set by the calling BASH).
38229      if test "xAR" != xBASH; then
38230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38231$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38232      fi
38233      # Try to locate tool using the code snippet
38234      if test -n "$ac_tool_prefix"; then
38235  for ac_prog in ar
38236  do
38237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38240$as_echo_n "checking for $ac_word... " >&6; }
38241if ${ac_cv_prog_AR+:} false; then :
38242  $as_echo_n "(cached) " >&6
38243else
38244  if test -n "$AR"; then
38245  ac_cv_prog_AR="$AR" # Let the user override the test.
38246else
38247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38248for as_dir in $PATH
38249do
38250  IFS=$as_save_IFS
38251  test -z "$as_dir" && as_dir=.
38252    for ac_exec_ext in '' $ac_executable_extensions; do
38253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38254    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38256    break 2
38257  fi
38258done
38259  done
38260IFS=$as_save_IFS
38261
38262fi
38263fi
38264AR=$ac_cv_prog_AR
38265if test -n "$AR"; then
38266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38267$as_echo "$AR" >&6; }
38268else
38269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38270$as_echo "no" >&6; }
38271fi
38272
38273
38274    test -n "$AR" && break
38275  done
38276fi
38277if test -z "$AR"; then
38278  ac_ct_AR=$AR
38279  for ac_prog in ar
38280do
38281  # Extract the first word of "$ac_prog", so it can be a program name with args.
38282set dummy $ac_prog; ac_word=$2
38283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38284$as_echo_n "checking for $ac_word... " >&6; }
38285if ${ac_cv_prog_ac_ct_AR+:} false; then :
38286  $as_echo_n "(cached) " >&6
38287else
38288  if test -n "$ac_ct_AR"; then
38289  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38290else
38291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38292for as_dir in $PATH
38293do
38294  IFS=$as_save_IFS
38295  test -z "$as_dir" && as_dir=.
38296    for ac_exec_ext in '' $ac_executable_extensions; do
38297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38298    ac_cv_prog_ac_ct_AR="$ac_prog"
38299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38300    break 2
38301  fi
38302done
38303  done
38304IFS=$as_save_IFS
38305
38306fi
38307fi
38308ac_ct_AR=$ac_cv_prog_ac_ct_AR
38309if test -n "$ac_ct_AR"; then
38310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38311$as_echo "$ac_ct_AR" >&6; }
38312else
38313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38314$as_echo "no" >&6; }
38315fi
38316
38317
38318  test -n "$ac_ct_AR" && break
38319done
38320
38321  if test "x$ac_ct_AR" = x; then
38322    AR=""
38323  else
38324    case $cross_compiling:$ac_tool_warned in
38325yes:)
38326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38328ac_tool_warned=yes ;;
38329esac
38330    AR=$ac_ct_AR
38331  fi
38332fi
38333
38334    else
38335      # If it succeeded, then it was overridden by the user. We will use it
38336      # for the tool.
38337
38338      # First remove it from the list of overridden variables, so we can test
38339      # for unknown variables in the end.
38340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38341
38342      # Check if we try to supply an empty value
38343      if test "x$AR" = x; then
38344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38345$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38347$as_echo_n "checking for AR... " >&6; }
38348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38349$as_echo "disabled" >&6; }
38350      else
38351        # Check if the provided tool contains a complete path.
38352        tool_specified="$AR"
38353        tool_basename="${tool_specified##*/}"
38354        if test "x$tool_basename" = "x$tool_specified"; then
38355          # A command without a complete path is provided, search $PATH.
38356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38357$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38358          # Extract the first word of "$tool_basename", so it can be a program name with args.
38359set dummy $tool_basename; ac_word=$2
38360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38361$as_echo_n "checking for $ac_word... " >&6; }
38362if ${ac_cv_path_AR+:} false; then :
38363  $as_echo_n "(cached) " >&6
38364else
38365  case $AR in
38366  [\\/]* | ?:[\\/]*)
38367  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38368  ;;
38369  *)
38370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38371for as_dir in $PATH
38372do
38373  IFS=$as_save_IFS
38374  test -z "$as_dir" && as_dir=.
38375    for ac_exec_ext in '' $ac_executable_extensions; do
38376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38377    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38379    break 2
38380  fi
38381done
38382  done
38383IFS=$as_save_IFS
38384
38385  ;;
38386esac
38387fi
38388AR=$ac_cv_path_AR
38389if test -n "$AR"; then
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38391$as_echo "$AR" >&6; }
38392else
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38394$as_echo "no" >&6; }
38395fi
38396
38397
38398          if test "x$AR" = x; then
38399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38400          fi
38401        else
38402          # Otherwise we believe it is a complete path. Use it as it is.
38403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38404$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38406$as_echo_n "checking for AR... " >&6; }
38407          if test ! -x "$tool_specified"; then
38408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38409$as_echo "not found" >&6; }
38410            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38411          fi
38412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38413$as_echo "$tool_specified" >&6; }
38414        fi
38415      fi
38416    fi
38417
38418  fi
38419
38420
38421  fi
38422
38423  # Only process if variable expands to non-empty
38424
38425  if test "x$AR" != x; then
38426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38427
38428  # First separate the path from the arguments. This will split at the first
38429  # space.
38430  complete="$AR"
38431  path="${complete%% *}"
38432  tmp="$complete EOL"
38433  arguments="${tmp#* }"
38434
38435  # Input might be given as Windows format, start by converting to
38436  # unix format.
38437  new_path=`$CYGPATH -u "$path"`
38438
38439  # Now try to locate executable using which
38440  new_path=`$WHICH "$new_path" 2> /dev/null`
38441  # bat and cmd files are not always considered executable in cygwin causing which
38442  # to not find them
38443  if test "x$new_path" = x \
38444      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38445      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38446    new_path=`$CYGPATH -u "$path"`
38447  fi
38448  if test "x$new_path" = x; then
38449    # Oops. Which didn't find the executable.
38450    # The splitting of arguments from the executable at a space might have been incorrect,
38451    # since paths with space are more likely in Windows. Give it another try with the whole
38452    # argument.
38453    path="$complete"
38454    arguments="EOL"
38455    new_path=`$CYGPATH -u "$path"`
38456    new_path=`$WHICH "$new_path" 2> /dev/null`
38457    # bat and cmd files are not always considered executable in cygwin causing which
38458    # to not find them
38459    if test "x$new_path" = x \
38460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38462      new_path=`$CYGPATH -u "$path"`
38463    fi
38464    if test "x$new_path" = x; then
38465      # It's still not found. Now this is an unrecoverable error.
38466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38467$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38468      has_space=`$ECHO "$complete" | $GREP " "`
38469      if test "x$has_space" != x; then
38470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38472      fi
38473      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38474    fi
38475  fi
38476
38477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38480  # "foo.exe" is OK but "foo" is an error.
38481  #
38482  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38483  # It is also a way to make sure we got the proper file name for the real test later on.
38484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38485  if test "x$test_shortpath" = x; then
38486    # Short path failed, file does not exist as specified.
38487    # Try adding .exe or .cmd
38488    if test -f "${new_path}.exe"; then
38489      input_to_shortpath="${new_path}.exe"
38490    elif test -f "${new_path}.cmd"; then
38491      input_to_shortpath="${new_path}.cmd"
38492    else
38493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38494$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38495      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38496$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38497      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38498    fi
38499  else
38500    input_to_shortpath="$new_path"
38501  fi
38502
38503  # Call helper function which possibly converts this using DOS-style short mode.
38504  # If so, the updated path is stored in $new_path.
38505  new_path="$input_to_shortpath"
38506
38507  input_path="$input_to_shortpath"
38508  # Check if we need to convert this using DOS-style short mode. If the path
38509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38510  # take no chances and rewrite it.
38511  # Note: m4 eats our [], so we need to use [ and ] instead.
38512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38513  if test "x$has_forbidden_chars" != x; then
38514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38518      # Going to short mode and back again did indeed matter. Since short mode is
38519      # case insensitive, let's make it lowercase to improve readability.
38520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38521      # Now convert it back to Unix-style (cygpath)
38522      input_path=`$CYGPATH -u "$shortmode_path"`
38523      new_path="$input_path"
38524    fi
38525  fi
38526
38527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38528  if test "x$test_cygdrive_prefix" = x; then
38529    # As a simple fix, exclude /usr/bin since it's not a real path.
38530    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38532      # a path prefixed by /cygdrive for fixpath to work.
38533      new_path="$CYGWIN_ROOT_PATH$input_path"
38534    fi
38535  fi
38536
38537  # remove trailing .exe if any
38538  new_path="${new_path/%.exe/}"
38539
38540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38541
38542  # First separate the path from the arguments. This will split at the first
38543  # space.
38544  complete="$AR"
38545  path="${complete%% *}"
38546  tmp="$complete EOL"
38547  arguments="${tmp#* }"
38548
38549  # Input might be given as Windows format, start by converting to
38550  # unix format.
38551  new_path="$path"
38552
38553  windows_path="$new_path"
38554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38555    unix_path=`$CYGPATH -u "$windows_path"`
38556    new_path="$unix_path"
38557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38559    new_path="$unix_path"
38560  fi
38561
38562
38563  # Now try to locate executable using which
38564  new_path=`$WHICH "$new_path" 2> /dev/null`
38565
38566  if test "x$new_path" = x; then
38567    # Oops. Which didn't find the executable.
38568    # The splitting of arguments from the executable at a space might have been incorrect,
38569    # since paths with space are more likely in Windows. Give it another try with the whole
38570    # argument.
38571    path="$complete"
38572    arguments="EOL"
38573    new_path="$path"
38574
38575  windows_path="$new_path"
38576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38577    unix_path=`$CYGPATH -u "$windows_path"`
38578    new_path="$unix_path"
38579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38581    new_path="$unix_path"
38582  fi
38583
38584
38585    new_path=`$WHICH "$new_path" 2> /dev/null`
38586    # bat and cmd files are not always considered executable in MSYS causing which
38587    # to not find them
38588    if test "x$new_path" = x \
38589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38591      new_path="$path"
38592
38593  windows_path="$new_path"
38594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38595    unix_path=`$CYGPATH -u "$windows_path"`
38596    new_path="$unix_path"
38597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38599    new_path="$unix_path"
38600  fi
38601
38602    fi
38603
38604    if test "x$new_path" = x; then
38605      # It's still not found. Now this is an unrecoverable error.
38606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38607$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38608      has_space=`$ECHO "$complete" | $GREP " "`
38609      if test "x$has_space" != x; then
38610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38612      fi
38613      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38614    fi
38615  fi
38616
38617  # Now new_path has a complete unix path to the binary
38618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38619    # Keep paths in /bin as-is, but remove trailing .exe if any
38620    new_path="${new_path/%.exe/}"
38621    # Do not save /bin paths to all_fixpath_prefixes!
38622  else
38623    # Not in mixed or Windows style, start by that.
38624    new_path=`cmd //c echo $new_path`
38625
38626  input_path="$new_path"
38627  # Check if we need to convert this using DOS-style short mode. If the path
38628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38629  # take no chances and rewrite it.
38630  # Note: m4 eats our [], so we need to use [ and ] instead.
38631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38632  if test "x$has_forbidden_chars" != x; then
38633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38635  fi
38636
38637    # Output is in $new_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    # remove trailing .exe if any
38649    new_path="${new_path/%.exe/}"
38650
38651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38653  fi
38654
38655    else
38656      # We're on a unix platform. Hooray! :)
38657      # First separate the path from the arguments. This will split at the first
38658      # space.
38659      complete="$AR"
38660      path="${complete%% *}"
38661      tmp="$complete EOL"
38662      arguments="${tmp#* }"
38663
38664      # Cannot rely on the command "which" here since it doesn't always work.
38665      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38666      if test -z "$is_absolute_path"; then
38667        # Path to executable is not absolute. Find it.
38668        IFS_save="$IFS"
38669        IFS=:
38670        for p in $PATH; do
38671          if test -f "$p/$path" && test -x "$p/$path"; then
38672            new_path="$p/$path"
38673            break
38674          fi
38675        done
38676        IFS="$IFS_save"
38677      else
38678        # This is an absolute path, we can use it without further modifications.
38679        new_path="$path"
38680      fi
38681
38682      if test "x$new_path" = x; then
38683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38684$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38685        has_space=`$ECHO "$complete" | $GREP " "`
38686        if test "x$has_space" != x; then
38687          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38688$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38689        fi
38690        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38691      fi
38692    fi
38693
38694    # Now join together the path and the arguments once again
38695    if test "x$arguments" != xEOL; then
38696      new_complete="$new_path ${arguments% *}"
38697    else
38698      new_complete="$new_path"
38699    fi
38700
38701    if test "x$complete" != "x$new_complete"; then
38702      AR="$new_complete"
38703      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38704$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38705    fi
38706  fi
38707
38708
38709
38710  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38711
38712
38713  # Publish this variable in the help.
38714
38715
38716  if [ -z "${LIPO+x}" ]; then
38717    # The variable is not set by user, try to locate tool using the code snippet
38718    for ac_prog in lipo
38719do
38720  # Extract the first word of "$ac_prog", so it can be a program name with args.
38721set dummy $ac_prog; ac_word=$2
38722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38723$as_echo_n "checking for $ac_word... " >&6; }
38724if ${ac_cv_path_LIPO+:} false; then :
38725  $as_echo_n "(cached) " >&6
38726else
38727  case $LIPO in
38728  [\\/]* | ?:[\\/]*)
38729  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38730  ;;
38731  *)
38732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38733for as_dir in $PATH
38734do
38735  IFS=$as_save_IFS
38736  test -z "$as_dir" && as_dir=.
38737    for ac_exec_ext in '' $ac_executable_extensions; do
38738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38739    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38741    break 2
38742  fi
38743done
38744  done
38745IFS=$as_save_IFS
38746
38747  ;;
38748esac
38749fi
38750LIPO=$ac_cv_path_LIPO
38751if test -n "$LIPO"; then
38752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38753$as_echo "$LIPO" >&6; }
38754else
38755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38756$as_echo "no" >&6; }
38757fi
38758
38759
38760  test -n "$LIPO" && break
38761done
38762
38763  else
38764    # The variable is set, but is it from the command line or the environment?
38765
38766    # Try to remove the string !LIPO! from our list.
38767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38769      # If it failed, the variable was not from the command line. Ignore it,
38770      # but warn the user (except for BASH, which is always set by the calling BASH).
38771      if test "xLIPO" != xBASH; then
38772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38773$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38774      fi
38775      # Try to locate tool using the code snippet
38776      for ac_prog in lipo
38777do
38778  # Extract the first word of "$ac_prog", so it can be a program name with args.
38779set dummy $ac_prog; ac_word=$2
38780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38781$as_echo_n "checking for $ac_word... " >&6; }
38782if ${ac_cv_path_LIPO+:} false; then :
38783  $as_echo_n "(cached) " >&6
38784else
38785  case $LIPO in
38786  [\\/]* | ?:[\\/]*)
38787  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38788  ;;
38789  *)
38790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38791for as_dir in $PATH
38792do
38793  IFS=$as_save_IFS
38794  test -z "$as_dir" && as_dir=.
38795    for ac_exec_ext in '' $ac_executable_extensions; do
38796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38797    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38799    break 2
38800  fi
38801done
38802  done
38803IFS=$as_save_IFS
38804
38805  ;;
38806esac
38807fi
38808LIPO=$ac_cv_path_LIPO
38809if test -n "$LIPO"; then
38810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38811$as_echo "$LIPO" >&6; }
38812else
38813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38814$as_echo "no" >&6; }
38815fi
38816
38817
38818  test -n "$LIPO" && break
38819done
38820
38821    else
38822      # If it succeeded, then it was overridden by the user. We will use it
38823      # for the tool.
38824
38825      # First remove it from the list of overridden variables, so we can test
38826      # for unknown variables in the end.
38827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38828
38829      # Check if we try to supply an empty value
38830      if test "x$LIPO" = x; then
38831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38832$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38834$as_echo_n "checking for LIPO... " >&6; }
38835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38836$as_echo "disabled" >&6; }
38837      else
38838        # Check if the provided tool contains a complete path.
38839        tool_specified="$LIPO"
38840        tool_basename="${tool_specified##*/}"
38841        if test "x$tool_basename" = "x$tool_specified"; then
38842          # A command without a complete path is provided, search $PATH.
38843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38844$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38845          # Extract the first word of "$tool_basename", so it can be a program name with args.
38846set dummy $tool_basename; ac_word=$2
38847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38848$as_echo_n "checking for $ac_word... " >&6; }
38849if ${ac_cv_path_LIPO+:} false; then :
38850  $as_echo_n "(cached) " >&6
38851else
38852  case $LIPO in
38853  [\\/]* | ?:[\\/]*)
38854  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38855  ;;
38856  *)
38857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38858for as_dir in $PATH
38859do
38860  IFS=$as_save_IFS
38861  test -z "$as_dir" && as_dir=.
38862    for ac_exec_ext in '' $ac_executable_extensions; do
38863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38864    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38866    break 2
38867  fi
38868done
38869  done
38870IFS=$as_save_IFS
38871
38872  ;;
38873esac
38874fi
38875LIPO=$ac_cv_path_LIPO
38876if test -n "$LIPO"; then
38877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38878$as_echo "$LIPO" >&6; }
38879else
38880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38881$as_echo "no" >&6; }
38882fi
38883
38884
38885          if test "x$LIPO" = x; then
38886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38887          fi
38888        else
38889          # Otherwise we believe it is a complete path. Use it as it is.
38890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38891$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38893$as_echo_n "checking for LIPO... " >&6; }
38894          if test ! -x "$tool_specified"; then
38895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38896$as_echo "not found" >&6; }
38897            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38898          fi
38899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38900$as_echo "$tool_specified" >&6; }
38901        fi
38902      fi
38903    fi
38904
38905  fi
38906
38907
38908
38909  # Only process if variable expands to non-empty
38910
38911  if test "x$LIPO" != x; then
38912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913
38914  # First separate the path from the arguments. This will split at the first
38915  # space.
38916  complete="$LIPO"
38917  path="${complete%% *}"
38918  tmp="$complete EOL"
38919  arguments="${tmp#* }"
38920
38921  # Input might be given as Windows format, start by converting to
38922  # unix format.
38923  new_path=`$CYGPATH -u "$path"`
38924
38925  # Now try to locate executable using which
38926  new_path=`$WHICH "$new_path" 2> /dev/null`
38927  # bat and cmd files are not always considered executable in cygwin causing which
38928  # to not find them
38929  if test "x$new_path" = x \
38930      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38931      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38932    new_path=`$CYGPATH -u "$path"`
38933  fi
38934  if test "x$new_path" = x; then
38935    # Oops. Which didn't find the executable.
38936    # The splitting of arguments from the executable at a space might have been incorrect,
38937    # since paths with space are more likely in Windows. Give it another try with the whole
38938    # argument.
38939    path="$complete"
38940    arguments="EOL"
38941    new_path=`$CYGPATH -u "$path"`
38942    new_path=`$WHICH "$new_path" 2> /dev/null`
38943    # bat and cmd files are not always considered executable in cygwin causing which
38944    # to not find them
38945    if test "x$new_path" = x \
38946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38948      new_path=`$CYGPATH -u "$path"`
38949    fi
38950    if test "x$new_path" = x; then
38951      # It's still not found. Now this is an unrecoverable error.
38952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38953$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38954      has_space=`$ECHO "$complete" | $GREP " "`
38955      if test "x$has_space" != x; then
38956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38958      fi
38959      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38960    fi
38961  fi
38962
38963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38966  # "foo.exe" is OK but "foo" is an error.
38967  #
38968  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38969  # It is also a way to make sure we got the proper file name for the real test later on.
38970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38971  if test "x$test_shortpath" = x; then
38972    # Short path failed, file does not exist as specified.
38973    # Try adding .exe or .cmd
38974    if test -f "${new_path}.exe"; then
38975      input_to_shortpath="${new_path}.exe"
38976    elif test -f "${new_path}.cmd"; then
38977      input_to_shortpath="${new_path}.cmd"
38978    else
38979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38980$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38983      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38984    fi
38985  else
38986    input_to_shortpath="$new_path"
38987  fi
38988
38989  # Call helper function which possibly converts this using DOS-style short mode.
38990  # If so, the updated path is stored in $new_path.
38991  new_path="$input_to_shortpath"
38992
38993  input_path="$input_to_shortpath"
38994  # Check if we need to convert this using DOS-style short mode. If the path
38995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38996  # take no chances and rewrite it.
38997  # Note: m4 eats our [], so we need to use [ and ] instead.
38998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38999  if test "x$has_forbidden_chars" != x; then
39000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39004      # Going to short mode and back again did indeed matter. Since short mode is
39005      # case insensitive, let's make it lowercase to improve readability.
39006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39007      # Now convert it back to Unix-style (cygpath)
39008      input_path=`$CYGPATH -u "$shortmode_path"`
39009      new_path="$input_path"
39010    fi
39011  fi
39012
39013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39014  if test "x$test_cygdrive_prefix" = x; then
39015    # As a simple fix, exclude /usr/bin since it's not a real path.
39016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39018      # a path prefixed by /cygdrive for fixpath to work.
39019      new_path="$CYGWIN_ROOT_PATH$input_path"
39020    fi
39021  fi
39022
39023  # remove trailing .exe if any
39024  new_path="${new_path/%.exe/}"
39025
39026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39027
39028  # First separate the path from the arguments. This will split at the first
39029  # space.
39030  complete="$LIPO"
39031  path="${complete%% *}"
39032  tmp="$complete EOL"
39033  arguments="${tmp#* }"
39034
39035  # Input might be given as Windows format, start by converting to
39036  # unix format.
39037  new_path="$path"
39038
39039  windows_path="$new_path"
39040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39041    unix_path=`$CYGPATH -u "$windows_path"`
39042    new_path="$unix_path"
39043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39045    new_path="$unix_path"
39046  fi
39047
39048
39049  # Now try to locate executable using which
39050  new_path=`$WHICH "$new_path" 2> /dev/null`
39051
39052  if test "x$new_path" = x; then
39053    # Oops. Which didn't find the executable.
39054    # The splitting of arguments from the executable at a space might have been incorrect,
39055    # since paths with space are more likely in Windows. Give it another try with the whole
39056    # argument.
39057    path="$complete"
39058    arguments="EOL"
39059    new_path="$path"
39060
39061  windows_path="$new_path"
39062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39063    unix_path=`$CYGPATH -u "$windows_path"`
39064    new_path="$unix_path"
39065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39067    new_path="$unix_path"
39068  fi
39069
39070
39071    new_path=`$WHICH "$new_path" 2> /dev/null`
39072    # bat and cmd files are not always considered executable in MSYS causing which
39073    # to not find them
39074    if test "x$new_path" = x \
39075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39077      new_path="$path"
39078
39079  windows_path="$new_path"
39080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081    unix_path=`$CYGPATH -u "$windows_path"`
39082    new_path="$unix_path"
39083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39085    new_path="$unix_path"
39086  fi
39087
39088    fi
39089
39090    if test "x$new_path" = x; then
39091      # It's still not found. Now this is an unrecoverable error.
39092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39093$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39094      has_space=`$ECHO "$complete" | $GREP " "`
39095      if test "x$has_space" != x; then
39096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39098      fi
39099      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39100    fi
39101  fi
39102
39103  # Now new_path has a complete unix path to the binary
39104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39105    # Keep paths in /bin as-is, but remove trailing .exe if any
39106    new_path="${new_path/%.exe/}"
39107    # Do not save /bin paths to all_fixpath_prefixes!
39108  else
39109    # Not in mixed or Windows style, start by that.
39110    new_path=`cmd //c echo $new_path`
39111
39112  input_path="$new_path"
39113  # Check if we need to convert this using DOS-style short mode. If the path
39114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39115  # take no chances and rewrite it.
39116  # Note: m4 eats our [], so we need to use [ and ] instead.
39117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39118  if test "x$has_forbidden_chars" != x; then
39119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39121  fi
39122
39123    # Output is in $new_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    # remove trailing .exe if any
39135    new_path="${new_path/%.exe/}"
39136
39137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39139  fi
39140
39141    else
39142      # We're on a unix platform. Hooray! :)
39143      # First separate the path from the arguments. This will split at the first
39144      # space.
39145      complete="$LIPO"
39146      path="${complete%% *}"
39147      tmp="$complete EOL"
39148      arguments="${tmp#* }"
39149
39150      # Cannot rely on the command "which" here since it doesn't always work.
39151      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39152      if test -z "$is_absolute_path"; then
39153        # Path to executable is not absolute. Find it.
39154        IFS_save="$IFS"
39155        IFS=:
39156        for p in $PATH; do
39157          if test -f "$p/$path" && test -x "$p/$path"; then
39158            new_path="$p/$path"
39159            break
39160          fi
39161        done
39162        IFS="$IFS_save"
39163      else
39164        # This is an absolute path, we can use it without further modifications.
39165        new_path="$path"
39166      fi
39167
39168      if test "x$new_path" = x; then
39169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39170$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39171        has_space=`$ECHO "$complete" | $GREP " "`
39172        if test "x$has_space" != x; then
39173          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39175        fi
39176        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39177      fi
39178    fi
39179
39180    # Now join together the path and the arguments once again
39181    if test "x$arguments" != xEOL; then
39182      new_complete="$new_path ${arguments% *}"
39183    else
39184      new_complete="$new_path"
39185    fi
39186
39187    if test "x$complete" != "x$new_complete"; then
39188      LIPO="$new_complete"
39189      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39190$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39191    fi
39192  fi
39193
39194  fi
39195
39196  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39197    # Extract the first word of "mt", so it can be a program name with args.
39198set dummy mt; ac_word=$2
39199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39200$as_echo_n "checking for $ac_word... " >&6; }
39201if ${ac_cv_prog_MT+:} false; then :
39202  $as_echo_n "(cached) " >&6
39203else
39204  if test -n "$MT"; then
39205  ac_cv_prog_MT="$MT" # Let the user override the test.
39206else
39207  ac_prog_rejected=no
39208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39209for as_dir in $PATH
39210do
39211  IFS=$as_save_IFS
39212  test -z "$as_dir" && as_dir=.
39213    for ac_exec_ext in '' $ac_executable_extensions; do
39214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39215    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39216       ac_prog_rejected=yes
39217       continue
39218     fi
39219    ac_cv_prog_MT="mt"
39220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39221    break 2
39222  fi
39223done
39224  done
39225IFS=$as_save_IFS
39226
39227if test $ac_prog_rejected = yes; then
39228  # We found a bogon in the path, so make sure we never use it.
39229  set dummy $ac_cv_prog_MT
39230  shift
39231  if test $# != 0; then
39232    # We chose a different compiler from the bogus one.
39233    # However, it has the same basename, so the bogon will be chosen
39234    # first if we set MT to just the basename; use the full file name.
39235    shift
39236    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39237  fi
39238fi
39239fi
39240fi
39241MT=$ac_cv_prog_MT
39242if test -n "$MT"; then
39243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39244$as_echo "$MT" >&6; }
39245else
39246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39247$as_echo "no" >&6; }
39248fi
39249
39250
39251
39252  # Only process if variable expands to non-empty
39253
39254  if test "x$MT" != x; then
39255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39256
39257  # First separate the path from the arguments. This will split at the first
39258  # space.
39259  complete="$MT"
39260  path="${complete%% *}"
39261  tmp="$complete EOL"
39262  arguments="${tmp#* }"
39263
39264  # Input might be given as Windows format, start by converting to
39265  # unix format.
39266  new_path=`$CYGPATH -u "$path"`
39267
39268  # Now try to locate executable using which
39269  new_path=`$WHICH "$new_path" 2> /dev/null`
39270  # bat and cmd files are not always considered executable in cygwin causing which
39271  # to not find them
39272  if test "x$new_path" = x \
39273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39275    new_path=`$CYGPATH -u "$path"`
39276  fi
39277  if test "x$new_path" = x; then
39278    # Oops. Which didn't find the executable.
39279    # The splitting of arguments from the executable at a space might have been incorrect,
39280    # since paths with space are more likely in Windows. Give it another try with the whole
39281    # argument.
39282    path="$complete"
39283    arguments="EOL"
39284    new_path=`$CYGPATH -u "$path"`
39285    new_path=`$WHICH "$new_path" 2> /dev/null`
39286    # bat and cmd files are not always considered executable in cygwin causing which
39287    # to not find them
39288    if test "x$new_path" = x \
39289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39291      new_path=`$CYGPATH -u "$path"`
39292    fi
39293    if test "x$new_path" = x; then
39294      # It's still not found. Now this is an unrecoverable error.
39295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39296$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39297      has_space=`$ECHO "$complete" | $GREP " "`
39298      if test "x$has_space" != x; then
39299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39301      fi
39302      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39303    fi
39304  fi
39305
39306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39309  # "foo.exe" is OK but "foo" is an error.
39310  #
39311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39312  # It is also a way to make sure we got the proper file name for the real test later on.
39313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39314  if test "x$test_shortpath" = x; then
39315    # Short path failed, file does not exist as specified.
39316    # Try adding .exe or .cmd
39317    if test -f "${new_path}.exe"; then
39318      input_to_shortpath="${new_path}.exe"
39319    elif test -f "${new_path}.cmd"; then
39320      input_to_shortpath="${new_path}.cmd"
39321    else
39322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39323$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39326      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39327    fi
39328  else
39329    input_to_shortpath="$new_path"
39330  fi
39331
39332  # Call helper function which possibly converts this using DOS-style short mode.
39333  # If so, the updated path is stored in $new_path.
39334  new_path="$input_to_shortpath"
39335
39336  input_path="$input_to_shortpath"
39337  # Check if we need to convert this using DOS-style short mode. If the path
39338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39339  # take no chances and rewrite it.
39340  # Note: m4 eats our [], so we need to use [ and ] instead.
39341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39342  if test "x$has_forbidden_chars" != x; then
39343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39347      # Going to short mode and back again did indeed matter. Since short mode is
39348      # case insensitive, let's make it lowercase to improve readability.
39349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39350      # Now convert it back to Unix-style (cygpath)
39351      input_path=`$CYGPATH -u "$shortmode_path"`
39352      new_path="$input_path"
39353    fi
39354  fi
39355
39356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39357  if test "x$test_cygdrive_prefix" = x; then
39358    # As a simple fix, exclude /usr/bin since it's not a real path.
39359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39361      # a path prefixed by /cygdrive for fixpath to work.
39362      new_path="$CYGWIN_ROOT_PATH$input_path"
39363    fi
39364  fi
39365
39366  # remove trailing .exe if any
39367  new_path="${new_path/%.exe/}"
39368
39369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39370
39371  # First separate the path from the arguments. This will split at the first
39372  # space.
39373  complete="$MT"
39374  path="${complete%% *}"
39375  tmp="$complete EOL"
39376  arguments="${tmp#* }"
39377
39378  # Input might be given as Windows format, start by converting to
39379  # unix format.
39380  new_path="$path"
39381
39382  windows_path="$new_path"
39383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39384    unix_path=`$CYGPATH -u "$windows_path"`
39385    new_path="$unix_path"
39386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39388    new_path="$unix_path"
39389  fi
39390
39391
39392  # Now try to locate executable using which
39393  new_path=`$WHICH "$new_path" 2> /dev/null`
39394
39395  if test "x$new_path" = x; then
39396    # Oops. Which didn't find the executable.
39397    # The splitting of arguments from the executable at a space might have been incorrect,
39398    # since paths with space are more likely in Windows. Give it another try with the whole
39399    # argument.
39400    path="$complete"
39401    arguments="EOL"
39402    new_path="$path"
39403
39404  windows_path="$new_path"
39405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39406    unix_path=`$CYGPATH -u "$windows_path"`
39407    new_path="$unix_path"
39408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39410    new_path="$unix_path"
39411  fi
39412
39413
39414    new_path=`$WHICH "$new_path" 2> /dev/null`
39415    # bat and cmd files are not always considered executable in MSYS causing which
39416    # to not find them
39417    if test "x$new_path" = x \
39418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39420      new_path="$path"
39421
39422  windows_path="$new_path"
39423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39424    unix_path=`$CYGPATH -u "$windows_path"`
39425    new_path="$unix_path"
39426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39428    new_path="$unix_path"
39429  fi
39430
39431    fi
39432
39433    if test "x$new_path" = x; then
39434      # It's still not found. Now this is an unrecoverable error.
39435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39436$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39437      has_space=`$ECHO "$complete" | $GREP " "`
39438      if test "x$has_space" != x; then
39439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39441      fi
39442      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39443    fi
39444  fi
39445
39446  # Now new_path has a complete unix path to the binary
39447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39448    # Keep paths in /bin as-is, but remove trailing .exe if any
39449    new_path="${new_path/%.exe/}"
39450    # Do not save /bin paths to all_fixpath_prefixes!
39451  else
39452    # Not in mixed or Windows style, start by that.
39453    new_path=`cmd //c echo $new_path`
39454
39455  input_path="$new_path"
39456  # Check if we need to convert this using DOS-style short mode. If the path
39457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39458  # take no chances and rewrite it.
39459  # Note: m4 eats our [], so we need to use [ and ] instead.
39460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39461  if test "x$has_forbidden_chars" != x; then
39462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39464  fi
39465
39466    # Output is in $new_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    # remove trailing .exe if any
39478    new_path="${new_path/%.exe/}"
39479
39480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39482  fi
39483
39484    else
39485      # We're on a unix platform. Hooray! :)
39486      # First separate the path from the arguments. This will split at the first
39487      # space.
39488      complete="$MT"
39489      path="${complete%% *}"
39490      tmp="$complete EOL"
39491      arguments="${tmp#* }"
39492
39493      # Cannot rely on the command "which" here since it doesn't always work.
39494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39495      if test -z "$is_absolute_path"; then
39496        # Path to executable is not absolute. Find it.
39497        IFS_save="$IFS"
39498        IFS=:
39499        for p in $PATH; do
39500          if test -f "$p/$path" && test -x "$p/$path"; then
39501            new_path="$p/$path"
39502            break
39503          fi
39504        done
39505        IFS="$IFS_save"
39506      else
39507        # This is an absolute path, we can use it without further modifications.
39508        new_path="$path"
39509      fi
39510
39511      if test "x$new_path" = x; then
39512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39513$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39514        has_space=`$ECHO "$complete" | $GREP " "`
39515        if test "x$has_space" != x; then
39516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39518        fi
39519        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39520      fi
39521    fi
39522
39523    # Now join together the path and the arguments once again
39524    if test "x$arguments" != xEOL; then
39525      new_complete="$new_path ${arguments% *}"
39526    else
39527      new_complete="$new_path"
39528    fi
39529
39530    if test "x$complete" != "x$new_complete"; then
39531      MT="$new_complete"
39532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39533$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39534    fi
39535  fi
39536
39537    # Setup the resource compiler (RC)
39538    # Extract the first word of "rc", so it can be a program name with args.
39539set dummy rc; ac_word=$2
39540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39541$as_echo_n "checking for $ac_word... " >&6; }
39542if ${ac_cv_prog_RC+:} false; then :
39543  $as_echo_n "(cached) " >&6
39544else
39545  if test -n "$RC"; then
39546  ac_cv_prog_RC="$RC" # Let the user override the test.
39547else
39548  ac_prog_rejected=no
39549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39550for as_dir in $PATH
39551do
39552  IFS=$as_save_IFS
39553  test -z "$as_dir" && as_dir=.
39554    for ac_exec_ext in '' $ac_executable_extensions; do
39555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39556    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39557       ac_prog_rejected=yes
39558       continue
39559     fi
39560    ac_cv_prog_RC="rc"
39561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39562    break 2
39563  fi
39564done
39565  done
39566IFS=$as_save_IFS
39567
39568if test $ac_prog_rejected = yes; then
39569  # We found a bogon in the path, so make sure we never use it.
39570  set dummy $ac_cv_prog_RC
39571  shift
39572  if test $# != 0; then
39573    # We chose a different compiler from the bogus one.
39574    # However, it has the same basename, so the bogon will be chosen
39575    # first if we set RC to just the basename; use the full file name.
39576    shift
39577    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39578  fi
39579fi
39580fi
39581fi
39582RC=$ac_cv_prog_RC
39583if test -n "$RC"; then
39584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39585$as_echo "$RC" >&6; }
39586else
39587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39588$as_echo "no" >&6; }
39589fi
39590
39591
39592
39593  # Only process if variable expands to non-empty
39594
39595  if test "x$RC" != x; then
39596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39597
39598  # First separate the path from the arguments. This will split at the first
39599  # space.
39600  complete="$RC"
39601  path="${complete%% *}"
39602  tmp="$complete EOL"
39603  arguments="${tmp#* }"
39604
39605  # Input might be given as Windows format, start by converting to
39606  # unix format.
39607  new_path=`$CYGPATH -u "$path"`
39608
39609  # Now try to locate executable using which
39610  new_path=`$WHICH "$new_path" 2> /dev/null`
39611  # bat and cmd files are not always considered executable in cygwin causing which
39612  # to not find them
39613  if test "x$new_path" = x \
39614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39616    new_path=`$CYGPATH -u "$path"`
39617  fi
39618  if test "x$new_path" = x; then
39619    # Oops. Which didn't find the executable.
39620    # The splitting of arguments from the executable at a space might have been incorrect,
39621    # since paths with space are more likely in Windows. Give it another try with the whole
39622    # argument.
39623    path="$complete"
39624    arguments="EOL"
39625    new_path=`$CYGPATH -u "$path"`
39626    new_path=`$WHICH "$new_path" 2> /dev/null`
39627    # bat and cmd files are not always considered executable in cygwin causing which
39628    # to not find them
39629    if test "x$new_path" = x \
39630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39632      new_path=`$CYGPATH -u "$path"`
39633    fi
39634    if test "x$new_path" = x; then
39635      # It's still not found. Now this is an unrecoverable error.
39636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39637$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39638      has_space=`$ECHO "$complete" | $GREP " "`
39639      if test "x$has_space" != x; then
39640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39642      fi
39643      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39644    fi
39645  fi
39646
39647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39650  # "foo.exe" is OK but "foo" is an error.
39651  #
39652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39653  # It is also a way to make sure we got the proper file name for the real test later on.
39654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39655  if test "x$test_shortpath" = x; then
39656    # Short path failed, file does not exist as specified.
39657    # Try adding .exe or .cmd
39658    if test -f "${new_path}.exe"; then
39659      input_to_shortpath="${new_path}.exe"
39660    elif test -f "${new_path}.cmd"; then
39661      input_to_shortpath="${new_path}.cmd"
39662    else
39663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39664$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39667      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39668    fi
39669  else
39670    input_to_shortpath="$new_path"
39671  fi
39672
39673  # Call helper function which possibly converts this using DOS-style short mode.
39674  # If so, the updated path is stored in $new_path.
39675  new_path="$input_to_shortpath"
39676
39677  input_path="$input_to_shortpath"
39678  # Check if we need to convert this using DOS-style short mode. If the path
39679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39680  # take no chances and rewrite it.
39681  # Note: m4 eats our [], so we need to use [ and ] instead.
39682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39683  if test "x$has_forbidden_chars" != x; then
39684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39688      # Going to short mode and back again did indeed matter. Since short mode is
39689      # case insensitive, let's make it lowercase to improve readability.
39690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39691      # Now convert it back to Unix-style (cygpath)
39692      input_path=`$CYGPATH -u "$shortmode_path"`
39693      new_path="$input_path"
39694    fi
39695  fi
39696
39697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39698  if test "x$test_cygdrive_prefix" = x; then
39699    # As a simple fix, exclude /usr/bin since it's not a real path.
39700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39702      # a path prefixed by /cygdrive for fixpath to work.
39703      new_path="$CYGWIN_ROOT_PATH$input_path"
39704    fi
39705  fi
39706
39707  # remove trailing .exe if any
39708  new_path="${new_path/%.exe/}"
39709
39710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39711
39712  # First separate the path from the arguments. This will split at the first
39713  # space.
39714  complete="$RC"
39715  path="${complete%% *}"
39716  tmp="$complete EOL"
39717  arguments="${tmp#* }"
39718
39719  # Input might be given as Windows format, start by converting to
39720  # unix format.
39721  new_path="$path"
39722
39723  windows_path="$new_path"
39724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39725    unix_path=`$CYGPATH -u "$windows_path"`
39726    new_path="$unix_path"
39727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39729    new_path="$unix_path"
39730  fi
39731
39732
39733  # Now try to locate executable using which
39734  new_path=`$WHICH "$new_path" 2> /dev/null`
39735
39736  if test "x$new_path" = x; then
39737    # Oops. Which didn't find the executable.
39738    # The splitting of arguments from the executable at a space might have been incorrect,
39739    # since paths with space are more likely in Windows. Give it another try with the whole
39740    # argument.
39741    path="$complete"
39742    arguments="EOL"
39743    new_path="$path"
39744
39745  windows_path="$new_path"
39746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39747    unix_path=`$CYGPATH -u "$windows_path"`
39748    new_path="$unix_path"
39749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39751    new_path="$unix_path"
39752  fi
39753
39754
39755    new_path=`$WHICH "$new_path" 2> /dev/null`
39756    # bat and cmd files are not always considered executable in MSYS causing which
39757    # to not find them
39758    if test "x$new_path" = x \
39759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39761      new_path="$path"
39762
39763  windows_path="$new_path"
39764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39765    unix_path=`$CYGPATH -u "$windows_path"`
39766    new_path="$unix_path"
39767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39769    new_path="$unix_path"
39770  fi
39771
39772    fi
39773
39774    if test "x$new_path" = x; then
39775      # It's still not found. Now this is an unrecoverable error.
39776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39777$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39778      has_space=`$ECHO "$complete" | $GREP " "`
39779      if test "x$has_space" != x; then
39780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39782      fi
39783      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39784    fi
39785  fi
39786
39787  # Now new_path has a complete unix path to the binary
39788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39789    # Keep paths in /bin as-is, but remove trailing .exe if any
39790    new_path="${new_path/%.exe/}"
39791    # Do not save /bin paths to all_fixpath_prefixes!
39792  else
39793    # Not in mixed or Windows style, start by that.
39794    new_path=`cmd //c echo $new_path`
39795
39796  input_path="$new_path"
39797  # Check if we need to convert this using DOS-style short mode. If the path
39798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39799  # take no chances and rewrite it.
39800  # Note: m4 eats our [], so we need to use [ and ] instead.
39801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39802  if test "x$has_forbidden_chars" != x; then
39803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39805  fi
39806
39807    # Output is in $new_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    # remove trailing .exe if any
39819    new_path="${new_path/%.exe/}"
39820
39821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39823  fi
39824
39825    else
39826      # We're on a unix platform. Hooray! :)
39827      # First separate the path from the arguments. This will split at the first
39828      # space.
39829      complete="$RC"
39830      path="${complete%% *}"
39831      tmp="$complete EOL"
39832      arguments="${tmp#* }"
39833
39834      # Cannot rely on the command "which" here since it doesn't always work.
39835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39836      if test -z "$is_absolute_path"; then
39837        # Path to executable is not absolute. Find it.
39838        IFS_save="$IFS"
39839        IFS=:
39840        for p in $PATH; do
39841          if test -f "$p/$path" && test -x "$p/$path"; then
39842            new_path="$p/$path"
39843            break
39844          fi
39845        done
39846        IFS="$IFS_save"
39847      else
39848        # This is an absolute path, we can use it without further modifications.
39849        new_path="$path"
39850      fi
39851
39852      if test "x$new_path" = x; then
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39854$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39855        has_space=`$ECHO "$complete" | $GREP " "`
39856        if test "x$has_space" != x; then
39857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39859        fi
39860        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39861      fi
39862    fi
39863
39864    # Now join together the path and the arguments once again
39865    if test "x$arguments" != xEOL; then
39866      new_complete="$new_path ${arguments% *}"
39867    else
39868      new_complete="$new_path"
39869    fi
39870
39871    if test "x$complete" != "x$new_complete"; then
39872      RC="$new_complete"
39873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39874$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39875    fi
39876  fi
39877
39878    # Extract the first word of "dumpbin", so it can be a program name with args.
39879set dummy dumpbin; ac_word=$2
39880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39881$as_echo_n "checking for $ac_word... " >&6; }
39882if ${ac_cv_prog_DUMPBIN+:} false; then :
39883  $as_echo_n "(cached) " >&6
39884else
39885  if test -n "$DUMPBIN"; then
39886  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39887else
39888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39889for as_dir in $PATH
39890do
39891  IFS=$as_save_IFS
39892  test -z "$as_dir" && as_dir=.
39893    for ac_exec_ext in '' $ac_executable_extensions; do
39894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39895    ac_cv_prog_DUMPBIN="dumpbin"
39896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39897    break 2
39898  fi
39899done
39900  done
39901IFS=$as_save_IFS
39902
39903fi
39904fi
39905DUMPBIN=$ac_cv_prog_DUMPBIN
39906if test -n "$DUMPBIN"; then
39907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39908$as_echo "$DUMPBIN" >&6; }
39909else
39910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39911$as_echo "no" >&6; }
39912fi
39913
39914
39915
39916  # Only process if variable expands to non-empty
39917
39918  if test "x$DUMPBIN" != x; then
39919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39920
39921  # First separate the path from the arguments. This will split at the first
39922  # space.
39923  complete="$DUMPBIN"
39924  path="${complete%% *}"
39925  tmp="$complete EOL"
39926  arguments="${tmp#* }"
39927
39928  # Input might be given as Windows format, start by converting to
39929  # unix format.
39930  new_path=`$CYGPATH -u "$path"`
39931
39932  # Now try to locate executable using which
39933  new_path=`$WHICH "$new_path" 2> /dev/null`
39934  # bat and cmd files are not always considered executable in cygwin causing which
39935  # to not find them
39936  if test "x$new_path" = x \
39937      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39938      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39939    new_path=`$CYGPATH -u "$path"`
39940  fi
39941  if test "x$new_path" = x; then
39942    # Oops. Which didn't find the executable.
39943    # The splitting of arguments from the executable at a space might have been incorrect,
39944    # since paths with space are more likely in Windows. Give it another try with the whole
39945    # argument.
39946    path="$complete"
39947    arguments="EOL"
39948    new_path=`$CYGPATH -u "$path"`
39949    new_path=`$WHICH "$new_path" 2> /dev/null`
39950    # bat and cmd files are not always considered executable in cygwin causing which
39951    # to not find them
39952    if test "x$new_path" = x \
39953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39955      new_path=`$CYGPATH -u "$path"`
39956    fi
39957    if test "x$new_path" = x; then
39958      # It's still not found. Now this is an unrecoverable error.
39959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39960$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39961      has_space=`$ECHO "$complete" | $GREP " "`
39962      if test "x$has_space" != x; then
39963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39965      fi
39966      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39967    fi
39968  fi
39969
39970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39973  # "foo.exe" is OK but "foo" is an error.
39974  #
39975  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39976  # It is also a way to make sure we got the proper file name for the real test later on.
39977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39978  if test "x$test_shortpath" = x; then
39979    # Short path failed, file does not exist as specified.
39980    # Try adding .exe or .cmd
39981    if test -f "${new_path}.exe"; then
39982      input_to_shortpath="${new_path}.exe"
39983    elif test -f "${new_path}.cmd"; then
39984      input_to_shortpath="${new_path}.cmd"
39985    else
39986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39987$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39990      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39991    fi
39992  else
39993    input_to_shortpath="$new_path"
39994  fi
39995
39996  # Call helper function which possibly converts this using DOS-style short mode.
39997  # If so, the updated path is stored in $new_path.
39998  new_path="$input_to_shortpath"
39999
40000  input_path="$input_to_shortpath"
40001  # Check if we need to convert this using DOS-style short mode. If the path
40002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40003  # take no chances and rewrite it.
40004  # Note: m4 eats our [], so we need to use [ and ] instead.
40005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40006  if test "x$has_forbidden_chars" != x; then
40007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40011      # Going to short mode and back again did indeed matter. Since short mode is
40012      # case insensitive, let's make it lowercase to improve readability.
40013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40014      # Now convert it back to Unix-style (cygpath)
40015      input_path=`$CYGPATH -u "$shortmode_path"`
40016      new_path="$input_path"
40017    fi
40018  fi
40019
40020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40021  if test "x$test_cygdrive_prefix" = x; then
40022    # As a simple fix, exclude /usr/bin since it's not a real path.
40023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40025      # a path prefixed by /cygdrive for fixpath to work.
40026      new_path="$CYGWIN_ROOT_PATH$input_path"
40027    fi
40028  fi
40029
40030  # remove trailing .exe if any
40031  new_path="${new_path/%.exe/}"
40032
40033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40034
40035  # First separate the path from the arguments. This will split at the first
40036  # space.
40037  complete="$DUMPBIN"
40038  path="${complete%% *}"
40039  tmp="$complete EOL"
40040  arguments="${tmp#* }"
40041
40042  # Input might be given as Windows format, start by converting to
40043  # unix format.
40044  new_path="$path"
40045
40046  windows_path="$new_path"
40047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40048    unix_path=`$CYGPATH -u "$windows_path"`
40049    new_path="$unix_path"
40050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40052    new_path="$unix_path"
40053  fi
40054
40055
40056  # Now try to locate executable using which
40057  new_path=`$WHICH "$new_path" 2> /dev/null`
40058
40059  if test "x$new_path" = x; then
40060    # Oops. Which didn't find the executable.
40061    # The splitting of arguments from the executable at a space might have been incorrect,
40062    # since paths with space are more likely in Windows. Give it another try with the whole
40063    # argument.
40064    path="$complete"
40065    arguments="EOL"
40066    new_path="$path"
40067
40068  windows_path="$new_path"
40069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40070    unix_path=`$CYGPATH -u "$windows_path"`
40071    new_path="$unix_path"
40072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40074    new_path="$unix_path"
40075  fi
40076
40077
40078    new_path=`$WHICH "$new_path" 2> /dev/null`
40079    # bat and cmd files are not always considered executable in MSYS causing which
40080    # to not find them
40081    if test "x$new_path" = x \
40082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40084      new_path="$path"
40085
40086  windows_path="$new_path"
40087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40088    unix_path=`$CYGPATH -u "$windows_path"`
40089    new_path="$unix_path"
40090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40092    new_path="$unix_path"
40093  fi
40094
40095    fi
40096
40097    if test "x$new_path" = x; then
40098      # It's still not found. Now this is an unrecoverable error.
40099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40100$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40101      has_space=`$ECHO "$complete" | $GREP " "`
40102      if test "x$has_space" != x; then
40103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40105      fi
40106      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40107    fi
40108  fi
40109
40110  # Now new_path has a complete unix path to the binary
40111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40112    # Keep paths in /bin as-is, but remove trailing .exe if any
40113    new_path="${new_path/%.exe/}"
40114    # Do not save /bin paths to all_fixpath_prefixes!
40115  else
40116    # Not in mixed or Windows style, start by that.
40117    new_path=`cmd //c echo $new_path`
40118
40119  input_path="$new_path"
40120  # Check if we need to convert this using DOS-style short mode. If the path
40121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40122  # take no chances and rewrite it.
40123  # Note: m4 eats our [], so we need to use [ and ] instead.
40124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40125  if test "x$has_forbidden_chars" != x; then
40126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40128  fi
40129
40130    # Output is in $new_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    # remove trailing .exe if any
40142    new_path="${new_path/%.exe/}"
40143
40144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40146  fi
40147
40148    else
40149      # We're on a unix platform. Hooray! :)
40150      # First separate the path from the arguments. This will split at the first
40151      # space.
40152      complete="$DUMPBIN"
40153      path="${complete%% *}"
40154      tmp="$complete EOL"
40155      arguments="${tmp#* }"
40156
40157      # Cannot rely on the command "which" here since it doesn't always work.
40158      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40159      if test -z "$is_absolute_path"; then
40160        # Path to executable is not absolute. Find it.
40161        IFS_save="$IFS"
40162        IFS=:
40163        for p in $PATH; do
40164          if test -f "$p/$path" && test -x "$p/$path"; then
40165            new_path="$p/$path"
40166            break
40167          fi
40168        done
40169        IFS="$IFS_save"
40170      else
40171        # This is an absolute path, we can use it without further modifications.
40172        new_path="$path"
40173      fi
40174
40175      if test "x$new_path" = x; then
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40177$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40178        has_space=`$ECHO "$complete" | $GREP " "`
40179        if test "x$has_space" != x; then
40180          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40182        fi
40183        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40184      fi
40185    fi
40186
40187    # Now join together the path and the arguments once again
40188    if test "x$arguments" != xEOL; then
40189      new_complete="$new_path ${arguments% *}"
40190    else
40191      new_complete="$new_path"
40192    fi
40193
40194    if test "x$complete" != "x$new_complete"; then
40195      DUMPBIN="$new_complete"
40196      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40197$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40198    fi
40199  fi
40200
40201    # We need to check for 'msbuild.exe' because at the place where we expect to
40202    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40203    # won't find the 'msbuild.exe' executable in that case (and the
40204    # 'ac_executable_extensions' is unusable due to performance reasons).
40205    # Notice that we intentionally don't fix up the path to MSBUILD because we
40206    # will call it in a DOS shell during freetype detection on Windows (see
40207    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40208    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40209set dummy msbuild.exe; ac_word=$2
40210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40211$as_echo_n "checking for $ac_word... " >&6; }
40212if ${ac_cv_prog_MSBUILD+:} false; then :
40213  $as_echo_n "(cached) " >&6
40214else
40215  if test -n "$MSBUILD"; then
40216  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40217else
40218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40219for as_dir in $PATH
40220do
40221  IFS=$as_save_IFS
40222  test -z "$as_dir" && as_dir=.
40223    for ac_exec_ext in '' $ac_executable_extensions; do
40224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40225    ac_cv_prog_MSBUILD="msbuild.exe"
40226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40227    break 2
40228  fi
40229done
40230  done
40231IFS=$as_save_IFS
40232
40233fi
40234fi
40235MSBUILD=$ac_cv_prog_MSBUILD
40236if test -n "$MSBUILD"; then
40237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40238$as_echo "$MSBUILD" >&6; }
40239else
40240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40241$as_echo "no" >&6; }
40242fi
40243
40244
40245  fi
40246
40247  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40248
40249
40250  # Publish this variable in the help.
40251
40252
40253  if [ -z "${STRIP+x}" ]; then
40254    # The variable is not set by user, try to locate tool using the code snippet
40255    for ac_prog in strip
40256do
40257  # Extract the first word of "$ac_prog", so it can be a program name with args.
40258set dummy $ac_prog; ac_word=$2
40259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40260$as_echo_n "checking for $ac_word... " >&6; }
40261if ${ac_cv_path_STRIP+:} false; then :
40262  $as_echo_n "(cached) " >&6
40263else
40264  case $STRIP in
40265  [\\/]* | ?:[\\/]*)
40266  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40267  ;;
40268  *)
40269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40270for as_dir in $PATH
40271do
40272  IFS=$as_save_IFS
40273  test -z "$as_dir" && as_dir=.
40274    for ac_exec_ext in '' $ac_executable_extensions; do
40275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40276    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40278    break 2
40279  fi
40280done
40281  done
40282IFS=$as_save_IFS
40283
40284  ;;
40285esac
40286fi
40287STRIP=$ac_cv_path_STRIP
40288if test -n "$STRIP"; then
40289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40290$as_echo "$STRIP" >&6; }
40291else
40292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40293$as_echo "no" >&6; }
40294fi
40295
40296
40297  test -n "$STRIP" && break
40298done
40299
40300  else
40301    # The variable is set, but is it from the command line or the environment?
40302
40303    # Try to remove the string !STRIP! from our list.
40304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40306      # If it failed, the variable was not from the command line. Ignore it,
40307      # but warn the user (except for BASH, which is always set by the calling BASH).
40308      if test "xSTRIP" != xBASH; then
40309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40310$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40311      fi
40312      # Try to locate tool using the code snippet
40313      for ac_prog in strip
40314do
40315  # Extract the first word of "$ac_prog", so it can be a program name with args.
40316set dummy $ac_prog; ac_word=$2
40317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40318$as_echo_n "checking for $ac_word... " >&6; }
40319if ${ac_cv_path_STRIP+:} false; then :
40320  $as_echo_n "(cached) " >&6
40321else
40322  case $STRIP in
40323  [\\/]* | ?:[\\/]*)
40324  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40325  ;;
40326  *)
40327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40328for as_dir in $PATH
40329do
40330  IFS=$as_save_IFS
40331  test -z "$as_dir" && as_dir=.
40332    for ac_exec_ext in '' $ac_executable_extensions; do
40333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40334    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40336    break 2
40337  fi
40338done
40339  done
40340IFS=$as_save_IFS
40341
40342  ;;
40343esac
40344fi
40345STRIP=$ac_cv_path_STRIP
40346if test -n "$STRIP"; then
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40348$as_echo "$STRIP" >&6; }
40349else
40350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40351$as_echo "no" >&6; }
40352fi
40353
40354
40355  test -n "$STRIP" && break
40356done
40357
40358    else
40359      # If it succeeded, then it was overridden by the user. We will use it
40360      # for the tool.
40361
40362      # First remove it from the list of overridden variables, so we can test
40363      # for unknown variables in the end.
40364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40365
40366      # Check if we try to supply an empty value
40367      if test "x$STRIP" = x; then
40368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40369$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40371$as_echo_n "checking for STRIP... " >&6; }
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40373$as_echo "disabled" >&6; }
40374      else
40375        # Check if the provided tool contains a complete path.
40376        tool_specified="$STRIP"
40377        tool_basename="${tool_specified##*/}"
40378        if test "x$tool_basename" = "x$tool_specified"; then
40379          # A command without a complete path is provided, search $PATH.
40380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40381$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40382          # Extract the first word of "$tool_basename", so it can be a program name with args.
40383set dummy $tool_basename; ac_word=$2
40384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40385$as_echo_n "checking for $ac_word... " >&6; }
40386if ${ac_cv_path_STRIP+:} false; then :
40387  $as_echo_n "(cached) " >&6
40388else
40389  case $STRIP in
40390  [\\/]* | ?:[\\/]*)
40391  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40392  ;;
40393  *)
40394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40395for as_dir in $PATH
40396do
40397  IFS=$as_save_IFS
40398  test -z "$as_dir" && as_dir=.
40399    for ac_exec_ext in '' $ac_executable_extensions; do
40400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40401    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40403    break 2
40404  fi
40405done
40406  done
40407IFS=$as_save_IFS
40408
40409  ;;
40410esac
40411fi
40412STRIP=$ac_cv_path_STRIP
40413if test -n "$STRIP"; then
40414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40415$as_echo "$STRIP" >&6; }
40416else
40417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40418$as_echo "no" >&6; }
40419fi
40420
40421
40422          if test "x$STRIP" = x; then
40423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40424          fi
40425        else
40426          # Otherwise we believe it is a complete path. Use it as it is.
40427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40428$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40430$as_echo_n "checking for STRIP... " >&6; }
40431          if test ! -x "$tool_specified"; then
40432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40433$as_echo "not found" >&6; }
40434            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40435          fi
40436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40437$as_echo "$tool_specified" >&6; }
40438        fi
40439      fi
40440    fi
40441
40442  fi
40443
40444
40445
40446  # Only process if variable expands to non-empty
40447
40448  if test "x$STRIP" != x; then
40449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40450
40451  # First separate the path from the arguments. This will split at the first
40452  # space.
40453  complete="$STRIP"
40454  path="${complete%% *}"
40455  tmp="$complete EOL"
40456  arguments="${tmp#* }"
40457
40458  # Input might be given as Windows format, start by converting to
40459  # unix format.
40460  new_path=`$CYGPATH -u "$path"`
40461
40462  # Now try to locate executable using which
40463  new_path=`$WHICH "$new_path" 2> /dev/null`
40464  # bat and cmd files are not always considered executable in cygwin causing which
40465  # to not find them
40466  if test "x$new_path" = x \
40467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40469    new_path=`$CYGPATH -u "$path"`
40470  fi
40471  if test "x$new_path" = x; then
40472    # Oops. Which didn't find the executable.
40473    # The splitting of arguments from the executable at a space might have been incorrect,
40474    # since paths with space are more likely in Windows. Give it another try with the whole
40475    # argument.
40476    path="$complete"
40477    arguments="EOL"
40478    new_path=`$CYGPATH -u "$path"`
40479    new_path=`$WHICH "$new_path" 2> /dev/null`
40480    # bat and cmd files are not always considered executable in cygwin causing which
40481    # to not find them
40482    if test "x$new_path" = x \
40483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40485      new_path=`$CYGPATH -u "$path"`
40486    fi
40487    if test "x$new_path" = x; then
40488      # It's still not found. Now this is an unrecoverable error.
40489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40490$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40491      has_space=`$ECHO "$complete" | $GREP " "`
40492      if test "x$has_space" != x; then
40493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40495      fi
40496      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40497    fi
40498  fi
40499
40500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40503  # "foo.exe" is OK but "foo" is an error.
40504  #
40505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40506  # It is also a way to make sure we got the proper file name for the real test later on.
40507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40508  if test "x$test_shortpath" = x; then
40509    # Short path failed, file does not exist as specified.
40510    # Try adding .exe or .cmd
40511    if test -f "${new_path}.exe"; then
40512      input_to_shortpath="${new_path}.exe"
40513    elif test -f "${new_path}.cmd"; then
40514      input_to_shortpath="${new_path}.cmd"
40515    else
40516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40517$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40520      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40521    fi
40522  else
40523    input_to_shortpath="$new_path"
40524  fi
40525
40526  # Call helper function which possibly converts this using DOS-style short mode.
40527  # If so, the updated path is stored in $new_path.
40528  new_path="$input_to_shortpath"
40529
40530  input_path="$input_to_shortpath"
40531  # Check if we need to convert this using DOS-style short mode. If the path
40532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40533  # take no chances and rewrite it.
40534  # Note: m4 eats our [], so we need to use [ and ] instead.
40535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40536  if test "x$has_forbidden_chars" != x; then
40537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40541      # Going to short mode and back again did indeed matter. Since short mode is
40542      # case insensitive, let's make it lowercase to improve readability.
40543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40544      # Now convert it back to Unix-style (cygpath)
40545      input_path=`$CYGPATH -u "$shortmode_path"`
40546      new_path="$input_path"
40547    fi
40548  fi
40549
40550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40551  if test "x$test_cygdrive_prefix" = x; then
40552    # As a simple fix, exclude /usr/bin since it's not a real path.
40553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40555      # a path prefixed by /cygdrive for fixpath to work.
40556      new_path="$CYGWIN_ROOT_PATH$input_path"
40557    fi
40558  fi
40559
40560  # remove trailing .exe if any
40561  new_path="${new_path/%.exe/}"
40562
40563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40564
40565  # First separate the path from the arguments. This will split at the first
40566  # space.
40567  complete="$STRIP"
40568  path="${complete%% *}"
40569  tmp="$complete EOL"
40570  arguments="${tmp#* }"
40571
40572  # Input might be given as Windows format, start by converting to
40573  # unix format.
40574  new_path="$path"
40575
40576  windows_path="$new_path"
40577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40578    unix_path=`$CYGPATH -u "$windows_path"`
40579    new_path="$unix_path"
40580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40582    new_path="$unix_path"
40583  fi
40584
40585
40586  # Now try to locate executable using which
40587  new_path=`$WHICH "$new_path" 2> /dev/null`
40588
40589  if test "x$new_path" = x; then
40590    # Oops. Which didn't find the executable.
40591    # The splitting of arguments from the executable at a space might have been incorrect,
40592    # since paths with space are more likely in Windows. Give it another try with the whole
40593    # argument.
40594    path="$complete"
40595    arguments="EOL"
40596    new_path="$path"
40597
40598  windows_path="$new_path"
40599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40600    unix_path=`$CYGPATH -u "$windows_path"`
40601    new_path="$unix_path"
40602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40604    new_path="$unix_path"
40605  fi
40606
40607
40608    new_path=`$WHICH "$new_path" 2> /dev/null`
40609    # bat and cmd files are not always considered executable in MSYS causing which
40610    # to not find them
40611    if test "x$new_path" = x \
40612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40614      new_path="$path"
40615
40616  windows_path="$new_path"
40617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40618    unix_path=`$CYGPATH -u "$windows_path"`
40619    new_path="$unix_path"
40620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40622    new_path="$unix_path"
40623  fi
40624
40625    fi
40626
40627    if test "x$new_path" = x; then
40628      # It's still not found. Now this is an unrecoverable error.
40629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40630$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40631      has_space=`$ECHO "$complete" | $GREP " "`
40632      if test "x$has_space" != x; then
40633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40635      fi
40636      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40637    fi
40638  fi
40639
40640  # Now new_path has a complete unix path to the binary
40641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40642    # Keep paths in /bin as-is, but remove trailing .exe if any
40643    new_path="${new_path/%.exe/}"
40644    # Do not save /bin paths to all_fixpath_prefixes!
40645  else
40646    # Not in mixed or Windows style, start by that.
40647    new_path=`cmd //c echo $new_path`
40648
40649  input_path="$new_path"
40650  # Check if we need to convert this using DOS-style short mode. If the path
40651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40652  # take no chances and rewrite it.
40653  # Note: m4 eats our [], so we need to use [ and ] instead.
40654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40655  if test "x$has_forbidden_chars" != x; then
40656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40658  fi
40659
40660    # Output is in $new_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    # remove trailing .exe if any
40672    new_path="${new_path/%.exe/}"
40673
40674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40676  fi
40677
40678    else
40679      # We're on a unix platform. Hooray! :)
40680      # First separate the path from the arguments. This will split at the first
40681      # space.
40682      complete="$STRIP"
40683      path="${complete%% *}"
40684      tmp="$complete EOL"
40685      arguments="${tmp#* }"
40686
40687      # Cannot rely on the command "which" here since it doesn't always work.
40688      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40689      if test -z "$is_absolute_path"; then
40690        # Path to executable is not absolute. Find it.
40691        IFS_save="$IFS"
40692        IFS=:
40693        for p in $PATH; do
40694          if test -f "$p/$path" && test -x "$p/$path"; then
40695            new_path="$p/$path"
40696            break
40697          fi
40698        done
40699        IFS="$IFS_save"
40700      else
40701        # This is an absolute path, we can use it without further modifications.
40702        new_path="$path"
40703      fi
40704
40705      if test "x$new_path" = x; then
40706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40707$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40708        has_space=`$ECHO "$complete" | $GREP " "`
40709        if test "x$has_space" != x; then
40710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40712        fi
40713        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40714      fi
40715    fi
40716
40717    # Now join together the path and the arguments once again
40718    if test "x$arguments" != xEOL; then
40719      new_complete="$new_path ${arguments% *}"
40720    else
40721      new_complete="$new_path"
40722    fi
40723
40724    if test "x$complete" != "x$new_complete"; then
40725      STRIP="$new_complete"
40726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40727$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40728    fi
40729  fi
40730
40731
40732
40733  # Publish this variable in the help.
40734
40735
40736  if [ -z "${NM+x}" ]; then
40737    # The variable is not set by user, try to locate tool using the code snippet
40738    for ac_prog in nm
40739do
40740  # Extract the first word of "$ac_prog", so it can be a program name with args.
40741set dummy $ac_prog; ac_word=$2
40742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40743$as_echo_n "checking for $ac_word... " >&6; }
40744if ${ac_cv_path_NM+:} false; then :
40745  $as_echo_n "(cached) " >&6
40746else
40747  case $NM in
40748  [\\/]* | ?:[\\/]*)
40749  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40750  ;;
40751  *)
40752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40753for as_dir in $PATH
40754do
40755  IFS=$as_save_IFS
40756  test -z "$as_dir" && as_dir=.
40757    for ac_exec_ext in '' $ac_executable_extensions; do
40758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40759    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40761    break 2
40762  fi
40763done
40764  done
40765IFS=$as_save_IFS
40766
40767  ;;
40768esac
40769fi
40770NM=$ac_cv_path_NM
40771if test -n "$NM"; then
40772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40773$as_echo "$NM" >&6; }
40774else
40775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40776$as_echo "no" >&6; }
40777fi
40778
40779
40780  test -n "$NM" && break
40781done
40782
40783  else
40784    # The variable is set, but is it from the command line or the environment?
40785
40786    # Try to remove the string !NM! from our list.
40787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40789      # If it failed, the variable was not from the command line. Ignore it,
40790      # but warn the user (except for BASH, which is always set by the calling BASH).
40791      if test "xNM" != xBASH; then
40792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40793$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40794      fi
40795      # Try to locate tool using the code snippet
40796      for ac_prog in nm
40797do
40798  # Extract the first word of "$ac_prog", so it can be a program name with args.
40799set dummy $ac_prog; ac_word=$2
40800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40801$as_echo_n "checking for $ac_word... " >&6; }
40802if ${ac_cv_path_NM+:} false; then :
40803  $as_echo_n "(cached) " >&6
40804else
40805  case $NM in
40806  [\\/]* | ?:[\\/]*)
40807  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40808  ;;
40809  *)
40810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40811for as_dir in $PATH
40812do
40813  IFS=$as_save_IFS
40814  test -z "$as_dir" && as_dir=.
40815    for ac_exec_ext in '' $ac_executable_extensions; do
40816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40817    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40819    break 2
40820  fi
40821done
40822  done
40823IFS=$as_save_IFS
40824
40825  ;;
40826esac
40827fi
40828NM=$ac_cv_path_NM
40829if test -n "$NM"; then
40830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40831$as_echo "$NM" >&6; }
40832else
40833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40834$as_echo "no" >&6; }
40835fi
40836
40837
40838  test -n "$NM" && break
40839done
40840
40841    else
40842      # If it succeeded, then it was overridden by the user. We will use it
40843      # for the tool.
40844
40845      # First remove it from the list of overridden variables, so we can test
40846      # for unknown variables in the end.
40847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40848
40849      # Check if we try to supply an empty value
40850      if test "x$NM" = x; then
40851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40852$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40854$as_echo_n "checking for NM... " >&6; }
40855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40856$as_echo "disabled" >&6; }
40857      else
40858        # Check if the provided tool contains a complete path.
40859        tool_specified="$NM"
40860        tool_basename="${tool_specified##*/}"
40861        if test "x$tool_basename" = "x$tool_specified"; then
40862          # A command without a complete path is provided, search $PATH.
40863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40864$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40865          # Extract the first word of "$tool_basename", so it can be a program name with args.
40866set dummy $tool_basename; ac_word=$2
40867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40868$as_echo_n "checking for $ac_word... " >&6; }
40869if ${ac_cv_path_NM+:} false; then :
40870  $as_echo_n "(cached) " >&6
40871else
40872  case $NM in
40873  [\\/]* | ?:[\\/]*)
40874  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40875  ;;
40876  *)
40877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40878for as_dir in $PATH
40879do
40880  IFS=$as_save_IFS
40881  test -z "$as_dir" && as_dir=.
40882    for ac_exec_ext in '' $ac_executable_extensions; do
40883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40884    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40886    break 2
40887  fi
40888done
40889  done
40890IFS=$as_save_IFS
40891
40892  ;;
40893esac
40894fi
40895NM=$ac_cv_path_NM
40896if test -n "$NM"; then
40897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40898$as_echo "$NM" >&6; }
40899else
40900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40901$as_echo "no" >&6; }
40902fi
40903
40904
40905          if test "x$NM" = x; then
40906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40907          fi
40908        else
40909          # Otherwise we believe it is a complete path. Use it as it is.
40910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40911$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40913$as_echo_n "checking for NM... " >&6; }
40914          if test ! -x "$tool_specified"; then
40915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40916$as_echo "not found" >&6; }
40917            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40918          fi
40919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40920$as_echo "$tool_specified" >&6; }
40921        fi
40922      fi
40923    fi
40924
40925  fi
40926
40927
40928
40929  # Only process if variable expands to non-empty
40930
40931  if test "x$NM" != x; then
40932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40933
40934  # First separate the path from the arguments. This will split at the first
40935  # space.
40936  complete="$NM"
40937  path="${complete%% *}"
40938  tmp="$complete EOL"
40939  arguments="${tmp#* }"
40940
40941  # Input might be given as Windows format, start by converting to
40942  # unix format.
40943  new_path=`$CYGPATH -u "$path"`
40944
40945  # Now try to locate executable using which
40946  new_path=`$WHICH "$new_path" 2> /dev/null`
40947  # bat and cmd files are not always considered executable in cygwin causing which
40948  # to not find them
40949  if test "x$new_path" = x \
40950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40952    new_path=`$CYGPATH -u "$path"`
40953  fi
40954  if test "x$new_path" = x; then
40955    # Oops. Which didn't find the executable.
40956    # The splitting of arguments from the executable at a space might have been incorrect,
40957    # since paths with space are more likely in Windows. Give it another try with the whole
40958    # argument.
40959    path="$complete"
40960    arguments="EOL"
40961    new_path=`$CYGPATH -u "$path"`
40962    new_path=`$WHICH "$new_path" 2> /dev/null`
40963    # bat and cmd files are not always considered executable in cygwin causing which
40964    # to not find them
40965    if test "x$new_path" = x \
40966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40968      new_path=`$CYGPATH -u "$path"`
40969    fi
40970    if test "x$new_path" = x; then
40971      # It's still not found. Now this is an unrecoverable error.
40972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40973$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40974      has_space=`$ECHO "$complete" | $GREP " "`
40975      if test "x$has_space" != x; then
40976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40978      fi
40979      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40980    fi
40981  fi
40982
40983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40986  # "foo.exe" is OK but "foo" is an error.
40987  #
40988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40989  # It is also a way to make sure we got the proper file name for the real test later on.
40990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40991  if test "x$test_shortpath" = x; then
40992    # Short path failed, file does not exist as specified.
40993    # Try adding .exe or .cmd
40994    if test -f "${new_path}.exe"; then
40995      input_to_shortpath="${new_path}.exe"
40996    elif test -f "${new_path}.cmd"; then
40997      input_to_shortpath="${new_path}.cmd"
40998    else
40999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41000$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41003      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41004    fi
41005  else
41006    input_to_shortpath="$new_path"
41007  fi
41008
41009  # Call helper function which possibly converts this using DOS-style short mode.
41010  # If so, the updated path is stored in $new_path.
41011  new_path="$input_to_shortpath"
41012
41013  input_path="$input_to_shortpath"
41014  # Check if we need to convert this using DOS-style short mode. If the path
41015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41016  # take no chances and rewrite it.
41017  # Note: m4 eats our [], so we need to use [ and ] instead.
41018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41019  if test "x$has_forbidden_chars" != x; then
41020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41024      # Going to short mode and back again did indeed matter. Since short mode is
41025      # case insensitive, let's make it lowercase to improve readability.
41026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41027      # Now convert it back to Unix-style (cygpath)
41028      input_path=`$CYGPATH -u "$shortmode_path"`
41029      new_path="$input_path"
41030    fi
41031  fi
41032
41033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41034  if test "x$test_cygdrive_prefix" = x; then
41035    # As a simple fix, exclude /usr/bin since it's not a real path.
41036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41038      # a path prefixed by /cygdrive for fixpath to work.
41039      new_path="$CYGWIN_ROOT_PATH$input_path"
41040    fi
41041  fi
41042
41043  # remove trailing .exe if any
41044  new_path="${new_path/%.exe/}"
41045
41046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41047
41048  # First separate the path from the arguments. This will split at the first
41049  # space.
41050  complete="$NM"
41051  path="${complete%% *}"
41052  tmp="$complete EOL"
41053  arguments="${tmp#* }"
41054
41055  # Input might be given as Windows format, start by converting to
41056  # unix format.
41057  new_path="$path"
41058
41059  windows_path="$new_path"
41060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41061    unix_path=`$CYGPATH -u "$windows_path"`
41062    new_path="$unix_path"
41063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41065    new_path="$unix_path"
41066  fi
41067
41068
41069  # Now try to locate executable using which
41070  new_path=`$WHICH "$new_path" 2> /dev/null`
41071
41072  if test "x$new_path" = x; then
41073    # Oops. Which didn't find the executable.
41074    # The splitting of arguments from the executable at a space might have been incorrect,
41075    # since paths with space are more likely in Windows. Give it another try with the whole
41076    # argument.
41077    path="$complete"
41078    arguments="EOL"
41079    new_path="$path"
41080
41081  windows_path="$new_path"
41082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41083    unix_path=`$CYGPATH -u "$windows_path"`
41084    new_path="$unix_path"
41085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41087    new_path="$unix_path"
41088  fi
41089
41090
41091    new_path=`$WHICH "$new_path" 2> /dev/null`
41092    # bat and cmd files are not always considered executable in MSYS causing which
41093    # to not find them
41094    if test "x$new_path" = x \
41095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41097      new_path="$path"
41098
41099  windows_path="$new_path"
41100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41101    unix_path=`$CYGPATH -u "$windows_path"`
41102    new_path="$unix_path"
41103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41105    new_path="$unix_path"
41106  fi
41107
41108    fi
41109
41110    if test "x$new_path" = x; then
41111      # It's still not found. Now this is an unrecoverable error.
41112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41113$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41114      has_space=`$ECHO "$complete" | $GREP " "`
41115      if test "x$has_space" != x; then
41116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41118      fi
41119      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41120    fi
41121  fi
41122
41123  # Now new_path has a complete unix path to the binary
41124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41125    # Keep paths in /bin as-is, but remove trailing .exe if any
41126    new_path="${new_path/%.exe/}"
41127    # Do not save /bin paths to all_fixpath_prefixes!
41128  else
41129    # Not in mixed or Windows style, start by that.
41130    new_path=`cmd //c echo $new_path`
41131
41132  input_path="$new_path"
41133  # Check if we need to convert this using DOS-style short mode. If the path
41134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41135  # take no chances and rewrite it.
41136  # Note: m4 eats our [], so we need to use [ and ] instead.
41137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41138  if test "x$has_forbidden_chars" != x; then
41139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41141  fi
41142
41143    # Output is in $new_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    # remove trailing .exe if any
41155    new_path="${new_path/%.exe/}"
41156
41157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41159  fi
41160
41161    else
41162      # We're on a unix platform. Hooray! :)
41163      # First separate the path from the arguments. This will split at the first
41164      # space.
41165      complete="$NM"
41166      path="${complete%% *}"
41167      tmp="$complete EOL"
41168      arguments="${tmp#* }"
41169
41170      # Cannot rely on the command "which" here since it doesn't always work.
41171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41172      if test -z "$is_absolute_path"; then
41173        # Path to executable is not absolute. Find it.
41174        IFS_save="$IFS"
41175        IFS=:
41176        for p in $PATH; do
41177          if test -f "$p/$path" && test -x "$p/$path"; then
41178            new_path="$p/$path"
41179            break
41180          fi
41181        done
41182        IFS="$IFS_save"
41183      else
41184        # This is an absolute path, we can use it without further modifications.
41185        new_path="$path"
41186      fi
41187
41188      if test "x$new_path" = x; then
41189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41190$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41191        has_space=`$ECHO "$complete" | $GREP " "`
41192        if test "x$has_space" != x; then
41193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41195        fi
41196        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41197      fi
41198    fi
41199
41200    # Now join together the path and the arguments once again
41201    if test "x$arguments" != xEOL; then
41202      new_complete="$new_path ${arguments% *}"
41203    else
41204      new_complete="$new_path"
41205    fi
41206
41207    if test "x$complete" != "x$new_complete"; then
41208      NM="$new_complete"
41209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41210$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41211    fi
41212  fi
41213
41214
41215
41216  # Publish this variable in the help.
41217
41218
41219  if [ -z "${GNM+x}" ]; then
41220    # The variable is not set by user, try to locate tool using the code snippet
41221    for ac_prog in gnm
41222do
41223  # Extract the first word of "$ac_prog", so it can be a program name with args.
41224set dummy $ac_prog; ac_word=$2
41225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41226$as_echo_n "checking for $ac_word... " >&6; }
41227if ${ac_cv_path_GNM+:} false; then :
41228  $as_echo_n "(cached) " >&6
41229else
41230  case $GNM in
41231  [\\/]* | ?:[\\/]*)
41232  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41233  ;;
41234  *)
41235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41236for as_dir in $PATH
41237do
41238  IFS=$as_save_IFS
41239  test -z "$as_dir" && as_dir=.
41240    for ac_exec_ext in '' $ac_executable_extensions; do
41241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41242    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41244    break 2
41245  fi
41246done
41247  done
41248IFS=$as_save_IFS
41249
41250  ;;
41251esac
41252fi
41253GNM=$ac_cv_path_GNM
41254if test -n "$GNM"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41256$as_echo "$GNM" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263  test -n "$GNM" && break
41264done
41265
41266  else
41267    # The variable is set, but is it from the command line or the environment?
41268
41269    # Try to remove the string !GNM! from our list.
41270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41272      # If it failed, the variable was not from the command line. Ignore it,
41273      # but warn the user (except for BASH, which is always set by the calling BASH).
41274      if test "xGNM" != xBASH; then
41275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41276$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41277      fi
41278      # Try to locate tool using the code snippet
41279      for ac_prog in gnm
41280do
41281  # Extract the first word of "$ac_prog", so it can be a program name with args.
41282set dummy $ac_prog; ac_word=$2
41283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41284$as_echo_n "checking for $ac_word... " >&6; }
41285if ${ac_cv_path_GNM+:} false; then :
41286  $as_echo_n "(cached) " >&6
41287else
41288  case $GNM in
41289  [\\/]* | ?:[\\/]*)
41290  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41291  ;;
41292  *)
41293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41294for as_dir in $PATH
41295do
41296  IFS=$as_save_IFS
41297  test -z "$as_dir" && as_dir=.
41298    for ac_exec_ext in '' $ac_executable_extensions; do
41299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41300    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41302    break 2
41303  fi
41304done
41305  done
41306IFS=$as_save_IFS
41307
41308  ;;
41309esac
41310fi
41311GNM=$ac_cv_path_GNM
41312if test -n "$GNM"; then
41313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41314$as_echo "$GNM" >&6; }
41315else
41316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41317$as_echo "no" >&6; }
41318fi
41319
41320
41321  test -n "$GNM" && break
41322done
41323
41324    else
41325      # If it succeeded, then it was overridden by the user. We will use it
41326      # for the tool.
41327
41328      # First remove it from the list of overridden variables, so we can test
41329      # for unknown variables in the end.
41330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41331
41332      # Check if we try to supply an empty value
41333      if test "x$GNM" = x; then
41334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41335$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41337$as_echo_n "checking for GNM... " >&6; }
41338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41339$as_echo "disabled" >&6; }
41340      else
41341        # Check if the provided tool contains a complete path.
41342        tool_specified="$GNM"
41343        tool_basename="${tool_specified##*/}"
41344        if test "x$tool_basename" = "x$tool_specified"; then
41345          # A command without a complete path is provided, search $PATH.
41346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41347$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41348          # Extract the first word of "$tool_basename", so it can be a program name with args.
41349set dummy $tool_basename; ac_word=$2
41350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41351$as_echo_n "checking for $ac_word... " >&6; }
41352if ${ac_cv_path_GNM+:} false; then :
41353  $as_echo_n "(cached) " >&6
41354else
41355  case $GNM in
41356  [\\/]* | ?:[\\/]*)
41357  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41358  ;;
41359  *)
41360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41361for as_dir in $PATH
41362do
41363  IFS=$as_save_IFS
41364  test -z "$as_dir" && as_dir=.
41365    for ac_exec_ext in '' $ac_executable_extensions; do
41366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41367    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41369    break 2
41370  fi
41371done
41372  done
41373IFS=$as_save_IFS
41374
41375  ;;
41376esac
41377fi
41378GNM=$ac_cv_path_GNM
41379if test -n "$GNM"; then
41380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41381$as_echo "$GNM" >&6; }
41382else
41383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41384$as_echo "no" >&6; }
41385fi
41386
41387
41388          if test "x$GNM" = x; then
41389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41390          fi
41391        else
41392          # Otherwise we believe it is a complete path. Use it as it is.
41393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41394$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41396$as_echo_n "checking for GNM... " >&6; }
41397          if test ! -x "$tool_specified"; then
41398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41399$as_echo "not found" >&6; }
41400            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41401          fi
41402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41403$as_echo "$tool_specified" >&6; }
41404        fi
41405      fi
41406    fi
41407
41408  fi
41409
41410
41411
41412  # Only process if variable expands to non-empty
41413
41414  if test "x$GNM" != x; then
41415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416
41417  # First separate the path from the arguments. This will split at the first
41418  # space.
41419  complete="$GNM"
41420  path="${complete%% *}"
41421  tmp="$complete EOL"
41422  arguments="${tmp#* }"
41423
41424  # Input might be given as Windows format, start by converting to
41425  # unix format.
41426  new_path=`$CYGPATH -u "$path"`
41427
41428  # Now try to locate executable using which
41429  new_path=`$WHICH "$new_path" 2> /dev/null`
41430  # bat and cmd files are not always considered executable in cygwin causing which
41431  # to not find them
41432  if test "x$new_path" = x \
41433      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41434      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41435    new_path=`$CYGPATH -u "$path"`
41436  fi
41437  if test "x$new_path" = x; then
41438    # Oops. Which didn't find the executable.
41439    # The splitting of arguments from the executable at a space might have been incorrect,
41440    # since paths with space are more likely in Windows. Give it another try with the whole
41441    # argument.
41442    path="$complete"
41443    arguments="EOL"
41444    new_path=`$CYGPATH -u "$path"`
41445    new_path=`$WHICH "$new_path" 2> /dev/null`
41446    # bat and cmd files are not always considered executable in cygwin causing which
41447    # to not find them
41448    if test "x$new_path" = x \
41449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41451      new_path=`$CYGPATH -u "$path"`
41452    fi
41453    if test "x$new_path" = x; then
41454      # It's still not found. Now this is an unrecoverable error.
41455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41456$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41457      has_space=`$ECHO "$complete" | $GREP " "`
41458      if test "x$has_space" != x; then
41459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41461      fi
41462      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41463    fi
41464  fi
41465
41466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41469  # "foo.exe" is OK but "foo" is an error.
41470  #
41471  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41472  # It is also a way to make sure we got the proper file name for the real test later on.
41473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41474  if test "x$test_shortpath" = x; then
41475    # Short path failed, file does not exist as specified.
41476    # Try adding .exe or .cmd
41477    if test -f "${new_path}.exe"; then
41478      input_to_shortpath="${new_path}.exe"
41479    elif test -f "${new_path}.cmd"; then
41480      input_to_shortpath="${new_path}.cmd"
41481    else
41482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41483$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41486      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41487    fi
41488  else
41489    input_to_shortpath="$new_path"
41490  fi
41491
41492  # Call helper function which possibly converts this using DOS-style short mode.
41493  # If so, the updated path is stored in $new_path.
41494  new_path="$input_to_shortpath"
41495
41496  input_path="$input_to_shortpath"
41497  # Check if we need to convert this using DOS-style short mode. If the path
41498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41499  # take no chances and rewrite it.
41500  # Note: m4 eats our [], so we need to use [ and ] instead.
41501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41502  if test "x$has_forbidden_chars" != x; then
41503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41507      # Going to short mode and back again did indeed matter. Since short mode is
41508      # case insensitive, let's make it lowercase to improve readability.
41509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41510      # Now convert it back to Unix-style (cygpath)
41511      input_path=`$CYGPATH -u "$shortmode_path"`
41512      new_path="$input_path"
41513    fi
41514  fi
41515
41516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41517  if test "x$test_cygdrive_prefix" = x; then
41518    # As a simple fix, exclude /usr/bin since it's not a real path.
41519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41521      # a path prefixed by /cygdrive for fixpath to work.
41522      new_path="$CYGWIN_ROOT_PATH$input_path"
41523    fi
41524  fi
41525
41526  # remove trailing .exe if any
41527  new_path="${new_path/%.exe/}"
41528
41529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41530
41531  # First separate the path from the arguments. This will split at the first
41532  # space.
41533  complete="$GNM"
41534  path="${complete%% *}"
41535  tmp="$complete EOL"
41536  arguments="${tmp#* }"
41537
41538  # Input might be given as Windows format, start by converting to
41539  # unix format.
41540  new_path="$path"
41541
41542  windows_path="$new_path"
41543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41544    unix_path=`$CYGPATH -u "$windows_path"`
41545    new_path="$unix_path"
41546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41548    new_path="$unix_path"
41549  fi
41550
41551
41552  # Now try to locate executable using which
41553  new_path=`$WHICH "$new_path" 2> /dev/null`
41554
41555  if test "x$new_path" = x; then
41556    # Oops. Which didn't find the executable.
41557    # The splitting of arguments from the executable at a space might have been incorrect,
41558    # since paths with space are more likely in Windows. Give it another try with the whole
41559    # argument.
41560    path="$complete"
41561    arguments="EOL"
41562    new_path="$path"
41563
41564  windows_path="$new_path"
41565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41566    unix_path=`$CYGPATH -u "$windows_path"`
41567    new_path="$unix_path"
41568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41570    new_path="$unix_path"
41571  fi
41572
41573
41574    new_path=`$WHICH "$new_path" 2> /dev/null`
41575    # bat and cmd files are not always considered executable in MSYS causing which
41576    # to not find them
41577    if test "x$new_path" = x \
41578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41580      new_path="$path"
41581
41582  windows_path="$new_path"
41583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41584    unix_path=`$CYGPATH -u "$windows_path"`
41585    new_path="$unix_path"
41586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41588    new_path="$unix_path"
41589  fi
41590
41591    fi
41592
41593    if test "x$new_path" = x; then
41594      # It's still not found. Now this is an unrecoverable error.
41595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41596$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41597      has_space=`$ECHO "$complete" | $GREP " "`
41598      if test "x$has_space" != x; then
41599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41601      fi
41602      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41603    fi
41604  fi
41605
41606  # Now new_path has a complete unix path to the binary
41607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41608    # Keep paths in /bin as-is, but remove trailing .exe if any
41609    new_path="${new_path/%.exe/}"
41610    # Do not save /bin paths to all_fixpath_prefixes!
41611  else
41612    # Not in mixed or Windows style, start by that.
41613    new_path=`cmd //c echo $new_path`
41614
41615  input_path="$new_path"
41616  # Check if we need to convert this using DOS-style short mode. If the path
41617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41618  # take no chances and rewrite it.
41619  # Note: m4 eats our [], so we need to use [ and ] instead.
41620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41621  if test "x$has_forbidden_chars" != x; then
41622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41624  fi
41625
41626    # Output is in $new_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    # remove trailing .exe if any
41638    new_path="${new_path/%.exe/}"
41639
41640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41642  fi
41643
41644    else
41645      # We're on a unix platform. Hooray! :)
41646      # First separate the path from the arguments. This will split at the first
41647      # space.
41648      complete="$GNM"
41649      path="${complete%% *}"
41650      tmp="$complete EOL"
41651      arguments="${tmp#* }"
41652
41653      # Cannot rely on the command "which" here since it doesn't always work.
41654      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41655      if test -z "$is_absolute_path"; then
41656        # Path to executable is not absolute. Find it.
41657        IFS_save="$IFS"
41658        IFS=:
41659        for p in $PATH; do
41660          if test -f "$p/$path" && test -x "$p/$path"; then
41661            new_path="$p/$path"
41662            break
41663          fi
41664        done
41665        IFS="$IFS_save"
41666      else
41667        # This is an absolute path, we can use it without further modifications.
41668        new_path="$path"
41669      fi
41670
41671      if test "x$new_path" = x; then
41672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41673$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41674        has_space=`$ECHO "$complete" | $GREP " "`
41675        if test "x$has_space" != x; then
41676          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41678        fi
41679        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41680      fi
41681    fi
41682
41683    # Now join together the path and the arguments once again
41684    if test "x$arguments" != xEOL; then
41685      new_complete="$new_path ${arguments% *}"
41686    else
41687      new_complete="$new_path"
41688    fi
41689
41690    if test "x$complete" != "x$new_complete"; then
41691      GNM="$new_complete"
41692      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41693$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41694    fi
41695  fi
41696
41697  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41698    # FIXME: we should unify this with the solaris case above.
41699
41700
41701  # Publish this variable in the help.
41702
41703
41704  if [ -z "${STRIP+x}" ]; then
41705    # The variable is not set by user, try to locate tool using the code snippet
41706    if test -n "$ac_tool_prefix"; then
41707  for ac_prog in strip
41708  do
41709    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41710set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41712$as_echo_n "checking for $ac_word... " >&6; }
41713if ${ac_cv_prog_STRIP+:} false; then :
41714  $as_echo_n "(cached) " >&6
41715else
41716  if test -n "$STRIP"; then
41717  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41718else
41719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41720for as_dir in $PATH
41721do
41722  IFS=$as_save_IFS
41723  test -z "$as_dir" && as_dir=.
41724    for ac_exec_ext in '' $ac_executable_extensions; do
41725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41726    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41728    break 2
41729  fi
41730done
41731  done
41732IFS=$as_save_IFS
41733
41734fi
41735fi
41736STRIP=$ac_cv_prog_STRIP
41737if test -n "$STRIP"; then
41738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41739$as_echo "$STRIP" >&6; }
41740else
41741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41742$as_echo "no" >&6; }
41743fi
41744
41745
41746    test -n "$STRIP" && break
41747  done
41748fi
41749if test -z "$STRIP"; then
41750  ac_ct_STRIP=$STRIP
41751  for ac_prog in strip
41752do
41753  # Extract the first word of "$ac_prog", so it can be a program name with args.
41754set dummy $ac_prog; ac_word=$2
41755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41756$as_echo_n "checking for $ac_word... " >&6; }
41757if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41758  $as_echo_n "(cached) " >&6
41759else
41760  if test -n "$ac_ct_STRIP"; then
41761  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41762else
41763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41764for as_dir in $PATH
41765do
41766  IFS=$as_save_IFS
41767  test -z "$as_dir" && as_dir=.
41768    for ac_exec_ext in '' $ac_executable_extensions; do
41769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41770    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41772    break 2
41773  fi
41774done
41775  done
41776IFS=$as_save_IFS
41777
41778fi
41779fi
41780ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41781if test -n "$ac_ct_STRIP"; then
41782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41783$as_echo "$ac_ct_STRIP" >&6; }
41784else
41785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41786$as_echo "no" >&6; }
41787fi
41788
41789
41790  test -n "$ac_ct_STRIP" && break
41791done
41792
41793  if test "x$ac_ct_STRIP" = x; then
41794    STRIP=""
41795  else
41796    case $cross_compiling:$ac_tool_warned in
41797yes:)
41798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41800ac_tool_warned=yes ;;
41801esac
41802    STRIP=$ac_ct_STRIP
41803  fi
41804fi
41805
41806  else
41807    # The variable is set, but is it from the command line or the environment?
41808
41809    # Try to remove the string !STRIP! from our list.
41810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41812      # If it failed, the variable was not from the command line. Ignore it,
41813      # but warn the user (except for BASH, which is always set by the calling BASH).
41814      if test "xSTRIP" != xBASH; then
41815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41816$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41817      fi
41818      # Try to locate tool using the code snippet
41819      if test -n "$ac_tool_prefix"; then
41820  for ac_prog in strip
41821  do
41822    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41823set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41825$as_echo_n "checking for $ac_word... " >&6; }
41826if ${ac_cv_prog_STRIP+:} false; then :
41827  $as_echo_n "(cached) " >&6
41828else
41829  if test -n "$STRIP"; then
41830  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41831else
41832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41833for as_dir in $PATH
41834do
41835  IFS=$as_save_IFS
41836  test -z "$as_dir" && as_dir=.
41837    for ac_exec_ext in '' $ac_executable_extensions; do
41838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41839    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41841    break 2
41842  fi
41843done
41844  done
41845IFS=$as_save_IFS
41846
41847fi
41848fi
41849STRIP=$ac_cv_prog_STRIP
41850if test -n "$STRIP"; then
41851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41852$as_echo "$STRIP" >&6; }
41853else
41854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41855$as_echo "no" >&6; }
41856fi
41857
41858
41859    test -n "$STRIP" && break
41860  done
41861fi
41862if test -z "$STRIP"; then
41863  ac_ct_STRIP=$STRIP
41864  for ac_prog in strip
41865do
41866  # Extract the first word of "$ac_prog", so it can be a program name with args.
41867set dummy $ac_prog; ac_word=$2
41868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41869$as_echo_n "checking for $ac_word... " >&6; }
41870if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41871  $as_echo_n "(cached) " >&6
41872else
41873  if test -n "$ac_ct_STRIP"; then
41874  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41875else
41876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41877for as_dir in $PATH
41878do
41879  IFS=$as_save_IFS
41880  test -z "$as_dir" && as_dir=.
41881    for ac_exec_ext in '' $ac_executable_extensions; do
41882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41883    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41885    break 2
41886  fi
41887done
41888  done
41889IFS=$as_save_IFS
41890
41891fi
41892fi
41893ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41894if test -n "$ac_ct_STRIP"; then
41895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41896$as_echo "$ac_ct_STRIP" >&6; }
41897else
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41899$as_echo "no" >&6; }
41900fi
41901
41902
41903  test -n "$ac_ct_STRIP" && break
41904done
41905
41906  if test "x$ac_ct_STRIP" = x; then
41907    STRIP=""
41908  else
41909    case $cross_compiling:$ac_tool_warned in
41910yes:)
41911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41913ac_tool_warned=yes ;;
41914esac
41915    STRIP=$ac_ct_STRIP
41916  fi
41917fi
41918
41919    else
41920      # If it succeeded, then it was overridden by the user. We will use it
41921      # for the tool.
41922
41923      # First remove it from the list of overridden variables, so we can test
41924      # for unknown variables in the end.
41925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41926
41927      # Check if we try to supply an empty value
41928      if test "x$STRIP" = x; then
41929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41930$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41932$as_echo_n "checking for STRIP... " >&6; }
41933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41934$as_echo "disabled" >&6; }
41935      else
41936        # Check if the provided tool contains a complete path.
41937        tool_specified="$STRIP"
41938        tool_basename="${tool_specified##*/}"
41939        if test "x$tool_basename" = "x$tool_specified"; then
41940          # A command without a complete path is provided, search $PATH.
41941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41942$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41943          # Extract the first word of "$tool_basename", so it can be a program name with args.
41944set dummy $tool_basename; ac_word=$2
41945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41946$as_echo_n "checking for $ac_word... " >&6; }
41947if ${ac_cv_path_STRIP+:} false; then :
41948  $as_echo_n "(cached) " >&6
41949else
41950  case $STRIP in
41951  [\\/]* | ?:[\\/]*)
41952  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41953  ;;
41954  *)
41955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41956for as_dir in $PATH
41957do
41958  IFS=$as_save_IFS
41959  test -z "$as_dir" && as_dir=.
41960    for ac_exec_ext in '' $ac_executable_extensions; do
41961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41962    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41964    break 2
41965  fi
41966done
41967  done
41968IFS=$as_save_IFS
41969
41970  ;;
41971esac
41972fi
41973STRIP=$ac_cv_path_STRIP
41974if test -n "$STRIP"; then
41975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41976$as_echo "$STRIP" >&6; }
41977else
41978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41979$as_echo "no" >&6; }
41980fi
41981
41982
41983          if test "x$STRIP" = x; then
41984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41985          fi
41986        else
41987          # Otherwise we believe it is a complete path. Use it as it is.
41988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41989$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41991$as_echo_n "checking for STRIP... " >&6; }
41992          if test ! -x "$tool_specified"; then
41993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41994$as_echo "not found" >&6; }
41995            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41996          fi
41997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41998$as_echo "$tool_specified" >&6; }
41999        fi
42000      fi
42001    fi
42002
42003  fi
42004
42005
42006
42007  # Only process if variable expands to non-empty
42008
42009  if test "x$STRIP" != x; then
42010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42011
42012  # First separate the path from the arguments. This will split at the first
42013  # space.
42014  complete="$STRIP"
42015  path="${complete%% *}"
42016  tmp="$complete EOL"
42017  arguments="${tmp#* }"
42018
42019  # Input might be given as Windows format, start by converting to
42020  # unix format.
42021  new_path=`$CYGPATH -u "$path"`
42022
42023  # Now try to locate executable using which
42024  new_path=`$WHICH "$new_path" 2> /dev/null`
42025  # bat and cmd files are not always considered executable in cygwin causing which
42026  # to not find them
42027  if test "x$new_path" = x \
42028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42030    new_path=`$CYGPATH -u "$path"`
42031  fi
42032  if test "x$new_path" = x; then
42033    # Oops. Which didn't find the executable.
42034    # The splitting of arguments from the executable at a space might have been incorrect,
42035    # since paths with space are more likely in Windows. Give it another try with the whole
42036    # argument.
42037    path="$complete"
42038    arguments="EOL"
42039    new_path=`$CYGPATH -u "$path"`
42040    new_path=`$WHICH "$new_path" 2> /dev/null`
42041    # bat and cmd files are not always considered executable in cygwin causing which
42042    # to not find them
42043    if test "x$new_path" = x \
42044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42046      new_path=`$CYGPATH -u "$path"`
42047    fi
42048    if test "x$new_path" = x; then
42049      # It's still not found. Now this is an unrecoverable error.
42050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42051$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42052      has_space=`$ECHO "$complete" | $GREP " "`
42053      if test "x$has_space" != x; then
42054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42056      fi
42057      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42058    fi
42059  fi
42060
42061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42064  # "foo.exe" is OK but "foo" is an error.
42065  #
42066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42067  # It is also a way to make sure we got the proper file name for the real test later on.
42068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42069  if test "x$test_shortpath" = x; then
42070    # Short path failed, file does not exist as specified.
42071    # Try adding .exe or .cmd
42072    if test -f "${new_path}.exe"; then
42073      input_to_shortpath="${new_path}.exe"
42074    elif test -f "${new_path}.cmd"; then
42075      input_to_shortpath="${new_path}.cmd"
42076    else
42077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42078$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42081      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42082    fi
42083  else
42084    input_to_shortpath="$new_path"
42085  fi
42086
42087  # Call helper function which possibly converts this using DOS-style short mode.
42088  # If so, the updated path is stored in $new_path.
42089  new_path="$input_to_shortpath"
42090
42091  input_path="$input_to_shortpath"
42092  # Check if we need to convert this using DOS-style short mode. If the path
42093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42094  # take no chances and rewrite it.
42095  # Note: m4 eats our [], so we need to use [ and ] instead.
42096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42097  if test "x$has_forbidden_chars" != x; then
42098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42102      # Going to short mode and back again did indeed matter. Since short mode is
42103      # case insensitive, let's make it lowercase to improve readability.
42104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42105      # Now convert it back to Unix-style (cygpath)
42106      input_path=`$CYGPATH -u "$shortmode_path"`
42107      new_path="$input_path"
42108    fi
42109  fi
42110
42111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42112  if test "x$test_cygdrive_prefix" = x; then
42113    # As a simple fix, exclude /usr/bin since it's not a real path.
42114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42116      # a path prefixed by /cygdrive for fixpath to work.
42117      new_path="$CYGWIN_ROOT_PATH$input_path"
42118    fi
42119  fi
42120
42121  # remove trailing .exe if any
42122  new_path="${new_path/%.exe/}"
42123
42124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42125
42126  # First separate the path from the arguments. This will split at the first
42127  # space.
42128  complete="$STRIP"
42129  path="${complete%% *}"
42130  tmp="$complete EOL"
42131  arguments="${tmp#* }"
42132
42133  # Input might be given as Windows format, start by converting to
42134  # unix format.
42135  new_path="$path"
42136
42137  windows_path="$new_path"
42138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42139    unix_path=`$CYGPATH -u "$windows_path"`
42140    new_path="$unix_path"
42141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42143    new_path="$unix_path"
42144  fi
42145
42146
42147  # Now try to locate executable using which
42148  new_path=`$WHICH "$new_path" 2> /dev/null`
42149
42150  if test "x$new_path" = x; then
42151    # Oops. Which didn't find the executable.
42152    # The splitting of arguments from the executable at a space might have been incorrect,
42153    # since paths with space are more likely in Windows. Give it another try with the whole
42154    # argument.
42155    path="$complete"
42156    arguments="EOL"
42157    new_path="$path"
42158
42159  windows_path="$new_path"
42160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42161    unix_path=`$CYGPATH -u "$windows_path"`
42162    new_path="$unix_path"
42163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42165    new_path="$unix_path"
42166  fi
42167
42168
42169    new_path=`$WHICH "$new_path" 2> /dev/null`
42170    # bat and cmd files are not always considered executable in MSYS causing which
42171    # to not find them
42172    if test "x$new_path" = x \
42173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42175      new_path="$path"
42176
42177  windows_path="$new_path"
42178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42179    unix_path=`$CYGPATH -u "$windows_path"`
42180    new_path="$unix_path"
42181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42183    new_path="$unix_path"
42184  fi
42185
42186    fi
42187
42188    if test "x$new_path" = x; then
42189      # It's still not found. Now this is an unrecoverable error.
42190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42191$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42192      has_space=`$ECHO "$complete" | $GREP " "`
42193      if test "x$has_space" != x; then
42194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42196      fi
42197      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42198    fi
42199  fi
42200
42201  # Now new_path has a complete unix path to the binary
42202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42203    # Keep paths in /bin as-is, but remove trailing .exe if any
42204    new_path="${new_path/%.exe/}"
42205    # Do not save /bin paths to all_fixpath_prefixes!
42206  else
42207    # Not in mixed or Windows style, start by that.
42208    new_path=`cmd //c echo $new_path`
42209
42210  input_path="$new_path"
42211  # Check if we need to convert this using DOS-style short mode. If the path
42212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42213  # take no chances and rewrite it.
42214  # Note: m4 eats our [], so we need to use [ and ] instead.
42215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42216  if test "x$has_forbidden_chars" != x; then
42217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42219  fi
42220
42221    # Output is in $new_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    # remove trailing .exe if any
42233    new_path="${new_path/%.exe/}"
42234
42235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42237  fi
42238
42239    else
42240      # We're on a unix platform. Hooray! :)
42241      # First separate the path from the arguments. This will split at the first
42242      # space.
42243      complete="$STRIP"
42244      path="${complete%% *}"
42245      tmp="$complete EOL"
42246      arguments="${tmp#* }"
42247
42248      # Cannot rely on the command "which" here since it doesn't always work.
42249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42250      if test -z "$is_absolute_path"; then
42251        # Path to executable is not absolute. Find it.
42252        IFS_save="$IFS"
42253        IFS=:
42254        for p in $PATH; do
42255          if test -f "$p/$path" && test -x "$p/$path"; then
42256            new_path="$p/$path"
42257            break
42258          fi
42259        done
42260        IFS="$IFS_save"
42261      else
42262        # This is an absolute path, we can use it without further modifications.
42263        new_path="$path"
42264      fi
42265
42266      if test "x$new_path" = x; then
42267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42268$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42269        has_space=`$ECHO "$complete" | $GREP " "`
42270        if test "x$has_space" != x; then
42271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42273        fi
42274        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42275      fi
42276    fi
42277
42278    # Now join together the path and the arguments once again
42279    if test "x$arguments" != xEOL; then
42280      new_complete="$new_path ${arguments% *}"
42281    else
42282      new_complete="$new_path"
42283    fi
42284
42285    if test "x$complete" != "x$new_complete"; then
42286      STRIP="$new_complete"
42287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42288$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42289    fi
42290  fi
42291
42292    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42293
42294
42295  # Publish this variable in the help.
42296
42297
42298  if [ -z "${NM+x}" ]; then
42299    # The variable is not set by user, try to locate tool using the code snippet
42300    if test -n "$ac_tool_prefix"; then
42301  for ac_prog in nm gcc-nm
42302  do
42303    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42304set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42306$as_echo_n "checking for $ac_word... " >&6; }
42307if ${ac_cv_prog_NM+:} false; then :
42308  $as_echo_n "(cached) " >&6
42309else
42310  if test -n "$NM"; then
42311  ac_cv_prog_NM="$NM" # Let the user override the test.
42312else
42313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42314for as_dir in $PATH
42315do
42316  IFS=$as_save_IFS
42317  test -z "$as_dir" && as_dir=.
42318    for ac_exec_ext in '' $ac_executable_extensions; do
42319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42320    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42322    break 2
42323  fi
42324done
42325  done
42326IFS=$as_save_IFS
42327
42328fi
42329fi
42330NM=$ac_cv_prog_NM
42331if test -n "$NM"; then
42332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42333$as_echo "$NM" >&6; }
42334else
42335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42336$as_echo "no" >&6; }
42337fi
42338
42339
42340    test -n "$NM" && break
42341  done
42342fi
42343if test -z "$NM"; then
42344  ac_ct_NM=$NM
42345  for ac_prog in nm gcc-nm
42346do
42347  # Extract the first word of "$ac_prog", so it can be a program name with args.
42348set dummy $ac_prog; ac_word=$2
42349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42350$as_echo_n "checking for $ac_word... " >&6; }
42351if ${ac_cv_prog_ac_ct_NM+:} false; then :
42352  $as_echo_n "(cached) " >&6
42353else
42354  if test -n "$ac_ct_NM"; then
42355  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42356else
42357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42358for as_dir in $PATH
42359do
42360  IFS=$as_save_IFS
42361  test -z "$as_dir" && as_dir=.
42362    for ac_exec_ext in '' $ac_executable_extensions; do
42363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42364    ac_cv_prog_ac_ct_NM="$ac_prog"
42365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42366    break 2
42367  fi
42368done
42369  done
42370IFS=$as_save_IFS
42371
42372fi
42373fi
42374ac_ct_NM=$ac_cv_prog_ac_ct_NM
42375if test -n "$ac_ct_NM"; then
42376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42377$as_echo "$ac_ct_NM" >&6; }
42378else
42379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42380$as_echo "no" >&6; }
42381fi
42382
42383
42384  test -n "$ac_ct_NM" && break
42385done
42386
42387  if test "x$ac_ct_NM" = x; then
42388    NM=""
42389  else
42390    case $cross_compiling:$ac_tool_warned in
42391yes:)
42392{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42393$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42394ac_tool_warned=yes ;;
42395esac
42396    NM=$ac_ct_NM
42397  fi
42398fi
42399
42400  else
42401    # The variable is set, but is it from the command line or the environment?
42402
42403    # Try to remove the string !NM! from our list.
42404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42406      # If it failed, the variable was not from the command line. Ignore it,
42407      # but warn the user (except for BASH, which is always set by the calling BASH).
42408      if test "xNM" != xBASH; then
42409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42410$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42411      fi
42412      # Try to locate tool using the code snippet
42413      if test -n "$ac_tool_prefix"; then
42414  for ac_prog in nm gcc-nm
42415  do
42416    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42417set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42419$as_echo_n "checking for $ac_word... " >&6; }
42420if ${ac_cv_prog_NM+:} false; then :
42421  $as_echo_n "(cached) " >&6
42422else
42423  if test -n "$NM"; then
42424  ac_cv_prog_NM="$NM" # Let the user override the test.
42425else
42426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42427for as_dir in $PATH
42428do
42429  IFS=$as_save_IFS
42430  test -z "$as_dir" && as_dir=.
42431    for ac_exec_ext in '' $ac_executable_extensions; do
42432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42433    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42435    break 2
42436  fi
42437done
42438  done
42439IFS=$as_save_IFS
42440
42441fi
42442fi
42443NM=$ac_cv_prog_NM
42444if test -n "$NM"; then
42445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42446$as_echo "$NM" >&6; }
42447else
42448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42449$as_echo "no" >&6; }
42450fi
42451
42452
42453    test -n "$NM" && break
42454  done
42455fi
42456if test -z "$NM"; then
42457  ac_ct_NM=$NM
42458  for ac_prog in nm gcc-nm
42459do
42460  # Extract the first word of "$ac_prog", so it can be a program name with args.
42461set dummy $ac_prog; ac_word=$2
42462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42463$as_echo_n "checking for $ac_word... " >&6; }
42464if ${ac_cv_prog_ac_ct_NM+:} false; then :
42465  $as_echo_n "(cached) " >&6
42466else
42467  if test -n "$ac_ct_NM"; then
42468  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42469else
42470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42471for as_dir in $PATH
42472do
42473  IFS=$as_save_IFS
42474  test -z "$as_dir" && as_dir=.
42475    for ac_exec_ext in '' $ac_executable_extensions; do
42476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42477    ac_cv_prog_ac_ct_NM="$ac_prog"
42478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42479    break 2
42480  fi
42481done
42482  done
42483IFS=$as_save_IFS
42484
42485fi
42486fi
42487ac_ct_NM=$ac_cv_prog_ac_ct_NM
42488if test -n "$ac_ct_NM"; then
42489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42490$as_echo "$ac_ct_NM" >&6; }
42491else
42492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42493$as_echo "no" >&6; }
42494fi
42495
42496
42497  test -n "$ac_ct_NM" && break
42498done
42499
42500  if test "x$ac_ct_NM" = x; then
42501    NM=""
42502  else
42503    case $cross_compiling:$ac_tool_warned in
42504yes:)
42505{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42506$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42507ac_tool_warned=yes ;;
42508esac
42509    NM=$ac_ct_NM
42510  fi
42511fi
42512
42513    else
42514      # If it succeeded, then it was overridden by the user. We will use it
42515      # for the tool.
42516
42517      # First remove it from the list of overridden variables, so we can test
42518      # for unknown variables in the end.
42519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42520
42521      # Check if we try to supply an empty value
42522      if test "x$NM" = x; then
42523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42524$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42526$as_echo_n "checking for NM... " >&6; }
42527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42528$as_echo "disabled" >&6; }
42529      else
42530        # Check if the provided tool contains a complete path.
42531        tool_specified="$NM"
42532        tool_basename="${tool_specified##*/}"
42533        if test "x$tool_basename" = "x$tool_specified"; then
42534          # A command without a complete path is provided, search $PATH.
42535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42536$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42537          # Extract the first word of "$tool_basename", so it can be a program name with args.
42538set dummy $tool_basename; ac_word=$2
42539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42540$as_echo_n "checking for $ac_word... " >&6; }
42541if ${ac_cv_path_NM+:} false; then :
42542  $as_echo_n "(cached) " >&6
42543else
42544  case $NM in
42545  [\\/]* | ?:[\\/]*)
42546  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42547  ;;
42548  *)
42549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42550for as_dir in $PATH
42551do
42552  IFS=$as_save_IFS
42553  test -z "$as_dir" && as_dir=.
42554    for ac_exec_ext in '' $ac_executable_extensions; do
42555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42556    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42558    break 2
42559  fi
42560done
42561  done
42562IFS=$as_save_IFS
42563
42564  ;;
42565esac
42566fi
42567NM=$ac_cv_path_NM
42568if test -n "$NM"; then
42569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42570$as_echo "$NM" >&6; }
42571else
42572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42573$as_echo "no" >&6; }
42574fi
42575
42576
42577          if test "x$NM" = x; then
42578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42579          fi
42580        else
42581          # Otherwise we believe it is a complete path. Use it as it is.
42582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42583$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42585$as_echo_n "checking for NM... " >&6; }
42586          if test ! -x "$tool_specified"; then
42587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42588$as_echo "not found" >&6; }
42589            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42590          fi
42591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42592$as_echo "$tool_specified" >&6; }
42593        fi
42594      fi
42595    fi
42596
42597  fi
42598
42599
42600    else
42601
42602
42603  # Publish this variable in the help.
42604
42605
42606  if [ -z "${NM+x}" ]; then
42607    # The variable is not set by user, try to locate tool using the code snippet
42608    if test -n "$ac_tool_prefix"; then
42609  for ac_prog in nm
42610  do
42611    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42612set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42614$as_echo_n "checking for $ac_word... " >&6; }
42615if ${ac_cv_prog_NM+:} false; then :
42616  $as_echo_n "(cached) " >&6
42617else
42618  if test -n "$NM"; then
42619  ac_cv_prog_NM="$NM" # Let the user override the test.
42620else
42621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42622for as_dir in $PATH
42623do
42624  IFS=$as_save_IFS
42625  test -z "$as_dir" && as_dir=.
42626    for ac_exec_ext in '' $ac_executable_extensions; do
42627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42628    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42630    break 2
42631  fi
42632done
42633  done
42634IFS=$as_save_IFS
42635
42636fi
42637fi
42638NM=$ac_cv_prog_NM
42639if test -n "$NM"; then
42640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42641$as_echo "$NM" >&6; }
42642else
42643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42644$as_echo "no" >&6; }
42645fi
42646
42647
42648    test -n "$NM" && break
42649  done
42650fi
42651if test -z "$NM"; then
42652  ac_ct_NM=$NM
42653  for ac_prog in nm
42654do
42655  # Extract the first word of "$ac_prog", so it can be a program name with args.
42656set dummy $ac_prog; ac_word=$2
42657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42658$as_echo_n "checking for $ac_word... " >&6; }
42659if ${ac_cv_prog_ac_ct_NM+:} false; then :
42660  $as_echo_n "(cached) " >&6
42661else
42662  if test -n "$ac_ct_NM"; then
42663  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42664else
42665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42666for as_dir in $PATH
42667do
42668  IFS=$as_save_IFS
42669  test -z "$as_dir" && as_dir=.
42670    for ac_exec_ext in '' $ac_executable_extensions; do
42671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42672    ac_cv_prog_ac_ct_NM="$ac_prog"
42673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42674    break 2
42675  fi
42676done
42677  done
42678IFS=$as_save_IFS
42679
42680fi
42681fi
42682ac_ct_NM=$ac_cv_prog_ac_ct_NM
42683if test -n "$ac_ct_NM"; then
42684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42685$as_echo "$ac_ct_NM" >&6; }
42686else
42687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42688$as_echo "no" >&6; }
42689fi
42690
42691
42692  test -n "$ac_ct_NM" && break
42693done
42694
42695  if test "x$ac_ct_NM" = x; then
42696    NM=""
42697  else
42698    case $cross_compiling:$ac_tool_warned in
42699yes:)
42700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42702ac_tool_warned=yes ;;
42703esac
42704    NM=$ac_ct_NM
42705  fi
42706fi
42707
42708  else
42709    # The variable is set, but is it from the command line or the environment?
42710
42711    # Try to remove the string !NM! from our list.
42712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42714      # If it failed, the variable was not from the command line. Ignore it,
42715      # but warn the user (except for BASH, which is always set by the calling BASH).
42716      if test "xNM" != xBASH; then
42717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42718$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42719      fi
42720      # Try to locate tool using the code snippet
42721      if test -n "$ac_tool_prefix"; then
42722  for ac_prog in nm
42723  do
42724    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42725set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42727$as_echo_n "checking for $ac_word... " >&6; }
42728if ${ac_cv_prog_NM+:} false; then :
42729  $as_echo_n "(cached) " >&6
42730else
42731  if test -n "$NM"; then
42732  ac_cv_prog_NM="$NM" # Let the user override the test.
42733else
42734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42735for as_dir in $PATH
42736do
42737  IFS=$as_save_IFS
42738  test -z "$as_dir" && as_dir=.
42739    for ac_exec_ext in '' $ac_executable_extensions; do
42740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42741    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42743    break 2
42744  fi
42745done
42746  done
42747IFS=$as_save_IFS
42748
42749fi
42750fi
42751NM=$ac_cv_prog_NM
42752if test -n "$NM"; then
42753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42754$as_echo "$NM" >&6; }
42755else
42756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42757$as_echo "no" >&6; }
42758fi
42759
42760
42761    test -n "$NM" && break
42762  done
42763fi
42764if test -z "$NM"; then
42765  ac_ct_NM=$NM
42766  for ac_prog in nm
42767do
42768  # Extract the first word of "$ac_prog", so it can be a program name with args.
42769set dummy $ac_prog; ac_word=$2
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42771$as_echo_n "checking for $ac_word... " >&6; }
42772if ${ac_cv_prog_ac_ct_NM+:} false; then :
42773  $as_echo_n "(cached) " >&6
42774else
42775  if test -n "$ac_ct_NM"; then
42776  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42777else
42778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42779for as_dir in $PATH
42780do
42781  IFS=$as_save_IFS
42782  test -z "$as_dir" && as_dir=.
42783    for ac_exec_ext in '' $ac_executable_extensions; do
42784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42785    ac_cv_prog_ac_ct_NM="$ac_prog"
42786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42787    break 2
42788  fi
42789done
42790  done
42791IFS=$as_save_IFS
42792
42793fi
42794fi
42795ac_ct_NM=$ac_cv_prog_ac_ct_NM
42796if test -n "$ac_ct_NM"; then
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42798$as_echo "$ac_ct_NM" >&6; }
42799else
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42801$as_echo "no" >&6; }
42802fi
42803
42804
42805  test -n "$ac_ct_NM" && break
42806done
42807
42808  if test "x$ac_ct_NM" = x; then
42809    NM=""
42810  else
42811    case $cross_compiling:$ac_tool_warned in
42812yes:)
42813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42815ac_tool_warned=yes ;;
42816esac
42817    NM=$ac_ct_NM
42818  fi
42819fi
42820
42821    else
42822      # If it succeeded, then it was overridden by the user. We will use it
42823      # for the tool.
42824
42825      # First remove it from the list of overridden variables, so we can test
42826      # for unknown variables in the end.
42827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42828
42829      # Check if we try to supply an empty value
42830      if test "x$NM" = x; then
42831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42832$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42834$as_echo_n "checking for NM... " >&6; }
42835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42836$as_echo "disabled" >&6; }
42837      else
42838        # Check if the provided tool contains a complete path.
42839        tool_specified="$NM"
42840        tool_basename="${tool_specified##*/}"
42841        if test "x$tool_basename" = "x$tool_specified"; then
42842          # A command without a complete path is provided, search $PATH.
42843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42844$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42845          # Extract the first word of "$tool_basename", so it can be a program name with args.
42846set dummy $tool_basename; ac_word=$2
42847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42848$as_echo_n "checking for $ac_word... " >&6; }
42849if ${ac_cv_path_NM+:} false; then :
42850  $as_echo_n "(cached) " >&6
42851else
42852  case $NM in
42853  [\\/]* | ?:[\\/]*)
42854  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42855  ;;
42856  *)
42857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42858for as_dir in $PATH
42859do
42860  IFS=$as_save_IFS
42861  test -z "$as_dir" && as_dir=.
42862    for ac_exec_ext in '' $ac_executable_extensions; do
42863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42864    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42866    break 2
42867  fi
42868done
42869  done
42870IFS=$as_save_IFS
42871
42872  ;;
42873esac
42874fi
42875NM=$ac_cv_path_NM
42876if test -n "$NM"; then
42877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42878$as_echo "$NM" >&6; }
42879else
42880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42881$as_echo "no" >&6; }
42882fi
42883
42884
42885          if test "x$NM" = x; then
42886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42887          fi
42888        else
42889          # Otherwise we believe it is a complete path. Use it as it is.
42890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42891$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42893$as_echo_n "checking for NM... " >&6; }
42894          if test ! -x "$tool_specified"; then
42895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42896$as_echo "not found" >&6; }
42897            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42898          fi
42899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42900$as_echo "$tool_specified" >&6; }
42901        fi
42902      fi
42903    fi
42904
42905  fi
42906
42907
42908    fi
42909
42910  # Only process if variable expands to non-empty
42911
42912  if test "x$NM" != x; then
42913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42914
42915  # First separate the path from the arguments. This will split at the first
42916  # space.
42917  complete="$NM"
42918  path="${complete%% *}"
42919  tmp="$complete EOL"
42920  arguments="${tmp#* }"
42921
42922  # Input might be given as Windows format, start by converting to
42923  # unix format.
42924  new_path=`$CYGPATH -u "$path"`
42925
42926  # Now try to locate executable using which
42927  new_path=`$WHICH "$new_path" 2> /dev/null`
42928  # bat and cmd files are not always considered executable in cygwin causing which
42929  # to not find them
42930  if test "x$new_path" = x \
42931      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42932      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42933    new_path=`$CYGPATH -u "$path"`
42934  fi
42935  if test "x$new_path" = x; then
42936    # Oops. Which didn't find the executable.
42937    # The splitting of arguments from the executable at a space might have been incorrect,
42938    # since paths with space are more likely in Windows. Give it another try with the whole
42939    # argument.
42940    path="$complete"
42941    arguments="EOL"
42942    new_path=`$CYGPATH -u "$path"`
42943    new_path=`$WHICH "$new_path" 2> /dev/null`
42944    # bat and cmd files are not always considered executable in cygwin causing which
42945    # to not find them
42946    if test "x$new_path" = x \
42947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42949      new_path=`$CYGPATH -u "$path"`
42950    fi
42951    if test "x$new_path" = x; then
42952      # It's still not found. Now this is an unrecoverable error.
42953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42955      has_space=`$ECHO "$complete" | $GREP " "`
42956      if test "x$has_space" != x; then
42957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42959      fi
42960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42961    fi
42962  fi
42963
42964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42967  # "foo.exe" is OK but "foo" is an error.
42968  #
42969  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42970  # It is also a way to make sure we got the proper file name for the real test later on.
42971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42972  if test "x$test_shortpath" = x; then
42973    # Short path failed, file does not exist as specified.
42974    # Try adding .exe or .cmd
42975    if test -f "${new_path}.exe"; then
42976      input_to_shortpath="${new_path}.exe"
42977    elif test -f "${new_path}.cmd"; then
42978      input_to_shortpath="${new_path}.cmd"
42979    else
42980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42981$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42984      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42985    fi
42986  else
42987    input_to_shortpath="$new_path"
42988  fi
42989
42990  # Call helper function which possibly converts this using DOS-style short mode.
42991  # If so, the updated path is stored in $new_path.
42992  new_path="$input_to_shortpath"
42993
42994  input_path="$input_to_shortpath"
42995  # Check if we need to convert this using DOS-style short mode. If the path
42996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42997  # take no chances and rewrite it.
42998  # Note: m4 eats our [], so we need to use [ and ] instead.
42999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43000  if test "x$has_forbidden_chars" != x; then
43001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43005      # Going to short mode and back again did indeed matter. Since short mode is
43006      # case insensitive, let's make it lowercase to improve readability.
43007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43008      # Now convert it back to Unix-style (cygpath)
43009      input_path=`$CYGPATH -u "$shortmode_path"`
43010      new_path="$input_path"
43011    fi
43012  fi
43013
43014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43015  if test "x$test_cygdrive_prefix" = x; then
43016    # As a simple fix, exclude /usr/bin since it's not a real path.
43017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43019      # a path prefixed by /cygdrive for fixpath to work.
43020      new_path="$CYGWIN_ROOT_PATH$input_path"
43021    fi
43022  fi
43023
43024  # remove trailing .exe if any
43025  new_path="${new_path/%.exe/}"
43026
43027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43028
43029  # First separate the path from the arguments. This will split at the first
43030  # space.
43031  complete="$NM"
43032  path="${complete%% *}"
43033  tmp="$complete EOL"
43034  arguments="${tmp#* }"
43035
43036  # Input might be given as Windows format, start by converting to
43037  # unix format.
43038  new_path="$path"
43039
43040  windows_path="$new_path"
43041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43042    unix_path=`$CYGPATH -u "$windows_path"`
43043    new_path="$unix_path"
43044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43046    new_path="$unix_path"
43047  fi
43048
43049
43050  # Now try to locate executable using which
43051  new_path=`$WHICH "$new_path" 2> /dev/null`
43052
43053  if test "x$new_path" = x; then
43054    # Oops. Which didn't find the executable.
43055    # The splitting of arguments from the executable at a space might have been incorrect,
43056    # since paths with space are more likely in Windows. Give it another try with the whole
43057    # argument.
43058    path="$complete"
43059    arguments="EOL"
43060    new_path="$path"
43061
43062  windows_path="$new_path"
43063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43064    unix_path=`$CYGPATH -u "$windows_path"`
43065    new_path="$unix_path"
43066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43068    new_path="$unix_path"
43069  fi
43070
43071
43072    new_path=`$WHICH "$new_path" 2> /dev/null`
43073    # bat and cmd files are not always considered executable in MSYS causing which
43074    # to not find them
43075    if test "x$new_path" = x \
43076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43078      new_path="$path"
43079
43080  windows_path="$new_path"
43081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43082    unix_path=`$CYGPATH -u "$windows_path"`
43083    new_path="$unix_path"
43084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43086    new_path="$unix_path"
43087  fi
43088
43089    fi
43090
43091    if test "x$new_path" = x; then
43092      # It's still not found. Now this is an unrecoverable error.
43093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43094$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43095      has_space=`$ECHO "$complete" | $GREP " "`
43096      if test "x$has_space" != x; then
43097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43099      fi
43100      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43101    fi
43102  fi
43103
43104  # Now new_path has a complete unix path to the binary
43105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43106    # Keep paths in /bin as-is, but remove trailing .exe if any
43107    new_path="${new_path/%.exe/}"
43108    # Do not save /bin paths to all_fixpath_prefixes!
43109  else
43110    # Not in mixed or Windows style, start by that.
43111    new_path=`cmd //c echo $new_path`
43112
43113  input_path="$new_path"
43114  # Check if we need to convert this using DOS-style short mode. If the path
43115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43116  # take no chances and rewrite it.
43117  # Note: m4 eats our [], so we need to use [ and ] instead.
43118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43119  if test "x$has_forbidden_chars" != x; then
43120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43122  fi
43123
43124    # Output is in $new_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    # remove trailing .exe if any
43136    new_path="${new_path/%.exe/}"
43137
43138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43140  fi
43141
43142    else
43143      # We're on a unix platform. Hooray! :)
43144      # First separate the path from the arguments. This will split at the first
43145      # space.
43146      complete="$NM"
43147      path="${complete%% *}"
43148      tmp="$complete EOL"
43149      arguments="${tmp#* }"
43150
43151      # Cannot rely on the command "which" here since it doesn't always work.
43152      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43153      if test -z "$is_absolute_path"; then
43154        # Path to executable is not absolute. Find it.
43155        IFS_save="$IFS"
43156        IFS=:
43157        for p in $PATH; do
43158          if test -f "$p/$path" && test -x "$p/$path"; then
43159            new_path="$p/$path"
43160            break
43161          fi
43162        done
43163        IFS="$IFS_save"
43164      else
43165        # This is an absolute path, we can use it without further modifications.
43166        new_path="$path"
43167      fi
43168
43169      if test "x$new_path" = x; then
43170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43171$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43172        has_space=`$ECHO "$complete" | $GREP " "`
43173        if test "x$has_space" != x; then
43174          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43176        fi
43177        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43178      fi
43179    fi
43180
43181    # Now join together the path and the arguments once again
43182    if test "x$arguments" != xEOL; then
43183      new_complete="$new_path ${arguments% *}"
43184    else
43185      new_complete="$new_path"
43186    fi
43187
43188    if test "x$complete" != "x$new_complete"; then
43189      NM="$new_complete"
43190      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43191$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43192    fi
43193  fi
43194
43195    GNM="$NM"
43196
43197  fi
43198
43199  # objcopy is used for moving debug symbols to separate files when
43200  # full debug symbols are enabled.
43201  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43202
43203
43204  # Publish this variable in the help.
43205
43206
43207  if [ -z "${OBJCOPY+x}" ]; then
43208    # The variable is not set by user, try to locate tool using the code snippet
43209    if test -n "$ac_tool_prefix"; then
43210  for ac_prog in gobjcopy objcopy
43211  do
43212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43215$as_echo_n "checking for $ac_word... " >&6; }
43216if ${ac_cv_prog_OBJCOPY+:} false; then :
43217  $as_echo_n "(cached) " >&6
43218else
43219  if test -n "$OBJCOPY"; then
43220  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43221else
43222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43223for as_dir in $PATH
43224do
43225  IFS=$as_save_IFS
43226  test -z "$as_dir" && as_dir=.
43227    for ac_exec_ext in '' $ac_executable_extensions; do
43228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43229    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43231    break 2
43232  fi
43233done
43234  done
43235IFS=$as_save_IFS
43236
43237fi
43238fi
43239OBJCOPY=$ac_cv_prog_OBJCOPY
43240if test -n "$OBJCOPY"; then
43241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43242$as_echo "$OBJCOPY" >&6; }
43243else
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43245$as_echo "no" >&6; }
43246fi
43247
43248
43249    test -n "$OBJCOPY" && break
43250  done
43251fi
43252if test -z "$OBJCOPY"; then
43253  ac_ct_OBJCOPY=$OBJCOPY
43254  for ac_prog in gobjcopy objcopy
43255do
43256  # Extract the first word of "$ac_prog", so it can be a program name with args.
43257set dummy $ac_prog; ac_word=$2
43258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259$as_echo_n "checking for $ac_word... " >&6; }
43260if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43261  $as_echo_n "(cached) " >&6
43262else
43263  if test -n "$ac_ct_OBJCOPY"; then
43264  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43265else
43266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43267for as_dir in $PATH
43268do
43269  IFS=$as_save_IFS
43270  test -z "$as_dir" && as_dir=.
43271    for ac_exec_ext in '' $ac_executable_extensions; do
43272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43273    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43275    break 2
43276  fi
43277done
43278  done
43279IFS=$as_save_IFS
43280
43281fi
43282fi
43283ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43284if test -n "$ac_ct_OBJCOPY"; then
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43286$as_echo "$ac_ct_OBJCOPY" >&6; }
43287else
43288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43289$as_echo "no" >&6; }
43290fi
43291
43292
43293  test -n "$ac_ct_OBJCOPY" && break
43294done
43295
43296  if test "x$ac_ct_OBJCOPY" = x; then
43297    OBJCOPY=""
43298  else
43299    case $cross_compiling:$ac_tool_warned in
43300yes:)
43301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43303ac_tool_warned=yes ;;
43304esac
43305    OBJCOPY=$ac_ct_OBJCOPY
43306  fi
43307fi
43308
43309  else
43310    # The variable is set, but is it from the command line or the environment?
43311
43312    # Try to remove the string !OBJCOPY! from our list.
43313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43315      # If it failed, the variable was not from the command line. Ignore it,
43316      # but warn the user (except for BASH, which is always set by the calling BASH).
43317      if test "xOBJCOPY" != xBASH; then
43318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43319$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43320      fi
43321      # Try to locate tool using the code snippet
43322      if test -n "$ac_tool_prefix"; then
43323  for ac_prog in gobjcopy objcopy
43324  do
43325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43328$as_echo_n "checking for $ac_word... " >&6; }
43329if ${ac_cv_prog_OBJCOPY+:} false; then :
43330  $as_echo_n "(cached) " >&6
43331else
43332  if test -n "$OBJCOPY"; then
43333  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43334else
43335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43336for as_dir in $PATH
43337do
43338  IFS=$as_save_IFS
43339  test -z "$as_dir" && as_dir=.
43340    for ac_exec_ext in '' $ac_executable_extensions; do
43341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43342    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43344    break 2
43345  fi
43346done
43347  done
43348IFS=$as_save_IFS
43349
43350fi
43351fi
43352OBJCOPY=$ac_cv_prog_OBJCOPY
43353if test -n "$OBJCOPY"; then
43354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43355$as_echo "$OBJCOPY" >&6; }
43356else
43357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43358$as_echo "no" >&6; }
43359fi
43360
43361
43362    test -n "$OBJCOPY" && break
43363  done
43364fi
43365if test -z "$OBJCOPY"; then
43366  ac_ct_OBJCOPY=$OBJCOPY
43367  for ac_prog in gobjcopy objcopy
43368do
43369  # Extract the first word of "$ac_prog", so it can be a program name with args.
43370set dummy $ac_prog; ac_word=$2
43371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43372$as_echo_n "checking for $ac_word... " >&6; }
43373if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43374  $as_echo_n "(cached) " >&6
43375else
43376  if test -n "$ac_ct_OBJCOPY"; then
43377  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43378else
43379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43380for as_dir in $PATH
43381do
43382  IFS=$as_save_IFS
43383  test -z "$as_dir" && as_dir=.
43384    for ac_exec_ext in '' $ac_executable_extensions; do
43385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43386    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43388    break 2
43389  fi
43390done
43391  done
43392IFS=$as_save_IFS
43393
43394fi
43395fi
43396ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43397if test -n "$ac_ct_OBJCOPY"; then
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43399$as_echo "$ac_ct_OBJCOPY" >&6; }
43400else
43401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43402$as_echo "no" >&6; }
43403fi
43404
43405
43406  test -n "$ac_ct_OBJCOPY" && break
43407done
43408
43409  if test "x$ac_ct_OBJCOPY" = x; then
43410    OBJCOPY=""
43411  else
43412    case $cross_compiling:$ac_tool_warned in
43413yes:)
43414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43416ac_tool_warned=yes ;;
43417esac
43418    OBJCOPY=$ac_ct_OBJCOPY
43419  fi
43420fi
43421
43422    else
43423      # If it succeeded, then it was overridden by the user. We will use it
43424      # for the tool.
43425
43426      # First remove it from the list of overridden variables, so we can test
43427      # for unknown variables in the end.
43428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43429
43430      # Check if we try to supply an empty value
43431      if test "x$OBJCOPY" = x; then
43432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43433$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43435$as_echo_n "checking for OBJCOPY... " >&6; }
43436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43437$as_echo "disabled" >&6; }
43438      else
43439        # Check if the provided tool contains a complete path.
43440        tool_specified="$OBJCOPY"
43441        tool_basename="${tool_specified##*/}"
43442        if test "x$tool_basename" = "x$tool_specified"; then
43443          # A command without a complete path is provided, search $PATH.
43444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43445$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43446          # Extract the first word of "$tool_basename", so it can be a program name with args.
43447set dummy $tool_basename; ac_word=$2
43448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43449$as_echo_n "checking for $ac_word... " >&6; }
43450if ${ac_cv_path_OBJCOPY+:} false; then :
43451  $as_echo_n "(cached) " >&6
43452else
43453  case $OBJCOPY in
43454  [\\/]* | ?:[\\/]*)
43455  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43456  ;;
43457  *)
43458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43459for as_dir in $PATH
43460do
43461  IFS=$as_save_IFS
43462  test -z "$as_dir" && as_dir=.
43463    for ac_exec_ext in '' $ac_executable_extensions; do
43464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43465    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43467    break 2
43468  fi
43469done
43470  done
43471IFS=$as_save_IFS
43472
43473  ;;
43474esac
43475fi
43476OBJCOPY=$ac_cv_path_OBJCOPY
43477if test -n "$OBJCOPY"; then
43478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43479$as_echo "$OBJCOPY" >&6; }
43480else
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43482$as_echo "no" >&6; }
43483fi
43484
43485
43486          if test "x$OBJCOPY" = x; then
43487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43488          fi
43489        else
43490          # Otherwise we believe it is a complete path. Use it as it is.
43491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43492$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43494$as_echo_n "checking for OBJCOPY... " >&6; }
43495          if test ! -x "$tool_specified"; then
43496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43497$as_echo "not found" >&6; }
43498            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43499          fi
43500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43501$as_echo "$tool_specified" >&6; }
43502        fi
43503      fi
43504    fi
43505
43506  fi
43507
43508
43509    # Only call fixup if objcopy was found.
43510    if test -n "$OBJCOPY"; then
43511
43512  # Only process if variable expands to non-empty
43513
43514  if test "x$OBJCOPY" != x; then
43515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43516
43517  # First separate the path from the arguments. This will split at the first
43518  # space.
43519  complete="$OBJCOPY"
43520  path="${complete%% *}"
43521  tmp="$complete EOL"
43522  arguments="${tmp#* }"
43523
43524  # Input might be given as Windows format, start by converting to
43525  # unix format.
43526  new_path=`$CYGPATH -u "$path"`
43527
43528  # Now try to locate executable using which
43529  new_path=`$WHICH "$new_path" 2> /dev/null`
43530  # bat and cmd files are not always considered executable in cygwin causing which
43531  # to not find them
43532  if test "x$new_path" = x \
43533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43535    new_path=`$CYGPATH -u "$path"`
43536  fi
43537  if test "x$new_path" = x; then
43538    # Oops. Which didn't find the executable.
43539    # The splitting of arguments from the executable at a space might have been incorrect,
43540    # since paths with space are more likely in Windows. Give it another try with the whole
43541    # argument.
43542    path="$complete"
43543    arguments="EOL"
43544    new_path=`$CYGPATH -u "$path"`
43545    new_path=`$WHICH "$new_path" 2> /dev/null`
43546    # bat and cmd files are not always considered executable in cygwin causing which
43547    # to not find them
43548    if test "x$new_path" = x \
43549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43551      new_path=`$CYGPATH -u "$path"`
43552    fi
43553    if test "x$new_path" = x; then
43554      # It's still not found. Now this is an unrecoverable error.
43555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43556$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43557      has_space=`$ECHO "$complete" | $GREP " "`
43558      if test "x$has_space" != x; then
43559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43561      fi
43562      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43563    fi
43564  fi
43565
43566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43569  # "foo.exe" is OK but "foo" is an error.
43570  #
43571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43572  # It is also a way to make sure we got the proper file name for the real test later on.
43573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43574  if test "x$test_shortpath" = x; then
43575    # Short path failed, file does not exist as specified.
43576    # Try adding .exe or .cmd
43577    if test -f "${new_path}.exe"; then
43578      input_to_shortpath="${new_path}.exe"
43579    elif test -f "${new_path}.cmd"; then
43580      input_to_shortpath="${new_path}.cmd"
43581    else
43582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43583$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43586      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43587    fi
43588  else
43589    input_to_shortpath="$new_path"
43590  fi
43591
43592  # Call helper function which possibly converts this using DOS-style short mode.
43593  # If so, the updated path is stored in $new_path.
43594  new_path="$input_to_shortpath"
43595
43596  input_path="$input_to_shortpath"
43597  # Check if we need to convert this using DOS-style short mode. If the path
43598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43599  # take no chances and rewrite it.
43600  # Note: m4 eats our [], so we need to use [ and ] instead.
43601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43602  if test "x$has_forbidden_chars" != x; then
43603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43607      # Going to short mode and back again did indeed matter. Since short mode is
43608      # case insensitive, let's make it lowercase to improve readability.
43609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43610      # Now convert it back to Unix-style (cygpath)
43611      input_path=`$CYGPATH -u "$shortmode_path"`
43612      new_path="$input_path"
43613    fi
43614  fi
43615
43616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43617  if test "x$test_cygdrive_prefix" = x; then
43618    # As a simple fix, exclude /usr/bin since it's not a real path.
43619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43621      # a path prefixed by /cygdrive for fixpath to work.
43622      new_path="$CYGWIN_ROOT_PATH$input_path"
43623    fi
43624  fi
43625
43626  # remove trailing .exe if any
43627  new_path="${new_path/%.exe/}"
43628
43629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43630
43631  # First separate the path from the arguments. This will split at the first
43632  # space.
43633  complete="$OBJCOPY"
43634  path="${complete%% *}"
43635  tmp="$complete EOL"
43636  arguments="${tmp#* }"
43637
43638  # Input might be given as Windows format, start by converting to
43639  # unix format.
43640  new_path="$path"
43641
43642  windows_path="$new_path"
43643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644    unix_path=`$CYGPATH -u "$windows_path"`
43645    new_path="$unix_path"
43646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648    new_path="$unix_path"
43649  fi
43650
43651
43652  # Now try to locate executable using which
43653  new_path=`$WHICH "$new_path" 2> /dev/null`
43654
43655  if test "x$new_path" = x; then
43656    # Oops. Which didn't find the executable.
43657    # The splitting of arguments from the executable at a space might have been incorrect,
43658    # since paths with space are more likely in Windows. Give it another try with the whole
43659    # argument.
43660    path="$complete"
43661    arguments="EOL"
43662    new_path="$path"
43663
43664  windows_path="$new_path"
43665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43666    unix_path=`$CYGPATH -u "$windows_path"`
43667    new_path="$unix_path"
43668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43670    new_path="$unix_path"
43671  fi
43672
43673
43674    new_path=`$WHICH "$new_path" 2> /dev/null`
43675    # bat and cmd files are not always considered executable in MSYS causing which
43676    # to not find them
43677    if test "x$new_path" = x \
43678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43680      new_path="$path"
43681
43682  windows_path="$new_path"
43683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43684    unix_path=`$CYGPATH -u "$windows_path"`
43685    new_path="$unix_path"
43686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43688    new_path="$unix_path"
43689  fi
43690
43691    fi
43692
43693    if test "x$new_path" = x; then
43694      # It's still not found. Now this is an unrecoverable error.
43695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43696$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43697      has_space=`$ECHO "$complete" | $GREP " "`
43698      if test "x$has_space" != x; then
43699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43701      fi
43702      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43703    fi
43704  fi
43705
43706  # Now new_path has a complete unix path to the binary
43707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43708    # Keep paths in /bin as-is, but remove trailing .exe if any
43709    new_path="${new_path/%.exe/}"
43710    # Do not save /bin paths to all_fixpath_prefixes!
43711  else
43712    # Not in mixed or Windows style, start by that.
43713    new_path=`cmd //c echo $new_path`
43714
43715  input_path="$new_path"
43716  # Check if we need to convert this using DOS-style short mode. If the path
43717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43718  # take no chances and rewrite it.
43719  # Note: m4 eats our [], so we need to use [ and ] instead.
43720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43721  if test "x$has_forbidden_chars" != x; then
43722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43724  fi
43725
43726    # Output is in $new_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    # remove trailing .exe if any
43738    new_path="${new_path/%.exe/}"
43739
43740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43742  fi
43743
43744    else
43745      # We're on a unix platform. Hooray! :)
43746      # First separate the path from the arguments. This will split at the first
43747      # space.
43748      complete="$OBJCOPY"
43749      path="${complete%% *}"
43750      tmp="$complete EOL"
43751      arguments="${tmp#* }"
43752
43753      # Cannot rely on the command "which" here since it doesn't always work.
43754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43755      if test -z "$is_absolute_path"; then
43756        # Path to executable is not absolute. Find it.
43757        IFS_save="$IFS"
43758        IFS=:
43759        for p in $PATH; do
43760          if test -f "$p/$path" && test -x "$p/$path"; then
43761            new_path="$p/$path"
43762            break
43763          fi
43764        done
43765        IFS="$IFS_save"
43766      else
43767        # This is an absolute path, we can use it without further modifications.
43768        new_path="$path"
43769      fi
43770
43771      if test "x$new_path" = x; then
43772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43773$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43774        has_space=`$ECHO "$complete" | $GREP " "`
43775        if test "x$has_space" != x; then
43776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43778        fi
43779        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43780      fi
43781    fi
43782
43783    # Now join together the path and the arguments once again
43784    if test "x$arguments" != xEOL; then
43785      new_complete="$new_path ${arguments% *}"
43786    else
43787      new_complete="$new_path"
43788    fi
43789
43790    if test "x$complete" != "x$new_complete"; then
43791      OBJCOPY="$new_complete"
43792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43793$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43794    fi
43795  fi
43796
43797      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43798        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43799        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43800        # - version number is last blank separate word on first line
43801        # - version number formats that have been seen:
43802        #   - <major>.<minor>
43803        #   - <major>.<minor>.<micro>
43804        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43805        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43806         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43807              -e 's/.* //' \
43808              -e '/^[01]\./b bad' \
43809              -e '/^2\./{' \
43810              -e '  s/^2\.//' \
43811              -e '  /^[0-9]$/b bad' \
43812              -e '  /^[0-9]\./b bad' \
43813              -e '  /^1[0-9]$/b bad' \
43814              -e '  /^1[0-9]\./b bad' \
43815              -e '  /^20\./b bad' \
43816              -e '  /^21\.0$/b bad' \
43817              -e '  /^21\.0\./b bad' \
43818              -e '}' \
43819              -e ':good' \
43820              -e 's/.*/VALID_VERSION/p' \
43821              -e 'q' \
43822              -e ':bad' \
43823              -e 's/.*/BAD_VERSION/p' \
43824              -e 'q'`
43825        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43826          OBJCOPY=
43827          { $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
43828$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43829          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43830$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43831          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43832$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43833          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43834$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43835          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43836$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43837        fi
43838      fi
43839    fi
43840  fi
43841
43842
43843
43844  # Publish this variable in the help.
43845
43846
43847  if [ -z "${OBJDUMP+x}" ]; then
43848    # The variable is not set by user, try to locate tool using the code snippet
43849    if test -n "$ac_tool_prefix"; then
43850  for ac_prog in gobjdump objdump
43851  do
43852    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43855$as_echo_n "checking for $ac_word... " >&6; }
43856if ${ac_cv_prog_OBJDUMP+:} false; then :
43857  $as_echo_n "(cached) " >&6
43858else
43859  if test -n "$OBJDUMP"; then
43860  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43861else
43862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43863for as_dir in $PATH
43864do
43865  IFS=$as_save_IFS
43866  test -z "$as_dir" && as_dir=.
43867    for ac_exec_ext in '' $ac_executable_extensions; do
43868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43869    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43871    break 2
43872  fi
43873done
43874  done
43875IFS=$as_save_IFS
43876
43877fi
43878fi
43879OBJDUMP=$ac_cv_prog_OBJDUMP
43880if test -n "$OBJDUMP"; then
43881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43882$as_echo "$OBJDUMP" >&6; }
43883else
43884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43885$as_echo "no" >&6; }
43886fi
43887
43888
43889    test -n "$OBJDUMP" && break
43890  done
43891fi
43892if test -z "$OBJDUMP"; then
43893  ac_ct_OBJDUMP=$OBJDUMP
43894  for ac_prog in gobjdump objdump
43895do
43896  # Extract the first word of "$ac_prog", so it can be a program name with args.
43897set dummy $ac_prog; ac_word=$2
43898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43899$as_echo_n "checking for $ac_word... " >&6; }
43900if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43901  $as_echo_n "(cached) " >&6
43902else
43903  if test -n "$ac_ct_OBJDUMP"; then
43904  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43905else
43906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43907for as_dir in $PATH
43908do
43909  IFS=$as_save_IFS
43910  test -z "$as_dir" && as_dir=.
43911    for ac_exec_ext in '' $ac_executable_extensions; do
43912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43913    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43915    break 2
43916  fi
43917done
43918  done
43919IFS=$as_save_IFS
43920
43921fi
43922fi
43923ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43924if test -n "$ac_ct_OBJDUMP"; then
43925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43926$as_echo "$ac_ct_OBJDUMP" >&6; }
43927else
43928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43929$as_echo "no" >&6; }
43930fi
43931
43932
43933  test -n "$ac_ct_OBJDUMP" && break
43934done
43935
43936  if test "x$ac_ct_OBJDUMP" = x; then
43937    OBJDUMP=""
43938  else
43939    case $cross_compiling:$ac_tool_warned in
43940yes:)
43941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43943ac_tool_warned=yes ;;
43944esac
43945    OBJDUMP=$ac_ct_OBJDUMP
43946  fi
43947fi
43948
43949  else
43950    # The variable is set, but is it from the command line or the environment?
43951
43952    # Try to remove the string !OBJDUMP! from our list.
43953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43955      # If it failed, the variable was not from the command line. Ignore it,
43956      # but warn the user (except for BASH, which is always set by the calling BASH).
43957      if test "xOBJDUMP" != xBASH; then
43958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43959$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43960      fi
43961      # Try to locate tool using the code snippet
43962      if test -n "$ac_tool_prefix"; then
43963  for ac_prog in gobjdump objdump
43964  do
43965    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43966set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43968$as_echo_n "checking for $ac_word... " >&6; }
43969if ${ac_cv_prog_OBJDUMP+:} false; then :
43970  $as_echo_n "(cached) " >&6
43971else
43972  if test -n "$OBJDUMP"; then
43973  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43974else
43975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43976for as_dir in $PATH
43977do
43978  IFS=$as_save_IFS
43979  test -z "$as_dir" && as_dir=.
43980    for ac_exec_ext in '' $ac_executable_extensions; do
43981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43982    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43984    break 2
43985  fi
43986done
43987  done
43988IFS=$as_save_IFS
43989
43990fi
43991fi
43992OBJDUMP=$ac_cv_prog_OBJDUMP
43993if test -n "$OBJDUMP"; then
43994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43995$as_echo "$OBJDUMP" >&6; }
43996else
43997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43998$as_echo "no" >&6; }
43999fi
44000
44001
44002    test -n "$OBJDUMP" && break
44003  done
44004fi
44005if test -z "$OBJDUMP"; then
44006  ac_ct_OBJDUMP=$OBJDUMP
44007  for ac_prog in gobjdump objdump
44008do
44009  # Extract the first word of "$ac_prog", so it can be a program name with args.
44010set dummy $ac_prog; ac_word=$2
44011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44012$as_echo_n "checking for $ac_word... " >&6; }
44013if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44014  $as_echo_n "(cached) " >&6
44015else
44016  if test -n "$ac_ct_OBJDUMP"; then
44017  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44018else
44019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44020for as_dir in $PATH
44021do
44022  IFS=$as_save_IFS
44023  test -z "$as_dir" && as_dir=.
44024    for ac_exec_ext in '' $ac_executable_extensions; do
44025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44026    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44028    break 2
44029  fi
44030done
44031  done
44032IFS=$as_save_IFS
44033
44034fi
44035fi
44036ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44037if test -n "$ac_ct_OBJDUMP"; then
44038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44039$as_echo "$ac_ct_OBJDUMP" >&6; }
44040else
44041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44042$as_echo "no" >&6; }
44043fi
44044
44045
44046  test -n "$ac_ct_OBJDUMP" && break
44047done
44048
44049  if test "x$ac_ct_OBJDUMP" = x; then
44050    OBJDUMP=""
44051  else
44052    case $cross_compiling:$ac_tool_warned in
44053yes:)
44054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44056ac_tool_warned=yes ;;
44057esac
44058    OBJDUMP=$ac_ct_OBJDUMP
44059  fi
44060fi
44061
44062    else
44063      # If it succeeded, then it was overridden by the user. We will use it
44064      # for the tool.
44065
44066      # First remove it from the list of overridden variables, so we can test
44067      # for unknown variables in the end.
44068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44069
44070      # Check if we try to supply an empty value
44071      if test "x$OBJDUMP" = x; then
44072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44073$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44075$as_echo_n "checking for OBJDUMP... " >&6; }
44076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44077$as_echo "disabled" >&6; }
44078      else
44079        # Check if the provided tool contains a complete path.
44080        tool_specified="$OBJDUMP"
44081        tool_basename="${tool_specified##*/}"
44082        if test "x$tool_basename" = "x$tool_specified"; then
44083          # A command without a complete path is provided, search $PATH.
44084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44085$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44086          # Extract the first word of "$tool_basename", so it can be a program name with args.
44087set dummy $tool_basename; ac_word=$2
44088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44089$as_echo_n "checking for $ac_word... " >&6; }
44090if ${ac_cv_path_OBJDUMP+:} false; then :
44091  $as_echo_n "(cached) " >&6
44092else
44093  case $OBJDUMP in
44094  [\\/]* | ?:[\\/]*)
44095  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44096  ;;
44097  *)
44098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44099for as_dir in $PATH
44100do
44101  IFS=$as_save_IFS
44102  test -z "$as_dir" && as_dir=.
44103    for ac_exec_ext in '' $ac_executable_extensions; do
44104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44105    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44107    break 2
44108  fi
44109done
44110  done
44111IFS=$as_save_IFS
44112
44113  ;;
44114esac
44115fi
44116OBJDUMP=$ac_cv_path_OBJDUMP
44117if test -n "$OBJDUMP"; then
44118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44119$as_echo "$OBJDUMP" >&6; }
44120else
44121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44122$as_echo "no" >&6; }
44123fi
44124
44125
44126          if test "x$OBJDUMP" = x; then
44127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44128          fi
44129        else
44130          # Otherwise we believe it is a complete path. Use it as it is.
44131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44132$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44134$as_echo_n "checking for OBJDUMP... " >&6; }
44135          if test ! -x "$tool_specified"; then
44136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44137$as_echo "not found" >&6; }
44138            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44139          fi
44140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44141$as_echo "$tool_specified" >&6; }
44142        fi
44143      fi
44144    fi
44145
44146  fi
44147
44148
44149  if test "x$OBJDUMP" != x; then
44150    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44151    # bails if argument is missing.
44152
44153  # Only process if variable expands to non-empty
44154
44155  if test "x$OBJDUMP" != x; then
44156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44157
44158  # First separate the path from the arguments. This will split at the first
44159  # space.
44160  complete="$OBJDUMP"
44161  path="${complete%% *}"
44162  tmp="$complete EOL"
44163  arguments="${tmp#* }"
44164
44165  # Input might be given as Windows format, start by converting to
44166  # unix format.
44167  new_path=`$CYGPATH -u "$path"`
44168
44169  # Now try to locate executable using which
44170  new_path=`$WHICH "$new_path" 2> /dev/null`
44171  # bat and cmd files are not always considered executable in cygwin causing which
44172  # to not find them
44173  if test "x$new_path" = x \
44174      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44175      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44176    new_path=`$CYGPATH -u "$path"`
44177  fi
44178  if test "x$new_path" = x; then
44179    # Oops. Which didn't find the executable.
44180    # The splitting of arguments from the executable at a space might have been incorrect,
44181    # since paths with space are more likely in Windows. Give it another try with the whole
44182    # argument.
44183    path="$complete"
44184    arguments="EOL"
44185    new_path=`$CYGPATH -u "$path"`
44186    new_path=`$WHICH "$new_path" 2> /dev/null`
44187    # bat and cmd files are not always considered executable in cygwin causing which
44188    # to not find them
44189    if test "x$new_path" = x \
44190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44192      new_path=`$CYGPATH -u "$path"`
44193    fi
44194    if test "x$new_path" = x; then
44195      # It's still not found. Now this is an unrecoverable error.
44196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44197$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44198      has_space=`$ECHO "$complete" | $GREP " "`
44199      if test "x$has_space" != x; then
44200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44202      fi
44203      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44204    fi
44205  fi
44206
44207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44210  # "foo.exe" is OK but "foo" is an error.
44211  #
44212  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44213  # It is also a way to make sure we got the proper file name for the real test later on.
44214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44215  if test "x$test_shortpath" = x; then
44216    # Short path failed, file does not exist as specified.
44217    # Try adding .exe or .cmd
44218    if test -f "${new_path}.exe"; then
44219      input_to_shortpath="${new_path}.exe"
44220    elif test -f "${new_path}.cmd"; then
44221      input_to_shortpath="${new_path}.cmd"
44222    else
44223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44224$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44227      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44228    fi
44229  else
44230    input_to_shortpath="$new_path"
44231  fi
44232
44233  # Call helper function which possibly converts this using DOS-style short mode.
44234  # If so, the updated path is stored in $new_path.
44235  new_path="$input_to_shortpath"
44236
44237  input_path="$input_to_shortpath"
44238  # Check if we need to convert this using DOS-style short mode. If the path
44239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44240  # take no chances and rewrite it.
44241  # Note: m4 eats our [], so we need to use [ and ] instead.
44242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44243  if test "x$has_forbidden_chars" != x; then
44244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44248      # Going to short mode and back again did indeed matter. Since short mode is
44249      # case insensitive, let's make it lowercase to improve readability.
44250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44251      # Now convert it back to Unix-style (cygpath)
44252      input_path=`$CYGPATH -u "$shortmode_path"`
44253      new_path="$input_path"
44254    fi
44255  fi
44256
44257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44258  if test "x$test_cygdrive_prefix" = x; then
44259    # As a simple fix, exclude /usr/bin since it's not a real path.
44260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44262      # a path prefixed by /cygdrive for fixpath to work.
44263      new_path="$CYGWIN_ROOT_PATH$input_path"
44264    fi
44265  fi
44266
44267  # remove trailing .exe if any
44268  new_path="${new_path/%.exe/}"
44269
44270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44271
44272  # First separate the path from the arguments. This will split at the first
44273  # space.
44274  complete="$OBJDUMP"
44275  path="${complete%% *}"
44276  tmp="$complete EOL"
44277  arguments="${tmp#* }"
44278
44279  # Input might be given as Windows format, start by converting to
44280  # unix format.
44281  new_path="$path"
44282
44283  windows_path="$new_path"
44284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44285    unix_path=`$CYGPATH -u "$windows_path"`
44286    new_path="$unix_path"
44287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44289    new_path="$unix_path"
44290  fi
44291
44292
44293  # Now try to locate executable using which
44294  new_path=`$WHICH "$new_path" 2> /dev/null`
44295
44296  if test "x$new_path" = x; then
44297    # Oops. Which didn't find the executable.
44298    # The splitting of arguments from the executable at a space might have been incorrect,
44299    # since paths with space are more likely in Windows. Give it another try with the whole
44300    # argument.
44301    path="$complete"
44302    arguments="EOL"
44303    new_path="$path"
44304
44305  windows_path="$new_path"
44306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44307    unix_path=`$CYGPATH -u "$windows_path"`
44308    new_path="$unix_path"
44309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44311    new_path="$unix_path"
44312  fi
44313
44314
44315    new_path=`$WHICH "$new_path" 2> /dev/null`
44316    # bat and cmd files are not always considered executable in MSYS causing which
44317    # to not find them
44318    if test "x$new_path" = x \
44319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44321      new_path="$path"
44322
44323  windows_path="$new_path"
44324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44325    unix_path=`$CYGPATH -u "$windows_path"`
44326    new_path="$unix_path"
44327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44329    new_path="$unix_path"
44330  fi
44331
44332    fi
44333
44334    if test "x$new_path" = x; then
44335      # It's still not found. Now this is an unrecoverable error.
44336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44337$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44338      has_space=`$ECHO "$complete" | $GREP " "`
44339      if test "x$has_space" != x; then
44340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44342      fi
44343      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44344    fi
44345  fi
44346
44347  # Now new_path has a complete unix path to the binary
44348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44349    # Keep paths in /bin as-is, but remove trailing .exe if any
44350    new_path="${new_path/%.exe/}"
44351    # Do not save /bin paths to all_fixpath_prefixes!
44352  else
44353    # Not in mixed or Windows style, start by that.
44354    new_path=`cmd //c echo $new_path`
44355
44356  input_path="$new_path"
44357  # Check if we need to convert this using DOS-style short mode. If the path
44358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44359  # take no chances and rewrite it.
44360  # Note: m4 eats our [], so we need to use [ and ] instead.
44361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44362  if test "x$has_forbidden_chars" != x; then
44363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44365  fi
44366
44367    # Output is in $new_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    # remove trailing .exe if any
44379    new_path="${new_path/%.exe/}"
44380
44381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44383  fi
44384
44385    else
44386      # We're on a unix platform. Hooray! :)
44387      # First separate the path from the arguments. This will split at the first
44388      # space.
44389      complete="$OBJDUMP"
44390      path="${complete%% *}"
44391      tmp="$complete EOL"
44392      arguments="${tmp#* }"
44393
44394      # Cannot rely on the command "which" here since it doesn't always work.
44395      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44396      if test -z "$is_absolute_path"; then
44397        # Path to executable is not absolute. Find it.
44398        IFS_save="$IFS"
44399        IFS=:
44400        for p in $PATH; do
44401          if test -f "$p/$path" && test -x "$p/$path"; then
44402            new_path="$p/$path"
44403            break
44404          fi
44405        done
44406        IFS="$IFS_save"
44407      else
44408        # This is an absolute path, we can use it without further modifications.
44409        new_path="$path"
44410      fi
44411
44412      if test "x$new_path" = x; then
44413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44414$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44415        has_space=`$ECHO "$complete" | $GREP " "`
44416        if test "x$has_space" != x; then
44417          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44419        fi
44420        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44421      fi
44422    fi
44423
44424    # Now join together the path and the arguments once again
44425    if test "x$arguments" != xEOL; then
44426      new_complete="$new_path ${arguments% *}"
44427    else
44428      new_complete="$new_path"
44429    fi
44430
44431    if test "x$complete" != "x$new_complete"; then
44432      OBJDUMP="$new_complete"
44433      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44434$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44435    fi
44436  fi
44437
44438  fi
44439
44440
44441  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44442  # to remain in place. Otherwise the compiler will not work in some siutations
44443  # in later configure checks.
44444  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44445    PATH="$OLD_PATH"
44446  fi
44447
44448  # Restore the flags to the user specified values.
44449  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44450  CFLAGS="$ORG_CFLAGS"
44451  CXXFLAGS="$ORG_CXXFLAGS"
44452
44453
44454# Finally do some processing after the detection phase
44455
44456  if test "x$COMPILE_TYPE" = "xcross"; then
44457    # Now we need to find a C/C++ compiler that can build executables for the
44458    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44459    # used once. Also, we need to do this without adding a tools dir to the
44460    # path, otherwise we might pick up cross-compilers which don't use standard
44461    # naming.
44462
44463    OLDPATH="$PATH"
44464
44465
44466# Check whether --with-build-devkit was given.
44467if test "${with_build_devkit+set}" = set; then :
44468  withval=$with_build_devkit;
44469fi
44470
44471    if test "x$with_build_devkit" = "xyes"; then
44472      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44473    elif test -n "$with_build_devkit"; then
44474      if test ! -d "$with_build_devkit"; then
44475        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44476      else
44477
44478  # Only process if variable expands to non-empty
44479
44480  if test "x$with_build_devkit" != x; then
44481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44482
44483  # Input might be given as Windows format, start by converting to
44484  # unix format.
44485  path="$with_build_devkit"
44486  new_path=`$CYGPATH -u "$path"`
44487
44488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44491  # "foo.exe" is OK but "foo" is an error.
44492  #
44493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44494  # It is also a way to make sure we got the proper file name for the real test later on.
44495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44496  if test "x$test_shortpath" = x; then
44497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44498$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44499    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44500  fi
44501
44502  # Call helper function which possibly converts this using DOS-style short mode.
44503  # If so, the updated path is stored in $new_path.
44504
44505  input_path="$new_path"
44506  # Check if we need to convert this using DOS-style short mode. If the path
44507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44508  # take no chances and rewrite it.
44509  # Note: m4 eats our [], so we need to use [ and ] instead.
44510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44511  if test "x$has_forbidden_chars" != x; then
44512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44516      # Going to short mode and back again did indeed matter. Since short mode is
44517      # case insensitive, let's make it lowercase to improve readability.
44518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44519      # Now convert it back to Unix-style (cygpath)
44520      input_path=`$CYGPATH -u "$shortmode_path"`
44521      new_path="$input_path"
44522    fi
44523  fi
44524
44525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44526  if test "x$test_cygdrive_prefix" = x; then
44527    # As a simple fix, exclude /usr/bin since it's not a real path.
44528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44530      # a path prefixed by /cygdrive for fixpath to work.
44531      new_path="$CYGWIN_ROOT_PATH$input_path"
44532    fi
44533  fi
44534
44535
44536  if test "x$path" != "x$new_path"; then
44537    with_build_devkit="$new_path"
44538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44539$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44540  fi
44541
44542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44543
44544  path="$with_build_devkit"
44545  has_colon=`$ECHO $path | $GREP ^.:`
44546  new_path="$path"
44547  if test "x$has_colon" = x; then
44548    # Not in mixed or Windows style, start by that.
44549    new_path=`cmd //c echo $path`
44550  fi
44551
44552
44553  input_path="$new_path"
44554  # Check if we need to convert this using DOS-style short mode. If the path
44555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44556  # take no chances and rewrite it.
44557  # Note: m4 eats our [], so we need to use [ and ] instead.
44558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44559  if test "x$has_forbidden_chars" != x; then
44560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44562  fi
44563
44564
44565  windows_path="$new_path"
44566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44567    unix_path=`$CYGPATH -u "$windows_path"`
44568    new_path="$unix_path"
44569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44571    new_path="$unix_path"
44572  fi
44573
44574  if test "x$path" != "x$new_path"; then
44575    with_build_devkit="$new_path"
44576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44577$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44578  fi
44579
44580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44582
44583    else
44584      # We're on a unix platform. Hooray! :)
44585      path="$with_build_devkit"
44586      has_space=`$ECHO "$path" | $GREP " "`
44587      if test "x$has_space" != x; then
44588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44589$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44591      fi
44592
44593      # Use eval to expand a potential ~
44594      eval path="$path"
44595      if test ! -f "$path" && test ! -d "$path"; then
44596        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44597      fi
44598
44599      if test -d "$path"; then
44600        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44601      else
44602        dir="`$DIRNAME "$path"`"
44603        base="`$BASENAME "$path"`"
44604        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44605      fi
44606    fi
44607  fi
44608
44609        BUILD_DEVKIT_ROOT="$with_build_devkit"
44610        # Check for a meta data info file in the root of the devkit
44611        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44612          # Process devkit.info so that existing devkit variables are not
44613          # modified by this
44614          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44615              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44616              -e "s/\$host/\$build/g" \
44617              $BUILD_DEVKIT_ROOT/devkit.info \
44618              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44619          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44620          # This potentially sets the following:
44621          # A descriptive name of the devkit
44622
44623  if test "x$BUILD_DEVKIT_NAME" = x; then
44624    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44625  fi
44626
44627          # Corresponds to --with-extra-path
44628
44629  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44630    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44631  fi
44632
44633          # Corresponds to --with-toolchain-path
44634
44635  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44636    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44637  fi
44638
44639          # Corresponds to --with-sysroot
44640
44641  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44642    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44643  fi
44644
44645          # Skip the Window specific parts
44646        fi
44647
44648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44649$as_echo_n "checking for build platform devkit... " >&6; }
44650        if test "x$BUILD_DEVKIT_NAME" != x; then
44651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44652$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44653        else
44654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44655$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44656        fi
44657
44658        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44659
44660  if test "x$BUILD_SYSROOT" != "x"; then
44661    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44662      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44663        # Solaris Studio does not have a concept of sysroot. Instead we must
44664        # make sure the default include and lib dirs are appended to each
44665        # compile and link command line. Must also add -I-xbuiltin to enable
44666        # inlining of system functions and intrinsics.
44667        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44668        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44669            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44670      fi
44671    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44672      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44673      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44674    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44675      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44676      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44677    fi
44678    # The global CFLAGS and LDFLAGS variables need these for configure to function
44679    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44680    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44681    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44682    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44683  fi
44684
44685  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44686    # We also need -iframework<path>/System/Library/Frameworks
44687    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44688    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44689    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44690    # set this here so it doesn't have to be peppered throughout the forest
44691    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44692    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44693  fi
44694
44695
44696
44697
44698
44699         # Fallback default of just /bin if DEVKIT_PATH is not defined
44700        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44701          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44702        fi
44703        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44704      fi
44705    fi
44706
44707    # FIXME: we should list the discovered compilers as an exclude pattern!
44708    # If we do that, we can do this detection before POST_DETECTION, and still
44709    # find the build compilers in the tools dir, if needed.
44710
44711
44712
44713  # Publish this variable in the help.
44714
44715
44716  if [ -z "${BUILD_CC+x}" ]; then
44717    # The variable is not set by user, try to locate tool using the code snippet
44718    for ac_prog in cl cc gcc
44719do
44720  # Extract the first word of "$ac_prog", so it can be a program name with args.
44721set dummy $ac_prog; ac_word=$2
44722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44723$as_echo_n "checking for $ac_word... " >&6; }
44724if ${ac_cv_path_BUILD_CC+:} false; then :
44725  $as_echo_n "(cached) " >&6
44726else
44727  case $BUILD_CC in
44728  [\\/]* | ?:[\\/]*)
44729  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44730  ;;
44731  *)
44732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44733for as_dir in $PATH
44734do
44735  IFS=$as_save_IFS
44736  test -z "$as_dir" && as_dir=.
44737    for ac_exec_ext in '' $ac_executable_extensions; do
44738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44739    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44741    break 2
44742  fi
44743done
44744  done
44745IFS=$as_save_IFS
44746
44747  ;;
44748esac
44749fi
44750BUILD_CC=$ac_cv_path_BUILD_CC
44751if test -n "$BUILD_CC"; then
44752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44753$as_echo "$BUILD_CC" >&6; }
44754else
44755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44756$as_echo "no" >&6; }
44757fi
44758
44759
44760  test -n "$BUILD_CC" && break
44761done
44762
44763  else
44764    # The variable is set, but is it from the command line or the environment?
44765
44766    # Try to remove the string !BUILD_CC! from our list.
44767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44769      # If it failed, the variable was not from the command line. Ignore it,
44770      # but warn the user (except for BASH, which is always set by the calling BASH).
44771      if test "xBUILD_CC" != xBASH; then
44772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44773$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44774      fi
44775      # Try to locate tool using the code snippet
44776      for ac_prog in cl cc gcc
44777do
44778  # Extract the first word of "$ac_prog", so it can be a program name with args.
44779set dummy $ac_prog; ac_word=$2
44780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44781$as_echo_n "checking for $ac_word... " >&6; }
44782if ${ac_cv_path_BUILD_CC+:} false; then :
44783  $as_echo_n "(cached) " >&6
44784else
44785  case $BUILD_CC in
44786  [\\/]* | ?:[\\/]*)
44787  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44788  ;;
44789  *)
44790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44791for as_dir in $PATH
44792do
44793  IFS=$as_save_IFS
44794  test -z "$as_dir" && as_dir=.
44795    for ac_exec_ext in '' $ac_executable_extensions; do
44796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44797    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44799    break 2
44800  fi
44801done
44802  done
44803IFS=$as_save_IFS
44804
44805  ;;
44806esac
44807fi
44808BUILD_CC=$ac_cv_path_BUILD_CC
44809if test -n "$BUILD_CC"; then
44810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44811$as_echo "$BUILD_CC" >&6; }
44812else
44813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44814$as_echo "no" >&6; }
44815fi
44816
44817
44818  test -n "$BUILD_CC" && break
44819done
44820
44821    else
44822      # If it succeeded, then it was overridden by the user. We will use it
44823      # for the tool.
44824
44825      # First remove it from the list of overridden variables, so we can test
44826      # for unknown variables in the end.
44827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44828
44829      # Check if we try to supply an empty value
44830      if test "x$BUILD_CC" = x; then
44831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44832$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44834$as_echo_n "checking for BUILD_CC... " >&6; }
44835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44836$as_echo "disabled" >&6; }
44837      else
44838        # Check if the provided tool contains a complete path.
44839        tool_specified="$BUILD_CC"
44840        tool_basename="${tool_specified##*/}"
44841        if test "x$tool_basename" = "x$tool_specified"; then
44842          # A command without a complete path is provided, search $PATH.
44843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44844$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44845          # Extract the first word of "$tool_basename", so it can be a program name with args.
44846set dummy $tool_basename; ac_word=$2
44847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44848$as_echo_n "checking for $ac_word... " >&6; }
44849if ${ac_cv_path_BUILD_CC+:} false; then :
44850  $as_echo_n "(cached) " >&6
44851else
44852  case $BUILD_CC in
44853  [\\/]* | ?:[\\/]*)
44854  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44855  ;;
44856  *)
44857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44858for as_dir in $PATH
44859do
44860  IFS=$as_save_IFS
44861  test -z "$as_dir" && as_dir=.
44862    for ac_exec_ext in '' $ac_executable_extensions; do
44863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44864    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44866    break 2
44867  fi
44868done
44869  done
44870IFS=$as_save_IFS
44871
44872  ;;
44873esac
44874fi
44875BUILD_CC=$ac_cv_path_BUILD_CC
44876if test -n "$BUILD_CC"; then
44877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44878$as_echo "$BUILD_CC" >&6; }
44879else
44880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44881$as_echo "no" >&6; }
44882fi
44883
44884
44885          if test "x$BUILD_CC" = x; then
44886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44887          fi
44888        else
44889          # Otherwise we believe it is a complete path. Use it as it is.
44890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44891$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44893$as_echo_n "checking for BUILD_CC... " >&6; }
44894          if test ! -x "$tool_specified"; then
44895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44896$as_echo "not found" >&6; }
44897            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44898          fi
44899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44900$as_echo "$tool_specified" >&6; }
44901        fi
44902      fi
44903    fi
44904
44905  fi
44906
44907
44908
44909  if test "x$BUILD_CC" = x; then
44910    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44911  fi
44912
44913
44914
44915  # Only process if variable expands to non-empty
44916
44917  if test "x$BUILD_CC" != x; then
44918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919
44920  # First separate the path from the arguments. This will split at the first
44921  # space.
44922  complete="$BUILD_CC"
44923  path="${complete%% *}"
44924  tmp="$complete EOL"
44925  arguments="${tmp#* }"
44926
44927  # Input might be given as Windows format, start by converting to
44928  # unix format.
44929  new_path=`$CYGPATH -u "$path"`
44930
44931  # Now try to locate executable using which
44932  new_path=`$WHICH "$new_path" 2> /dev/null`
44933  # bat and cmd files are not always considered executable in cygwin causing which
44934  # to not find them
44935  if test "x$new_path" = x \
44936      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44937      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44938    new_path=`$CYGPATH -u "$path"`
44939  fi
44940  if test "x$new_path" = x; then
44941    # Oops. Which didn't find the executable.
44942    # The splitting of arguments from the executable at a space might have been incorrect,
44943    # since paths with space are more likely in Windows. Give it another try with the whole
44944    # argument.
44945    path="$complete"
44946    arguments="EOL"
44947    new_path=`$CYGPATH -u "$path"`
44948    new_path=`$WHICH "$new_path" 2> /dev/null`
44949    # bat and cmd files are not always considered executable in cygwin causing which
44950    # to not find them
44951    if test "x$new_path" = x \
44952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44954      new_path=`$CYGPATH -u "$path"`
44955    fi
44956    if test "x$new_path" = x; then
44957      # It's still not found. Now this is an unrecoverable error.
44958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44959$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44960      has_space=`$ECHO "$complete" | $GREP " "`
44961      if test "x$has_space" != x; then
44962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44964      fi
44965      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44966    fi
44967  fi
44968
44969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44972  # "foo.exe" is OK but "foo" is an error.
44973  #
44974  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44975  # It is also a way to make sure we got the proper file name for the real test later on.
44976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44977  if test "x$test_shortpath" = x; then
44978    # Short path failed, file does not exist as specified.
44979    # Try adding .exe or .cmd
44980    if test -f "${new_path}.exe"; then
44981      input_to_shortpath="${new_path}.exe"
44982    elif test -f "${new_path}.cmd"; then
44983      input_to_shortpath="${new_path}.cmd"
44984    else
44985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44986$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44989      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44990    fi
44991  else
44992    input_to_shortpath="$new_path"
44993  fi
44994
44995  # Call helper function which possibly converts this using DOS-style short mode.
44996  # If so, the updated path is stored in $new_path.
44997  new_path="$input_to_shortpath"
44998
44999  input_path="$input_to_shortpath"
45000  # Check if we need to convert this using DOS-style short mode. If the path
45001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45002  # take no chances and rewrite it.
45003  # Note: m4 eats our [], so we need to use [ and ] instead.
45004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45005  if test "x$has_forbidden_chars" != x; then
45006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45010      # Going to short mode and back again did indeed matter. Since short mode is
45011      # case insensitive, let's make it lowercase to improve readability.
45012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45013      # Now convert it back to Unix-style (cygpath)
45014      input_path=`$CYGPATH -u "$shortmode_path"`
45015      new_path="$input_path"
45016    fi
45017  fi
45018
45019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45020  if test "x$test_cygdrive_prefix" = x; then
45021    # As a simple fix, exclude /usr/bin since it's not a real path.
45022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45024      # a path prefixed by /cygdrive for fixpath to work.
45025      new_path="$CYGWIN_ROOT_PATH$input_path"
45026    fi
45027  fi
45028
45029  # remove trailing .exe if any
45030  new_path="${new_path/%.exe/}"
45031
45032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45033
45034  # First separate the path from the arguments. This will split at the first
45035  # space.
45036  complete="$BUILD_CC"
45037  path="${complete%% *}"
45038  tmp="$complete EOL"
45039  arguments="${tmp#* }"
45040
45041  # Input might be given as Windows format, start by converting to
45042  # unix format.
45043  new_path="$path"
45044
45045  windows_path="$new_path"
45046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45047    unix_path=`$CYGPATH -u "$windows_path"`
45048    new_path="$unix_path"
45049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45051    new_path="$unix_path"
45052  fi
45053
45054
45055  # Now try to locate executable using which
45056  new_path=`$WHICH "$new_path" 2> /dev/null`
45057
45058  if test "x$new_path" = x; then
45059    # Oops. Which didn't find the executable.
45060    # The splitting of arguments from the executable at a space might have been incorrect,
45061    # since paths with space are more likely in Windows. Give it another try with the whole
45062    # argument.
45063    path="$complete"
45064    arguments="EOL"
45065    new_path="$path"
45066
45067  windows_path="$new_path"
45068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45069    unix_path=`$CYGPATH -u "$windows_path"`
45070    new_path="$unix_path"
45071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45073    new_path="$unix_path"
45074  fi
45075
45076
45077    new_path=`$WHICH "$new_path" 2> /dev/null`
45078    # bat and cmd files are not always considered executable in MSYS causing which
45079    # to not find them
45080    if test "x$new_path" = x \
45081        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45082        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45083      new_path="$path"
45084
45085  windows_path="$new_path"
45086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45087    unix_path=`$CYGPATH -u "$windows_path"`
45088    new_path="$unix_path"
45089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45091    new_path="$unix_path"
45092  fi
45093
45094    fi
45095
45096    if test "x$new_path" = x; then
45097      # It's still not found. Now this is an unrecoverable error.
45098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45099$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45100      has_space=`$ECHO "$complete" | $GREP " "`
45101      if test "x$has_space" != x; then
45102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45104      fi
45105      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45106    fi
45107  fi
45108
45109  # Now new_path has a complete unix path to the binary
45110  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45111    # Keep paths in /bin as-is, but remove trailing .exe if any
45112    new_path="${new_path/%.exe/}"
45113    # Do not save /bin paths to all_fixpath_prefixes!
45114  else
45115    # Not in mixed or Windows style, start by that.
45116    new_path=`cmd //c echo $new_path`
45117
45118  input_path="$new_path"
45119  # Check if we need to convert this using DOS-style short mode. If the path
45120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45121  # take no chances and rewrite it.
45122  # Note: m4 eats our [], so we need to use [ and ] instead.
45123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45124  if test "x$has_forbidden_chars" != x; then
45125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45127  fi
45128
45129    # Output is in $new_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    # remove trailing .exe if any
45141    new_path="${new_path/%.exe/}"
45142
45143    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45144    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45145  fi
45146
45147    else
45148      # We're on a unix platform. Hooray! :)
45149      # First separate the path from the arguments. This will split at the first
45150      # space.
45151      complete="$BUILD_CC"
45152      path="${complete%% *}"
45153      tmp="$complete EOL"
45154      arguments="${tmp#* }"
45155
45156      # Cannot rely on the command "which" here since it doesn't always work.
45157      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45158      if test -z "$is_absolute_path"; then
45159        # Path to executable is not absolute. Find it.
45160        IFS_save="$IFS"
45161        IFS=:
45162        for p in $PATH; do
45163          if test -f "$p/$path" && test -x "$p/$path"; then
45164            new_path="$p/$path"
45165            break
45166          fi
45167        done
45168        IFS="$IFS_save"
45169      else
45170        # This is an absolute path, we can use it without further modifications.
45171        new_path="$path"
45172      fi
45173
45174      if test "x$new_path" = x; then
45175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45176$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45177        has_space=`$ECHO "$complete" | $GREP " "`
45178        if test "x$has_space" != x; then
45179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45181        fi
45182        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45183      fi
45184    fi
45185
45186    # Now join together the path and the arguments once again
45187    if test "x$arguments" != xEOL; then
45188      new_complete="$new_path ${arguments% *}"
45189    else
45190      new_complete="$new_path"
45191    fi
45192
45193    if test "x$complete" != "x$new_complete"; then
45194      BUILD_CC="$new_complete"
45195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45196$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45197    fi
45198  fi
45199
45200
45201
45202
45203  # Publish this variable in the help.
45204
45205
45206  if [ -z "${BUILD_CXX+x}" ]; then
45207    # The variable is not set by user, try to locate tool using the code snippet
45208    for ac_prog in cl CC g++
45209do
45210  # Extract the first word of "$ac_prog", so it can be a program name with args.
45211set dummy $ac_prog; ac_word=$2
45212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45213$as_echo_n "checking for $ac_word... " >&6; }
45214if ${ac_cv_path_BUILD_CXX+:} false; then :
45215  $as_echo_n "(cached) " >&6
45216else
45217  case $BUILD_CXX in
45218  [\\/]* | ?:[\\/]*)
45219  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45220  ;;
45221  *)
45222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45223for as_dir in $PATH
45224do
45225  IFS=$as_save_IFS
45226  test -z "$as_dir" && as_dir=.
45227    for ac_exec_ext in '' $ac_executable_extensions; do
45228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45229    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45231    break 2
45232  fi
45233done
45234  done
45235IFS=$as_save_IFS
45236
45237  ;;
45238esac
45239fi
45240BUILD_CXX=$ac_cv_path_BUILD_CXX
45241if test -n "$BUILD_CXX"; then
45242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45243$as_echo "$BUILD_CXX" >&6; }
45244else
45245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45246$as_echo "no" >&6; }
45247fi
45248
45249
45250  test -n "$BUILD_CXX" && break
45251done
45252
45253  else
45254    # The variable is set, but is it from the command line or the environment?
45255
45256    # Try to remove the string !BUILD_CXX! from our list.
45257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45259      # If it failed, the variable was not from the command line. Ignore it,
45260      # but warn the user (except for BASH, which is always set by the calling BASH).
45261      if test "xBUILD_CXX" != xBASH; then
45262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45263$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45264      fi
45265      # Try to locate tool using the code snippet
45266      for ac_prog in cl CC g++
45267do
45268  # Extract the first word of "$ac_prog", so it can be a program name with args.
45269set dummy $ac_prog; ac_word=$2
45270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45271$as_echo_n "checking for $ac_word... " >&6; }
45272if ${ac_cv_path_BUILD_CXX+:} false; then :
45273  $as_echo_n "(cached) " >&6
45274else
45275  case $BUILD_CXX in
45276  [\\/]* | ?:[\\/]*)
45277  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45278  ;;
45279  *)
45280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45281for as_dir in $PATH
45282do
45283  IFS=$as_save_IFS
45284  test -z "$as_dir" && as_dir=.
45285    for ac_exec_ext in '' $ac_executable_extensions; do
45286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45287    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45289    break 2
45290  fi
45291done
45292  done
45293IFS=$as_save_IFS
45294
45295  ;;
45296esac
45297fi
45298BUILD_CXX=$ac_cv_path_BUILD_CXX
45299if test -n "$BUILD_CXX"; then
45300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45301$as_echo "$BUILD_CXX" >&6; }
45302else
45303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45304$as_echo "no" >&6; }
45305fi
45306
45307
45308  test -n "$BUILD_CXX" && break
45309done
45310
45311    else
45312      # If it succeeded, then it was overridden by the user. We will use it
45313      # for the tool.
45314
45315      # First remove it from the list of overridden variables, so we can test
45316      # for unknown variables in the end.
45317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45318
45319      # Check if we try to supply an empty value
45320      if test "x$BUILD_CXX" = x; then
45321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45322$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45324$as_echo_n "checking for BUILD_CXX... " >&6; }
45325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45326$as_echo "disabled" >&6; }
45327      else
45328        # Check if the provided tool contains a complete path.
45329        tool_specified="$BUILD_CXX"
45330        tool_basename="${tool_specified##*/}"
45331        if test "x$tool_basename" = "x$tool_specified"; then
45332          # A command without a complete path is provided, search $PATH.
45333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45334$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45335          # Extract the first word of "$tool_basename", so it can be a program name with args.
45336set dummy $tool_basename; ac_word=$2
45337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45338$as_echo_n "checking for $ac_word... " >&6; }
45339if ${ac_cv_path_BUILD_CXX+:} false; then :
45340  $as_echo_n "(cached) " >&6
45341else
45342  case $BUILD_CXX in
45343  [\\/]* | ?:[\\/]*)
45344  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45345  ;;
45346  *)
45347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45348for as_dir in $PATH
45349do
45350  IFS=$as_save_IFS
45351  test -z "$as_dir" && as_dir=.
45352    for ac_exec_ext in '' $ac_executable_extensions; do
45353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45354    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45356    break 2
45357  fi
45358done
45359  done
45360IFS=$as_save_IFS
45361
45362  ;;
45363esac
45364fi
45365BUILD_CXX=$ac_cv_path_BUILD_CXX
45366if test -n "$BUILD_CXX"; then
45367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45368$as_echo "$BUILD_CXX" >&6; }
45369else
45370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45371$as_echo "no" >&6; }
45372fi
45373
45374
45375          if test "x$BUILD_CXX" = x; then
45376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45377          fi
45378        else
45379          # Otherwise we believe it is a complete path. Use it as it is.
45380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45381$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45383$as_echo_n "checking for BUILD_CXX... " >&6; }
45384          if test ! -x "$tool_specified"; then
45385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45386$as_echo "not found" >&6; }
45387            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45388          fi
45389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45390$as_echo "$tool_specified" >&6; }
45391        fi
45392      fi
45393    fi
45394
45395  fi
45396
45397
45398
45399  if test "x$BUILD_CXX" = x; then
45400    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45401  fi
45402
45403
45404
45405  # Only process if variable expands to non-empty
45406
45407  if test "x$BUILD_CXX" != x; then
45408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45409
45410  # First separate the path from the arguments. This will split at the first
45411  # space.
45412  complete="$BUILD_CXX"
45413  path="${complete%% *}"
45414  tmp="$complete EOL"
45415  arguments="${tmp#* }"
45416
45417  # Input might be given as Windows format, start by converting to
45418  # unix format.
45419  new_path=`$CYGPATH -u "$path"`
45420
45421  # Now try to locate executable using which
45422  new_path=`$WHICH "$new_path" 2> /dev/null`
45423  # bat and cmd files are not always considered executable in cygwin causing which
45424  # to not find them
45425  if test "x$new_path" = x \
45426      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45427      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45428    new_path=`$CYGPATH -u "$path"`
45429  fi
45430  if test "x$new_path" = x; then
45431    # Oops. Which didn't find the executable.
45432    # The splitting of arguments from the executable at a space might have been incorrect,
45433    # since paths with space are more likely in Windows. Give it another try with the whole
45434    # argument.
45435    path="$complete"
45436    arguments="EOL"
45437    new_path=`$CYGPATH -u "$path"`
45438    new_path=`$WHICH "$new_path" 2> /dev/null`
45439    # bat and cmd files are not always considered executable in cygwin causing which
45440    # to not find them
45441    if test "x$new_path" = x \
45442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45444      new_path=`$CYGPATH -u "$path"`
45445    fi
45446    if test "x$new_path" = x; then
45447      # It's still not found. Now this is an unrecoverable error.
45448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45449$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45450      has_space=`$ECHO "$complete" | $GREP " "`
45451      if test "x$has_space" != x; then
45452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45454      fi
45455      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45456    fi
45457  fi
45458
45459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45462  # "foo.exe" is OK but "foo" is an error.
45463  #
45464  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45465  # It is also a way to make sure we got the proper file name for the real test later on.
45466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45467  if test "x$test_shortpath" = x; then
45468    # Short path failed, file does not exist as specified.
45469    # Try adding .exe or .cmd
45470    if test -f "${new_path}.exe"; then
45471      input_to_shortpath="${new_path}.exe"
45472    elif test -f "${new_path}.cmd"; then
45473      input_to_shortpath="${new_path}.cmd"
45474    else
45475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45476$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45479      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45480    fi
45481  else
45482    input_to_shortpath="$new_path"
45483  fi
45484
45485  # Call helper function which possibly converts this using DOS-style short mode.
45486  # If so, the updated path is stored in $new_path.
45487  new_path="$input_to_shortpath"
45488
45489  input_path="$input_to_shortpath"
45490  # Check if we need to convert this using DOS-style short mode. If the path
45491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45492  # take no chances and rewrite it.
45493  # Note: m4 eats our [], so we need to use [ and ] instead.
45494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45495  if test "x$has_forbidden_chars" != x; then
45496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45500      # Going to short mode and back again did indeed matter. Since short mode is
45501      # case insensitive, let's make it lowercase to improve readability.
45502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45503      # Now convert it back to Unix-style (cygpath)
45504      input_path=`$CYGPATH -u "$shortmode_path"`
45505      new_path="$input_path"
45506    fi
45507  fi
45508
45509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45510  if test "x$test_cygdrive_prefix" = x; then
45511    # As a simple fix, exclude /usr/bin since it's not a real path.
45512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45514      # a path prefixed by /cygdrive for fixpath to work.
45515      new_path="$CYGWIN_ROOT_PATH$input_path"
45516    fi
45517  fi
45518
45519  # remove trailing .exe if any
45520  new_path="${new_path/%.exe/}"
45521
45522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45523
45524  # First separate the path from the arguments. This will split at the first
45525  # space.
45526  complete="$BUILD_CXX"
45527  path="${complete%% *}"
45528  tmp="$complete EOL"
45529  arguments="${tmp#* }"
45530
45531  # Input might be given as Windows format, start by converting to
45532  # unix format.
45533  new_path="$path"
45534
45535  windows_path="$new_path"
45536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45537    unix_path=`$CYGPATH -u "$windows_path"`
45538    new_path="$unix_path"
45539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45541    new_path="$unix_path"
45542  fi
45543
45544
45545  # Now try to locate executable using which
45546  new_path=`$WHICH "$new_path" 2> /dev/null`
45547
45548  if test "x$new_path" = x; then
45549    # Oops. Which didn't find the executable.
45550    # The splitting of arguments from the executable at a space might have been incorrect,
45551    # since paths with space are more likely in Windows. Give it another try with the whole
45552    # argument.
45553    path="$complete"
45554    arguments="EOL"
45555    new_path="$path"
45556
45557  windows_path="$new_path"
45558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45559    unix_path=`$CYGPATH -u "$windows_path"`
45560    new_path="$unix_path"
45561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45563    new_path="$unix_path"
45564  fi
45565
45566
45567    new_path=`$WHICH "$new_path" 2> /dev/null`
45568    # bat and cmd files are not always considered executable in MSYS causing which
45569    # to not find them
45570    if test "x$new_path" = x \
45571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45573      new_path="$path"
45574
45575  windows_path="$new_path"
45576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45577    unix_path=`$CYGPATH -u "$windows_path"`
45578    new_path="$unix_path"
45579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45581    new_path="$unix_path"
45582  fi
45583
45584    fi
45585
45586    if test "x$new_path" = x; then
45587      # It's still not found. Now this is an unrecoverable error.
45588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45589$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45590      has_space=`$ECHO "$complete" | $GREP " "`
45591      if test "x$has_space" != x; then
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45594      fi
45595      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45596    fi
45597  fi
45598
45599  # Now new_path has a complete unix path to the binary
45600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45601    # Keep paths in /bin as-is, but remove trailing .exe if any
45602    new_path="${new_path/%.exe/}"
45603    # Do not save /bin paths to all_fixpath_prefixes!
45604  else
45605    # Not in mixed or Windows style, start by that.
45606    new_path=`cmd //c echo $new_path`
45607
45608  input_path="$new_path"
45609  # Check if we need to convert this using DOS-style short mode. If the path
45610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45611  # take no chances and rewrite it.
45612  # Note: m4 eats our [], so we need to use [ and ] instead.
45613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45614  if test "x$has_forbidden_chars" != x; then
45615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45617  fi
45618
45619    # Output is in $new_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    # remove trailing .exe if any
45631    new_path="${new_path/%.exe/}"
45632
45633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45635  fi
45636
45637    else
45638      # We're on a unix platform. Hooray! :)
45639      # First separate the path from the arguments. This will split at the first
45640      # space.
45641      complete="$BUILD_CXX"
45642      path="${complete%% *}"
45643      tmp="$complete EOL"
45644      arguments="${tmp#* }"
45645
45646      # Cannot rely on the command "which" here since it doesn't always work.
45647      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45648      if test -z "$is_absolute_path"; then
45649        # Path to executable is not absolute. Find it.
45650        IFS_save="$IFS"
45651        IFS=:
45652        for p in $PATH; do
45653          if test -f "$p/$path" && test -x "$p/$path"; then
45654            new_path="$p/$path"
45655            break
45656          fi
45657        done
45658        IFS="$IFS_save"
45659      else
45660        # This is an absolute path, we can use it without further modifications.
45661        new_path="$path"
45662      fi
45663
45664      if test "x$new_path" = x; then
45665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45666$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45667        has_space=`$ECHO "$complete" | $GREP " "`
45668        if test "x$has_space" != x; then
45669          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45671        fi
45672        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45673      fi
45674    fi
45675
45676    # Now join together the path and the arguments once again
45677    if test "x$arguments" != xEOL; then
45678      new_complete="$new_path ${arguments% *}"
45679    else
45680      new_complete="$new_path"
45681    fi
45682
45683    if test "x$complete" != "x$new_complete"; then
45684      BUILD_CXX="$new_complete"
45685      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45686$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45687    fi
45688  fi
45689
45690
45691
45692  # Publish this variable in the help.
45693
45694
45695  if [ -z "${BUILD_NM+x}" ]; then
45696    # The variable is not set by user, try to locate tool using the code snippet
45697    for ac_prog in nm gcc-nm
45698do
45699  # Extract the first word of "$ac_prog", so it can be a program name with args.
45700set dummy $ac_prog; ac_word=$2
45701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45702$as_echo_n "checking for $ac_word... " >&6; }
45703if ${ac_cv_path_BUILD_NM+:} false; then :
45704  $as_echo_n "(cached) " >&6
45705else
45706  case $BUILD_NM in
45707  [\\/]* | ?:[\\/]*)
45708  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45709  ;;
45710  *)
45711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45712for as_dir in $PATH
45713do
45714  IFS=$as_save_IFS
45715  test -z "$as_dir" && as_dir=.
45716    for ac_exec_ext in '' $ac_executable_extensions; do
45717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45718    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45720    break 2
45721  fi
45722done
45723  done
45724IFS=$as_save_IFS
45725
45726  ;;
45727esac
45728fi
45729BUILD_NM=$ac_cv_path_BUILD_NM
45730if test -n "$BUILD_NM"; then
45731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45732$as_echo "$BUILD_NM" >&6; }
45733else
45734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45735$as_echo "no" >&6; }
45736fi
45737
45738
45739  test -n "$BUILD_NM" && break
45740done
45741
45742  else
45743    # The variable is set, but is it from the command line or the environment?
45744
45745    # Try to remove the string !BUILD_NM! from our list.
45746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45748      # If it failed, the variable was not from the command line. Ignore it,
45749      # but warn the user (except for BASH, which is always set by the calling BASH).
45750      if test "xBUILD_NM" != xBASH; then
45751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45752$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45753      fi
45754      # Try to locate tool using the code snippet
45755      for ac_prog in nm gcc-nm
45756do
45757  # Extract the first word of "$ac_prog", so it can be a program name with args.
45758set dummy $ac_prog; ac_word=$2
45759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45760$as_echo_n "checking for $ac_word... " >&6; }
45761if ${ac_cv_path_BUILD_NM+:} false; then :
45762  $as_echo_n "(cached) " >&6
45763else
45764  case $BUILD_NM in
45765  [\\/]* | ?:[\\/]*)
45766  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45767  ;;
45768  *)
45769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45770for as_dir in $PATH
45771do
45772  IFS=$as_save_IFS
45773  test -z "$as_dir" && as_dir=.
45774    for ac_exec_ext in '' $ac_executable_extensions; do
45775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45776    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45778    break 2
45779  fi
45780done
45781  done
45782IFS=$as_save_IFS
45783
45784  ;;
45785esac
45786fi
45787BUILD_NM=$ac_cv_path_BUILD_NM
45788if test -n "$BUILD_NM"; then
45789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45790$as_echo "$BUILD_NM" >&6; }
45791else
45792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45793$as_echo "no" >&6; }
45794fi
45795
45796
45797  test -n "$BUILD_NM" && break
45798done
45799
45800    else
45801      # If it succeeded, then it was overridden by the user. We will use it
45802      # for the tool.
45803
45804      # First remove it from the list of overridden variables, so we can test
45805      # for unknown variables in the end.
45806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45807
45808      # Check if we try to supply an empty value
45809      if test "x$BUILD_NM" = x; then
45810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45811$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45813$as_echo_n "checking for BUILD_NM... " >&6; }
45814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45815$as_echo "disabled" >&6; }
45816      else
45817        # Check if the provided tool contains a complete path.
45818        tool_specified="$BUILD_NM"
45819        tool_basename="${tool_specified##*/}"
45820        if test "x$tool_basename" = "x$tool_specified"; then
45821          # A command without a complete path is provided, search $PATH.
45822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45823$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45824          # Extract the first word of "$tool_basename", so it can be a program name with args.
45825set dummy $tool_basename; ac_word=$2
45826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45827$as_echo_n "checking for $ac_word... " >&6; }
45828if ${ac_cv_path_BUILD_NM+:} false; then :
45829  $as_echo_n "(cached) " >&6
45830else
45831  case $BUILD_NM in
45832  [\\/]* | ?:[\\/]*)
45833  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45834  ;;
45835  *)
45836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45837for as_dir in $PATH
45838do
45839  IFS=$as_save_IFS
45840  test -z "$as_dir" && as_dir=.
45841    for ac_exec_ext in '' $ac_executable_extensions; do
45842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45843    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45845    break 2
45846  fi
45847done
45848  done
45849IFS=$as_save_IFS
45850
45851  ;;
45852esac
45853fi
45854BUILD_NM=$ac_cv_path_BUILD_NM
45855if test -n "$BUILD_NM"; then
45856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45857$as_echo "$BUILD_NM" >&6; }
45858else
45859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45860$as_echo "no" >&6; }
45861fi
45862
45863
45864          if test "x$BUILD_NM" = x; then
45865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45866          fi
45867        else
45868          # Otherwise we believe it is a complete path. Use it as it is.
45869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45870$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45872$as_echo_n "checking for BUILD_NM... " >&6; }
45873          if test ! -x "$tool_specified"; then
45874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45875$as_echo "not found" >&6; }
45876            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45877          fi
45878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45879$as_echo "$tool_specified" >&6; }
45880        fi
45881      fi
45882    fi
45883
45884  fi
45885
45886
45887
45888  # Only process if variable expands to non-empty
45889
45890  if test "x$BUILD_NM" != x; then
45891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45892
45893  # First separate the path from the arguments. This will split at the first
45894  # space.
45895  complete="$BUILD_NM"
45896  path="${complete%% *}"
45897  tmp="$complete EOL"
45898  arguments="${tmp#* }"
45899
45900  # Input might be given as Windows format, start by converting to
45901  # unix format.
45902  new_path=`$CYGPATH -u "$path"`
45903
45904  # Now try to locate executable using which
45905  new_path=`$WHICH "$new_path" 2> /dev/null`
45906  # bat and cmd files are not always considered executable in cygwin causing which
45907  # to not find them
45908  if test "x$new_path" = x \
45909      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45910      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45911    new_path=`$CYGPATH -u "$path"`
45912  fi
45913  if test "x$new_path" = x; then
45914    # Oops. Which didn't find the executable.
45915    # The splitting of arguments from the executable at a space might have been incorrect,
45916    # since paths with space are more likely in Windows. Give it another try with the whole
45917    # argument.
45918    path="$complete"
45919    arguments="EOL"
45920    new_path=`$CYGPATH -u "$path"`
45921    new_path=`$WHICH "$new_path" 2> /dev/null`
45922    # bat and cmd files are not always considered executable in cygwin causing which
45923    # to not find them
45924    if test "x$new_path" = x \
45925        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45926        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45927      new_path=`$CYGPATH -u "$path"`
45928    fi
45929    if test "x$new_path" = x; then
45930      # It's still not found. Now this is an unrecoverable error.
45931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45932$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45933      has_space=`$ECHO "$complete" | $GREP " "`
45934      if test "x$has_space" != x; then
45935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45937      fi
45938      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45939    fi
45940  fi
45941
45942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45945  # "foo.exe" is OK but "foo" is an error.
45946  #
45947  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45948  # It is also a way to make sure we got the proper file name for the real test later on.
45949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45950  if test "x$test_shortpath" = x; then
45951    # Short path failed, file does not exist as specified.
45952    # Try adding .exe or .cmd
45953    if test -f "${new_path}.exe"; then
45954      input_to_shortpath="${new_path}.exe"
45955    elif test -f "${new_path}.cmd"; then
45956      input_to_shortpath="${new_path}.cmd"
45957    else
45958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45959$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45960      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45961$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45962      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45963    fi
45964  else
45965    input_to_shortpath="$new_path"
45966  fi
45967
45968  # Call helper function which possibly converts this using DOS-style short mode.
45969  # If so, the updated path is stored in $new_path.
45970  new_path="$input_to_shortpath"
45971
45972  input_path="$input_to_shortpath"
45973  # Check if we need to convert this using DOS-style short mode. If the path
45974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45975  # take no chances and rewrite it.
45976  # Note: m4 eats our [], so we need to use [ and ] instead.
45977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45978  if test "x$has_forbidden_chars" != x; then
45979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45983      # Going to short mode and back again did indeed matter. Since short mode is
45984      # case insensitive, let's make it lowercase to improve readability.
45985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45986      # Now convert it back to Unix-style (cygpath)
45987      input_path=`$CYGPATH -u "$shortmode_path"`
45988      new_path="$input_path"
45989    fi
45990  fi
45991
45992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45993  if test "x$test_cygdrive_prefix" = x; then
45994    # As a simple fix, exclude /usr/bin since it's not a real path.
45995    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45997      # a path prefixed by /cygdrive for fixpath to work.
45998      new_path="$CYGWIN_ROOT_PATH$input_path"
45999    fi
46000  fi
46001
46002  # remove trailing .exe if any
46003  new_path="${new_path/%.exe/}"
46004
46005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46006
46007  # First separate the path from the arguments. This will split at the first
46008  # space.
46009  complete="$BUILD_NM"
46010  path="${complete%% *}"
46011  tmp="$complete EOL"
46012  arguments="${tmp#* }"
46013
46014  # Input might be given as Windows format, start by converting to
46015  # unix format.
46016  new_path="$path"
46017
46018  windows_path="$new_path"
46019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46020    unix_path=`$CYGPATH -u "$windows_path"`
46021    new_path="$unix_path"
46022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46024    new_path="$unix_path"
46025  fi
46026
46027
46028  # Now try to locate executable using which
46029  new_path=`$WHICH "$new_path" 2> /dev/null`
46030
46031  if test "x$new_path" = x; then
46032    # Oops. Which didn't find the executable.
46033    # The splitting of arguments from the executable at a space might have been incorrect,
46034    # since paths with space are more likely in Windows. Give it another try with the whole
46035    # argument.
46036    path="$complete"
46037    arguments="EOL"
46038    new_path="$path"
46039
46040  windows_path="$new_path"
46041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46042    unix_path=`$CYGPATH -u "$windows_path"`
46043    new_path="$unix_path"
46044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46046    new_path="$unix_path"
46047  fi
46048
46049
46050    new_path=`$WHICH "$new_path" 2> /dev/null`
46051    # bat and cmd files are not always considered executable in MSYS causing which
46052    # to not find them
46053    if test "x$new_path" = x \
46054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46056      new_path="$path"
46057
46058  windows_path="$new_path"
46059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46060    unix_path=`$CYGPATH -u "$windows_path"`
46061    new_path="$unix_path"
46062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46064    new_path="$unix_path"
46065  fi
46066
46067    fi
46068
46069    if test "x$new_path" = x; then
46070      # It's still not found. Now this is an unrecoverable error.
46071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46072$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46073      has_space=`$ECHO "$complete" | $GREP " "`
46074      if test "x$has_space" != x; then
46075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46077      fi
46078      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46079    fi
46080  fi
46081
46082  # Now new_path has a complete unix path to the binary
46083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46084    # Keep paths in /bin as-is, but remove trailing .exe if any
46085    new_path="${new_path/%.exe/}"
46086    # Do not save /bin paths to all_fixpath_prefixes!
46087  else
46088    # Not in mixed or Windows style, start by that.
46089    new_path=`cmd //c echo $new_path`
46090
46091  input_path="$new_path"
46092  # Check if we need to convert this using DOS-style short mode. If the path
46093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46094  # take no chances and rewrite it.
46095  # Note: m4 eats our [], so we need to use [ and ] instead.
46096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46097  if test "x$has_forbidden_chars" != x; then
46098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46100  fi
46101
46102    # Output is in $new_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    # remove trailing .exe if any
46114    new_path="${new_path/%.exe/}"
46115
46116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46118  fi
46119
46120    else
46121      # We're on a unix platform. Hooray! :)
46122      # First separate the path from the arguments. This will split at the first
46123      # space.
46124      complete="$BUILD_NM"
46125      path="${complete%% *}"
46126      tmp="$complete EOL"
46127      arguments="${tmp#* }"
46128
46129      # Cannot rely on the command "which" here since it doesn't always work.
46130      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46131      if test -z "$is_absolute_path"; then
46132        # Path to executable is not absolute. Find it.
46133        IFS_save="$IFS"
46134        IFS=:
46135        for p in $PATH; do
46136          if test -f "$p/$path" && test -x "$p/$path"; then
46137            new_path="$p/$path"
46138            break
46139          fi
46140        done
46141        IFS="$IFS_save"
46142      else
46143        # This is an absolute path, we can use it without further modifications.
46144        new_path="$path"
46145      fi
46146
46147      if test "x$new_path" = x; then
46148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46149$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46150        has_space=`$ECHO "$complete" | $GREP " "`
46151        if test "x$has_space" != x; then
46152          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46153$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46154        fi
46155        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46156      fi
46157    fi
46158
46159    # Now join together the path and the arguments once again
46160    if test "x$arguments" != xEOL; then
46161      new_complete="$new_path ${arguments% *}"
46162    else
46163      new_complete="$new_path"
46164    fi
46165
46166    if test "x$complete" != "x$new_complete"; then
46167      BUILD_NM="$new_complete"
46168      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46169$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46170    fi
46171  fi
46172
46173
46174
46175  # Publish this variable in the help.
46176
46177
46178  if [ -z "${BUILD_AR+x}" ]; then
46179    # The variable is not set by user, try to locate tool using the code snippet
46180    for ac_prog in ar gcc-ar
46181do
46182  # Extract the first word of "$ac_prog", so it can be a program name with args.
46183set dummy $ac_prog; ac_word=$2
46184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46185$as_echo_n "checking for $ac_word... " >&6; }
46186if ${ac_cv_path_BUILD_AR+:} false; then :
46187  $as_echo_n "(cached) " >&6
46188else
46189  case $BUILD_AR in
46190  [\\/]* | ?:[\\/]*)
46191  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46192  ;;
46193  *)
46194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46195for as_dir in $PATH
46196do
46197  IFS=$as_save_IFS
46198  test -z "$as_dir" && as_dir=.
46199    for ac_exec_ext in '' $ac_executable_extensions; do
46200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46201    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46203    break 2
46204  fi
46205done
46206  done
46207IFS=$as_save_IFS
46208
46209  ;;
46210esac
46211fi
46212BUILD_AR=$ac_cv_path_BUILD_AR
46213if test -n "$BUILD_AR"; then
46214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46215$as_echo "$BUILD_AR" >&6; }
46216else
46217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46218$as_echo "no" >&6; }
46219fi
46220
46221
46222  test -n "$BUILD_AR" && break
46223done
46224
46225  else
46226    # The variable is set, but is it from the command line or the environment?
46227
46228    # Try to remove the string !BUILD_AR! from our list.
46229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46231      # If it failed, the variable was not from the command line. Ignore it,
46232      # but warn the user (except for BASH, which is always set by the calling BASH).
46233      if test "xBUILD_AR" != xBASH; then
46234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46235$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46236      fi
46237      # Try to locate tool using the code snippet
46238      for ac_prog in ar gcc-ar
46239do
46240  # Extract the first word of "$ac_prog", so it can be a program name with args.
46241set dummy $ac_prog; ac_word=$2
46242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46243$as_echo_n "checking for $ac_word... " >&6; }
46244if ${ac_cv_path_BUILD_AR+:} false; then :
46245  $as_echo_n "(cached) " >&6
46246else
46247  case $BUILD_AR in
46248  [\\/]* | ?:[\\/]*)
46249  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46250  ;;
46251  *)
46252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46253for as_dir in $PATH
46254do
46255  IFS=$as_save_IFS
46256  test -z "$as_dir" && as_dir=.
46257    for ac_exec_ext in '' $ac_executable_extensions; do
46258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46259    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46261    break 2
46262  fi
46263done
46264  done
46265IFS=$as_save_IFS
46266
46267  ;;
46268esac
46269fi
46270BUILD_AR=$ac_cv_path_BUILD_AR
46271if test -n "$BUILD_AR"; then
46272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46273$as_echo "$BUILD_AR" >&6; }
46274else
46275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46276$as_echo "no" >&6; }
46277fi
46278
46279
46280  test -n "$BUILD_AR" && break
46281done
46282
46283    else
46284      # If it succeeded, then it was overridden by the user. We will use it
46285      # for the tool.
46286
46287      # First remove it from the list of overridden variables, so we can test
46288      # for unknown variables in the end.
46289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46290
46291      # Check if we try to supply an empty value
46292      if test "x$BUILD_AR" = x; then
46293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46294$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46296$as_echo_n "checking for BUILD_AR... " >&6; }
46297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46298$as_echo "disabled" >&6; }
46299      else
46300        # Check if the provided tool contains a complete path.
46301        tool_specified="$BUILD_AR"
46302        tool_basename="${tool_specified##*/}"
46303        if test "x$tool_basename" = "x$tool_specified"; then
46304          # A command without a complete path is provided, search $PATH.
46305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46306$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46307          # Extract the first word of "$tool_basename", so it can be a program name with args.
46308set dummy $tool_basename; ac_word=$2
46309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46310$as_echo_n "checking for $ac_word... " >&6; }
46311if ${ac_cv_path_BUILD_AR+:} false; then :
46312  $as_echo_n "(cached) " >&6
46313else
46314  case $BUILD_AR in
46315  [\\/]* | ?:[\\/]*)
46316  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46317  ;;
46318  *)
46319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46320for as_dir in $PATH
46321do
46322  IFS=$as_save_IFS
46323  test -z "$as_dir" && as_dir=.
46324    for ac_exec_ext in '' $ac_executable_extensions; do
46325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46326    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46328    break 2
46329  fi
46330done
46331  done
46332IFS=$as_save_IFS
46333
46334  ;;
46335esac
46336fi
46337BUILD_AR=$ac_cv_path_BUILD_AR
46338if test -n "$BUILD_AR"; then
46339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46340$as_echo "$BUILD_AR" >&6; }
46341else
46342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46343$as_echo "no" >&6; }
46344fi
46345
46346
46347          if test "x$BUILD_AR" = x; then
46348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46349          fi
46350        else
46351          # Otherwise we believe it is a complete path. Use it as it is.
46352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46353$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46355$as_echo_n "checking for BUILD_AR... " >&6; }
46356          if test ! -x "$tool_specified"; then
46357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46358$as_echo "not found" >&6; }
46359            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46360          fi
46361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46362$as_echo "$tool_specified" >&6; }
46363        fi
46364      fi
46365    fi
46366
46367  fi
46368
46369
46370
46371  # Only process if variable expands to non-empty
46372
46373  if test "x$BUILD_AR" != x; then
46374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375
46376  # First separate the path from the arguments. This will split at the first
46377  # space.
46378  complete="$BUILD_AR"
46379  path="${complete%% *}"
46380  tmp="$complete EOL"
46381  arguments="${tmp#* }"
46382
46383  # Input might be given as Windows format, start by converting to
46384  # unix format.
46385  new_path=`$CYGPATH -u "$path"`
46386
46387  # Now try to locate executable using which
46388  new_path=`$WHICH "$new_path" 2> /dev/null`
46389  # bat and cmd files are not always considered executable in cygwin causing which
46390  # to not find them
46391  if test "x$new_path" = x \
46392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46394    new_path=`$CYGPATH -u "$path"`
46395  fi
46396  if test "x$new_path" = x; then
46397    # Oops. Which didn't find the executable.
46398    # The splitting of arguments from the executable at a space might have been incorrect,
46399    # since paths with space are more likely in Windows. Give it another try with the whole
46400    # argument.
46401    path="$complete"
46402    arguments="EOL"
46403    new_path=`$CYGPATH -u "$path"`
46404    new_path=`$WHICH "$new_path" 2> /dev/null`
46405    # bat and cmd files are not always considered executable in cygwin causing which
46406    # to not find them
46407    if test "x$new_path" = x \
46408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46410      new_path=`$CYGPATH -u "$path"`
46411    fi
46412    if test "x$new_path" = x; then
46413      # It's still not found. Now this is an unrecoverable error.
46414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46415$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46416      has_space=`$ECHO "$complete" | $GREP " "`
46417      if test "x$has_space" != x; then
46418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46420      fi
46421      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46422    fi
46423  fi
46424
46425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46428  # "foo.exe" is OK but "foo" is an error.
46429  #
46430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46431  # It is also a way to make sure we got the proper file name for the real test later on.
46432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46433  if test "x$test_shortpath" = x; then
46434    # Short path failed, file does not exist as specified.
46435    # Try adding .exe or .cmd
46436    if test -f "${new_path}.exe"; then
46437      input_to_shortpath="${new_path}.exe"
46438    elif test -f "${new_path}.cmd"; then
46439      input_to_shortpath="${new_path}.cmd"
46440    else
46441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46442$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46445      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46446    fi
46447  else
46448    input_to_shortpath="$new_path"
46449  fi
46450
46451  # Call helper function which possibly converts this using DOS-style short mode.
46452  # If so, the updated path is stored in $new_path.
46453  new_path="$input_to_shortpath"
46454
46455  input_path="$input_to_shortpath"
46456  # Check if we need to convert this using DOS-style short mode. If the path
46457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46458  # take no chances and rewrite it.
46459  # Note: m4 eats our [], so we need to use [ and ] instead.
46460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46461  if test "x$has_forbidden_chars" != x; then
46462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46466      # Going to short mode and back again did indeed matter. Since short mode is
46467      # case insensitive, let's make it lowercase to improve readability.
46468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46469      # Now convert it back to Unix-style (cygpath)
46470      input_path=`$CYGPATH -u "$shortmode_path"`
46471      new_path="$input_path"
46472    fi
46473  fi
46474
46475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46476  if test "x$test_cygdrive_prefix" = x; then
46477    # As a simple fix, exclude /usr/bin since it's not a real path.
46478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46480      # a path prefixed by /cygdrive for fixpath to work.
46481      new_path="$CYGWIN_ROOT_PATH$input_path"
46482    fi
46483  fi
46484
46485  # remove trailing .exe if any
46486  new_path="${new_path/%.exe/}"
46487
46488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46489
46490  # First separate the path from the arguments. This will split at the first
46491  # space.
46492  complete="$BUILD_AR"
46493  path="${complete%% *}"
46494  tmp="$complete EOL"
46495  arguments="${tmp#* }"
46496
46497  # Input might be given as Windows format, start by converting to
46498  # unix format.
46499  new_path="$path"
46500
46501  windows_path="$new_path"
46502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46503    unix_path=`$CYGPATH -u "$windows_path"`
46504    new_path="$unix_path"
46505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46507    new_path="$unix_path"
46508  fi
46509
46510
46511  # Now try to locate executable using which
46512  new_path=`$WHICH "$new_path" 2> /dev/null`
46513
46514  if test "x$new_path" = x; then
46515    # Oops. Which didn't find the executable.
46516    # The splitting of arguments from the executable at a space might have been incorrect,
46517    # since paths with space are more likely in Windows. Give it another try with the whole
46518    # argument.
46519    path="$complete"
46520    arguments="EOL"
46521    new_path="$path"
46522
46523  windows_path="$new_path"
46524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46525    unix_path=`$CYGPATH -u "$windows_path"`
46526    new_path="$unix_path"
46527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46529    new_path="$unix_path"
46530  fi
46531
46532
46533    new_path=`$WHICH "$new_path" 2> /dev/null`
46534    # bat and cmd files are not always considered executable in MSYS causing which
46535    # to not find them
46536    if test "x$new_path" = x \
46537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46539      new_path="$path"
46540
46541  windows_path="$new_path"
46542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46543    unix_path=`$CYGPATH -u "$windows_path"`
46544    new_path="$unix_path"
46545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46547    new_path="$unix_path"
46548  fi
46549
46550    fi
46551
46552    if test "x$new_path" = x; then
46553      # It's still not found. Now this is an unrecoverable error.
46554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46555$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46556      has_space=`$ECHO "$complete" | $GREP " "`
46557      if test "x$has_space" != x; then
46558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46560      fi
46561      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46562    fi
46563  fi
46564
46565  # Now new_path has a complete unix path to the binary
46566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46567    # Keep paths in /bin as-is, but remove trailing .exe if any
46568    new_path="${new_path/%.exe/}"
46569    # Do not save /bin paths to all_fixpath_prefixes!
46570  else
46571    # Not in mixed or Windows style, start by that.
46572    new_path=`cmd //c echo $new_path`
46573
46574  input_path="$new_path"
46575  # Check if we need to convert this using DOS-style short mode. If the path
46576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46577  # take no chances and rewrite it.
46578  # Note: m4 eats our [], so we need to use [ and ] instead.
46579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46580  if test "x$has_forbidden_chars" != x; then
46581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46583  fi
46584
46585    # Output is in $new_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    # remove trailing .exe if any
46597    new_path="${new_path/%.exe/}"
46598
46599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46601  fi
46602
46603    else
46604      # We're on a unix platform. Hooray! :)
46605      # First separate the path from the arguments. This will split at the first
46606      # space.
46607      complete="$BUILD_AR"
46608      path="${complete%% *}"
46609      tmp="$complete EOL"
46610      arguments="${tmp#* }"
46611
46612      # Cannot rely on the command "which" here since it doesn't always work.
46613      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46614      if test -z "$is_absolute_path"; then
46615        # Path to executable is not absolute. Find it.
46616        IFS_save="$IFS"
46617        IFS=:
46618        for p in $PATH; do
46619          if test -f "$p/$path" && test -x "$p/$path"; then
46620            new_path="$p/$path"
46621            break
46622          fi
46623        done
46624        IFS="$IFS_save"
46625      else
46626        # This is an absolute path, we can use it without further modifications.
46627        new_path="$path"
46628      fi
46629
46630      if test "x$new_path" = x; then
46631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46632$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46633        has_space=`$ECHO "$complete" | $GREP " "`
46634        if test "x$has_space" != x; then
46635          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46637        fi
46638        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46639      fi
46640    fi
46641
46642    # Now join together the path and the arguments once again
46643    if test "x$arguments" != xEOL; then
46644      new_complete="$new_path ${arguments% *}"
46645    else
46646      new_complete="$new_path"
46647    fi
46648
46649    if test "x$complete" != "x$new_complete"; then
46650      BUILD_AR="$new_complete"
46651      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46652$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46653    fi
46654  fi
46655
46656
46657
46658  # Publish this variable in the help.
46659
46660
46661  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46662    # The variable is not set by user, try to locate tool using the code snippet
46663    for ac_prog in objcopy
46664do
46665  # Extract the first word of "$ac_prog", so it can be a program name with args.
46666set dummy $ac_prog; ac_word=$2
46667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46668$as_echo_n "checking for $ac_word... " >&6; }
46669if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46670  $as_echo_n "(cached) " >&6
46671else
46672  case $BUILD_OBJCOPY in
46673  [\\/]* | ?:[\\/]*)
46674  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46675  ;;
46676  *)
46677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46678for as_dir in $PATH
46679do
46680  IFS=$as_save_IFS
46681  test -z "$as_dir" && as_dir=.
46682    for ac_exec_ext in '' $ac_executable_extensions; do
46683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46684    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46686    break 2
46687  fi
46688done
46689  done
46690IFS=$as_save_IFS
46691
46692  ;;
46693esac
46694fi
46695BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46696if test -n "$BUILD_OBJCOPY"; then
46697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46698$as_echo "$BUILD_OBJCOPY" >&6; }
46699else
46700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46701$as_echo "no" >&6; }
46702fi
46703
46704
46705  test -n "$BUILD_OBJCOPY" && break
46706done
46707
46708  else
46709    # The variable is set, but is it from the command line or the environment?
46710
46711    # Try to remove the string !BUILD_OBJCOPY! from our list.
46712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46714      # If it failed, the variable was not from the command line. Ignore it,
46715      # but warn the user (except for BASH, which is always set by the calling BASH).
46716      if test "xBUILD_OBJCOPY" != xBASH; then
46717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46718$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46719      fi
46720      # Try to locate tool using the code snippet
46721      for ac_prog in objcopy
46722do
46723  # Extract the first word of "$ac_prog", so it can be a program name with args.
46724set dummy $ac_prog; ac_word=$2
46725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46726$as_echo_n "checking for $ac_word... " >&6; }
46727if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46728  $as_echo_n "(cached) " >&6
46729else
46730  case $BUILD_OBJCOPY in
46731  [\\/]* | ?:[\\/]*)
46732  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46733  ;;
46734  *)
46735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46736for as_dir in $PATH
46737do
46738  IFS=$as_save_IFS
46739  test -z "$as_dir" && as_dir=.
46740    for ac_exec_ext in '' $ac_executable_extensions; do
46741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46742    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46744    break 2
46745  fi
46746done
46747  done
46748IFS=$as_save_IFS
46749
46750  ;;
46751esac
46752fi
46753BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46754if test -n "$BUILD_OBJCOPY"; then
46755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46756$as_echo "$BUILD_OBJCOPY" >&6; }
46757else
46758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46759$as_echo "no" >&6; }
46760fi
46761
46762
46763  test -n "$BUILD_OBJCOPY" && break
46764done
46765
46766    else
46767      # If it succeeded, then it was overridden by the user. We will use it
46768      # for the tool.
46769
46770      # First remove it from the list of overridden variables, so we can test
46771      # for unknown variables in the end.
46772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46773
46774      # Check if we try to supply an empty value
46775      if test "x$BUILD_OBJCOPY" = x; then
46776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46777$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46779$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46781$as_echo "disabled" >&6; }
46782      else
46783        # Check if the provided tool contains a complete path.
46784        tool_specified="$BUILD_OBJCOPY"
46785        tool_basename="${tool_specified##*/}"
46786        if test "x$tool_basename" = "x$tool_specified"; then
46787          # A command without a complete path is provided, search $PATH.
46788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46789$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46790          # Extract the first word of "$tool_basename", so it can be a program name with args.
46791set dummy $tool_basename; ac_word=$2
46792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46793$as_echo_n "checking for $ac_word... " >&6; }
46794if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46795  $as_echo_n "(cached) " >&6
46796else
46797  case $BUILD_OBJCOPY in
46798  [\\/]* | ?:[\\/]*)
46799  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46800  ;;
46801  *)
46802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46803for as_dir in $PATH
46804do
46805  IFS=$as_save_IFS
46806  test -z "$as_dir" && as_dir=.
46807    for ac_exec_ext in '' $ac_executable_extensions; do
46808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46809    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46811    break 2
46812  fi
46813done
46814  done
46815IFS=$as_save_IFS
46816
46817  ;;
46818esac
46819fi
46820BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46821if test -n "$BUILD_OBJCOPY"; then
46822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46823$as_echo "$BUILD_OBJCOPY" >&6; }
46824else
46825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46826$as_echo "no" >&6; }
46827fi
46828
46829
46830          if test "x$BUILD_OBJCOPY" = x; then
46831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46832          fi
46833        else
46834          # Otherwise we believe it is a complete path. Use it as it is.
46835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46836$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46838$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46839          if test ! -x "$tool_specified"; then
46840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46841$as_echo "not found" >&6; }
46842            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46843          fi
46844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46845$as_echo "$tool_specified" >&6; }
46846        fi
46847      fi
46848    fi
46849
46850  fi
46851
46852
46853
46854  # Only process if variable expands to non-empty
46855
46856  if test "x$BUILD_OBJCOPY" != x; then
46857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46858
46859  # First separate the path from the arguments. This will split at the first
46860  # space.
46861  complete="$BUILD_OBJCOPY"
46862  path="${complete%% *}"
46863  tmp="$complete EOL"
46864  arguments="${tmp#* }"
46865
46866  # Input might be given as Windows format, start by converting to
46867  # unix format.
46868  new_path=`$CYGPATH -u "$path"`
46869
46870  # Now try to locate executable using which
46871  new_path=`$WHICH "$new_path" 2> /dev/null`
46872  # bat and cmd files are not always considered executable in cygwin causing which
46873  # to not find them
46874  if test "x$new_path" = x \
46875      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46876      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46877    new_path=`$CYGPATH -u "$path"`
46878  fi
46879  if test "x$new_path" = x; then
46880    # Oops. Which didn't find the executable.
46881    # The splitting of arguments from the executable at a space might have been incorrect,
46882    # since paths with space are more likely in Windows. Give it another try with the whole
46883    # argument.
46884    path="$complete"
46885    arguments="EOL"
46886    new_path=`$CYGPATH -u "$path"`
46887    new_path=`$WHICH "$new_path" 2> /dev/null`
46888    # bat and cmd files are not always considered executable in cygwin causing which
46889    # to not find them
46890    if test "x$new_path" = x \
46891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46893      new_path=`$CYGPATH -u "$path"`
46894    fi
46895    if test "x$new_path" = x; then
46896      # It's still not found. Now this is an unrecoverable error.
46897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46898$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46899      has_space=`$ECHO "$complete" | $GREP " "`
46900      if test "x$has_space" != x; then
46901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46903      fi
46904      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46905    fi
46906  fi
46907
46908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46911  # "foo.exe" is OK but "foo" is an error.
46912  #
46913  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46914  # It is also a way to make sure we got the proper file name for the real test later on.
46915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46916  if test "x$test_shortpath" = x; then
46917    # Short path failed, file does not exist as specified.
46918    # Try adding .exe or .cmd
46919    if test -f "${new_path}.exe"; then
46920      input_to_shortpath="${new_path}.exe"
46921    elif test -f "${new_path}.cmd"; then
46922      input_to_shortpath="${new_path}.cmd"
46923    else
46924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46925$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46928      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46929    fi
46930  else
46931    input_to_shortpath="$new_path"
46932  fi
46933
46934  # Call helper function which possibly converts this using DOS-style short mode.
46935  # If so, the updated path is stored in $new_path.
46936  new_path="$input_to_shortpath"
46937
46938  input_path="$input_to_shortpath"
46939  # Check if we need to convert this using DOS-style short mode. If the path
46940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46941  # take no chances and rewrite it.
46942  # Note: m4 eats our [], so we need to use [ and ] instead.
46943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46944  if test "x$has_forbidden_chars" != x; then
46945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46949      # Going to short mode and back again did indeed matter. Since short mode is
46950      # case insensitive, let's make it lowercase to improve readability.
46951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46952      # Now convert it back to Unix-style (cygpath)
46953      input_path=`$CYGPATH -u "$shortmode_path"`
46954      new_path="$input_path"
46955    fi
46956  fi
46957
46958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46959  if test "x$test_cygdrive_prefix" = x; then
46960    # As a simple fix, exclude /usr/bin since it's not a real path.
46961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46963      # a path prefixed by /cygdrive for fixpath to work.
46964      new_path="$CYGWIN_ROOT_PATH$input_path"
46965    fi
46966  fi
46967
46968  # remove trailing .exe if any
46969  new_path="${new_path/%.exe/}"
46970
46971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46972
46973  # First separate the path from the arguments. This will split at the first
46974  # space.
46975  complete="$BUILD_OBJCOPY"
46976  path="${complete%% *}"
46977  tmp="$complete EOL"
46978  arguments="${tmp#* }"
46979
46980  # Input might be given as Windows format, start by converting to
46981  # unix format.
46982  new_path="$path"
46983
46984  windows_path="$new_path"
46985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46986    unix_path=`$CYGPATH -u "$windows_path"`
46987    new_path="$unix_path"
46988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46990    new_path="$unix_path"
46991  fi
46992
46993
46994  # Now try to locate executable using which
46995  new_path=`$WHICH "$new_path" 2> /dev/null`
46996
46997  if test "x$new_path" = x; then
46998    # Oops. Which didn't find the executable.
46999    # The splitting of arguments from the executable at a space might have been incorrect,
47000    # since paths with space are more likely in Windows. Give it another try with the whole
47001    # argument.
47002    path="$complete"
47003    arguments="EOL"
47004    new_path="$path"
47005
47006  windows_path="$new_path"
47007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47008    unix_path=`$CYGPATH -u "$windows_path"`
47009    new_path="$unix_path"
47010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47012    new_path="$unix_path"
47013  fi
47014
47015
47016    new_path=`$WHICH "$new_path" 2> /dev/null`
47017    # bat and cmd files are not always considered executable in MSYS causing which
47018    # to not find them
47019    if test "x$new_path" = x \
47020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47022      new_path="$path"
47023
47024  windows_path="$new_path"
47025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47026    unix_path=`$CYGPATH -u "$windows_path"`
47027    new_path="$unix_path"
47028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47030    new_path="$unix_path"
47031  fi
47032
47033    fi
47034
47035    if test "x$new_path" = x; then
47036      # It's still not found. Now this is an unrecoverable error.
47037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47038$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47039      has_space=`$ECHO "$complete" | $GREP " "`
47040      if test "x$has_space" != x; then
47041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47043      fi
47044      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47045    fi
47046  fi
47047
47048  # Now new_path has a complete unix path to the binary
47049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47050    # Keep paths in /bin as-is, but remove trailing .exe if any
47051    new_path="${new_path/%.exe/}"
47052    # Do not save /bin paths to all_fixpath_prefixes!
47053  else
47054    # Not in mixed or Windows style, start by that.
47055    new_path=`cmd //c echo $new_path`
47056
47057  input_path="$new_path"
47058  # Check if we need to convert this using DOS-style short mode. If the path
47059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47060  # take no chances and rewrite it.
47061  # Note: m4 eats our [], so we need to use [ and ] instead.
47062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47063  if test "x$has_forbidden_chars" != x; then
47064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47066  fi
47067
47068    # Output is in $new_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    # remove trailing .exe if any
47080    new_path="${new_path/%.exe/}"
47081
47082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47084  fi
47085
47086    else
47087      # We're on a unix platform. Hooray! :)
47088      # First separate the path from the arguments. This will split at the first
47089      # space.
47090      complete="$BUILD_OBJCOPY"
47091      path="${complete%% *}"
47092      tmp="$complete EOL"
47093      arguments="${tmp#* }"
47094
47095      # Cannot rely on the command "which" here since it doesn't always work.
47096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47097      if test -z "$is_absolute_path"; then
47098        # Path to executable is not absolute. Find it.
47099        IFS_save="$IFS"
47100        IFS=:
47101        for p in $PATH; do
47102          if test -f "$p/$path" && test -x "$p/$path"; then
47103            new_path="$p/$path"
47104            break
47105          fi
47106        done
47107        IFS="$IFS_save"
47108      else
47109        # This is an absolute path, we can use it without further modifications.
47110        new_path="$path"
47111      fi
47112
47113      if test "x$new_path" = x; then
47114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47115$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47116        has_space=`$ECHO "$complete" | $GREP " "`
47117        if test "x$has_space" != x; then
47118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47120        fi
47121        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47122      fi
47123    fi
47124
47125    # Now join together the path and the arguments once again
47126    if test "x$arguments" != xEOL; then
47127      new_complete="$new_path ${arguments% *}"
47128    else
47129      new_complete="$new_path"
47130    fi
47131
47132    if test "x$complete" != "x$new_complete"; then
47133      BUILD_OBJCOPY="$new_complete"
47134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47135$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47136    fi
47137  fi
47138
47139
47140
47141  # Publish this variable in the help.
47142
47143
47144  if [ -z "${BUILD_STRIP+x}" ]; then
47145    # The variable is not set by user, try to locate tool using the code snippet
47146    for ac_prog in strip
47147do
47148  # Extract the first word of "$ac_prog", so it can be a program name with args.
47149set dummy $ac_prog; ac_word=$2
47150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47151$as_echo_n "checking for $ac_word... " >&6; }
47152if ${ac_cv_path_BUILD_STRIP+:} false; then :
47153  $as_echo_n "(cached) " >&6
47154else
47155  case $BUILD_STRIP in
47156  [\\/]* | ?:[\\/]*)
47157  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47158  ;;
47159  *)
47160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47161for as_dir in $PATH
47162do
47163  IFS=$as_save_IFS
47164  test -z "$as_dir" && as_dir=.
47165    for ac_exec_ext in '' $ac_executable_extensions; do
47166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47167    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47169    break 2
47170  fi
47171done
47172  done
47173IFS=$as_save_IFS
47174
47175  ;;
47176esac
47177fi
47178BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47179if test -n "$BUILD_STRIP"; then
47180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47181$as_echo "$BUILD_STRIP" >&6; }
47182else
47183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47184$as_echo "no" >&6; }
47185fi
47186
47187
47188  test -n "$BUILD_STRIP" && break
47189done
47190
47191  else
47192    # The variable is set, but is it from the command line or the environment?
47193
47194    # Try to remove the string !BUILD_STRIP! from our list.
47195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47197      # If it failed, the variable was not from the command line. Ignore it,
47198      # but warn the user (except for BASH, which is always set by the calling BASH).
47199      if test "xBUILD_STRIP" != xBASH; then
47200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47201$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47202      fi
47203      # Try to locate tool using the code snippet
47204      for ac_prog in strip
47205do
47206  # Extract the first word of "$ac_prog", so it can be a program name with args.
47207set dummy $ac_prog; ac_word=$2
47208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47209$as_echo_n "checking for $ac_word... " >&6; }
47210if ${ac_cv_path_BUILD_STRIP+:} false; then :
47211  $as_echo_n "(cached) " >&6
47212else
47213  case $BUILD_STRIP in
47214  [\\/]* | ?:[\\/]*)
47215  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47216  ;;
47217  *)
47218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47219for as_dir in $PATH
47220do
47221  IFS=$as_save_IFS
47222  test -z "$as_dir" && as_dir=.
47223    for ac_exec_ext in '' $ac_executable_extensions; do
47224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47225    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47227    break 2
47228  fi
47229done
47230  done
47231IFS=$as_save_IFS
47232
47233  ;;
47234esac
47235fi
47236BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47237if test -n "$BUILD_STRIP"; then
47238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47239$as_echo "$BUILD_STRIP" >&6; }
47240else
47241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47242$as_echo "no" >&6; }
47243fi
47244
47245
47246  test -n "$BUILD_STRIP" && break
47247done
47248
47249    else
47250      # If it succeeded, then it was overridden by the user. We will use it
47251      # for the tool.
47252
47253      # First remove it from the list of overridden variables, so we can test
47254      # for unknown variables in the end.
47255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47256
47257      # Check if we try to supply an empty value
47258      if test "x$BUILD_STRIP" = x; then
47259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47260$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47262$as_echo_n "checking for BUILD_STRIP... " >&6; }
47263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47264$as_echo "disabled" >&6; }
47265      else
47266        # Check if the provided tool contains a complete path.
47267        tool_specified="$BUILD_STRIP"
47268        tool_basename="${tool_specified##*/}"
47269        if test "x$tool_basename" = "x$tool_specified"; then
47270          # A command without a complete path is provided, search $PATH.
47271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47272$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47273          # Extract the first word of "$tool_basename", so it can be a program name with args.
47274set dummy $tool_basename; ac_word=$2
47275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47276$as_echo_n "checking for $ac_word... " >&6; }
47277if ${ac_cv_path_BUILD_STRIP+:} false; then :
47278  $as_echo_n "(cached) " >&6
47279else
47280  case $BUILD_STRIP in
47281  [\\/]* | ?:[\\/]*)
47282  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47283  ;;
47284  *)
47285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47286for as_dir in $PATH
47287do
47288  IFS=$as_save_IFS
47289  test -z "$as_dir" && as_dir=.
47290    for ac_exec_ext in '' $ac_executable_extensions; do
47291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47292    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47294    break 2
47295  fi
47296done
47297  done
47298IFS=$as_save_IFS
47299
47300  ;;
47301esac
47302fi
47303BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47304if test -n "$BUILD_STRIP"; then
47305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47306$as_echo "$BUILD_STRIP" >&6; }
47307else
47308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47309$as_echo "no" >&6; }
47310fi
47311
47312
47313          if test "x$BUILD_STRIP" = x; then
47314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47315          fi
47316        else
47317          # Otherwise we believe it is a complete path. Use it as it is.
47318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47319$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47321$as_echo_n "checking for BUILD_STRIP... " >&6; }
47322          if test ! -x "$tool_specified"; then
47323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47324$as_echo "not found" >&6; }
47325            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47326          fi
47327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47328$as_echo "$tool_specified" >&6; }
47329        fi
47330      fi
47331    fi
47332
47333  fi
47334
47335
47336
47337  # Only process if variable expands to non-empty
47338
47339  if test "x$BUILD_STRIP" != x; then
47340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47341
47342  # First separate the path from the arguments. This will split at the first
47343  # space.
47344  complete="$BUILD_STRIP"
47345  path="${complete%% *}"
47346  tmp="$complete EOL"
47347  arguments="${tmp#* }"
47348
47349  # Input might be given as Windows format, start by converting to
47350  # unix format.
47351  new_path=`$CYGPATH -u "$path"`
47352
47353  # Now try to locate executable using which
47354  new_path=`$WHICH "$new_path" 2> /dev/null`
47355  # bat and cmd files are not always considered executable in cygwin causing which
47356  # to not find them
47357  if test "x$new_path" = x \
47358      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47359      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47360    new_path=`$CYGPATH -u "$path"`
47361  fi
47362  if test "x$new_path" = x; then
47363    # Oops. Which didn't find the executable.
47364    # The splitting of arguments from the executable at a space might have been incorrect,
47365    # since paths with space are more likely in Windows. Give it another try with the whole
47366    # argument.
47367    path="$complete"
47368    arguments="EOL"
47369    new_path=`$CYGPATH -u "$path"`
47370    new_path=`$WHICH "$new_path" 2> /dev/null`
47371    # bat and cmd files are not always considered executable in cygwin causing which
47372    # to not find them
47373    if test "x$new_path" = x \
47374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47376      new_path=`$CYGPATH -u "$path"`
47377    fi
47378    if test "x$new_path" = x; then
47379      # It's still not found. Now this is an unrecoverable error.
47380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47381$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47382      has_space=`$ECHO "$complete" | $GREP " "`
47383      if test "x$has_space" != x; then
47384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47386      fi
47387      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47388    fi
47389  fi
47390
47391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47394  # "foo.exe" is OK but "foo" is an error.
47395  #
47396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47397  # It is also a way to make sure we got the proper file name for the real test later on.
47398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47399  if test "x$test_shortpath" = x; then
47400    # Short path failed, file does not exist as specified.
47401    # Try adding .exe or .cmd
47402    if test -f "${new_path}.exe"; then
47403      input_to_shortpath="${new_path}.exe"
47404    elif test -f "${new_path}.cmd"; then
47405      input_to_shortpath="${new_path}.cmd"
47406    else
47407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47408$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47411      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47412    fi
47413  else
47414    input_to_shortpath="$new_path"
47415  fi
47416
47417  # Call helper function which possibly converts this using DOS-style short mode.
47418  # If so, the updated path is stored in $new_path.
47419  new_path="$input_to_shortpath"
47420
47421  input_path="$input_to_shortpath"
47422  # Check if we need to convert this using DOS-style short mode. If the path
47423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47424  # take no chances and rewrite it.
47425  # Note: m4 eats our [], so we need to use [ and ] instead.
47426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47427  if test "x$has_forbidden_chars" != x; then
47428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47432      # Going to short mode and back again did indeed matter. Since short mode is
47433      # case insensitive, let's make it lowercase to improve readability.
47434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47435      # Now convert it back to Unix-style (cygpath)
47436      input_path=`$CYGPATH -u "$shortmode_path"`
47437      new_path="$input_path"
47438    fi
47439  fi
47440
47441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47442  if test "x$test_cygdrive_prefix" = x; then
47443    # As a simple fix, exclude /usr/bin since it's not a real path.
47444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47446      # a path prefixed by /cygdrive for fixpath to work.
47447      new_path="$CYGWIN_ROOT_PATH$input_path"
47448    fi
47449  fi
47450
47451  # remove trailing .exe if any
47452  new_path="${new_path/%.exe/}"
47453
47454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47455
47456  # First separate the path from the arguments. This will split at the first
47457  # space.
47458  complete="$BUILD_STRIP"
47459  path="${complete%% *}"
47460  tmp="$complete EOL"
47461  arguments="${tmp#* }"
47462
47463  # Input might be given as Windows format, start by converting to
47464  # unix format.
47465  new_path="$path"
47466
47467  windows_path="$new_path"
47468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47469    unix_path=`$CYGPATH -u "$windows_path"`
47470    new_path="$unix_path"
47471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47473    new_path="$unix_path"
47474  fi
47475
47476
47477  # Now try to locate executable using which
47478  new_path=`$WHICH "$new_path" 2> /dev/null`
47479
47480  if test "x$new_path" = x; then
47481    # Oops. Which didn't find the executable.
47482    # The splitting of arguments from the executable at a space might have been incorrect,
47483    # since paths with space are more likely in Windows. Give it another try with the whole
47484    # argument.
47485    path="$complete"
47486    arguments="EOL"
47487    new_path="$path"
47488
47489  windows_path="$new_path"
47490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47491    unix_path=`$CYGPATH -u "$windows_path"`
47492    new_path="$unix_path"
47493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47495    new_path="$unix_path"
47496  fi
47497
47498
47499    new_path=`$WHICH "$new_path" 2> /dev/null`
47500    # bat and cmd files are not always considered executable in MSYS causing which
47501    # to not find them
47502    if test "x$new_path" = x \
47503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47505      new_path="$path"
47506
47507  windows_path="$new_path"
47508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47509    unix_path=`$CYGPATH -u "$windows_path"`
47510    new_path="$unix_path"
47511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47513    new_path="$unix_path"
47514  fi
47515
47516    fi
47517
47518    if test "x$new_path" = x; then
47519      # It's still not found. Now this is an unrecoverable error.
47520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47521$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47522      has_space=`$ECHO "$complete" | $GREP " "`
47523      if test "x$has_space" != x; then
47524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47526      fi
47527      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47528    fi
47529  fi
47530
47531  # Now new_path has a complete unix path to the binary
47532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47533    # Keep paths in /bin as-is, but remove trailing .exe if any
47534    new_path="${new_path/%.exe/}"
47535    # Do not save /bin paths to all_fixpath_prefixes!
47536  else
47537    # Not in mixed or Windows style, start by that.
47538    new_path=`cmd //c echo $new_path`
47539
47540  input_path="$new_path"
47541  # Check if we need to convert this using DOS-style short mode. If the path
47542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47543  # take no chances and rewrite it.
47544  # Note: m4 eats our [], so we need to use [ and ] instead.
47545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47546  if test "x$has_forbidden_chars" != x; then
47547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47549  fi
47550
47551    # Output is in $new_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    # remove trailing .exe if any
47563    new_path="${new_path/%.exe/}"
47564
47565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47567  fi
47568
47569    else
47570      # We're on a unix platform. Hooray! :)
47571      # First separate the path from the arguments. This will split at the first
47572      # space.
47573      complete="$BUILD_STRIP"
47574      path="${complete%% *}"
47575      tmp="$complete EOL"
47576      arguments="${tmp#* }"
47577
47578      # Cannot rely on the command "which" here since it doesn't always work.
47579      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47580      if test -z "$is_absolute_path"; then
47581        # Path to executable is not absolute. Find it.
47582        IFS_save="$IFS"
47583        IFS=:
47584        for p in $PATH; do
47585          if test -f "$p/$path" && test -x "$p/$path"; then
47586            new_path="$p/$path"
47587            break
47588          fi
47589        done
47590        IFS="$IFS_save"
47591      else
47592        # This is an absolute path, we can use it without further modifications.
47593        new_path="$path"
47594      fi
47595
47596      if test "x$new_path" = x; then
47597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47598$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47599        has_space=`$ECHO "$complete" | $GREP " "`
47600        if test "x$has_space" != x; then
47601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47603        fi
47604        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47605      fi
47606    fi
47607
47608    # Now join together the path and the arguments once again
47609    if test "x$arguments" != xEOL; then
47610      new_complete="$new_path ${arguments% *}"
47611    else
47612      new_complete="$new_path"
47613    fi
47614
47615    if test "x$complete" != "x$new_complete"; then
47616      BUILD_STRIP="$new_complete"
47617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47618$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47619    fi
47620  fi
47621
47622    # Assume the C compiler is the assembler
47623    BUILD_AS="$BUILD_CC -c"
47624    # Just like for the target compiler, use the compiler as linker
47625    BUILD_LD="$BUILD_CC"
47626    BUILD_LDCXX="$BUILD_CXX"
47627
47628    PATH="$OLDPATH"
47629
47630
47631  COMPILER=$BUILD_CC
47632  COMPILER_NAME=BuildC
47633
47634  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47635    # cc -V output typically looks like
47636    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47637    # or
47638    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47639    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47640    # Check that this is likely to be the Solaris Studio cc.
47641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47642    if test $? -ne 0; then
47643      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47644      { $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
47645$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47646      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47647$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47649$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47650      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47651    fi
47652    # Remove usage instructions (if present), and
47653    # collapse compiler output into a single line
47654    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47655        $SED -e 's/ *[Uu]sage:.*//'`
47656    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47657        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47658  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47659    # xlc -qversion output typically looks like
47660    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47661    #     Version: 11.01.0000.0015
47662    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47663    # Check that this is likely to be the IBM XL C compiler.
47664    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47665    if test $? -ne 0; then
47666      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47667      { $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
47668$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47669      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47670$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47671      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47672$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47673      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47674    fi
47675    # Collapse compiler output into a single line
47676    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47677    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47678        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47679  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47680    # There is no specific version flag, but all output starts with a version string.
47681    # First line typically looks something like:
47682    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47683    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47684    # Check that this is likely to be Microsoft CL.EXE.
47685    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47686    if test $? -ne 0; then
47687      { $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
47688$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47689      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47690$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47691      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47692    fi
47693    # Collapse compiler output into a single line
47694    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47695    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47696        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47697  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47698    # gcc --version output typically looks like
47699    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47700    #     Copyright (C) 2013 Free Software Foundation, Inc.
47701    #     This is free software; see the source for copying conditions.  There is NO
47702    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47703    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47704    # Check that this is likely to be GCC.
47705    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47706    if test $? -ne 0; then
47707      { $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
47708$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47709      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47710$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47711      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47712    fi
47713    # Remove Copyright and legalese from version string, and
47714    # collapse into a single line
47715    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47716        $SED -e 's/ *Copyright .*//'`
47717    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47718        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47719  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47720    # clang --version output typically looks like
47721    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47722    #    clang version 3.3 (tags/RELEASE_33/final)
47723    # or
47724    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47725    #    Target: x86_64-pc-linux-gnu
47726    #    Thread model: posix
47727    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47728    # Check that this is likely to be clang
47729    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47730    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47734$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47735      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47736    fi
47737    # Collapse compiler output into a single line
47738    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47739    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47740        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47741  else
47742      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47743  fi
47744  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47745  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47746  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47747  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47748
47749  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47750$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47751
47752
47753  COMPILER=$BUILD_CXX
47754  COMPILER_NAME=BuildC++
47755
47756  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47757    # cc -V output typically looks like
47758    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47759    # or
47760    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47761    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47762    # Check that this is likely to be the Solaris Studio cc.
47763    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47764    if test $? -ne 0; then
47765      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47766      { $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
47767$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47769$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47770      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47771$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47772      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47773    fi
47774    # Remove usage instructions (if present), and
47775    # collapse compiler output into a single line
47776    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47777        $SED -e 's/ *[Uu]sage:.*//'`
47778    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47779        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47780  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47781    # xlc -qversion output typically looks like
47782    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47783    #     Version: 11.01.0000.0015
47784    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47785    # Check that this is likely to be the IBM XL C compiler.
47786    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47787    if test $? -ne 0; then
47788      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47789      { $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
47790$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47791      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47792$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47793      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47794$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47795      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47796    fi
47797    # Collapse compiler output into a single line
47798    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47799    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47800        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47801  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47802    # There is no specific version flag, but all output starts with a version string.
47803    # First line typically looks something like:
47804    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47805    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47806    # Check that this is likely to be Microsoft CL.EXE.
47807    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47808    if test $? -ne 0; then
47809      { $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
47810$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47811      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47812$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47813      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47814    fi
47815    # Collapse compiler output into a single line
47816    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47817    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47818        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47819  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47820    # gcc --version output typically looks like
47821    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47822    #     Copyright (C) 2013 Free Software Foundation, Inc.
47823    #     This is free software; see the source for copying conditions.  There is NO
47824    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47825    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47826    # Check that this is likely to be GCC.
47827    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47828    if test $? -ne 0; then
47829      { $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
47830$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47831      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47832$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47833      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47834    fi
47835    # Remove Copyright and legalese from version string, and
47836    # collapse into a single line
47837    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47838        $SED -e 's/ *Copyright .*//'`
47839    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47840        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47841  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47842    # clang --version output typically looks like
47843    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47844    #    clang version 3.3 (tags/RELEASE_33/final)
47845    # or
47846    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47847    #    Target: x86_64-pc-linux-gnu
47848    #    Thread model: posix
47849    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47850    # Check that this is likely to be clang
47851    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47852    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47856$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47857      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47858    fi
47859    # Collapse compiler output into a single line
47860    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47861    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47862        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47863  else
47864      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47865  fi
47866  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47867  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47868  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47869  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47870
47871  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47872$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47873
47874
47875  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47876    { $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
47877$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47878    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47879$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47880  fi
47881
47882  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47883  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47884    { $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
47885$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;}
47886  fi
47887
47888  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47889    { $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
47890$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47891  fi
47892
47893  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47894
47895  else
47896    # If we are not cross compiling, use the normal target compilers for
47897    # building the build platform executables.
47898    BUILD_CC="$CC"
47899    BUILD_CXX="$CXX"
47900    BUILD_LD="$LD"
47901    BUILD_LDCXX="$LDCXX"
47902    BUILD_NM="$NM"
47903    BUILD_AS="$AS"
47904    BUILD_OBJCOPY="$OBJCOPY"
47905    BUILD_STRIP="$STRIP"
47906    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47907    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47908    BUILD_AR="$AR"
47909
47910
47911  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47912    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47913$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47915$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47916  fi
47917
47918  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47919  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47920    { $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
47921$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;}
47922  fi
47923
47924  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47925    { $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
47926$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47927  fi
47928
47929  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47930
47931  fi
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946  # The package path is used only on macosx?
47947  # FIXME: clean this up, and/or move it elsewhere.
47948  PACKAGE_PATH=/opt/local
47949
47950
47951  # Check for extra potential brokenness.
47952  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47953    # On Windows, double-check that we got the right compiler.
47954    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47955    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47956    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47957      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47958        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
47959      fi
47960    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47961      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47962        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47963      fi
47964    fi
47965  fi
47966
47967  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47968    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47969    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47970    # This is later checked when setting flags.
47971
47972    # "-Og" suppported for GCC 4.8 and later
47973    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021    # Execute function body
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
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    # Execute function body
48071
48072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48073$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48074  supports=yes
48075
48076  saved_cflags="$CFLAGS"
48077  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48078  ac_ext=c
48079ac_cpp='$CPP $CPPFLAGS'
48080ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48081ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48082ac_compiler_gnu=$ac_cv_c_compiler_gnu
48083
48084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48085/* end confdefs.h.  */
48086int i;
48087_ACEOF
48088if ac_fn_c_try_compile "$LINENO"; then :
48089
48090else
48091  supports=no
48092fi
48093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48094  ac_ext=cpp
48095ac_cpp='$CXXCPP $CPPFLAGS'
48096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48099
48100  CFLAGS="$saved_cflags"
48101
48102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48103$as_echo "$supports" >&6; }
48104  if test "x$supports" = "xyes" ; then
48105    :
48106    C_COMP_SUPPORTS="yes"
48107  else
48108    :
48109    C_COMP_SUPPORTS="no"
48110  fi
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170    # Execute function body
48171
48172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48173$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48174  supports=yes
48175
48176  saved_cxxflags="$CXXFLAGS"
48177  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48178  ac_ext=cpp
48179ac_cpp='$CXXCPP $CPPFLAGS'
48180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48183
48184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48185/* end confdefs.h.  */
48186int i;
48187_ACEOF
48188if ac_fn_cxx_try_compile "$LINENO"; then :
48189
48190else
48191  supports=no
48192fi
48193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48194  ac_ext=cpp
48195ac_cpp='$CXXCPP $CPPFLAGS'
48196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48199
48200  CXXFLAGS="$saved_cxxflags"
48201
48202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48203$as_echo "$supports" >&6; }
48204  if test "x$supports" = "xyes" ; then
48205    :
48206    CXX_COMP_SUPPORTS="yes"
48207  else
48208    :
48209    CXX_COMP_SUPPORTS="no"
48210  fi
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48225$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48226  supports=no
48227  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48228
48229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48230$as_echo "$supports" >&6; }
48231  if test "x$supports" = "xyes" ; then
48232    :
48233    HAS_CFLAG_OPTIMIZE_DEBUG=true
48234  else
48235    :
48236    HAS_CFLAG_OPTIMIZE_DEBUG=false
48237  fi
48238
48239
48240
48241
48242
48243
48244
48245    # "-z relro" supported in GNU binutils 2.17 and later
48246    LINKER_RELRO_FLAG="-Wl,-z,relro"
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294    # Execute function body
48295
48296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48297$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48298  supports=yes
48299
48300  saved_ldflags="$LDFLAGS"
48301  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48302  ac_ext=c
48303ac_cpp='$CPP $CPPFLAGS'
48304ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48305ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48306ac_compiler_gnu=$ac_cv_c_compiler_gnu
48307
48308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48309/* end confdefs.h.  */
48310
48311int
48312main ()
48313{
48314
48315  ;
48316  return 0;
48317}
48318_ACEOF
48319if ac_fn_c_try_link "$LINENO"; then :
48320
48321else
48322  supports=no
48323fi
48324rm -f core conftest.err conftest.$ac_objext \
48325    conftest$ac_exeext conftest.$ac_ext
48326  ac_ext=cpp
48327ac_cpp='$CXXCPP $CPPFLAGS'
48328ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48329ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48330ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48331
48332  LDFLAGS="$saved_ldflags"
48333
48334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48335$as_echo "$supports" >&6; }
48336  if test "x$supports" = "xyes" ; then
48337    :
48338    HAS_LINKER_RELRO=true
48339  else
48340    :
48341    HAS_LINKER_RELRO=false
48342  fi
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356    # "-z now" supported in GNU binutils 2.11 and later
48357    LINKER_NOW_FLAG="-Wl,-z,now"
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405    # Execute function body
48406
48407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48408$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48409  supports=yes
48410
48411  saved_ldflags="$LDFLAGS"
48412  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48413  ac_ext=c
48414ac_cpp='$CPP $CPPFLAGS'
48415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48417ac_compiler_gnu=$ac_cv_c_compiler_gnu
48418
48419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48420/* end confdefs.h.  */
48421
48422int
48423main ()
48424{
48425
48426  ;
48427  return 0;
48428}
48429_ACEOF
48430if ac_fn_c_try_link "$LINENO"; then :
48431
48432else
48433  supports=no
48434fi
48435rm -f core conftest.err conftest.$ac_objext \
48436    conftest$ac_exeext conftest.$ac_ext
48437  ac_ext=cpp
48438ac_cpp='$CXXCPP $CPPFLAGS'
48439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48442
48443  LDFLAGS="$saved_ldflags"
48444
48445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48446$as_echo "$supports" >&6; }
48447  if test "x$supports" = "xyes" ; then
48448    :
48449    HAS_LINKER_NOW=true
48450  else
48451    :
48452    HAS_LINKER_NOW=false
48453  fi
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466  fi
48467
48468  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48469  # in executable.'
48470  USING_BROKEN_SUSE_LD=no
48471  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48473$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48474    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48475    $ECHO "int main() { }" > main.c
48476    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48478$as_echo "no" >&6; }
48479      USING_BROKEN_SUSE_LD=no
48480    else
48481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48482$as_echo "yes" >&6; }
48483      USING_BROKEN_SUSE_LD=yes
48484    fi
48485    $RM version-script.map main.c a.out
48486  fi
48487
48488
48489  # Setup hotspot lecagy names for toolchains
48490  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48491  if test "x$TOOLCHAIN_TYPE" = xclang; then
48492    HOTSPOT_TOOLCHAIN_TYPE=gcc
48493  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48494    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48495  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48496    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48497  fi
48498
48499
48500
48501# Setup the JTReg Regression Test Harness.
48502
48503
48504# Check whether --with-jtreg was given.
48505if test "${with_jtreg+set}" = set; then :
48506  withval=$with_jtreg;
48507else
48508  with_jtreg=no
48509fi
48510
48511
48512  if test "x$with_jtreg" = xno; then
48513    # jtreg disabled
48514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48515$as_echo_n "checking for jtreg... " >&6; }
48516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48517$as_echo "no" >&6; }
48518  else
48519    if test "x$with_jtreg" != xyes; then
48520      # with path specified.
48521      JT_HOME="$with_jtreg"
48522    fi
48523
48524    if test "x$JT_HOME" != x; then
48525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48526$as_echo_n "checking for jtreg... " >&6; }
48527
48528      # use JT_HOME enviroment var.
48529
48530  # Only process if variable expands to non-empty
48531
48532  if test "x$JT_HOME" != x; then
48533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48534
48535  # Input might be given as Windows format, start by converting to
48536  # unix format.
48537  path="$JT_HOME"
48538  new_path=`$CYGPATH -u "$path"`
48539
48540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48543  # "foo.exe" is OK but "foo" is an error.
48544  #
48545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48546  # It is also a way to make sure we got the proper file name for the real test later on.
48547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48548  if test "x$test_shortpath" = x; then
48549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48550$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48551    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48552  fi
48553
48554  # Call helper function which possibly converts this using DOS-style short mode.
48555  # If so, the updated path is stored in $new_path.
48556
48557  input_path="$new_path"
48558  # Check if we need to convert this using DOS-style short mode. If the path
48559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48560  # take no chances and rewrite it.
48561  # Note: m4 eats our [], so we need to use [ and ] instead.
48562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48563  if test "x$has_forbidden_chars" != x; then
48564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48568      # Going to short mode and back again did indeed matter. Since short mode is
48569      # case insensitive, let's make it lowercase to improve readability.
48570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48571      # Now convert it back to Unix-style (cygpath)
48572      input_path=`$CYGPATH -u "$shortmode_path"`
48573      new_path="$input_path"
48574    fi
48575  fi
48576
48577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48578  if test "x$test_cygdrive_prefix" = x; then
48579    # As a simple fix, exclude /usr/bin since it's not a real path.
48580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48582      # a path prefixed by /cygdrive for fixpath to work.
48583      new_path="$CYGWIN_ROOT_PATH$input_path"
48584    fi
48585  fi
48586
48587
48588  if test "x$path" != "x$new_path"; then
48589    JT_HOME="$new_path"
48590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48591$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48592  fi
48593
48594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48595
48596  path="$JT_HOME"
48597  has_colon=`$ECHO $path | $GREP ^.:`
48598  new_path="$path"
48599  if test "x$has_colon" = x; then
48600    # Not in mixed or Windows style, start by that.
48601    new_path=`cmd //c echo $path`
48602  fi
48603
48604
48605  input_path="$new_path"
48606  # Check if we need to convert this using DOS-style short mode. If the path
48607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48608  # take no chances and rewrite it.
48609  # Note: m4 eats our [], so we need to use [ and ] instead.
48610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48611  if test "x$has_forbidden_chars" != x; then
48612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48614  fi
48615
48616
48617  windows_path="$new_path"
48618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48619    unix_path=`$CYGPATH -u "$windows_path"`
48620    new_path="$unix_path"
48621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48623    new_path="$unix_path"
48624  fi
48625
48626  if test "x$path" != "x$new_path"; then
48627    JT_HOME="$new_path"
48628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48629$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48630  fi
48631
48632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48634
48635    else
48636      # We're on a unix platform. Hooray! :)
48637      path="$JT_HOME"
48638      has_space=`$ECHO "$path" | $GREP " "`
48639      if test "x$has_space" != x; then
48640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48641$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48643      fi
48644
48645      # Use eval to expand a potential ~
48646      eval path="$path"
48647      if test ! -f "$path" && test ! -d "$path"; then
48648        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48649      fi
48650
48651      if test -d "$path"; then
48652        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48653      else
48654        dir="`$DIRNAME "$path"`"
48655        base="`$BASENAME "$path"`"
48656        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48657      fi
48658    fi
48659  fi
48660
48661
48662      # jtreg win32 script works for everybody
48663      JTREGEXE="$JT_HOME/bin/jtreg"
48664
48665      if test ! -f "$JTREGEXE"; then
48666        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48667      fi
48668
48669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48670$as_echo "$JTREGEXE" >&6; }
48671    else
48672      # try to find jtreg on path
48673
48674
48675
48676  # Publish this variable in the help.
48677
48678
48679  if [ -z "${JTREGEXE+x}" ]; then
48680    # The variable is not set by user, try to locate tool using the code snippet
48681    for ac_prog in jtreg
48682do
48683  # Extract the first word of "$ac_prog", so it can be a program name with args.
48684set dummy $ac_prog; ac_word=$2
48685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48686$as_echo_n "checking for $ac_word... " >&6; }
48687if ${ac_cv_path_JTREGEXE+:} false; then :
48688  $as_echo_n "(cached) " >&6
48689else
48690  case $JTREGEXE in
48691  [\\/]* | ?:[\\/]*)
48692  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48693  ;;
48694  *)
48695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48696for as_dir in $PATH
48697do
48698  IFS=$as_save_IFS
48699  test -z "$as_dir" && as_dir=.
48700    for ac_exec_ext in '' $ac_executable_extensions; do
48701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48702    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48704    break 2
48705  fi
48706done
48707  done
48708IFS=$as_save_IFS
48709
48710  ;;
48711esac
48712fi
48713JTREGEXE=$ac_cv_path_JTREGEXE
48714if test -n "$JTREGEXE"; then
48715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48716$as_echo "$JTREGEXE" >&6; }
48717else
48718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48719$as_echo "no" >&6; }
48720fi
48721
48722
48723  test -n "$JTREGEXE" && break
48724done
48725
48726  else
48727    # The variable is set, but is it from the command line or the environment?
48728
48729    # Try to remove the string !JTREGEXE! from our list.
48730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48732      # If it failed, the variable was not from the command line. Ignore it,
48733      # but warn the user (except for BASH, which is always set by the calling BASH).
48734      if test "xJTREGEXE" != xBASH; then
48735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48736$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48737      fi
48738      # Try to locate tool using the code snippet
48739      for ac_prog in jtreg
48740do
48741  # Extract the first word of "$ac_prog", so it can be a program name with args.
48742set dummy $ac_prog; ac_word=$2
48743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48744$as_echo_n "checking for $ac_word... " >&6; }
48745if ${ac_cv_path_JTREGEXE+:} false; then :
48746  $as_echo_n "(cached) " >&6
48747else
48748  case $JTREGEXE in
48749  [\\/]* | ?:[\\/]*)
48750  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48751  ;;
48752  *)
48753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48754for as_dir in $PATH
48755do
48756  IFS=$as_save_IFS
48757  test -z "$as_dir" && as_dir=.
48758    for ac_exec_ext in '' $ac_executable_extensions; do
48759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48760    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48762    break 2
48763  fi
48764done
48765  done
48766IFS=$as_save_IFS
48767
48768  ;;
48769esac
48770fi
48771JTREGEXE=$ac_cv_path_JTREGEXE
48772if test -n "$JTREGEXE"; then
48773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48774$as_echo "$JTREGEXE" >&6; }
48775else
48776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48777$as_echo "no" >&6; }
48778fi
48779
48780
48781  test -n "$JTREGEXE" && break
48782done
48783
48784    else
48785      # If it succeeded, then it was overridden by the user. We will use it
48786      # for the tool.
48787
48788      # First remove it from the list of overridden variables, so we can test
48789      # for unknown variables in the end.
48790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48791
48792      # Check if we try to supply an empty value
48793      if test "x$JTREGEXE" = x; then
48794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48795$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48797$as_echo_n "checking for JTREGEXE... " >&6; }
48798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48799$as_echo "disabled" >&6; }
48800      else
48801        # Check if the provided tool contains a complete path.
48802        tool_specified="$JTREGEXE"
48803        tool_basename="${tool_specified##*/}"
48804        if test "x$tool_basename" = "x$tool_specified"; then
48805          # A command without a complete path is provided, search $PATH.
48806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48807$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48808          # Extract the first word of "$tool_basename", so it can be a program name with args.
48809set dummy $tool_basename; ac_word=$2
48810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48811$as_echo_n "checking for $ac_word... " >&6; }
48812if ${ac_cv_path_JTREGEXE+:} false; then :
48813  $as_echo_n "(cached) " >&6
48814else
48815  case $JTREGEXE in
48816  [\\/]* | ?:[\\/]*)
48817  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48818  ;;
48819  *)
48820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48821for as_dir in $PATH
48822do
48823  IFS=$as_save_IFS
48824  test -z "$as_dir" && as_dir=.
48825    for ac_exec_ext in '' $ac_executable_extensions; do
48826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48827    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48829    break 2
48830  fi
48831done
48832  done
48833IFS=$as_save_IFS
48834
48835  ;;
48836esac
48837fi
48838JTREGEXE=$ac_cv_path_JTREGEXE
48839if test -n "$JTREGEXE"; then
48840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48841$as_echo "$JTREGEXE" >&6; }
48842else
48843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48844$as_echo "no" >&6; }
48845fi
48846
48847
48848          if test "x$JTREGEXE" = x; then
48849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48850          fi
48851        else
48852          # Otherwise we believe it is a complete path. Use it as it is.
48853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48854$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48856$as_echo_n "checking for JTREGEXE... " >&6; }
48857          if test ! -x "$tool_specified"; then
48858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48859$as_echo "not found" >&6; }
48860            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48861          fi
48862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48863$as_echo "$tool_specified" >&6; }
48864        fi
48865      fi
48866    fi
48867
48868  fi
48869
48870
48871
48872  if test "x$JTREGEXE" = x; then
48873    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48874  fi
48875
48876
48877      JT_HOME="`$DIRNAME $JTREGEXE`"
48878    fi
48879  fi
48880
48881
48882
48883
48884
48885
48886  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48887  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48888  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48889  #                              commands produced by the link step (currently AIX only)
48890  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48891    COMPILER_TARGET_BITS_FLAG="-q"
48892    COMPILER_COMMAND_FILE_FLAG="-f"
48893    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48894  else
48895    COMPILER_TARGET_BITS_FLAG="-m"
48896    COMPILER_COMMAND_FILE_FLAG="@"
48897    COMPILER_BINDCMD_FILE_FLAG=""
48898
48899    # The solstudio linker does not support @-files.
48900    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48901      COMPILER_COMMAND_FILE_FLAG=
48902    fi
48903
48904    # Check if @file is supported by gcc
48905    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48907$as_echo_n "checking if @file is supported by gcc... " >&6; }
48908      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48909      $ECHO "" "--version" > command.file
48910      if $CXX @command.file 2>&5 >&5; then
48911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48912$as_echo "yes" >&6; }
48913        COMPILER_COMMAND_FILE_FLAG="@"
48914      else
48915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48916$as_echo "no" >&6; }
48917        COMPILER_COMMAND_FILE_FLAG=
48918      fi
48919      $RM command.file
48920    fi
48921  fi
48922
48923
48924
48925
48926  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48927  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48928    ARFLAGS="-r"
48929  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48930    ARFLAGS="-X64"
48931  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48932    # lib.exe is used as AR to create static libraries.
48933    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48934  else
48935    ARFLAGS=""
48936  fi
48937
48938
48939  ## Setup strip.
48940  # FIXME: should this really be per platform, or should it be per toolchain type?
48941  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48942  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48943  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48944    STRIPFLAGS="-g"
48945  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48946    STRIPFLAGS="-x"
48947  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48948    STRIPFLAGS="-S"
48949  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48950    STRIPFLAGS="-X32_64"
48951  fi
48952
48953
48954
48955  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48956    CC_OUT_OPTION=-Fo
48957    EXE_OUT_OPTION=-out:
48958    LD_OUT_OPTION=-out:
48959    AR_OUT_OPTION=-out:
48960  else
48961    # The option used to specify the target .o,.a or .so file.
48962    # When compiling, how to specify the to be created object file.
48963    CC_OUT_OPTION='-o$(SPACE)'
48964    # When linking, how to specify the to be created executable.
48965    EXE_OUT_OPTION='-o$(SPACE)'
48966    # When linking, how to specify the to be created dynamically linkable library.
48967    LD_OUT_OPTION='-o$(SPACE)'
48968    # When archiving, how to specify the to be create static archive for object files.
48969    AR_OUT_OPTION='rcs$(SPACE)'
48970  fi
48971
48972
48973
48974
48975
48976  # On Windows, we need to set RC flags.
48977  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48978    RC_FLAGS="-nologo -l0x409"
48979    JVM_RCFLAGS="-nologo"
48980    if test "x$DEBUG_LEVEL" = xrelease; then
48981      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48982      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48983    fi
48984
48985    # The version variables used to create RC_FLAGS may be overridden
48986    # in a custom configure script, or possibly the command line.
48987    # Let those variables be expanded at make time in spec.gmk.
48988    # The \$ are escaped to the shell, and the $(...) variables
48989    # are evaluated by make.
48990    RC_FLAGS="$RC_FLAGS \
48991        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48992        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48993        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48994        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48995        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48996        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48997        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48998
48999    JVM_RCFLAGS="$JVM_RCFLAGS \
49000        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49001        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49002        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49003        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49004        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49005        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49006        -D\"HS_FNAME=jvm.dll\" \
49007        -D\"HS_INTERNAL_NAME=jvm\""
49008  fi
49009
49010
49011
49012  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49013    # silence copyright notice and other headers.
49014    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49015  fi
49016
49017
49018# Now we can test some aspects on the target using configure macros.
49019
49020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49021$as_echo_n "checking for ANSI C header files... " >&6; }
49022if ${ac_cv_header_stdc+:} false; then :
49023  $as_echo_n "(cached) " >&6
49024else
49025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49026/* end confdefs.h.  */
49027#include <stdlib.h>
49028#include <stdarg.h>
49029#include <string.h>
49030#include <float.h>
49031
49032int
49033main ()
49034{
49035
49036  ;
49037  return 0;
49038}
49039_ACEOF
49040if ac_fn_cxx_try_compile "$LINENO"; then :
49041  ac_cv_header_stdc=yes
49042else
49043  ac_cv_header_stdc=no
49044fi
49045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49046
49047if test $ac_cv_header_stdc = yes; then
49048  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49050/* end confdefs.h.  */
49051#include <string.h>
49052
49053_ACEOF
49054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49055  $EGREP "memchr" >/dev/null 2>&1; then :
49056
49057else
49058  ac_cv_header_stdc=no
49059fi
49060rm -f conftest*
49061
49062fi
49063
49064if test $ac_cv_header_stdc = yes; then
49065  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49067/* end confdefs.h.  */
49068#include <stdlib.h>
49069
49070_ACEOF
49071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49072  $EGREP "free" >/dev/null 2>&1; then :
49073
49074else
49075  ac_cv_header_stdc=no
49076fi
49077rm -f conftest*
49078
49079fi
49080
49081if test $ac_cv_header_stdc = yes; then
49082  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49083  if test "$cross_compiling" = yes; then :
49084  :
49085else
49086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49087/* end confdefs.h.  */
49088#include <ctype.h>
49089#include <stdlib.h>
49090#if ((' ' & 0x0FF) == 0x020)
49091# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49092# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49093#else
49094# define ISLOWER(c) \
49095		   (('a' <= (c) && (c) <= 'i') \
49096		     || ('j' <= (c) && (c) <= 'r') \
49097		     || ('s' <= (c) && (c) <= 'z'))
49098# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49099#endif
49100
49101#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49102int
49103main ()
49104{
49105  int i;
49106  for (i = 0; i < 256; i++)
49107    if (XOR (islower (i), ISLOWER (i))
49108	|| toupper (i) != TOUPPER (i))
49109      return 2;
49110  return 0;
49111}
49112_ACEOF
49113if ac_fn_cxx_try_run "$LINENO"; then :
49114
49115else
49116  ac_cv_header_stdc=no
49117fi
49118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49119  conftest.$ac_objext conftest.beam conftest.$ac_ext
49120fi
49121
49122fi
49123fi
49124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49125$as_echo "$ac_cv_header_stdc" >&6; }
49126if test $ac_cv_header_stdc = yes; then
49127
49128$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49129
49130fi
49131
49132# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49133for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49134		  inttypes.h stdint.h unistd.h
49135do :
49136  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49137ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49138"
49139if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49140  cat >>confdefs.h <<_ACEOF
49141#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49142_ACEOF
49143
49144fi
49145
49146done
49147
49148
49149
49150  ###############################################################################
49151  #
49152  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49153  # (The JVM can use 32 or 64 bit Java pointers but that decision
49154  # is made at runtime.)
49155  #
49156
49157  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49158    # Always specify -m flag on Solaris
49159    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49160
49161  # When we add flags to the "official" CFLAGS etc, we need to
49162  # keep track of these additions in ADDED_CFLAGS etc. These
49163  # will later be checked to make sure only controlled additions
49164  # have been made to CFLAGS etc.
49165  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49166  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49167  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49168
49169  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49170  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49171  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49172
49173  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49174  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49175  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49176
49177  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49178  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49179  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49180
49181  elif test "x$COMPILE_TYPE" = xreduced; then
49182    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49183      # Specify -m if running reduced on unix platforms
49184
49185  # When we add flags to the "official" CFLAGS etc, we need to
49186  # keep track of these additions in ADDED_CFLAGS etc. These
49187  # will later be checked to make sure only controlled additions
49188  # have been made to CFLAGS etc.
49189  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49190  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49191  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49192
49193  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49194  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49195  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49196
49197  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49198  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49199  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49200
49201  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49202  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49203  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49204
49205    fi
49206  fi
49207  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49208    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49209    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49210    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49211  fi
49212
49213  # Make compilation sanity check
49214  for ac_header in stdio.h
49215do :
49216  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49217if test "x$ac_cv_header_stdio_h" = xyes; then :
49218  cat >>confdefs.h <<_ACEOF
49219#define HAVE_STDIO_H 1
49220_ACEOF
49221
49222else
49223
49224    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49225$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49226    if test "x$COMPILE_TYPE" = xreduced; then
49227
49228  # Print a helpful message on how to acquire the necessary build dependency.
49229  # reduced is the help tag: freetype, cups, alsa etc
49230  MISSING_DEPENDENCY=reduced
49231
49232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49233    cygwin_help $MISSING_DEPENDENCY
49234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49235    msys_help $MISSING_DEPENDENCY
49236  else
49237    PKGHANDLER_COMMAND=
49238
49239    case $PKGHANDLER in
49240      apt-get)
49241        apt_help     $MISSING_DEPENDENCY ;;
49242      yum)
49243        yum_help     $MISSING_DEPENDENCY ;;
49244      brew)
49245        brew_help    $MISSING_DEPENDENCY ;;
49246      port)
49247        port_help    $MISSING_DEPENDENCY ;;
49248      pkgutil)
49249        pkgutil_help $MISSING_DEPENDENCY ;;
49250      pkgadd)
49251        pkgadd_help  $MISSING_DEPENDENCY ;;
49252    esac
49253
49254    if test "x$PKGHANDLER_COMMAND" != x; then
49255      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49256    fi
49257  fi
49258
49259      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49260$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49261    elif test "x$COMPILE_TYPE" = xcross; then
49262      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49263$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49264    fi
49265    as_fn_error $? "Cannot continue." "$LINENO" 5
49266
49267fi
49268
49269done
49270
49271
49272  # The cast to long int works around a bug in the HP C Compiler
49273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49275# This bug is HP SR number 8606223364.
49276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49277$as_echo_n "checking size of int *... " >&6; }
49278if ${ac_cv_sizeof_int_p+:} false; then :
49279  $as_echo_n "(cached) " >&6
49280else
49281  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49282
49283else
49284  if test "$ac_cv_type_int_p" = yes; then
49285     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49287as_fn_error 77 "cannot compute sizeof (int *)
49288See \`config.log' for more details" "$LINENO" 5; }
49289   else
49290     ac_cv_sizeof_int_p=0
49291   fi
49292fi
49293
49294fi
49295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49296$as_echo "$ac_cv_sizeof_int_p" >&6; }
49297
49298
49299
49300cat >>confdefs.h <<_ACEOF
49301#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49302_ACEOF
49303
49304
49305
49306  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49307  if test "x$ac_cv_sizeof_int_p" = x; then
49308    # The test failed, lets stick to the assumed value.
49309    { $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
49310$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49311  else
49312    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49313
49314    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49315      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49316      # Let's try to implicitely set the compilers target architecture and retry the test
49317      { $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
49318$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;}
49319      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49320$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49321
49322  # When we add flags to the "official" CFLAGS etc, we need to
49323  # keep track of these additions in ADDED_CFLAGS etc. These
49324  # will later be checked to make sure only controlled additions
49325  # have been made to CFLAGS etc.
49326  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49327  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49328  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49329
49330  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49331  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49332  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49333
49334  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49335  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49336  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49337
49338  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49339  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49340  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49341
49342
49343      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49344      unset ac_cv_sizeof_int_p
49345      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49346      cat >>confdefs.h <<_ACEOF
49347#undef SIZEOF_INT_P
49348_ACEOF
49349
49350      # The cast to long int works around a bug in the HP C Compiler
49351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49353# This bug is HP SR number 8606223364.
49354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49355$as_echo_n "checking size of int *... " >&6; }
49356if ${ac_cv_sizeof_int_p+:} false; then :
49357  $as_echo_n "(cached) " >&6
49358else
49359  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49360
49361else
49362  if test "$ac_cv_type_int_p" = yes; then
49363     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49365as_fn_error 77 "cannot compute sizeof (int *)
49366See \`config.log' for more details" "$LINENO" 5; }
49367   else
49368     ac_cv_sizeof_int_p=0
49369   fi
49370fi
49371
49372fi
49373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49374$as_echo "$ac_cv_sizeof_int_p" >&6; }
49375
49376
49377
49378cat >>confdefs.h <<_ACEOF
49379#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49380_ACEOF
49381
49382
49383
49384      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49385
49386      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49387        { $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
49388$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;}
49389        if test "x$COMPILE_TYPE" = xreduced; then
49390
49391  # Print a helpful message on how to acquire the necessary build dependency.
49392  # reduced is the help tag: freetype, cups, alsa etc
49393  MISSING_DEPENDENCY=reduced
49394
49395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49396    cygwin_help $MISSING_DEPENDENCY
49397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49398    msys_help $MISSING_DEPENDENCY
49399  else
49400    PKGHANDLER_COMMAND=
49401
49402    case $PKGHANDLER in
49403      apt-get)
49404        apt_help     $MISSING_DEPENDENCY ;;
49405      yum)
49406        yum_help     $MISSING_DEPENDENCY ;;
49407      brew)
49408        brew_help    $MISSING_DEPENDENCY ;;
49409      port)
49410        port_help    $MISSING_DEPENDENCY ;;
49411      pkgutil)
49412        pkgutil_help $MISSING_DEPENDENCY ;;
49413      pkgadd)
49414        pkgadd_help  $MISSING_DEPENDENCY ;;
49415    esac
49416
49417    if test "x$PKGHANDLER_COMMAND" != x; then
49418      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49419    fi
49420  fi
49421
49422          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49423$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49424        elif test "x$COMPILE_TYPE" = xcross; then
49425          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49426$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49427        fi
49428        as_fn_error $? "Cannot continue." "$LINENO" 5
49429      fi
49430    fi
49431  fi
49432
49433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49434$as_echo_n "checking for target address size... " >&6; }
49435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49436$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49437
49438
49439  ###############################################################################
49440  #
49441  # Is the target little of big endian?
49442  #
49443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49444$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49445if ${ac_cv_c_bigendian+:} false; then :
49446  $as_echo_n "(cached) " >&6
49447else
49448  ac_cv_c_bigendian=unknown
49449    # See if we're dealing with a universal compiler.
49450    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49451/* end confdefs.h.  */
49452#ifndef __APPLE_CC__
49453	       not a universal capable compiler
49454	     #endif
49455	     typedef int dummy;
49456
49457_ACEOF
49458if ac_fn_cxx_try_compile "$LINENO"; then :
49459
49460	# Check for potential -arch flags.  It is not universal unless
49461	# there are at least two -arch flags with different values.
49462	ac_arch=
49463	ac_prev=
49464	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49465	 if test -n "$ac_prev"; then
49466	   case $ac_word in
49467	     i?86 | x86_64 | ppc | ppc64)
49468	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49469		 ac_arch=$ac_word
49470	       else
49471		 ac_cv_c_bigendian=universal
49472		 break
49473	       fi
49474	       ;;
49475	   esac
49476	   ac_prev=
49477	 elif test "x$ac_word" = "x-arch"; then
49478	   ac_prev=arch
49479	 fi
49480       done
49481fi
49482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49483    if test $ac_cv_c_bigendian = unknown; then
49484      # See if sys/param.h defines the BYTE_ORDER macro.
49485      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49486/* end confdefs.h.  */
49487#include <sys/types.h>
49488	     #include <sys/param.h>
49489
49490int
49491main ()
49492{
49493#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49494		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49495		     && LITTLE_ENDIAN)
49496	      bogus endian macros
49497	     #endif
49498
49499  ;
49500  return 0;
49501}
49502_ACEOF
49503if ac_fn_cxx_try_compile "$LINENO"; then :
49504  # It does; now see whether it defined to BIG_ENDIAN or not.
49505	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49506/* end confdefs.h.  */
49507#include <sys/types.h>
49508		#include <sys/param.h>
49509
49510int
49511main ()
49512{
49513#if BYTE_ORDER != BIG_ENDIAN
49514		 not big endian
49515		#endif
49516
49517  ;
49518  return 0;
49519}
49520_ACEOF
49521if ac_fn_cxx_try_compile "$LINENO"; then :
49522  ac_cv_c_bigendian=yes
49523else
49524  ac_cv_c_bigendian=no
49525fi
49526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49527fi
49528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49529    fi
49530    if test $ac_cv_c_bigendian = unknown; then
49531      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49532      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49533/* end confdefs.h.  */
49534#include <limits.h>
49535
49536int
49537main ()
49538{
49539#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49540	      bogus endian macros
49541	     #endif
49542
49543  ;
49544  return 0;
49545}
49546_ACEOF
49547if ac_fn_cxx_try_compile "$LINENO"; then :
49548  # It does; now see whether it defined to _BIG_ENDIAN or not.
49549	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49550/* end confdefs.h.  */
49551#include <limits.h>
49552
49553int
49554main ()
49555{
49556#ifndef _BIG_ENDIAN
49557		 not big endian
49558		#endif
49559
49560  ;
49561  return 0;
49562}
49563_ACEOF
49564if ac_fn_cxx_try_compile "$LINENO"; then :
49565  ac_cv_c_bigendian=yes
49566else
49567  ac_cv_c_bigendian=no
49568fi
49569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49570fi
49571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49572    fi
49573    if test $ac_cv_c_bigendian = unknown; then
49574      # Compile a test program.
49575      if test "$cross_compiling" = yes; then :
49576  # Try to guess by grepping values from an object file.
49577	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49578/* end confdefs.h.  */
49579short int ascii_mm[] =
49580		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49581		short int ascii_ii[] =
49582		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49583		int use_ascii (int i) {
49584		  return ascii_mm[i] + ascii_ii[i];
49585		}
49586		short int ebcdic_ii[] =
49587		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49588		short int ebcdic_mm[] =
49589		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49590		int use_ebcdic (int i) {
49591		  return ebcdic_mm[i] + ebcdic_ii[i];
49592		}
49593		extern int foo;
49594
49595int
49596main ()
49597{
49598return use_ascii (foo) == use_ebcdic (foo);
49599  ;
49600  return 0;
49601}
49602_ACEOF
49603if ac_fn_cxx_try_compile "$LINENO"; then :
49604  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49605	      ac_cv_c_bigendian=yes
49606	    fi
49607	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49608	      if test "$ac_cv_c_bigendian" = unknown; then
49609		ac_cv_c_bigendian=no
49610	      else
49611		# finding both strings is unlikely to happen, but who knows?
49612		ac_cv_c_bigendian=unknown
49613	      fi
49614	    fi
49615fi
49616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49617else
49618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49619/* end confdefs.h.  */
49620$ac_includes_default
49621int
49622main ()
49623{
49624
49625	     /* Are we little or big endian?  From Harbison&Steele.  */
49626	     union
49627	     {
49628	       long int l;
49629	       char c[sizeof (long int)];
49630	     } u;
49631	     u.l = 1;
49632	     return u.c[sizeof (long int) - 1] == 1;
49633
49634  ;
49635  return 0;
49636}
49637_ACEOF
49638if ac_fn_cxx_try_run "$LINENO"; then :
49639  ac_cv_c_bigendian=no
49640else
49641  ac_cv_c_bigendian=yes
49642fi
49643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49644  conftest.$ac_objext conftest.beam conftest.$ac_ext
49645fi
49646
49647    fi
49648fi
49649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49650$as_echo "$ac_cv_c_bigendian" >&6; }
49651 case $ac_cv_c_bigendian in #(
49652   yes)
49653     ENDIAN="big";; #(
49654   no)
49655     ENDIAN="little" ;; #(
49656   universal)
49657     ENDIAN="universal_endianness"
49658     ;; #(
49659   *)
49660     ENDIAN="unknown" ;;
49661 esac
49662
49663
49664  if test "x$ENDIAN" = xuniversal_endianness; then
49665    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49666  fi
49667  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49668    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
49669  fi
49670
49671
49672# Configure flags for the tools
49673
49674  ###############################################################################
49675  #
49676  # How to compile shared libraries.
49677  #
49678
49679  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49680    PICFLAG="-fPIC"
49681    C_FLAG_REORDER=''
49682    CXX_FLAG_REORDER=''
49683
49684    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49685      # Linking is different on MacOSX
49686      if test "x$STATIC_BUILD" = xtrue; then
49687        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49688      else
49689        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49690        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49691      fi
49692      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49693      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49694      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49695      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49696    else
49697      # Default works for linux, might work on other platforms as well.
49698      SHARED_LIBRARY_FLAGS='-shared'
49699      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49700      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49701      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49702      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49703    fi
49704  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49705    C_FLAG_REORDER=''
49706    CXX_FLAG_REORDER=''
49707
49708    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49709      # Linking is different on MacOSX
49710      PICFLAG=''
49711      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49712      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49713      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49714      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49715      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49716
49717      if test "x$STATIC_BUILD" = xfalse; then
49718        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49719      fi
49720    else
49721      # Default works for linux, might work on other platforms as well.
49722      PICFLAG='-fPIC'
49723      SHARED_LIBRARY_FLAGS='-shared'
49724      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49725      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49726      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49727
49728      # arm specific settings
49729      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49730        # '-Wl,-z,origin' isn't used on arm.
49731        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49732      else
49733        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49734      fi
49735
49736    fi
49737  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49738    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49739      PICFLAG="-xcode=pic32"
49740    else
49741      PICFLAG="-KPIC"
49742    fi
49743    C_FLAG_REORDER='-xF'
49744    CXX_FLAG_REORDER='-xF'
49745    SHARED_LIBRARY_FLAGS="-G"
49746    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49747    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49748    SET_SHARED_LIBRARY_NAME='-h $1'
49749    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49750  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49751    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49752    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49753    # will have to patch this single instruction with a call to some out-of-order code which
49754    # does the load from the TOC. This is of course slow. But in that case we also would have
49755    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49756    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49757    # can be patched directly by the linker and does not require a jump to out-of-order code.
49758    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49759    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49760    # loads for accessing a global variable). But there are rumors that this may be seen as a
49761    # 'performance feature' because of improved code locality of the symbols used in a
49762    # compilation unit.
49763    PICFLAG="-qpic"
49764    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49765    C_FLAG_REORDER=''
49766    CXX_FLAG_REORDER=''
49767    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49768    SET_EXECUTABLE_ORIGIN=""
49769    SET_SHARED_LIBRARY_ORIGIN=''
49770    SET_SHARED_LIBRARY_NAME=''
49771    SET_SHARED_LIBRARY_MAPFILE=''
49772  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49773    PICFLAG=""
49774    C_FLAG_REORDER=''
49775    CXX_FLAG_REORDER=''
49776    SHARED_LIBRARY_FLAGS="-dll"
49777    SET_EXECUTABLE_ORIGIN=''
49778    SET_SHARED_LIBRARY_ORIGIN=''
49779    SET_SHARED_LIBRARY_NAME=''
49780    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49781  fi
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791  # The (cross) compiler is now configured, we can now test capabilities
49792  # of the target platform.
49793
49794
49795
49796  ###############################################################################
49797  #
49798  # Setup the opt flags for different compilers
49799  # and different operating systems.
49800  #
49801
49802  # FIXME: this was indirectly the old default, but just inherited.
49803  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49804  #   C_FLAG_DEPS="-MMD -MF"
49805  # fi
49806
49807  # Generate make dependency files
49808  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49809    C_FLAG_DEPS="-MMD -MF"
49810  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49811    C_FLAG_DEPS="-MMD -MF"
49812  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49813    C_FLAG_DEPS="-xMMD -xMF"
49814  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49815    C_FLAG_DEPS="-qmakedep=gcc -MF"
49816  fi
49817  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49818
49819
49820
49821  # Debug symbols
49822  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49823    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49824      # reduce from default "-g2" option to save space
49825      CFLAGS_DEBUG_SYMBOLS="-g1"
49826      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49827    else
49828      CFLAGS_DEBUG_SYMBOLS="-g"
49829      CXXFLAGS_DEBUG_SYMBOLS="-g"
49830    fi
49831  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49832    CFLAGS_DEBUG_SYMBOLS="-g"
49833    CXXFLAGS_DEBUG_SYMBOLS="-g"
49834  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49835    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49836    # -g0 enables debug symbols without disabling inlining.
49837    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49838  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49839    CFLAGS_DEBUG_SYMBOLS="-g"
49840    CXXFLAGS_DEBUG_SYMBOLS="-g"
49841  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49842    CFLAGS_DEBUG_SYMBOLS="-Zi"
49843    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49844  fi
49845
49846
49847
49848  # Debug symbols for JVM_CFLAGS
49849  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49850    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49851    if test "x$DEBUG_LEVEL" = xslowdebug; then
49852      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49853    else
49854      # -g0 does not disable inlining, which -g does.
49855      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49856    fi
49857  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49858    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49859  else
49860    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49861  fi
49862
49863
49864  # bounds, memory and behavior checking options
49865  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49866    case $DEBUG_LEVEL in
49867    release )
49868      # no adjustment
49869      ;;
49870    fastdebug )
49871      # no adjustment
49872      ;;
49873    slowdebug )
49874      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49875      # get's added conditionally on whether we produce debug symbols or not.
49876      # This is most likely not really correct.
49877
49878      # Add runtime stack smashing and undefined behavior checks.
49879      # Not all versions of gcc support -fstack-protector
49880      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923    # Execute function body
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
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    # Execute function body
49973
49974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49975$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49976  supports=yes
49977
49978  saved_cflags="$CFLAGS"
49979  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49980  ac_ext=c
49981ac_cpp='$CPP $CPPFLAGS'
49982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49984ac_compiler_gnu=$ac_cv_c_compiler_gnu
49985
49986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49987/* end confdefs.h.  */
49988int i;
49989_ACEOF
49990if ac_fn_c_try_compile "$LINENO"; then :
49991
49992else
49993  supports=no
49994fi
49995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49996  ac_ext=cpp
49997ac_cpp='$CXXCPP $CPPFLAGS'
49998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50001
50002  CFLAGS="$saved_cflags"
50003
50004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50005$as_echo "$supports" >&6; }
50006  if test "x$supports" = "xyes" ; then
50007    :
50008    C_COMP_SUPPORTS="yes"
50009  else
50010    :
50011    C_COMP_SUPPORTS="no"
50012  fi
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072    # Execute function body
50073
50074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50075$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50076  supports=yes
50077
50078  saved_cxxflags="$CXXFLAGS"
50079  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50080  ac_ext=cpp
50081ac_cpp='$CXXCPP $CPPFLAGS'
50082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50085
50086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50087/* end confdefs.h.  */
50088int i;
50089_ACEOF
50090if ac_fn_cxx_try_compile "$LINENO"; then :
50091
50092else
50093  supports=no
50094fi
50095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50096  ac_ext=cpp
50097ac_cpp='$CXXCPP $CPPFLAGS'
50098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50101
50102  CXXFLAGS="$saved_cxxflags"
50103
50104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50105$as_echo "$supports" >&6; }
50106  if test "x$supports" = "xyes" ; then
50107    :
50108    CXX_COMP_SUPPORTS="yes"
50109  else
50110    :
50111    CXX_COMP_SUPPORTS="no"
50112  fi
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50127$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50128  supports=no
50129  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50130
50131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50132$as_echo "$supports" >&6; }
50133  if test "x$supports" = "xyes" ; then
50134    :
50135
50136  else
50137    :
50138    STACK_PROTECTOR_CFLAG=""
50139  fi
50140
50141
50142
50143
50144
50145
50146
50147      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50148      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50149      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50150        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50151      fi
50152      ;;
50153    esac
50154  fi
50155
50156  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50157    if test "x$DEBUG_LEVEL" != xrelease; then
50158      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50159        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50160      fi
50161    fi
50162  fi
50163
50164  # Optimization levels
50165  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50166    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50167
50168    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50169      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50170      C_O_FLAG_HIGHEST_JVM="-xO4"
50171      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50172      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50173      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50174      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50175      C_O_FLAG_DEBUG_JVM=""
50176      C_O_FLAG_NONE="-xregs=no%frameptr"
50177      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50178      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50179      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50180      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50181      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50182      CXX_O_FLAG_DEBUG_JVM=""
50183      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50184      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50185        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50186        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50187      fi
50188    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50189      C_O_FLAG_HIGHEST_JVM="-xO4"
50190      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50191      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50192      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50193      C_O_FLAG_DEBUG=""
50194      C_O_FLAG_DEBUG_JVM=""
50195      C_O_FLAG_NONE=""
50196      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50197      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50198      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50199      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50200      CXX_O_FLAG_DEBUG=""
50201      CXX_O_FLAG_DEBUG_JVM=""
50202      CXX_O_FLAG_NONE=""
50203    fi
50204  else
50205    # The remaining toolchains share opt flags between CC and CXX;
50206    # setup for C and duplicate afterwards.
50207    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50208      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50209        # On MacOSX we optimize for size, something
50210        # we should do for all platforms?
50211        C_O_FLAG_HIGHEST_JVM="-Os"
50212        C_O_FLAG_HIGHEST="-Os"
50213        C_O_FLAG_HI="-Os"
50214        C_O_FLAG_NORM="-Os"
50215        C_O_FLAG_SIZE="-Os"
50216      else
50217        C_O_FLAG_HIGHEST_JVM="-O3"
50218        C_O_FLAG_HIGHEST="-O3"
50219        C_O_FLAG_HI="-O3"
50220        C_O_FLAG_NORM="-O2"
50221        C_O_FLAG_SIZE="-Os"
50222      fi
50223      C_O_FLAG_DEBUG="-O0"
50224      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50225        C_O_FLAG_DEBUG_JVM=""
50226      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50227        C_O_FLAG_DEBUG_JVM="-O0"
50228      fi
50229      C_O_FLAG_NONE="-O0"
50230    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50231      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50232        # On MacOSX we optimize for size, something
50233        # we should do for all platforms?
50234        C_O_FLAG_HIGHEST_JVM="-Os"
50235        C_O_FLAG_HIGHEST="-Os"
50236        C_O_FLAG_HI="-Os"
50237        C_O_FLAG_NORM="-Os"
50238        C_O_FLAG_SIZE="-Os"
50239      else
50240        C_O_FLAG_HIGHEST_JVM="-O3"
50241        C_O_FLAG_HIGHEST="-O3"
50242        C_O_FLAG_HI="-O3"
50243        C_O_FLAG_NORM="-O2"
50244        C_O_FLAG_SIZE="-Os"
50245      fi
50246      C_O_FLAG_DEBUG="-O0"
50247      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50248        C_O_FLAG_DEBUG_JVM=""
50249      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50250        C_O_FLAG_DEBUG_JVM="-O0"
50251      fi
50252      C_O_FLAG_NONE="-O0"
50253    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50254      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50255      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50256      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50257      C_O_FLAG_NORM="-O2"
50258      C_O_FLAG_DEBUG="-qnoopt"
50259      # FIXME: Value below not verified.
50260      C_O_FLAG_DEBUG_JVM=""
50261      C_O_FLAG_NONE="-qnoopt"
50262    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50263      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50264      C_O_FLAG_HIGHEST="-O2"
50265      C_O_FLAG_HI="-O1"
50266      C_O_FLAG_NORM="-O1"
50267      C_O_FLAG_DEBUG="-Od"
50268      C_O_FLAG_DEBUG_JVM=""
50269      C_O_FLAG_NONE="-Od"
50270      C_O_FLAG_SIZE="-Os"
50271    fi
50272    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50273    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50274    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50275    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50276    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50277    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50278    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50279    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50280  fi
50281
50282  # Adjust optimization flags according to debug level.
50283  case $DEBUG_LEVEL in
50284    release )
50285      # no adjustment
50286      ;;
50287    fastdebug )
50288      # Not quite so much optimization
50289      C_O_FLAG_HI="$C_O_FLAG_NORM"
50290      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50291      ;;
50292    slowdebug )
50293      # Disable optimization
50294      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50295      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50296      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50297      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50298      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50299      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50300      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50301      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50302      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50303      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50304      ;;
50305  esac
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326# Check whether --with-abi-profile was given.
50327if test "${with_abi_profile+set}" = set; then :
50328  withval=$with_abi_profile;
50329fi
50330
50331
50332  if test "x$with_abi_profile" != x; then
50333    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50334        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50335      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50336    fi
50337
50338    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50340$as_echo_n "checking for ABI profle... " >&6; }
50341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50342$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50343
50344    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50345      ARM_FLOAT_TYPE=vfp-sflt
50346      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50347    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50348      ARM_FLOAT_TYPE=vfp-hflt
50349      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50350    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50351      ARM_FLOAT_TYPE=sflt
50352      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50353    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50354      ARM_FLOAT_TYPE=vfp-sflt
50355      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50356    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50357      ARM_FLOAT_TYPE=vfp-hflt
50358      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50359    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50360      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50361      ARM_FLOAT_TYPE=
50362      ARM_ARCH_TYPE_FLAGS=
50363    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50364      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50365      ARM_FLOAT_TYPE=
50366      ARM_ARCH_TYPE_FLAGS=
50367    else
50368      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50369    fi
50370
50371    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50372      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50373    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50374      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50375    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50376      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50377    fi
50378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50379$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50381$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50382
50383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50384$as_echo_n "checking for arch type flags... " >&6; }
50385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50386$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50387
50388    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50389    # autoconf target triplet.
50390     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50391    # Sanity check that it is a known ABI.
50392    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50393        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50394        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50395          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50396$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50397    fi
50398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50399$as_echo_n "checking for ABI property name... " >&6; }
50400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50401$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50402
50403
50404    # Pass these on to the open part of configure as if they were set using
50405    # --with-extra-c[xx]flags.
50406    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50407    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50408    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50409    # FIXME: This should not really be set using extra_cflags.
50410    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50411        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50412        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50413    fi
50414    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50415    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50416    # And pass the architecture flags to the linker as well
50417    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50418  fi
50419
50420  # When building with an abi profile, the name of that profile is appended on the
50421  # bundle platform, which is used in bundle names.
50422  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50423    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50424  fi
50425
50426
50427  # Special extras...
50428  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50429    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50430      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50431      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50432    fi
50433    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50434    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50435  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50436    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50437    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50438  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50439    CXXSTD_CXXFLAG="-std=gnu++98"
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482    # Execute function body
50483
50484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50485$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50486  supports=yes
50487
50488  saved_cxxflags="$CXXFLAGS"
50489  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50490  ac_ext=cpp
50491ac_cpp='$CXXCPP $CPPFLAGS'
50492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50495
50496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50497/* end confdefs.h.  */
50498int i;
50499_ACEOF
50500if ac_fn_cxx_try_compile "$LINENO"; then :
50501
50502else
50503  supports=no
50504fi
50505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50506  ac_ext=cpp
50507ac_cpp='$CXXCPP $CPPFLAGS'
50508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50511
50512  CXXFLAGS="$saved_cxxflags"
50513
50514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50515$as_echo "$supports" >&6; }
50516  if test "x$supports" = "xyes" ; then
50517    :
50518
50519  else
50520    :
50521    CXXSTD_CXXFLAG=""
50522  fi
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50536    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50537
50538  fi
50539  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50540    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50541    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50542  fi
50543
50544  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50545  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50546  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50547
50548  ###############################################################################
50549  #
50550  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50551  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50552  #
50553
50554  # Setup compiler/platform specific flags into
50555  #    CFLAGS_JDK    - C Compiler flags
50556  #    CXXFLAGS_JDK  - C++ Compiler flags
50557  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50558  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50559    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50560    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50561    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50562    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50563      # Force compatibility with i586 on 32 bit intel platforms.
50564      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50565      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50566    fi
50567    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50568        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50569    case $OPENJDK_TARGET_CPU_ARCH in
50570      arm )
50571        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50572        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50573        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50574        ;;
50575      ppc )
50576        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50577        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50578        ;;
50579      s390 )
50580        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50581        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50582        ;;
50583      * )
50584        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50585        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50586        ;;
50587    esac
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642    # Execute function body
50643
50644  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50645  REFERENCE_VERSION=6
50646
50647  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50648    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50649  fi
50650
50651  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50652    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50653  fi
50654
50655  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50656  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50657
50658  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50659    :
50660
50661  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50662  # runs afoul of the more aggressive versions of these optimisations.
50663  # Notably, value range propagation now assumes that the this pointer of C++
50664  # member functions is non-null.
50665  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50666        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50667        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50668$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50669  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50670  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50671
50672  else
50673    :
50674
50675  fi
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50691    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50692
50693    # Restrict the debug information created by Clang to avoid
50694    # too big object files and speed the build up a little bit
50695    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50696    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50697    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50698      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50699        # Force compatibility with i586 on 32 bit intel platforms.
50700        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50701        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50702      fi
50703      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50704      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50705          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50706      case $OPENJDK_TARGET_CPU_ARCH in
50707        ppc )
50708          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50709          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50710          ;;
50711        * )
50712          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50713          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50714          ;;
50715      esac
50716    fi
50717  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50718    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50719    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50720    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50721      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50722    fi
50723
50724    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50725    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50726  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50727    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50728    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50729    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50730  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50731    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50732        -MD -Zc:wchar_t- -W3 -wd4800 \
50733        -DWIN32_LEAN_AND_MEAN \
50734        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50735        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50736        -DWIN32 -DIAL"
50737    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50738      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50739    else
50740      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50741    fi
50742    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50743    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50744    # studio.
50745    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50746      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50747      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50748      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50749    fi
50750  fi
50751
50752  ###############################################################################
50753
50754  # Adjust flags according to debug level.
50755  case $DEBUG_LEVEL in
50756    fastdebug | slowdebug )
50757      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50758      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50759      ;;
50760    release )
50761      ;;
50762    * )
50763      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50764      ;;
50765  esac
50766
50767  # Set some common defines. These works for all compilers, but assume
50768  # -D is universally accepted.
50769
50770  # Setup endianness
50771  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50772    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50773    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50774    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50775    #   Note: -Dmacro         is the same as    #define macro 1
50776    #         -Dmacro=        is the same as    #define macro
50777    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50778      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50779    else
50780      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50781    fi
50782  else
50783    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50784    # are defined in the system?
50785    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50786      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50787    else
50788      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50789    fi
50790  fi
50791
50792  # Setup target OS define. Use OS target name but in upper case.
50793  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50794  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50795
50796  # Setup target CPU
50797  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50798      $OPENJDK_TARGET_ADD_LP64 \
50799      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50800
50801  # Setup debug/release defines
50802  if test "x$DEBUG_LEVEL" = xrelease; then
50803    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50804    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50805      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50806    fi
50807  else
50808    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50809  fi
50810
50811  # Set some additional per-OS defines.
50812  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50813    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50814    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50815        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50816  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50817    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50818    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50819        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50820  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50821    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50822    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50823    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50824    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50825        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50826        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50827        -fno-omit-frame-pointer"
50828  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50829    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50830    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50831    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50832        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50833        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50834  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50835    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50836  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50837    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50838    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50839  fi
50840
50841  # Set some additional per-CPU defines.
50842  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50843    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50844  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50845    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50846  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50847    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50848      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50849      # fixes `relocation truncated to fit' error for gcc 4.1.
50850      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50851      # Use ppc64 instructions, but schedule for power5
50852      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50853    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50854      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50855    fi
50856  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50857    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50858      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50859      # Little endian machine uses ELFv2 ABI.
50860      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50861      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50862      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50863    fi
50864  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50865    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50866      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50867    fi
50868  fi
50869
50870  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50871    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50872  fi
50873
50874  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50875    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50876      # Solaris does not have _LP64=1 in the old build.
50877      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50878      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50879    fi
50880  fi
50881
50882  # Set JVM_CFLAGS warning handling
50883  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50884    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50885        -Wunused-value -Woverloaded-virtual"
50886
50887    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942    # Execute function body
50943
50944  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50945  REFERENCE_VERSION=4.8
50946
50947  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50948    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50949  fi
50950
50951  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50952    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50953  fi
50954
50955  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50956  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50957
50958  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50959    :
50960
50961            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50962            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50963
50964
50965  else
50966    :
50967
50968  fi
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983    fi
50984    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50985      # Non-zero builds have stricter warnings
50986      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50987    else
50988      if test "x$TOOLCHAIN_TYPE" = xclang; then
50989        # Some versions of llvm do not like -Wundef
50990        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50991      fi
50992    fi
50993  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50994    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50995        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50996  fi
50997
50998  # Additional macosx handling
50999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51000    # Setting these parameters makes it an error to link to macosx APIs that are
51001    # newer than the given OS version and makes the linked binaries compatible
51002    # even if built on a newer version of the OS.
51003    # The expected format is X.Y.Z
51004    MACOSX_VERSION_MIN=10.7.0
51005
51006
51007    # The macro takes the version with no dots, ex: 1070
51008    # Let the flags variables get resolved in make for easier override on make
51009    # command line.
51010    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51011    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51012  fi
51013
51014  # Setup some hard coded includes
51015  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51016      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51017      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51018      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51019      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51020      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51021      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51022
51023  # The shared libraries are compiled using the picflag.
51024  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51025      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51026  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51027      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51028
51029  # Executable flags
51030  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51031  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51032
51033
51034
51035
51036
51037
51038  # Setup LDFLAGS et al.
51039  #
51040
51041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51042    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51043    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51044    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51045    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51046      LDFLAGS_SAFESH="-safeseh"
51047      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51048      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51049      # NOTE: Old build added -machine. Probably not needed.
51050      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51051    else
51052      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51053    fi
51054  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51055      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51056      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51057        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51058        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51059    fi
51060  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51061    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51062    # We have previously set HAS_GNU_HASH if this is the case
51063    if test -n "$HAS_GNU_HASH"; then
51064      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51065      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51066      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51067    fi
51068      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51069        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51070    fi
51071    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51072      # And since we now know that the linker is gnu, then add -z defs, to forbid
51073      # undefined symbols in object files.
51074      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51075      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51076      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51077      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51078      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51079      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51080        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51081      fi
51082      case $DEBUG_LEVEL in
51083        release )
51084          # tell linker to optimize libraries.
51085          # Should this be supplied to the OSS linker as well?
51086          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51087          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51088          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51089          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51090            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51091          fi
51092          ;;
51093        slowdebug )
51094          # Hotspot always let the linker optimize
51095          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51096          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51097            # do relocations at load
51098            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51099            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51100            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51101          fi
51102          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51103            # mark relocations read only
51104            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51105            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51106            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51107          fi
51108          ;;
51109        fastdebug )
51110          # Hotspot always let the linker optimize
51111          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51112          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51113            # mark relocations read only
51114            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51115            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51116            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51117          fi
51118          ;;
51119        * )
51120          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51121          ;;
51122        esac
51123    fi
51124  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51125    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51126    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51127    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51128    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51129    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51130    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51131      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51132    fi
51133  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51134    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51135    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51136    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51137  fi
51138
51139  # Customize LDFLAGS for executables
51140
51141  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51142
51143  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51144    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51145      LDFLAGS_STACK_SIZE=1048576
51146    else
51147      LDFLAGS_STACK_SIZE=327680
51148    fi
51149    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51150  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51151    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51152  fi
51153
51154  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51155
51156  # Customize LDFLAGS for libs
51157  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51158
51159  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51160  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51161    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51162        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51163    JDKLIB_LIBS=""
51164  else
51165    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51166        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51167
51168    if test "xTARGET" = "xTARGET"; then
51169      # On some platforms (mac) the linker warns about non existing -L dirs.
51170      # For any of the variants server, client or minimal, the dir matches the
51171      # variant name. The "main" variant should be used for linking. For the
51172      # rest, the dir is just server.
51173      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51174          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51175        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51176            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51177      else
51178        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51179            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51180      fi
51181    elif test "xTARGET" = "xBUILD"; then
51182      # When building a buildjdk, it's always only the server variant
51183      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51184          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51185    fi
51186
51187    JDKLIB_LIBS="-ljava -ljvm"
51188    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51189      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51190    fi
51191
51192  fi
51193
51194LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51195
51196  # Set JVM_LIBS (per os)
51197  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51198    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51199  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51200    # FIXME: This hard-coded path is not really proper.
51201    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51202      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51203    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51204      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51205    fi
51206    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51207        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51208  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51209    JVM_LIBS="$JVM_LIBS -lm"
51210  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51211    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51212  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51213    JVM_LIBS="$JVM_LIBS -lm"
51214  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51215    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51216        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51217        wsock32.lib winmm.lib version.lib psapi.lib"
51218    fi
51219
51220  # Set JVM_ASFLAGS
51221  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51222    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51223      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51224    fi
51225  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51226    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51227  fi
51228
51229  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245  # Special extras...
51246  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51247    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51248      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51249      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51250    fi
51251    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51252    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51253  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51254    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51255    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51256  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51257    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300    # Execute function body
51301
51302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51303$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51304  supports=yes
51305
51306  saved_cxxflags="$CXXFLAGS"
51307  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51308  ac_ext=cpp
51309ac_cpp='$CXXCPP $CPPFLAGS'
51310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51313
51314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51315/* end confdefs.h.  */
51316int i;
51317_ACEOF
51318if ac_fn_cxx_try_compile "$LINENO"; then :
51319
51320else
51321  supports=no
51322fi
51323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51324  ac_ext=cpp
51325ac_cpp='$CXXCPP $CPPFLAGS'
51326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51329
51330  CXXFLAGS="$saved_cxxflags"
51331
51332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51333$as_echo "$supports" >&6; }
51334  if test "x$supports" = "xyes" ; then
51335    :
51336
51337  else
51338    :
51339    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51340  fi
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51354    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51355
51356  fi
51357  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51358    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51359    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51360  fi
51361
51362  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51363  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51364  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51365
51366  ###############################################################################
51367  #
51368  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51369  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51370  #
51371
51372  # Setup compiler/platform specific flags into
51373  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51374  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51375  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51376  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51377    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51378    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51379    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51380    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51381      # Force compatibility with i586 on 32 bit intel platforms.
51382      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51383      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51384    fi
51385    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51386        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51387    case $OPENJDK_BUILD_CPU_ARCH in
51388      arm )
51389        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51390        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51391        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51392        ;;
51393      ppc )
51394        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51395        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51396        ;;
51397      s390 )
51398        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51399        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51400        ;;
51401      * )
51402        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51403        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51404        ;;
51405    esac
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460    # Execute function body
51461
51462  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51463  REFERENCE_VERSION=6
51464
51465  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51466    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51467  fi
51468
51469  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51470    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51471  fi
51472
51473  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51474  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51475
51476  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51477    :
51478
51479  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51480  # runs afoul of the more aggressive versions of these optimisations.
51481  # Notably, value range propagation now assumes that the this pointer of C++
51482  # member functions is non-null.
51483  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51484        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51485        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51486$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51487  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51488  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51489
51490  else
51491    :
51492
51493  fi
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51509    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51510
51511    # Restrict the debug information created by Clang to avoid
51512    # too big object files and speed the build up a little bit
51513    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51514    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51515    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51516      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51517        # Force compatibility with i586 on 32 bit intel platforms.
51518        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51519        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51520      fi
51521      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51522      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51523          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51524      case $OPENJDK_BUILD_CPU_ARCH in
51525        ppc )
51526          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51527          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51528          ;;
51529        * )
51530          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51531          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51532          ;;
51533      esac
51534    fi
51535  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51536    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51537    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51538    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51539      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51540    fi
51541
51542    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51543    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51544  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51545    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51546    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51547    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51548  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51549    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51550        -MD -Zc:wchar_t- -W3 -wd4800 \
51551        -DWIN32_LEAN_AND_MEAN \
51552        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51553        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51554        -DWIN32 -DIAL"
51555    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51556      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51557    else
51558      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51559    fi
51560    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51561    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51562    # studio.
51563    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51564      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51565      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51566      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51567    fi
51568  fi
51569
51570  ###############################################################################
51571
51572  # Adjust flags according to debug level.
51573  case $DEBUG_LEVEL in
51574    fastdebug | slowdebug )
51575      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51576      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51577      ;;
51578    release )
51579      ;;
51580    * )
51581      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51582      ;;
51583  esac
51584
51585  # Set some common defines. These works for all compilers, but assume
51586  # -D is universally accepted.
51587
51588  # Setup endianness
51589  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51590    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51591    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51592    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51593    #   Note: -Dmacro         is the same as    #define macro 1
51594    #         -Dmacro=        is the same as    #define macro
51595    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51596      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51597    else
51598      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51599    fi
51600  else
51601    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51602    # are defined in the system?
51603    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51604      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51605    else
51606      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51607    fi
51608  fi
51609
51610  # Setup target OS define. Use OS target name but in upper case.
51611  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51612  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51613
51614  # Setup target CPU
51615  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51616      $OPENJDK_BUILD_ADD_LP64 \
51617      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51618
51619  # Setup debug/release defines
51620  if test "x$DEBUG_LEVEL" = xrelease; then
51621    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51622    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51623      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51624    fi
51625  else
51626    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51627  fi
51628
51629  # Set some additional per-OS defines.
51630  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51631    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51632    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51633        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51634  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51635    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51636    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51637        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51638  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51639    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51640    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51641    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51642    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51643        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51644        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51645        -fno-omit-frame-pointer"
51646  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51647    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51648    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51649    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51650        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51651        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51652  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51653    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51654  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51655    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51656    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51657  fi
51658
51659  # Set some additional per-CPU defines.
51660  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51661    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51662  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51663    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51664  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51665    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51666      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51667      # fixes `relocation truncated to fit' error for gcc 4.1.
51668      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51669      # Use ppc64 instructions, but schedule for power5
51670      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51671    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51672      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51673    fi
51674  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51675    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51676      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51677      # Little endian machine uses ELFv2 ABI.
51678      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51679      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51680      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51681    fi
51682  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51683    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51684      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51685    fi
51686  fi
51687
51688  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51689    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51690  fi
51691
51692  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51693    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51694      # Solaris does not have _LP64=1 in the old build.
51695      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51696      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51697    fi
51698  fi
51699
51700  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51701  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51702    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51703        -Wunused-value -Woverloaded-virtual"
51704
51705    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760    # Execute function body
51761
51762  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51763  REFERENCE_VERSION=4.8
51764
51765  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51766    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51767  fi
51768
51769  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51770    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51771  fi
51772
51773  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51774  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51775
51776  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51777    :
51778
51779            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51780            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51781
51782
51783  else
51784    :
51785
51786  fi
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801    fi
51802    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51803      # Non-zero builds have stricter warnings
51804      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51805    else
51806      if test "x$TOOLCHAIN_TYPE" = xclang; then
51807        # Some versions of llvm do not like -Wundef
51808        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51809      fi
51810    fi
51811  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51812    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51813        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51814  fi
51815
51816  # Additional macosx handling
51817  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51818    # Setting these parameters makes it an error to link to macosx APIs that are
51819    # newer than the given OS version and makes the linked binaries compatible
51820    # even if built on a newer version of the OS.
51821    # The expected format is X.Y.Z
51822    MACOSX_VERSION_MIN=10.7.0
51823
51824
51825    # The macro takes the version with no dots, ex: 1070
51826    # Let the flags variables get resolved in make for easier override on make
51827    # command line.
51828    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)"
51829    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51830  fi
51831
51832  # Setup some hard coded includes
51833  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51834      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51835      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51836      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51837      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51838      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51839      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51840
51841  # The shared libraries are compiled using the picflag.
51842  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51843      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51844  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51845      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51846
51847  # Executable flags
51848  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51849  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51850
51851
51852
51853
51854
51855
51856  # Setup LDFLAGS et al.
51857  #
51858
51859  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51860    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51861    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51862    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51863    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51864      LDFLAGS_SAFESH="-safeseh"
51865      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51866      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51867      # NOTE: Old build added -machine. Probably not needed.
51868      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51869    else
51870      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51871    fi
51872  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51873      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51874      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51875        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51876        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51877    fi
51878  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51879    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51880    # We have previously set HAS_GNU_HASH if this is the case
51881    if test -n "$HAS_GNU_HASH"; then
51882      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51883      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51884      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51885    fi
51886      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51887        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51888    fi
51889    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51890      # And since we now know that the linker is gnu, then add -z defs, to forbid
51891      # undefined symbols in object files.
51892      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51893      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51894      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51895      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51896      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51897      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51898        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51899      fi
51900      case $DEBUG_LEVEL in
51901        release )
51902          # tell linker to optimize libraries.
51903          # Should this be supplied to the OSS linker as well?
51904          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51905          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51906          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51907          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51908            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51909          fi
51910          ;;
51911        slowdebug )
51912          # Hotspot always let the linker optimize
51913          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51914          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51915            # do relocations at load
51916            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51917            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51918            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51919          fi
51920          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51921            # mark relocations read only
51922            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51923            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51924            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51925          fi
51926          ;;
51927        fastdebug )
51928          # Hotspot always let the linker optimize
51929          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51930          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51931            # mark relocations read only
51932            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51933            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51934            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51935          fi
51936          ;;
51937        * )
51938          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51939          ;;
51940        esac
51941    fi
51942  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51943    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51944    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51945    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51946    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51947    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51948    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51949      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51950    fi
51951  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51952    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51953    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51954    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51955  fi
51956
51957  # Customize LDFLAGS for executables
51958
51959  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51960
51961  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51962    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51963      LDFLAGS_STACK_SIZE=1048576
51964    else
51965      LDFLAGS_STACK_SIZE=327680
51966    fi
51967    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51968  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51969    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51970  fi
51971
51972  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51973
51974  # Customize LDFLAGS for libs
51975  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51976
51977  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51978  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51979    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51980        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51981    OPENJDK_BUILD_JDKLIB_LIBS=""
51982  else
51983    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51984        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51985
51986    if test "xBUILD" = "xTARGET"; then
51987      # On some platforms (mac) the linker warns about non existing -L dirs.
51988      # For any of the variants server, client or minimal, the dir matches the
51989      # variant name. The "main" variant should be used for linking. For the
51990      # rest, the dir is just server.
51991      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51992          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51993        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51994            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51995      else
51996        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51997            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51998      fi
51999    elif test "xBUILD" = "xBUILD"; then
52000      # When building a buildjdk, it's always only the server variant
52001      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52002          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52003    fi
52004
52005    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52006    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52007      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52008    fi
52009
52010  fi
52011
52012OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52013
52014  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52015  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52016    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52017  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52018    # FIXME: This hard-coded path is not really proper.
52019    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52020      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52021    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52022      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52023    fi
52024    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52025        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52026  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52027    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52028  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52029    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52030  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52031    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52032  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52033    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52034        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52035        wsock32.lib winmm.lib version.lib psapi.lib"
52036    fi
52037
52038  # Set OPENJDK_BUILD_JVM_ASFLAGS
52039  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52040    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52041      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52042    fi
52043  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52044    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52045  fi
52046
52047  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063  # Tests are only ever compiled for TARGET
52064  # Flags for compiling test libraries
52065  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52066  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52067
52068  # Flags for compiling test executables
52069  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52070  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52071
52072
52073
52074
52075
52076
52077  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52078  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52079
52080
52081
52082
52083
52084
52085  # Check that the compiler supports -mX (or -qX on AIX) flags
52086  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134    # Execute function body
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183    # Execute function body
52184
52185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52186$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52187  supports=yes
52188
52189  saved_cflags="$CFLAGS"
52190  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52191  ac_ext=c
52192ac_cpp='$CPP $CPPFLAGS'
52193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52195ac_compiler_gnu=$ac_cv_c_compiler_gnu
52196
52197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52198/* end confdefs.h.  */
52199int i;
52200_ACEOF
52201if ac_fn_c_try_compile "$LINENO"; then :
52202
52203else
52204  supports=no
52205fi
52206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52207  ac_ext=cpp
52208ac_cpp='$CXXCPP $CPPFLAGS'
52209ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52210ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52211ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52212
52213  CFLAGS="$saved_cflags"
52214
52215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52216$as_echo "$supports" >&6; }
52217  if test "x$supports" = "xyes" ; then
52218    :
52219    C_COMP_SUPPORTS="yes"
52220  else
52221    :
52222    C_COMP_SUPPORTS="no"
52223  fi
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283    # Execute function body
52284
52285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52286$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52287  supports=yes
52288
52289  saved_cxxflags="$CXXFLAGS"
52290  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52291  ac_ext=cpp
52292ac_cpp='$CXXCPP $CPPFLAGS'
52293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52296
52297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52298/* end confdefs.h.  */
52299int i;
52300_ACEOF
52301if ac_fn_cxx_try_compile "$LINENO"; then :
52302
52303else
52304  supports=no
52305fi
52306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52307  ac_ext=cpp
52308ac_cpp='$CXXCPP $CPPFLAGS'
52309ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52310ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52311ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52312
52313  CXXFLAGS="$saved_cxxflags"
52314
52315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52316$as_echo "$supports" >&6; }
52317  if test "x$supports" = "xyes" ; then
52318    :
52319    CXX_COMP_SUPPORTS="yes"
52320  else
52321    :
52322    CXX_COMP_SUPPORTS="no"
52323  fi
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52338$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52339  supports=no
52340  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52341
52342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52343$as_echo "$supports" >&6; }
52344  if test "x$supports" = "xyes" ; then
52345    :
52346    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52347  else
52348    :
52349    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52350  fi
52351
52352
52353
52354
52355
52356
52357
52358
52359  # Check whether --enable-warnings-as-errors was given.
52360if test "${enable_warnings_as_errors+set}" = set; then :
52361  enableval=$enable_warnings_as_errors;
52362fi
52363
52364
52365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52366$as_echo_n "checking if native warnings are errors... " >&6; }
52367  if test "x$enable_warnings_as_errors" = "xyes"; then
52368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52369$as_echo "yes (explicitly set)" >&6; }
52370    WARNINGS_AS_ERRORS=true
52371  elif test "x$enable_warnings_as_errors" = "xno"; then
52372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52373$as_echo "no" >&6; }
52374    WARNINGS_AS_ERRORS=false
52375  elif test "x$enable_warnings_as_errors" = "x"; then
52376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52377$as_echo "yes (default)" >&6; }
52378    WARNINGS_AS_ERRORS=true
52379  else
52380    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52381  fi
52382
52383
52384
52385  case "${TOOLCHAIN_TYPE}" in
52386    microsoft)
52387      DISABLE_WARNING_PREFIX="-wd"
52388      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52389      ;;
52390    solstudio)
52391      DISABLE_WARNING_PREFIX="-erroff="
52392      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52393      ;;
52394    gcc)
52395      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443    # Execute function body
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492    # Execute function body
52493
52494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52495$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52496  supports=yes
52497
52498  saved_cflags="$CFLAGS"
52499  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52500  ac_ext=c
52501ac_cpp='$CPP $CPPFLAGS'
52502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52504ac_compiler_gnu=$ac_cv_c_compiler_gnu
52505
52506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52507/* end confdefs.h.  */
52508int i;
52509_ACEOF
52510if ac_fn_c_try_compile "$LINENO"; then :
52511
52512else
52513  supports=no
52514fi
52515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52516  ac_ext=cpp
52517ac_cpp='$CXXCPP $CPPFLAGS'
52518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52521
52522  CFLAGS="$saved_cflags"
52523
52524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52525$as_echo "$supports" >&6; }
52526  if test "x$supports" = "xyes" ; then
52527    :
52528    C_COMP_SUPPORTS="yes"
52529  else
52530    :
52531    C_COMP_SUPPORTS="no"
52532  fi
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592    # Execute function body
52593
52594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52595$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52596  supports=yes
52597
52598  saved_cxxflags="$CXXFLAGS"
52599  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52600  ac_ext=cpp
52601ac_cpp='$CXXCPP $CPPFLAGS'
52602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52605
52606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52607/* end confdefs.h.  */
52608int i;
52609_ACEOF
52610if ac_fn_cxx_try_compile "$LINENO"; then :
52611
52612else
52613  supports=no
52614fi
52615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52616  ac_ext=cpp
52617ac_cpp='$CXXCPP $CPPFLAGS'
52618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52621
52622  CXXFLAGS="$saved_cxxflags"
52623
52624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52625$as_echo "$supports" >&6; }
52626  if test "x$supports" = "xyes" ; then
52627    :
52628    CXX_COMP_SUPPORTS="yes"
52629  else
52630    :
52631    CXX_COMP_SUPPORTS="no"
52632  fi
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52647$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52648  supports=no
52649  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52650
52651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52652$as_echo "$supports" >&6; }
52653  if test "x$supports" = "xyes" ; then
52654    :
52655    GCC_CAN_DISABLE_WARNINGS=true
52656  else
52657    :
52658    GCC_CAN_DISABLE_WARNINGS=false
52659
52660  fi
52661
52662
52663
52664
52665
52666
52667      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52668        DISABLE_WARNING_PREFIX="-Wno-"
52669      else
52670        DISABLE_WARNING_PREFIX=
52671      fi
52672      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52673      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52674      # CFLAGS since any target specific flags will likely not work with the
52675      # build compiler
52676      CC_OLD="$CC"
52677      CXX_OLD="$CXX"
52678      CC="$BUILD_CC"
52679      CXX="$BUILD_CXX"
52680      CFLAGS_OLD="$CFLAGS"
52681      CFLAGS=""
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729    # Execute function body
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
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    # Execute function body
52779
52780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52781$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52782  supports=yes
52783
52784  saved_cflags="$CFLAGS"
52785  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52786  ac_ext=c
52787ac_cpp='$CPP $CPPFLAGS'
52788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52790ac_compiler_gnu=$ac_cv_c_compiler_gnu
52791
52792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52793/* end confdefs.h.  */
52794int i;
52795_ACEOF
52796if ac_fn_c_try_compile "$LINENO"; then :
52797
52798else
52799  supports=no
52800fi
52801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52802  ac_ext=cpp
52803ac_cpp='$CXXCPP $CPPFLAGS'
52804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52807
52808  CFLAGS="$saved_cflags"
52809
52810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52811$as_echo "$supports" >&6; }
52812  if test "x$supports" = "xyes" ; then
52813    :
52814    C_COMP_SUPPORTS="yes"
52815  else
52816    :
52817    C_COMP_SUPPORTS="no"
52818  fi
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878    # Execute function body
52879
52880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52881$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52882  supports=yes
52883
52884  saved_cxxflags="$CXXFLAGS"
52885  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52886  ac_ext=cpp
52887ac_cpp='$CXXCPP $CPPFLAGS'
52888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52891
52892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52893/* end confdefs.h.  */
52894int i;
52895_ACEOF
52896if ac_fn_cxx_try_compile "$LINENO"; then :
52897
52898else
52899  supports=no
52900fi
52901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52902  ac_ext=cpp
52903ac_cpp='$CXXCPP $CPPFLAGS'
52904ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52905ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52906ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52907
52908  CXXFLAGS="$saved_cxxflags"
52909
52910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52911$as_echo "$supports" >&6; }
52912  if test "x$supports" = "xyes" ; then
52913    :
52914    CXX_COMP_SUPPORTS="yes"
52915  else
52916    :
52917    CXX_COMP_SUPPORTS="no"
52918  fi
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52933$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52934  supports=no
52935  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52936
52937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52938$as_echo "$supports" >&6; }
52939  if test "x$supports" = "xyes" ; then
52940    :
52941    BUILD_CC_CAN_DISABLE_WARNINGS=true
52942  else
52943    :
52944    BUILD_CC_CAN_DISABLE_WARNINGS=false
52945
52946  fi
52947
52948
52949
52950
52951
52952
52953      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52954        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52955      else
52956        BUILD_CC_DISABLE_WARNING_PREFIX=
52957      fi
52958      CC="$CC_OLD"
52959      CXX="$CXX_OLD"
52960      CFLAGS="$CFLAGS_OLD"
52961      ;;
52962    clang)
52963      DISABLE_WARNING_PREFIX="-Wno-"
52964      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52965      ;;
52966    xlc)
52967      DISABLE_WARNING_PREFIX="-qsuppress="
52968      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52969      ;;
52970  esac
52971
52972
52973
52974
52975
52976# Setup debug symbols (need objcopy from the toolchain for that)
52977
52978  #
52979  # NATIVE_DEBUG_SYMBOLS
52980  # This must be done after the toolchain is setup, since we're looking at objcopy.
52981  #
52982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52983$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52984
52985# Check whether --with-native-debug-symbols was given.
52986if test "${with_native_debug_symbols+set}" = set; then :
52987  withval=$with_native_debug_symbols;
52988        if test "x$OPENJDK_TARGET_OS" = xaix; then
52989          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52990            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52991          fi
52992        fi
52993
52994else
52995
52996        if test "x$OPENJDK_TARGET_OS" = xaix; then
52997          # AIX doesn't support 'zipped' so use 'internal' as default
52998          with_native_debug_symbols="internal"
52999        else
53000          if test "x$STATIC_BUILD" = xtrue; then
53001            with_native_debug_symbols="none"
53002          else
53003            with_native_debug_symbols="zipped"
53004          fi
53005        fi
53006
53007fi
53008
53009  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53011$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53012
53013  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53014
53015    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53016      if test "x$OBJCOPY" = x; then
53017        # enabling of enable-debug-symbols and can't find objcopy
53018        # this is an error
53019        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53020      fi
53021    fi
53022
53023    COMPILE_WITH_DEBUG_SYMBOLS=true
53024    COPY_DEBUG_SYMBOLS=true
53025    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53026  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53027    COMPILE_WITH_DEBUG_SYMBOLS=false
53028    COPY_DEBUG_SYMBOLS=false
53029    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53030  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53031    COMPILE_WITH_DEBUG_SYMBOLS=true
53032    COPY_DEBUG_SYMBOLS=false
53033    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53034  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53035
53036    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53037      if test "x$OBJCOPY" = x; then
53038        # enabling of enable-debug-symbols and can't find objcopy
53039        # this is an error
53040        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53041      fi
53042    fi
53043
53044    COMPILE_WITH_DEBUG_SYMBOLS=true
53045    COPY_DEBUG_SYMBOLS=true
53046    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53047  else
53048    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53049  fi
53050
53051  # --enable-debug-symbols is deprecated.
53052  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53053
53054  # Check whether --enable-debug-symbols was given.
53055if test "${enable_debug_symbols+set}" = set; then :
53056  enableval=$enable_debug_symbols;
53057fi
53058
53059  if test "x$enable_debug_symbols" != x; then
53060    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53061$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53062
53063    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53064      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53065$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53066    fi
53067
53068  fi
53069
53070
53071  # --enable-zip-debug-info is deprecated.
53072  # Please use --with-native-debug-symbols=zipped .
53073
53074  # Check whether --enable-zip-debug-info was given.
53075if test "${enable_zip_debug_info+set}" = set; then :
53076  enableval=$enable_zip_debug_info;
53077fi
53078
53079  if test "x$enable_zip_debug_info" != x; then
53080    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53081$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53082
53083    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53084      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53085$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53086    fi
53087
53088  fi
53089
53090
53091
53092
53093
53094
53095
53096  # Check whether --enable-native-coverage was given.
53097if test "${enable_native_coverage+set}" = set; then :
53098  enableval=$enable_native_coverage;
53099fi
53100
53101  GCOV_ENABLED="false"
53102  if test "x$enable_native_coverage" = "xyes"; then
53103    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53105$as_echo_n "checking if native coverage is enabled... " >&6; }
53106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53107$as_echo "yes" >&6; }
53108      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53109      GCOV_LDFLAGS="-fprofile-arcs"
53110      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53111      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53112      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53113      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53114      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53115      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53116      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53117      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53118      GCOV_ENABLED="true"
53119    else
53120      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53121    fi
53122  elif test "x$enable_native_coverage" = "xno"; then
53123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53124$as_echo_n "checking if native coverage is enabled... " >&6; }
53125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53126$as_echo "no" >&6; }
53127  elif test "x$enable_native_coverage" != "x"; then
53128    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53129  fi
53130
53131
53132
53133
53134# Need toolchain to setup dtrace
53135
53136  # Test for dtrace dependencies
53137  # Check whether --enable-dtrace was given.
53138if test "${enable_dtrace+set}" = set; then :
53139  enableval=$enable_dtrace;
53140fi
53141
53142
53143  DTRACE_DEP_MISSING=false
53144
53145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53146$as_echo_n "checking for dtrace tool... " >&6; }
53147  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53149$as_echo "$DTRACE" >&6; }
53150  else
53151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53152$as_echo "not found, cannot build dtrace" >&6; }
53153    DTRACE_DEP_MISSING=true
53154  fi
53155
53156  for ac_header in sys/sdt.h
53157do :
53158  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53159if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53160  cat >>confdefs.h <<_ACEOF
53161#define HAVE_SYS_SDT_H 1
53162_ACEOF
53163 DTRACE_HEADERS_OK=yes
53164else
53165  DTRACE_HEADERS_OK=no
53166fi
53167
53168done
53169
53170  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53171    DTRACE_DEP_MISSING=true
53172  fi
53173
53174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53175$as_echo_n "checking if dtrace should be built... " >&6; }
53176  if test "x$enable_dtrace" = "xyes"; then
53177    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53179$as_echo "no, missing dependencies" >&6; }
53180
53181  # Print a helpful message on how to acquire the necessary build dependency.
53182  # dtrace is the help tag: freetype, cups, alsa etc
53183  MISSING_DEPENDENCY=dtrace
53184
53185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53186    cygwin_help $MISSING_DEPENDENCY
53187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53188    msys_help $MISSING_DEPENDENCY
53189  else
53190    PKGHANDLER_COMMAND=
53191
53192    case $PKGHANDLER in
53193      apt-get)
53194        apt_help     $MISSING_DEPENDENCY ;;
53195      yum)
53196        yum_help     $MISSING_DEPENDENCY ;;
53197      brew)
53198        brew_help    $MISSING_DEPENDENCY ;;
53199      port)
53200        port_help    $MISSING_DEPENDENCY ;;
53201      pkgutil)
53202        pkgutil_help $MISSING_DEPENDENCY ;;
53203      pkgadd)
53204        pkgadd_help  $MISSING_DEPENDENCY ;;
53205    esac
53206
53207    if test "x$PKGHANDLER_COMMAND" != x; then
53208      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53209    fi
53210  fi
53211
53212      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53213    else
53214      INCLUDE_DTRACE=true
53215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53216$as_echo "yes, forced" >&6; }
53217    fi
53218  elif test "x$enable_dtrace" = "xno"; then
53219    INCLUDE_DTRACE=false
53220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53221$as_echo "no, forced" >&6; }
53222  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53223    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53224      INCLUDE_DTRACE=false
53225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53226$as_echo "no, missing dependencies" >&6; }
53227    else
53228      INCLUDE_DTRACE=true
53229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53230$as_echo "yes, dependencies present" >&6; }
53231    fi
53232  else
53233    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53234  fi
53235
53236
53237  # Check whether --enable-aot was given.
53238if test "${enable_aot+set}" = set; then :
53239  enableval=$enable_aot;
53240fi
53241
53242
53243  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53244    ENABLE_AOT="true"
53245  elif test "x$enable_aot" = "xyes"; then
53246    ENABLE_AOT="true"
53247  elif test "x$enable_aot" = "xno"; then
53248    ENABLE_AOT="false"
53249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53250$as_echo_n "checking if aot should be enabled... " >&6; }
53251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53252$as_echo "no, forced" >&6; }
53253  else
53254    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53255  fi
53256
53257  if test "x$ENABLE_AOT" = "xtrue"; then
53258    # Only enable AOT on linux-X64.
53259    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53260      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53261        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53262          ENABLE_AOT="true"
53263        else
53264          ENABLE_AOT="false"
53265          if test "x$enable_aot" = "xyes"; then
53266            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53267          fi
53268        fi
53269      else
53270        ENABLE_AOT="false"
53271        if test "x$enable_aot" = "xyes"; then
53272          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53273        fi
53274      fi
53275    else
53276      ENABLE_AOT="false"
53277      if test "x$enable_aot" = "xyes"; then
53278        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53279      fi
53280    fi
53281  fi
53282
53283
53284
53285
53286  # Check whether --enable-hotspot-gtest was given.
53287if test "${enable_hotspot_gtest+set}" = set; then :
53288  enableval=$enable_hotspot_gtest;
53289fi
53290
53291
53292  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53293    GTEST_DIR_EXISTS="true"
53294  else
53295    GTEST_DIR_EXISTS="false"
53296  fi
53297
53298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53299$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53300  if test "x$enable_hotspot_gtest" = "xyes"; then
53301    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53303$as_echo "yes, forced" >&6; }
53304      BUILD_GTEST="true"
53305    else
53306      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53307    fi
53308  elif test "x$enable_hotspot_gtest" = "xno"; then
53309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53310$as_echo "no, forced" >&6; }
53311    BUILD_GTEST="false"
53312  elif test "x$enable_hotspot_gtest" = "x"; then
53313    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53315$as_echo "yes" >&6; }
53316      BUILD_GTEST="true"
53317    else
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53319$as_echo "no" >&6; }
53320      BUILD_GTEST="false"
53321    fi
53322  else
53323    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53324  fi
53325
53326
53327
53328
53329###############################################################################
53330#
53331# Check dependencies for external and internal libraries.
53332#
53333###############################################################################
53334
53335# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53336
53337  # When using cygwin or msys, we need a wrapper binary that renames
53338  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53339  # @files and rewrites these too! This wrapper binary is
53340  # called fixpath.
53341  FIXPATH=
53342  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53344$as_echo_n "checking if fixpath can be created... " >&6; }
53345    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53346    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53347    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53348    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53349      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53350      FIXPATH="$FIXPATH_BIN -c"
53351    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53352      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53353      # @ was chosen as separator to minimize risk of other tools messing around with it
53354      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53355          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53356      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53357      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53358    fi
53359    FIXPATH_SRC_W="$FIXPATH_SRC"
53360    FIXPATH_BIN_W="$FIXPATH_BIN"
53361
53362  unix_path="$FIXPATH_SRC_W"
53363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53364    windows_path=`$CYGPATH -m "$unix_path"`
53365    FIXPATH_SRC_W="$windows_path"
53366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53367    windows_path=`cmd //c echo $unix_path`
53368    FIXPATH_SRC_W="$windows_path"
53369  fi
53370
53371
53372  unix_path="$FIXPATH_BIN_W"
53373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53374    windows_path=`$CYGPATH -m "$unix_path"`
53375    FIXPATH_BIN_W="$windows_path"
53376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53377    windows_path=`cmd //c echo $unix_path`
53378    FIXPATH_BIN_W="$windows_path"
53379  fi
53380
53381    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53382    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53383    cd $FIXPATH_DIR
53384    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53385    cd $CURDIR
53386
53387    if test ! -x $FIXPATH_BIN; then
53388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53389$as_echo "no" >&6; }
53390      cat $FIXPATH_DIR/fixpath1.log
53391      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53392    fi
53393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53394$as_echo "yes" >&6; }
53395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53396$as_echo_n "checking if fixpath.exe works... " >&6; }
53397    cd $FIXPATH_DIR
53398    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53399        > $FIXPATH_DIR/fixpath2.log 2>&1
53400    cd $CURDIR
53401    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53403$as_echo "no" >&6; }
53404      cat $FIXPATH_DIR/fixpath2.log
53405      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53406    fi
53407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53408$as_echo "yes" >&6; }
53409
53410    FIXPATH_DETACH_FLAG="--detach"
53411  fi
53412
53413
53414
53415
53416
53417
53418  # Check if X11 is needed
53419  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53420    # No X11 support on windows or macosx
53421    NEEDS_LIB_X11=false
53422  else
53423    # All other instances need X11, even if building headless only, libawt still
53424    # needs X11 headers.
53425    NEEDS_LIB_X11=true
53426  fi
53427
53428  # Check if cups is needed
53429  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53430    # Windows have a separate print system
53431    NEEDS_LIB_CUPS=false
53432  else
53433    NEEDS_LIB_CUPS=true
53434  fi
53435
53436  # A custom hook may have set this already
53437  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53438    NEEDS_LIB_FREETYPE=true
53439  fi
53440
53441  # Check if alsa is needed
53442  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53443    NEEDS_LIB_ALSA=true
53444  else
53445    NEEDS_LIB_ALSA=false
53446  fi
53447
53448  # Check if ffi is needed
53449  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53450    NEEDS_LIB_FFI=true
53451  else
53452    NEEDS_LIB_FFI=false
53453  fi
53454
53455
53456  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53457  # dynamic build is configured on command line.
53458
53459# Check whether --with-stdc++lib was given.
53460if test "${with_stdc__lib+set}" = set; then :
53461  withval=$with_stdc__lib;
53462        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53463                && test "x$with_stdc__lib" != xdefault; then
53464          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53465        fi
53466
53467else
53468  with_stdc__lib=default
53469
53470fi
53471
53472
53473  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53474    # Test if stdc++ can be linked statically.
53475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53476$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53477    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53478    ac_ext=cpp
53479ac_cpp='$CXXCPP $CPPFLAGS'
53480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53483
53484    OLD_LIBS="$LIBS"
53485    LIBS="$STATIC_STDCXX_FLAGS"
53486    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53487/* end confdefs.h.  */
53488
53489int
53490main ()
53491{
53492return 0;
53493  ;
53494  return 0;
53495}
53496_ACEOF
53497if ac_fn_cxx_try_link "$LINENO"; then :
53498  has_static_libstdcxx=yes
53499else
53500  has_static_libstdcxx=no
53501fi
53502rm -f core conftest.err conftest.$ac_objext \
53503    conftest$ac_exeext conftest.$ac_ext
53504    LIBS="$OLD_LIBS"
53505    ac_ext=cpp
53506ac_cpp='$CXXCPP $CPPFLAGS'
53507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53510
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53512$as_echo "$has_static_libstdcxx" >&6; }
53513
53514    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53515      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53516    fi
53517
53518    # If dynamic was requested, it's available since it would fail above otherwise.
53519    # If dynamic wasn't requested, go with static unless it isn't available.
53520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53521$as_echo_n "checking how to link with libstdc++... " >&6; }
53522    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53523        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53525$as_echo "dynamic" >&6; }
53526    else
53527      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53528      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53529      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53530      # just use the same setting as for the TARGET toolchain.
53531      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53533$as_echo "static" >&6; }
53534    fi
53535  fi
53536
53537  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53538  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53539    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53540  fi
53541
53542
53543
53544  # Setup Windows runtime dlls
53545  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53546
53547
53548# Check whether --with-msvcr-dll was given.
53549if test "${with_msvcr_dll+set}" = set; then :
53550  withval=$with_msvcr_dll;
53551fi
53552
53553
53554  if test "x$with_msvcr_dll" != x; then
53555    # If given explicitly by user, do not probe. If not present, fail directly.
53556
53557  DLL_NAME="$MSVCR_NAME"
53558  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53559  METHOD="--with-msvcr-dll"
53560  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53562$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53563
53564    # Need to check if the found msvcr is correct architecture
53565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53566$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53567    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53569      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53570      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53572        CORRECT_MSVCR_ARCH="PE32 executable"
53573      else
53574        CORRECT_MSVCR_ARCH="PE32+ executable"
53575      fi
53576    else
53577      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53578        CORRECT_MSVCR_ARCH=386
53579      else
53580        CORRECT_MSVCR_ARCH=x86-64
53581      fi
53582    fi
53583    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53585$as_echo "ok" >&6; }
53586      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53587
53588  # Only process if variable expands to non-empty
53589
53590  if test "x$MSVC_DLL" != x; then
53591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53592
53593  # Input might be given as Windows format, start by converting to
53594  # unix format.
53595  path="$MSVC_DLL"
53596  new_path=`$CYGPATH -u "$path"`
53597
53598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53601  # "foo.exe" is OK but "foo" is an error.
53602  #
53603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53604  # It is also a way to make sure we got the proper file name for the real test later on.
53605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53606  if test "x$test_shortpath" = x; then
53607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53608$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53609    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53610  fi
53611
53612  # Call helper function which possibly converts this using DOS-style short mode.
53613  # If so, the updated path is stored in $new_path.
53614
53615  input_path="$new_path"
53616  # Check if we need to convert this using DOS-style short mode. If the path
53617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53618  # take no chances and rewrite it.
53619  # Note: m4 eats our [], so we need to use [ and ] instead.
53620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53621  if test "x$has_forbidden_chars" != x; then
53622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53626      # Going to short mode and back again did indeed matter. Since short mode is
53627      # case insensitive, let's make it lowercase to improve readability.
53628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53629      # Now convert it back to Unix-style (cygpath)
53630      input_path=`$CYGPATH -u "$shortmode_path"`
53631      new_path="$input_path"
53632    fi
53633  fi
53634
53635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53636  if test "x$test_cygdrive_prefix" = x; then
53637    # As a simple fix, exclude /usr/bin since it's not a real path.
53638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53640      # a path prefixed by /cygdrive for fixpath to work.
53641      new_path="$CYGWIN_ROOT_PATH$input_path"
53642    fi
53643  fi
53644
53645
53646  if test "x$path" != "x$new_path"; then
53647    MSVC_DLL="$new_path"
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53649$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53650  fi
53651
53652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53653
53654  path="$MSVC_DLL"
53655  has_colon=`$ECHO $path | $GREP ^.:`
53656  new_path="$path"
53657  if test "x$has_colon" = x; then
53658    # Not in mixed or Windows style, start by that.
53659    new_path=`cmd //c echo $path`
53660  fi
53661
53662
53663  input_path="$new_path"
53664  # Check if we need to convert this using DOS-style short mode. If the path
53665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53666  # take no chances and rewrite it.
53667  # Note: m4 eats our [], so we need to use [ and ] instead.
53668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53669  if test "x$has_forbidden_chars" != x; then
53670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53672  fi
53673
53674
53675  windows_path="$new_path"
53676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53677    unix_path=`$CYGPATH -u "$windows_path"`
53678    new_path="$unix_path"
53679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53681    new_path="$unix_path"
53682  fi
53683
53684  if test "x$path" != "x$new_path"; then
53685    MSVC_DLL="$new_path"
53686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53687$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53688  fi
53689
53690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53692
53693    else
53694      # We're on a unix platform. Hooray! :)
53695      path="$MSVC_DLL"
53696      has_space=`$ECHO "$path" | $GREP " "`
53697      if test "x$has_space" != x; then
53698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53699$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53701      fi
53702
53703      # Use eval to expand a potential ~
53704      eval path="$path"
53705      if test ! -f "$path" && test ! -d "$path"; then
53706        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53707      fi
53708
53709      if test -d "$path"; then
53710        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53711      else
53712        dir="`$DIRNAME "$path"`"
53713        base="`$BASENAME "$path"`"
53714        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53715      fi
53716    fi
53717  fi
53718
53719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53720$as_echo_n "checking for $DLL_NAME... " >&6; }
53721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53722$as_echo "$MSVC_DLL" >&6; }
53723    else
53724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53725$as_echo "incorrect, ignoring" >&6; }
53726      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53727$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53728    fi
53729  fi
53730
53731    if test "x$MSVC_DLL" = x; then
53732      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53733    fi
53734    MSVCR_DLL="$MSVC_DLL"
53735  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53736
53737  DLL_NAME="$MSVCR_NAME"
53738  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53739  METHOD="devkit"
53740  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53742$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53743
53744    # Need to check if the found msvcr is correct architecture
53745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53746$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53747    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53749      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53750      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53752        CORRECT_MSVCR_ARCH="PE32 executable"
53753      else
53754        CORRECT_MSVCR_ARCH="PE32+ executable"
53755      fi
53756    else
53757      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53758        CORRECT_MSVCR_ARCH=386
53759      else
53760        CORRECT_MSVCR_ARCH=x86-64
53761      fi
53762    fi
53763    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53765$as_echo "ok" >&6; }
53766      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53767
53768  # Only process if variable expands to non-empty
53769
53770  if test "x$MSVC_DLL" != x; then
53771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53772
53773  # Input might be given as Windows format, start by converting to
53774  # unix format.
53775  path="$MSVC_DLL"
53776  new_path=`$CYGPATH -u "$path"`
53777
53778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53781  # "foo.exe" is OK but "foo" is an error.
53782  #
53783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53784  # It is also a way to make sure we got the proper file name for the real test later on.
53785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53786  if test "x$test_shortpath" = x; then
53787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53788$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53789    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53790  fi
53791
53792  # Call helper function which possibly converts this using DOS-style short mode.
53793  # If so, the updated path is stored in $new_path.
53794
53795  input_path="$new_path"
53796  # Check if we need to convert this using DOS-style short mode. If the path
53797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53798  # take no chances and rewrite it.
53799  # Note: m4 eats our [], so we need to use [ and ] instead.
53800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53801  if test "x$has_forbidden_chars" != x; then
53802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53806      # Going to short mode and back again did indeed matter. Since short mode is
53807      # case insensitive, let's make it lowercase to improve readability.
53808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53809      # Now convert it back to Unix-style (cygpath)
53810      input_path=`$CYGPATH -u "$shortmode_path"`
53811      new_path="$input_path"
53812    fi
53813  fi
53814
53815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53816  if test "x$test_cygdrive_prefix" = x; then
53817    # As a simple fix, exclude /usr/bin since it's not a real path.
53818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53820      # a path prefixed by /cygdrive for fixpath to work.
53821      new_path="$CYGWIN_ROOT_PATH$input_path"
53822    fi
53823  fi
53824
53825
53826  if test "x$path" != "x$new_path"; then
53827    MSVC_DLL="$new_path"
53828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53829$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53830  fi
53831
53832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53833
53834  path="$MSVC_DLL"
53835  has_colon=`$ECHO $path | $GREP ^.:`
53836  new_path="$path"
53837  if test "x$has_colon" = x; then
53838    # Not in mixed or Windows style, start by that.
53839    new_path=`cmd //c echo $path`
53840  fi
53841
53842
53843  input_path="$new_path"
53844  # Check if we need to convert this using DOS-style short mode. If the path
53845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53846  # take no chances and rewrite it.
53847  # Note: m4 eats our [], so we need to use [ and ] instead.
53848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53849  if test "x$has_forbidden_chars" != x; then
53850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53852  fi
53853
53854
53855  windows_path="$new_path"
53856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53857    unix_path=`$CYGPATH -u "$windows_path"`
53858    new_path="$unix_path"
53859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53861    new_path="$unix_path"
53862  fi
53863
53864  if test "x$path" != "x$new_path"; then
53865    MSVC_DLL="$new_path"
53866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53867$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53868  fi
53869
53870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53872
53873    else
53874      # We're on a unix platform. Hooray! :)
53875      path="$MSVC_DLL"
53876      has_space=`$ECHO "$path" | $GREP " "`
53877      if test "x$has_space" != x; then
53878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53879$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53881      fi
53882
53883      # Use eval to expand a potential ~
53884      eval path="$path"
53885      if test ! -f "$path" && test ! -d "$path"; then
53886        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53887      fi
53888
53889      if test -d "$path"; then
53890        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53891      else
53892        dir="`$DIRNAME "$path"`"
53893        base="`$BASENAME "$path"`"
53894        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53895      fi
53896    fi
53897  fi
53898
53899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53900$as_echo_n "checking for $DLL_NAME... " >&6; }
53901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53902$as_echo "$MSVC_DLL" >&6; }
53903    else
53904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53905$as_echo "incorrect, ignoring" >&6; }
53906      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53907$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53908    fi
53909  fi
53910
53911    if test "x$MSVC_DLL" = x; then
53912      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53913    fi
53914    MSVCR_DLL="$MSVC_DLL"
53915  else
53916
53917  DLL_NAME="${MSVCR_NAME}"
53918  MSVC_DLL=
53919
53920  if test "x$MSVC_DLL" = x; then
53921    # Probe: Using well-known location from Visual Studio 10.0
53922    if test "x$VCINSTALLDIR" != x; then
53923      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53924
53925  windows_path="$CYGWIN_VC_INSTALL_DIR"
53926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53927    unix_path=`$CYGPATH -u "$windows_path"`
53928    CYGWIN_VC_INSTALL_DIR="$unix_path"
53929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53931    CYGWIN_VC_INSTALL_DIR="$unix_path"
53932  fi
53933
53934      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53935        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53936      else
53937        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53938      fi
53939      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53940
53941  DLL_NAME="$DLL_NAME"
53942  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53943  METHOD="well-known location in VCINSTALLDIR"
53944  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53945    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53946$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53947
53948    # Need to check if the found msvcr is correct architecture
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53950$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53951    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53953      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53954      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53955      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53956        CORRECT_MSVCR_ARCH="PE32 executable"
53957      else
53958        CORRECT_MSVCR_ARCH="PE32+ executable"
53959      fi
53960    else
53961      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53962        CORRECT_MSVCR_ARCH=386
53963      else
53964        CORRECT_MSVCR_ARCH=x86-64
53965      fi
53966    fi
53967    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53969$as_echo "ok" >&6; }
53970      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53971
53972  # Only process if variable expands to non-empty
53973
53974  if test "x$MSVC_DLL" != x; then
53975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53976
53977  # Input might be given as Windows format, start by converting to
53978  # unix format.
53979  path="$MSVC_DLL"
53980  new_path=`$CYGPATH -u "$path"`
53981
53982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53985  # "foo.exe" is OK but "foo" is an error.
53986  #
53987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53988  # It is also a way to make sure we got the proper file name for the real test later on.
53989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53990  if test "x$test_shortpath" = x; then
53991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53992$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53993    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53994  fi
53995
53996  # Call helper function which possibly converts this using DOS-style short mode.
53997  # If so, the updated path is stored in $new_path.
53998
53999  input_path="$new_path"
54000  # Check if we need to convert this using DOS-style short mode. If the path
54001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54002  # take no chances and rewrite it.
54003  # Note: m4 eats our [], so we need to use [ and ] instead.
54004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54005  if test "x$has_forbidden_chars" != x; then
54006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54010      # Going to short mode and back again did indeed matter. Since short mode is
54011      # case insensitive, let's make it lowercase to improve readability.
54012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54013      # Now convert it back to Unix-style (cygpath)
54014      input_path=`$CYGPATH -u "$shortmode_path"`
54015      new_path="$input_path"
54016    fi
54017  fi
54018
54019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54020  if test "x$test_cygdrive_prefix" = x; then
54021    # As a simple fix, exclude /usr/bin since it's not a real path.
54022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54024      # a path prefixed by /cygdrive for fixpath to work.
54025      new_path="$CYGWIN_ROOT_PATH$input_path"
54026    fi
54027  fi
54028
54029
54030  if test "x$path" != "x$new_path"; then
54031    MSVC_DLL="$new_path"
54032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54034  fi
54035
54036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54037
54038  path="$MSVC_DLL"
54039  has_colon=`$ECHO $path | $GREP ^.:`
54040  new_path="$path"
54041  if test "x$has_colon" = x; then
54042    # Not in mixed or Windows style, start by that.
54043    new_path=`cmd //c echo $path`
54044  fi
54045
54046
54047  input_path="$new_path"
54048  # Check if we need to convert this using DOS-style short mode. If the path
54049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54050  # take no chances and rewrite it.
54051  # Note: m4 eats our [], so we need to use [ and ] instead.
54052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54053  if test "x$has_forbidden_chars" != x; then
54054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54056  fi
54057
54058
54059  windows_path="$new_path"
54060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54061    unix_path=`$CYGPATH -u "$windows_path"`
54062    new_path="$unix_path"
54063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54065    new_path="$unix_path"
54066  fi
54067
54068  if test "x$path" != "x$new_path"; then
54069    MSVC_DLL="$new_path"
54070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54071$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54072  fi
54073
54074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54076
54077    else
54078      # We're on a unix platform. Hooray! :)
54079      path="$MSVC_DLL"
54080      has_space=`$ECHO "$path" | $GREP " "`
54081      if test "x$has_space" != x; then
54082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54083$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54085      fi
54086
54087      # Use eval to expand a potential ~
54088      eval path="$path"
54089      if test ! -f "$path" && test ! -d "$path"; then
54090        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54091      fi
54092
54093      if test -d "$path"; then
54094        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54095      else
54096        dir="`$DIRNAME "$path"`"
54097        base="`$BASENAME "$path"`"
54098        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54099      fi
54100    fi
54101  fi
54102
54103      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54104$as_echo_n "checking for $DLL_NAME... " >&6; }
54105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54106$as_echo "$MSVC_DLL" >&6; }
54107    else
54108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54109$as_echo "incorrect, ignoring" >&6; }
54110      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54111$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54112    fi
54113  fi
54114
54115    fi
54116  fi
54117
54118  if test "x$MSVC_DLL" = x; then
54119    # Probe: Check in the Boot JDK directory.
54120    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54121
54122  DLL_NAME="$DLL_NAME"
54123  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54124  METHOD="well-known location in Boot JDK"
54125  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54127$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54128
54129    # Need to check if the found msvcr is correct architecture
54130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54131$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54132    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54134      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54135      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54137        CORRECT_MSVCR_ARCH="PE32 executable"
54138      else
54139        CORRECT_MSVCR_ARCH="PE32+ executable"
54140      fi
54141    else
54142      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54143        CORRECT_MSVCR_ARCH=386
54144      else
54145        CORRECT_MSVCR_ARCH=x86-64
54146      fi
54147    fi
54148    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54150$as_echo "ok" >&6; }
54151      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54152
54153  # Only process if variable expands to non-empty
54154
54155  if test "x$MSVC_DLL" != x; then
54156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54157
54158  # Input might be given as Windows format, start by converting to
54159  # unix format.
54160  path="$MSVC_DLL"
54161  new_path=`$CYGPATH -u "$path"`
54162
54163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54166  # "foo.exe" is OK but "foo" is an error.
54167  #
54168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54169  # It is also a way to make sure we got the proper file name for the real test later on.
54170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54171  if test "x$test_shortpath" = x; then
54172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54173$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54174    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54175  fi
54176
54177  # Call helper function which possibly converts this using DOS-style short mode.
54178  # If so, the updated path is stored in $new_path.
54179
54180  input_path="$new_path"
54181  # Check if we need to convert this using DOS-style short mode. If the path
54182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54183  # take no chances and rewrite it.
54184  # Note: m4 eats our [], so we need to use [ and ] instead.
54185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54186  if test "x$has_forbidden_chars" != x; then
54187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54191      # Going to short mode and back again did indeed matter. Since short mode is
54192      # case insensitive, let's make it lowercase to improve readability.
54193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54194      # Now convert it back to Unix-style (cygpath)
54195      input_path=`$CYGPATH -u "$shortmode_path"`
54196      new_path="$input_path"
54197    fi
54198  fi
54199
54200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54201  if test "x$test_cygdrive_prefix" = x; then
54202    # As a simple fix, exclude /usr/bin since it's not a real path.
54203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54205      # a path prefixed by /cygdrive for fixpath to work.
54206      new_path="$CYGWIN_ROOT_PATH$input_path"
54207    fi
54208  fi
54209
54210
54211  if test "x$path" != "x$new_path"; then
54212    MSVC_DLL="$new_path"
54213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54215  fi
54216
54217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54218
54219  path="$MSVC_DLL"
54220  has_colon=`$ECHO $path | $GREP ^.:`
54221  new_path="$path"
54222  if test "x$has_colon" = x; then
54223    # Not in mixed or Windows style, start by that.
54224    new_path=`cmd //c echo $path`
54225  fi
54226
54227
54228  input_path="$new_path"
54229  # Check if we need to convert this using DOS-style short mode. If the path
54230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54231  # take no chances and rewrite it.
54232  # Note: m4 eats our [], so we need to use [ and ] instead.
54233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54234  if test "x$has_forbidden_chars" != x; then
54235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54237  fi
54238
54239
54240  windows_path="$new_path"
54241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54242    unix_path=`$CYGPATH -u "$windows_path"`
54243    new_path="$unix_path"
54244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54246    new_path="$unix_path"
54247  fi
54248
54249  if test "x$path" != "x$new_path"; then
54250    MSVC_DLL="$new_path"
54251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54253  fi
54254
54255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54257
54258    else
54259      # We're on a unix platform. Hooray! :)
54260      path="$MSVC_DLL"
54261      has_space=`$ECHO "$path" | $GREP " "`
54262      if test "x$has_space" != x; then
54263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54264$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54266      fi
54267
54268      # Use eval to expand a potential ~
54269      eval path="$path"
54270      if test ! -f "$path" && test ! -d "$path"; then
54271        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54272      fi
54273
54274      if test -d "$path"; then
54275        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54276      else
54277        dir="`$DIRNAME "$path"`"
54278        base="`$BASENAME "$path"`"
54279        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54280      fi
54281    fi
54282  fi
54283
54284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54285$as_echo_n "checking for $DLL_NAME... " >&6; }
54286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54287$as_echo "$MSVC_DLL" >&6; }
54288    else
54289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54290$as_echo "incorrect, ignoring" >&6; }
54291      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54292$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54293    fi
54294  fi
54295
54296  fi
54297
54298  if test "x$MSVC_DLL" = x; then
54299    # Probe: Look in the Windows system32 directory
54300    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54301
54302  windows_path="$CYGWIN_SYSTEMROOT"
54303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54304    unix_path=`$CYGPATH -u "$windows_path"`
54305    CYGWIN_SYSTEMROOT="$unix_path"
54306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54308    CYGWIN_SYSTEMROOT="$unix_path"
54309  fi
54310
54311    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54312
54313  DLL_NAME="$DLL_NAME"
54314  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54315  METHOD="well-known location in SYSTEMROOT"
54316  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54317    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54318$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54319
54320    # Need to check if the found msvcr is correct architecture
54321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54322$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54323    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54325      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54326      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54327      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54328        CORRECT_MSVCR_ARCH="PE32 executable"
54329      else
54330        CORRECT_MSVCR_ARCH="PE32+ executable"
54331      fi
54332    else
54333      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54334        CORRECT_MSVCR_ARCH=386
54335      else
54336        CORRECT_MSVCR_ARCH=x86-64
54337      fi
54338    fi
54339    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54341$as_echo "ok" >&6; }
54342      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54343
54344  # Only process if variable expands to non-empty
54345
54346  if test "x$MSVC_DLL" != x; then
54347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54348
54349  # Input might be given as Windows format, start by converting to
54350  # unix format.
54351  path="$MSVC_DLL"
54352  new_path=`$CYGPATH -u "$path"`
54353
54354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54357  # "foo.exe" is OK but "foo" is an error.
54358  #
54359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54360  # It is also a way to make sure we got the proper file name for the real test later on.
54361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54362  if test "x$test_shortpath" = x; then
54363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54364$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54365    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54366  fi
54367
54368  # Call helper function which possibly converts this using DOS-style short mode.
54369  # If so, the updated path is stored in $new_path.
54370
54371  input_path="$new_path"
54372  # Check if we need to convert this using DOS-style short mode. If the path
54373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54374  # take no chances and rewrite it.
54375  # Note: m4 eats our [], so we need to use [ and ] instead.
54376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54377  if test "x$has_forbidden_chars" != x; then
54378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54382      # Going to short mode and back again did indeed matter. Since short mode is
54383      # case insensitive, let's make it lowercase to improve readability.
54384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54385      # Now convert it back to Unix-style (cygpath)
54386      input_path=`$CYGPATH -u "$shortmode_path"`
54387      new_path="$input_path"
54388    fi
54389  fi
54390
54391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54392  if test "x$test_cygdrive_prefix" = x; then
54393    # As a simple fix, exclude /usr/bin since it's not a real path.
54394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54396      # a path prefixed by /cygdrive for fixpath to work.
54397      new_path="$CYGWIN_ROOT_PATH$input_path"
54398    fi
54399  fi
54400
54401
54402  if test "x$path" != "x$new_path"; then
54403    MSVC_DLL="$new_path"
54404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54405$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54406  fi
54407
54408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54409
54410  path="$MSVC_DLL"
54411  has_colon=`$ECHO $path | $GREP ^.:`
54412  new_path="$path"
54413  if test "x$has_colon" = x; then
54414    # Not in mixed or Windows style, start by that.
54415    new_path=`cmd //c echo $path`
54416  fi
54417
54418
54419  input_path="$new_path"
54420  # Check if we need to convert this using DOS-style short mode. If the path
54421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54422  # take no chances and rewrite it.
54423  # Note: m4 eats our [], so we need to use [ and ] instead.
54424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54425  if test "x$has_forbidden_chars" != x; then
54426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54428  fi
54429
54430
54431  windows_path="$new_path"
54432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54433    unix_path=`$CYGPATH -u "$windows_path"`
54434    new_path="$unix_path"
54435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54437    new_path="$unix_path"
54438  fi
54439
54440  if test "x$path" != "x$new_path"; then
54441    MSVC_DLL="$new_path"
54442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54444  fi
54445
54446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54448
54449    else
54450      # We're on a unix platform. Hooray! :)
54451      path="$MSVC_DLL"
54452      has_space=`$ECHO "$path" | $GREP " "`
54453      if test "x$has_space" != x; then
54454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54455$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54457      fi
54458
54459      # Use eval to expand a potential ~
54460      eval path="$path"
54461      if test ! -f "$path" && test ! -d "$path"; then
54462        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54463      fi
54464
54465      if test -d "$path"; then
54466        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54467      else
54468        dir="`$DIRNAME "$path"`"
54469        base="`$BASENAME "$path"`"
54470        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54471      fi
54472    fi
54473  fi
54474
54475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54476$as_echo_n "checking for $DLL_NAME... " >&6; }
54477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54478$as_echo "$MSVC_DLL" >&6; }
54479    else
54480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54481$as_echo "incorrect, ignoring" >&6; }
54482      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54483$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54484    fi
54485  fi
54486
54487  fi
54488
54489  if test "x$MSVC_DLL" = x; then
54490    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54491    if test "x$VS100COMNTOOLS" != x; then
54492      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54493
54494  windows_path="$CYGWIN_VS_TOOLS_DIR"
54495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54496    unix_path=`$CYGPATH -u "$windows_path"`
54497    CYGWIN_VS_TOOLS_DIR="$unix_path"
54498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54500    CYGWIN_VS_TOOLS_DIR="$unix_path"
54501  fi
54502
54503      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54504        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54505	    | $GREP -i /x64/ | $HEAD --lines 1`
54506      else
54507        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54508	    | $GREP -i /x86/ | $HEAD --lines 1`
54509      fi
54510
54511  DLL_NAME="$DLL_NAME"
54512  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54513  METHOD="search of VS100COMNTOOLS"
54514  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54516$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54517
54518    # Need to check if the found msvcr is correct architecture
54519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54520$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54521    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54523      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54524      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54526        CORRECT_MSVCR_ARCH="PE32 executable"
54527      else
54528        CORRECT_MSVCR_ARCH="PE32+ executable"
54529      fi
54530    else
54531      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54532        CORRECT_MSVCR_ARCH=386
54533      else
54534        CORRECT_MSVCR_ARCH=x86-64
54535      fi
54536    fi
54537    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54539$as_echo "ok" >&6; }
54540      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54541
54542  # Only process if variable expands to non-empty
54543
54544  if test "x$MSVC_DLL" != x; then
54545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54546
54547  # Input might be given as Windows format, start by converting to
54548  # unix format.
54549  path="$MSVC_DLL"
54550  new_path=`$CYGPATH -u "$path"`
54551
54552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54555  # "foo.exe" is OK but "foo" is an error.
54556  #
54557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54558  # It is also a way to make sure we got the proper file name for the real test later on.
54559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54560  if test "x$test_shortpath" = x; then
54561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54562$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54563    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54564  fi
54565
54566  # Call helper function which possibly converts this using DOS-style short mode.
54567  # If so, the updated path is stored in $new_path.
54568
54569  input_path="$new_path"
54570  # Check if we need to convert this using DOS-style short mode. If the path
54571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54572  # take no chances and rewrite it.
54573  # Note: m4 eats our [], so we need to use [ and ] instead.
54574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54575  if test "x$has_forbidden_chars" != x; then
54576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54580      # Going to short mode and back again did indeed matter. Since short mode is
54581      # case insensitive, let's make it lowercase to improve readability.
54582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54583      # Now convert it back to Unix-style (cygpath)
54584      input_path=`$CYGPATH -u "$shortmode_path"`
54585      new_path="$input_path"
54586    fi
54587  fi
54588
54589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54590  if test "x$test_cygdrive_prefix" = x; then
54591    # As a simple fix, exclude /usr/bin since it's not a real path.
54592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54594      # a path prefixed by /cygdrive for fixpath to work.
54595      new_path="$CYGWIN_ROOT_PATH$input_path"
54596    fi
54597  fi
54598
54599
54600  if test "x$path" != "x$new_path"; then
54601    MSVC_DLL="$new_path"
54602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54603$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54604  fi
54605
54606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54607
54608  path="$MSVC_DLL"
54609  has_colon=`$ECHO $path | $GREP ^.:`
54610  new_path="$path"
54611  if test "x$has_colon" = x; then
54612    # Not in mixed or Windows style, start by that.
54613    new_path=`cmd //c echo $path`
54614  fi
54615
54616
54617  input_path="$new_path"
54618  # Check if we need to convert this using DOS-style short mode. If the path
54619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54620  # take no chances and rewrite it.
54621  # Note: m4 eats our [], so we need to use [ and ] instead.
54622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54623  if test "x$has_forbidden_chars" != x; then
54624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54626  fi
54627
54628
54629  windows_path="$new_path"
54630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54631    unix_path=`$CYGPATH -u "$windows_path"`
54632    new_path="$unix_path"
54633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54635    new_path="$unix_path"
54636  fi
54637
54638  if test "x$path" != "x$new_path"; then
54639    MSVC_DLL="$new_path"
54640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54641$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54642  fi
54643
54644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54646
54647    else
54648      # We're on a unix platform. Hooray! :)
54649      path="$MSVC_DLL"
54650      has_space=`$ECHO "$path" | $GREP " "`
54651      if test "x$has_space" != x; then
54652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54653$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54655      fi
54656
54657      # Use eval to expand a potential ~
54658      eval path="$path"
54659      if test ! -f "$path" && test ! -d "$path"; then
54660        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54661      fi
54662
54663      if test -d "$path"; then
54664        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54665      else
54666        dir="`$DIRNAME "$path"`"
54667        base="`$BASENAME "$path"`"
54668        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54669      fi
54670    fi
54671  fi
54672
54673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54674$as_echo_n "checking for $DLL_NAME... " >&6; }
54675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54676$as_echo "$MSVC_DLL" >&6; }
54677    else
54678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54679$as_echo "incorrect, ignoring" >&6; }
54680      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54681$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54682    fi
54683  fi
54684
54685    fi
54686  fi
54687
54688  if test "x$MSVC_DLL" = x; then
54689    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54690    # (This was the original behaviour; kept since it might turn something up)
54691    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54692      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54693        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54694	    | $GREP x64 | $HEAD --lines 1`
54695      else
54696        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54697	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54698        if test "x$POSSIBLE_MSVC_DLL" = x; then
54699          # We're grasping at straws now...
54700          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54701	      | $HEAD --lines 1`
54702        fi
54703      fi
54704
54705
54706  DLL_NAME="$DLL_NAME"
54707  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54708  METHOD="search of VCINSTALLDIR"
54709  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54711$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54712
54713    # Need to check if the found msvcr is correct architecture
54714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54715$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54716    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54718      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54719      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54721        CORRECT_MSVCR_ARCH="PE32 executable"
54722      else
54723        CORRECT_MSVCR_ARCH="PE32+ executable"
54724      fi
54725    else
54726      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54727        CORRECT_MSVCR_ARCH=386
54728      else
54729        CORRECT_MSVCR_ARCH=x86-64
54730      fi
54731    fi
54732    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54734$as_echo "ok" >&6; }
54735      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54736
54737  # Only process if variable expands to non-empty
54738
54739  if test "x$MSVC_DLL" != x; then
54740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54741
54742  # Input might be given as Windows format, start by converting to
54743  # unix format.
54744  path="$MSVC_DLL"
54745  new_path=`$CYGPATH -u "$path"`
54746
54747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54750  # "foo.exe" is OK but "foo" is an error.
54751  #
54752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54753  # It is also a way to make sure we got the proper file name for the real test later on.
54754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54755  if test "x$test_shortpath" = x; then
54756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54758    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54759  fi
54760
54761  # Call helper function which possibly converts this using DOS-style short mode.
54762  # If so, the updated path is stored in $new_path.
54763
54764  input_path="$new_path"
54765  # Check if we need to convert this using DOS-style short mode. If the path
54766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54767  # take no chances and rewrite it.
54768  # Note: m4 eats our [], so we need to use [ and ] instead.
54769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54770  if test "x$has_forbidden_chars" != x; then
54771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54775      # Going to short mode and back again did indeed matter. Since short mode is
54776      # case insensitive, let's make it lowercase to improve readability.
54777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54778      # Now convert it back to Unix-style (cygpath)
54779      input_path=`$CYGPATH -u "$shortmode_path"`
54780      new_path="$input_path"
54781    fi
54782  fi
54783
54784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54785  if test "x$test_cygdrive_prefix" = x; then
54786    # As a simple fix, exclude /usr/bin since it's not a real path.
54787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54789      # a path prefixed by /cygdrive for fixpath to work.
54790      new_path="$CYGWIN_ROOT_PATH$input_path"
54791    fi
54792  fi
54793
54794
54795  if test "x$path" != "x$new_path"; then
54796    MSVC_DLL="$new_path"
54797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54798$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54799  fi
54800
54801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54802
54803  path="$MSVC_DLL"
54804  has_colon=`$ECHO $path | $GREP ^.:`
54805  new_path="$path"
54806  if test "x$has_colon" = x; then
54807    # Not in mixed or Windows style, start by that.
54808    new_path=`cmd //c echo $path`
54809  fi
54810
54811
54812  input_path="$new_path"
54813  # Check if we need to convert this using DOS-style short mode. If the path
54814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54815  # take no chances and rewrite it.
54816  # Note: m4 eats our [], so we need to use [ and ] instead.
54817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54818  if test "x$has_forbidden_chars" != x; then
54819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54821  fi
54822
54823
54824  windows_path="$new_path"
54825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54826    unix_path=`$CYGPATH -u "$windows_path"`
54827    new_path="$unix_path"
54828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54830    new_path="$unix_path"
54831  fi
54832
54833  if test "x$path" != "x$new_path"; then
54834    MSVC_DLL="$new_path"
54835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54836$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54837  fi
54838
54839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54841
54842    else
54843      # We're on a unix platform. Hooray! :)
54844      path="$MSVC_DLL"
54845      has_space=`$ECHO "$path" | $GREP " "`
54846      if test "x$has_space" != x; then
54847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54848$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54850      fi
54851
54852      # Use eval to expand a potential ~
54853      eval path="$path"
54854      if test ! -f "$path" && test ! -d "$path"; then
54855        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54856      fi
54857
54858      if test -d "$path"; then
54859        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54860      else
54861        dir="`$DIRNAME "$path"`"
54862        base="`$BASENAME "$path"`"
54863        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54864      fi
54865    fi
54866  fi
54867
54868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54869$as_echo_n "checking for $DLL_NAME... " >&6; }
54870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54871$as_echo "$MSVC_DLL" >&6; }
54872    else
54873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54874$as_echo "incorrect, ignoring" >&6; }
54875      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54876$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54877    fi
54878  fi
54879
54880    fi
54881  fi
54882
54883  if test "x$MSVC_DLL" = x; then
54884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54885$as_echo_n "checking for $DLL_NAME... " >&6; }
54886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54887$as_echo "no" >&6; }
54888    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54889  fi
54890
54891    MSVCR_DLL="$MSVC_DLL"
54892  fi
54893
54894
54895
54896# Check whether --with-msvcp-dll was given.
54897if test "${with_msvcp_dll+set}" = set; then :
54898  withval=$with_msvcp_dll;
54899fi
54900
54901
54902  if test "x$MSVCP_NAME" != "x"; then
54903    if test "x$with_msvcp_dll" != x; then
54904      # If given explicitly by user, do not probe. If not present, fail directly.
54905
54906  DLL_NAME="$MSVCP_NAME"
54907  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54908  METHOD="--with-msvcp-dll"
54909  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54910    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54911$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54912
54913    # Need to check if the found msvcr is correct architecture
54914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54915$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54916    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54918      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54919      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54920      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54921        CORRECT_MSVCR_ARCH="PE32 executable"
54922      else
54923        CORRECT_MSVCR_ARCH="PE32+ executable"
54924      fi
54925    else
54926      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54927        CORRECT_MSVCR_ARCH=386
54928      else
54929        CORRECT_MSVCR_ARCH=x86-64
54930      fi
54931    fi
54932    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54934$as_echo "ok" >&6; }
54935      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54936
54937  # Only process if variable expands to non-empty
54938
54939  if test "x$MSVC_DLL" != x; then
54940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54941
54942  # Input might be given as Windows format, start by converting to
54943  # unix format.
54944  path="$MSVC_DLL"
54945  new_path=`$CYGPATH -u "$path"`
54946
54947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54950  # "foo.exe" is OK but "foo" is an error.
54951  #
54952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54953  # It is also a way to make sure we got the proper file name for the real test later on.
54954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54955  if test "x$test_shortpath" = x; then
54956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54957$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54958    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54959  fi
54960
54961  # Call helper function which possibly converts this using DOS-style short mode.
54962  # If so, the updated path is stored in $new_path.
54963
54964  input_path="$new_path"
54965  # Check if we need to convert this using DOS-style short mode. If the path
54966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54967  # take no chances and rewrite it.
54968  # Note: m4 eats our [], so we need to use [ and ] instead.
54969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54970  if test "x$has_forbidden_chars" != x; then
54971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54975      # Going to short mode and back again did indeed matter. Since short mode is
54976      # case insensitive, let's make it lowercase to improve readability.
54977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54978      # Now convert it back to Unix-style (cygpath)
54979      input_path=`$CYGPATH -u "$shortmode_path"`
54980      new_path="$input_path"
54981    fi
54982  fi
54983
54984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54985  if test "x$test_cygdrive_prefix" = x; then
54986    # As a simple fix, exclude /usr/bin since it's not a real path.
54987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54989      # a path prefixed by /cygdrive for fixpath to work.
54990      new_path="$CYGWIN_ROOT_PATH$input_path"
54991    fi
54992  fi
54993
54994
54995  if test "x$path" != "x$new_path"; then
54996    MSVC_DLL="$new_path"
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54998$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54999  fi
55000
55001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55002
55003  path="$MSVC_DLL"
55004  has_colon=`$ECHO $path | $GREP ^.:`
55005  new_path="$path"
55006  if test "x$has_colon" = x; then
55007    # Not in mixed or Windows style, start by that.
55008    new_path=`cmd //c echo $path`
55009  fi
55010
55011
55012  input_path="$new_path"
55013  # Check if we need to convert this using DOS-style short mode. If the path
55014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55015  # take no chances and rewrite it.
55016  # Note: m4 eats our [], so we need to use [ and ] instead.
55017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55018  if test "x$has_forbidden_chars" != x; then
55019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55021  fi
55022
55023
55024  windows_path="$new_path"
55025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55026    unix_path=`$CYGPATH -u "$windows_path"`
55027    new_path="$unix_path"
55028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55030    new_path="$unix_path"
55031  fi
55032
55033  if test "x$path" != "x$new_path"; then
55034    MSVC_DLL="$new_path"
55035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55036$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55037  fi
55038
55039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55041
55042    else
55043      # We're on a unix platform. Hooray! :)
55044      path="$MSVC_DLL"
55045      has_space=`$ECHO "$path" | $GREP " "`
55046      if test "x$has_space" != x; then
55047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55048$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55050      fi
55051
55052      # Use eval to expand a potential ~
55053      eval path="$path"
55054      if test ! -f "$path" && test ! -d "$path"; then
55055        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55056      fi
55057
55058      if test -d "$path"; then
55059        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55060      else
55061        dir="`$DIRNAME "$path"`"
55062        base="`$BASENAME "$path"`"
55063        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55064      fi
55065    fi
55066  fi
55067
55068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55069$as_echo_n "checking for $DLL_NAME... " >&6; }
55070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55071$as_echo "$MSVC_DLL" >&6; }
55072    else
55073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55074$as_echo "incorrect, ignoring" >&6; }
55075      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55076$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55077    fi
55078  fi
55079
55080      if test "x$MSVC_DLL" = x; then
55081        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55082      fi
55083      MSVCP_DLL="$MSVC_DLL"
55084    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55085
55086  DLL_NAME="$MSVCP_NAME"
55087  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55088  METHOD="devkit"
55089  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55091$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55092
55093    # Need to check if the found msvcr is correct architecture
55094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55095$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55096    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55098      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55099      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55101        CORRECT_MSVCR_ARCH="PE32 executable"
55102      else
55103        CORRECT_MSVCR_ARCH="PE32+ executable"
55104      fi
55105    else
55106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55107        CORRECT_MSVCR_ARCH=386
55108      else
55109        CORRECT_MSVCR_ARCH=x86-64
55110      fi
55111    fi
55112    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55114$as_echo "ok" >&6; }
55115      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55116
55117  # Only process if variable expands to non-empty
55118
55119  if test "x$MSVC_DLL" != x; then
55120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55121
55122  # Input might be given as Windows format, start by converting to
55123  # unix format.
55124  path="$MSVC_DLL"
55125  new_path=`$CYGPATH -u "$path"`
55126
55127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55130  # "foo.exe" is OK but "foo" is an error.
55131  #
55132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55133  # It is also a way to make sure we got the proper file name for the real test later on.
55134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55135  if test "x$test_shortpath" = x; then
55136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55137$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55138    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55139  fi
55140
55141  # Call helper function which possibly converts this using DOS-style short mode.
55142  # If so, the updated path is stored in $new_path.
55143
55144  input_path="$new_path"
55145  # Check if we need to convert this using DOS-style short mode. If the path
55146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55147  # take no chances and rewrite it.
55148  # Note: m4 eats our [], so we need to use [ and ] instead.
55149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55150  if test "x$has_forbidden_chars" != x; then
55151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55155      # Going to short mode and back again did indeed matter. Since short mode is
55156      # case insensitive, let's make it lowercase to improve readability.
55157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55158      # Now convert it back to Unix-style (cygpath)
55159      input_path=`$CYGPATH -u "$shortmode_path"`
55160      new_path="$input_path"
55161    fi
55162  fi
55163
55164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55165  if test "x$test_cygdrive_prefix" = x; then
55166    # As a simple fix, exclude /usr/bin since it's not a real path.
55167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55169      # a path prefixed by /cygdrive for fixpath to work.
55170      new_path="$CYGWIN_ROOT_PATH$input_path"
55171    fi
55172  fi
55173
55174
55175  if test "x$path" != "x$new_path"; then
55176    MSVC_DLL="$new_path"
55177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55178$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55179  fi
55180
55181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55182
55183  path="$MSVC_DLL"
55184  has_colon=`$ECHO $path | $GREP ^.:`
55185  new_path="$path"
55186  if test "x$has_colon" = x; then
55187    # Not in mixed or Windows style, start by that.
55188    new_path=`cmd //c echo $path`
55189  fi
55190
55191
55192  input_path="$new_path"
55193  # Check if we need to convert this using DOS-style short mode. If the path
55194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55195  # take no chances and rewrite it.
55196  # Note: m4 eats our [], so we need to use [ and ] instead.
55197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55198  if test "x$has_forbidden_chars" != x; then
55199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55201  fi
55202
55203
55204  windows_path="$new_path"
55205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55206    unix_path=`$CYGPATH -u "$windows_path"`
55207    new_path="$unix_path"
55208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55210    new_path="$unix_path"
55211  fi
55212
55213  if test "x$path" != "x$new_path"; then
55214    MSVC_DLL="$new_path"
55215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55216$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55217  fi
55218
55219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55221
55222    else
55223      # We're on a unix platform. Hooray! :)
55224      path="$MSVC_DLL"
55225      has_space=`$ECHO "$path" | $GREP " "`
55226      if test "x$has_space" != x; then
55227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55228$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55230      fi
55231
55232      # Use eval to expand a potential ~
55233      eval path="$path"
55234      if test ! -f "$path" && test ! -d "$path"; then
55235        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55236      fi
55237
55238      if test -d "$path"; then
55239        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55240      else
55241        dir="`$DIRNAME "$path"`"
55242        base="`$BASENAME "$path"`"
55243        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55244      fi
55245    fi
55246  fi
55247
55248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55249$as_echo_n "checking for $DLL_NAME... " >&6; }
55250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55251$as_echo "$MSVC_DLL" >&6; }
55252    else
55253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55254$as_echo "incorrect, ignoring" >&6; }
55255      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55256$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55257    fi
55258  fi
55259
55260      if test "x$MSVC_DLL" = x; then
55261        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55262      fi
55263      MSVCP_DLL="$MSVC_DLL"
55264    else
55265
55266  DLL_NAME="${MSVCP_NAME}"
55267  MSVC_DLL=
55268
55269  if test "x$MSVC_DLL" = x; then
55270    # Probe: Using well-known location from Visual Studio 10.0
55271    if test "x$VCINSTALLDIR" != x; then
55272      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55273
55274  windows_path="$CYGWIN_VC_INSTALL_DIR"
55275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55276    unix_path=`$CYGPATH -u "$windows_path"`
55277    CYGWIN_VC_INSTALL_DIR="$unix_path"
55278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55280    CYGWIN_VC_INSTALL_DIR="$unix_path"
55281  fi
55282
55283      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55284        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55285      else
55286        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55287      fi
55288      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55289
55290  DLL_NAME="$DLL_NAME"
55291  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55292  METHOD="well-known location in VCINSTALLDIR"
55293  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55294    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55295$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55296
55297    # Need to check if the found msvcr is correct architecture
55298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55299$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55300    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55302      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55303      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55304      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55305        CORRECT_MSVCR_ARCH="PE32 executable"
55306      else
55307        CORRECT_MSVCR_ARCH="PE32+ executable"
55308      fi
55309    else
55310      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55311        CORRECT_MSVCR_ARCH=386
55312      else
55313        CORRECT_MSVCR_ARCH=x86-64
55314      fi
55315    fi
55316    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55318$as_echo "ok" >&6; }
55319      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55320
55321  # Only process if variable expands to non-empty
55322
55323  if test "x$MSVC_DLL" != x; then
55324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55325
55326  # Input might be given as Windows format, start by converting to
55327  # unix format.
55328  path="$MSVC_DLL"
55329  new_path=`$CYGPATH -u "$path"`
55330
55331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55334  # "foo.exe" is OK but "foo" is an error.
55335  #
55336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55337  # It is also a way to make sure we got the proper file name for the real test later on.
55338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55339  if test "x$test_shortpath" = x; then
55340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55341$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55342    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55343  fi
55344
55345  # Call helper function which possibly converts this using DOS-style short mode.
55346  # If so, the updated path is stored in $new_path.
55347
55348  input_path="$new_path"
55349  # Check if we need to convert this using DOS-style short mode. If the path
55350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55351  # take no chances and rewrite it.
55352  # Note: m4 eats our [], so we need to use [ and ] instead.
55353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55354  if test "x$has_forbidden_chars" != x; then
55355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55359      # Going to short mode and back again did indeed matter. Since short mode is
55360      # case insensitive, let's make it lowercase to improve readability.
55361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55362      # Now convert it back to Unix-style (cygpath)
55363      input_path=`$CYGPATH -u "$shortmode_path"`
55364      new_path="$input_path"
55365    fi
55366  fi
55367
55368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55369  if test "x$test_cygdrive_prefix" = x; then
55370    # As a simple fix, exclude /usr/bin since it's not a real path.
55371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55373      # a path prefixed by /cygdrive for fixpath to work.
55374      new_path="$CYGWIN_ROOT_PATH$input_path"
55375    fi
55376  fi
55377
55378
55379  if test "x$path" != "x$new_path"; then
55380    MSVC_DLL="$new_path"
55381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55382$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55383  fi
55384
55385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55386
55387  path="$MSVC_DLL"
55388  has_colon=`$ECHO $path | $GREP ^.:`
55389  new_path="$path"
55390  if test "x$has_colon" = x; then
55391    # Not in mixed or Windows style, start by that.
55392    new_path=`cmd //c echo $path`
55393  fi
55394
55395
55396  input_path="$new_path"
55397  # Check if we need to convert this using DOS-style short mode. If the path
55398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55399  # take no chances and rewrite it.
55400  # Note: m4 eats our [], so we need to use [ and ] instead.
55401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55402  if test "x$has_forbidden_chars" != x; then
55403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55405  fi
55406
55407
55408  windows_path="$new_path"
55409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55410    unix_path=`$CYGPATH -u "$windows_path"`
55411    new_path="$unix_path"
55412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55414    new_path="$unix_path"
55415  fi
55416
55417  if test "x$path" != "x$new_path"; then
55418    MSVC_DLL="$new_path"
55419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55420$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55421  fi
55422
55423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55425
55426    else
55427      # We're on a unix platform. Hooray! :)
55428      path="$MSVC_DLL"
55429      has_space=`$ECHO "$path" | $GREP " "`
55430      if test "x$has_space" != x; then
55431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55432$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55434      fi
55435
55436      # Use eval to expand a potential ~
55437      eval path="$path"
55438      if test ! -f "$path" && test ! -d "$path"; then
55439        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55440      fi
55441
55442      if test -d "$path"; then
55443        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55444      else
55445        dir="`$DIRNAME "$path"`"
55446        base="`$BASENAME "$path"`"
55447        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55448      fi
55449    fi
55450  fi
55451
55452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55453$as_echo_n "checking for $DLL_NAME... " >&6; }
55454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55455$as_echo "$MSVC_DLL" >&6; }
55456    else
55457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55458$as_echo "incorrect, ignoring" >&6; }
55459      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55460$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55461    fi
55462  fi
55463
55464    fi
55465  fi
55466
55467  if test "x$MSVC_DLL" = x; then
55468    # Probe: Check in the Boot JDK directory.
55469    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55470
55471  DLL_NAME="$DLL_NAME"
55472  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55473  METHOD="well-known location in Boot JDK"
55474  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55476$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55477
55478    # Need to check if the found msvcr is correct architecture
55479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55480$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55481    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55483      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55484      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55485      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55486        CORRECT_MSVCR_ARCH="PE32 executable"
55487      else
55488        CORRECT_MSVCR_ARCH="PE32+ executable"
55489      fi
55490    else
55491      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55492        CORRECT_MSVCR_ARCH=386
55493      else
55494        CORRECT_MSVCR_ARCH=x86-64
55495      fi
55496    fi
55497    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55499$as_echo "ok" >&6; }
55500      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55501
55502  # Only process if variable expands to non-empty
55503
55504  if test "x$MSVC_DLL" != x; then
55505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55506
55507  # Input might be given as Windows format, start by converting to
55508  # unix format.
55509  path="$MSVC_DLL"
55510  new_path=`$CYGPATH -u "$path"`
55511
55512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55515  # "foo.exe" is OK but "foo" is an error.
55516  #
55517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55518  # It is also a way to make sure we got the proper file name for the real test later on.
55519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55520  if test "x$test_shortpath" = x; then
55521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55523    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55524  fi
55525
55526  # Call helper function which possibly converts this using DOS-style short mode.
55527  # If so, the updated path is stored in $new_path.
55528
55529  input_path="$new_path"
55530  # Check if we need to convert this using DOS-style short mode. If the path
55531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55532  # take no chances and rewrite it.
55533  # Note: m4 eats our [], so we need to use [ and ] instead.
55534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55535  if test "x$has_forbidden_chars" != x; then
55536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55540      # Going to short mode and back again did indeed matter. Since short mode is
55541      # case insensitive, let's make it lowercase to improve readability.
55542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55543      # Now convert it back to Unix-style (cygpath)
55544      input_path=`$CYGPATH -u "$shortmode_path"`
55545      new_path="$input_path"
55546    fi
55547  fi
55548
55549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55550  if test "x$test_cygdrive_prefix" = x; then
55551    # As a simple fix, exclude /usr/bin since it's not a real path.
55552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55554      # a path prefixed by /cygdrive for fixpath to work.
55555      new_path="$CYGWIN_ROOT_PATH$input_path"
55556    fi
55557  fi
55558
55559
55560  if test "x$path" != "x$new_path"; then
55561    MSVC_DLL="$new_path"
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55564  fi
55565
55566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55567
55568  path="$MSVC_DLL"
55569  has_colon=`$ECHO $path | $GREP ^.:`
55570  new_path="$path"
55571  if test "x$has_colon" = x; then
55572    # Not in mixed or Windows style, start by that.
55573    new_path=`cmd //c echo $path`
55574  fi
55575
55576
55577  input_path="$new_path"
55578  # Check if we need to convert this using DOS-style short mode. If the path
55579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55580  # take no chances and rewrite it.
55581  # Note: m4 eats our [], so we need to use [ and ] instead.
55582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55583  if test "x$has_forbidden_chars" != x; then
55584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55586  fi
55587
55588
55589  windows_path="$new_path"
55590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55591    unix_path=`$CYGPATH -u "$windows_path"`
55592    new_path="$unix_path"
55593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55595    new_path="$unix_path"
55596  fi
55597
55598  if test "x$path" != "x$new_path"; then
55599    MSVC_DLL="$new_path"
55600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55602  fi
55603
55604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55606
55607    else
55608      # We're on a unix platform. Hooray! :)
55609      path="$MSVC_DLL"
55610      has_space=`$ECHO "$path" | $GREP " "`
55611      if test "x$has_space" != x; then
55612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55615      fi
55616
55617      # Use eval to expand a potential ~
55618      eval path="$path"
55619      if test ! -f "$path" && test ! -d "$path"; then
55620        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55621      fi
55622
55623      if test -d "$path"; then
55624        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55625      else
55626        dir="`$DIRNAME "$path"`"
55627        base="`$BASENAME "$path"`"
55628        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55629      fi
55630    fi
55631  fi
55632
55633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55634$as_echo_n "checking for $DLL_NAME... " >&6; }
55635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55636$as_echo "$MSVC_DLL" >&6; }
55637    else
55638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55639$as_echo "incorrect, ignoring" >&6; }
55640      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55641$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55642    fi
55643  fi
55644
55645  fi
55646
55647  if test "x$MSVC_DLL" = x; then
55648    # Probe: Look in the Windows system32 directory
55649    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55650
55651  windows_path="$CYGWIN_SYSTEMROOT"
55652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55653    unix_path=`$CYGPATH -u "$windows_path"`
55654    CYGWIN_SYSTEMROOT="$unix_path"
55655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55657    CYGWIN_SYSTEMROOT="$unix_path"
55658  fi
55659
55660    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55661
55662  DLL_NAME="$DLL_NAME"
55663  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55664  METHOD="well-known location in SYSTEMROOT"
55665  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55666    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55667$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55668
55669    # Need to check if the found msvcr is correct architecture
55670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55671$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55672    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55674      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55675      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55676      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55677        CORRECT_MSVCR_ARCH="PE32 executable"
55678      else
55679        CORRECT_MSVCR_ARCH="PE32+ executable"
55680      fi
55681    else
55682      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55683        CORRECT_MSVCR_ARCH=386
55684      else
55685        CORRECT_MSVCR_ARCH=x86-64
55686      fi
55687    fi
55688    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55690$as_echo "ok" >&6; }
55691      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55692
55693  # Only process if variable expands to non-empty
55694
55695  if test "x$MSVC_DLL" != x; then
55696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55697
55698  # Input might be given as Windows format, start by converting to
55699  # unix format.
55700  path="$MSVC_DLL"
55701  new_path=`$CYGPATH -u "$path"`
55702
55703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55706  # "foo.exe" is OK but "foo" is an error.
55707  #
55708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55709  # It is also a way to make sure we got the proper file name for the real test later on.
55710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55711  if test "x$test_shortpath" = x; then
55712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55713$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55714    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55715  fi
55716
55717  # Call helper function which possibly converts this using DOS-style short mode.
55718  # If so, the updated path is stored in $new_path.
55719
55720  input_path="$new_path"
55721  # Check if we need to convert this using DOS-style short mode. If the path
55722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55723  # take no chances and rewrite it.
55724  # Note: m4 eats our [], so we need to use [ and ] instead.
55725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55726  if test "x$has_forbidden_chars" != x; then
55727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55731      # Going to short mode and back again did indeed matter. Since short mode is
55732      # case insensitive, let's make it lowercase to improve readability.
55733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55734      # Now convert it back to Unix-style (cygpath)
55735      input_path=`$CYGPATH -u "$shortmode_path"`
55736      new_path="$input_path"
55737    fi
55738  fi
55739
55740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55741  if test "x$test_cygdrive_prefix" = x; then
55742    # As a simple fix, exclude /usr/bin since it's not a real path.
55743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55745      # a path prefixed by /cygdrive for fixpath to work.
55746      new_path="$CYGWIN_ROOT_PATH$input_path"
55747    fi
55748  fi
55749
55750
55751  if test "x$path" != "x$new_path"; then
55752    MSVC_DLL="$new_path"
55753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55754$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55755  fi
55756
55757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55758
55759  path="$MSVC_DLL"
55760  has_colon=`$ECHO $path | $GREP ^.:`
55761  new_path="$path"
55762  if test "x$has_colon" = x; then
55763    # Not in mixed or Windows style, start by that.
55764    new_path=`cmd //c echo $path`
55765  fi
55766
55767
55768  input_path="$new_path"
55769  # Check if we need to convert this using DOS-style short mode. If the path
55770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55771  # take no chances and rewrite it.
55772  # Note: m4 eats our [], so we need to use [ and ] instead.
55773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55774  if test "x$has_forbidden_chars" != x; then
55775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55777  fi
55778
55779
55780  windows_path="$new_path"
55781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55782    unix_path=`$CYGPATH -u "$windows_path"`
55783    new_path="$unix_path"
55784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55786    new_path="$unix_path"
55787  fi
55788
55789  if test "x$path" != "x$new_path"; then
55790    MSVC_DLL="$new_path"
55791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55792$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55793  fi
55794
55795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55797
55798    else
55799      # We're on a unix platform. Hooray! :)
55800      path="$MSVC_DLL"
55801      has_space=`$ECHO "$path" | $GREP " "`
55802      if test "x$has_space" != x; then
55803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55804$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55805        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55806      fi
55807
55808      # Use eval to expand a potential ~
55809      eval path="$path"
55810      if test ! -f "$path" && test ! -d "$path"; then
55811        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55812      fi
55813
55814      if test -d "$path"; then
55815        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55816      else
55817        dir="`$DIRNAME "$path"`"
55818        base="`$BASENAME "$path"`"
55819        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55820      fi
55821    fi
55822  fi
55823
55824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55825$as_echo_n "checking for $DLL_NAME... " >&6; }
55826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55827$as_echo "$MSVC_DLL" >&6; }
55828    else
55829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55830$as_echo "incorrect, ignoring" >&6; }
55831      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55832$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55833    fi
55834  fi
55835
55836  fi
55837
55838  if test "x$MSVC_DLL" = x; then
55839    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55840    if test "x$VS100COMNTOOLS" != x; then
55841      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55842
55843  windows_path="$CYGWIN_VS_TOOLS_DIR"
55844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55845    unix_path=`$CYGPATH -u "$windows_path"`
55846    CYGWIN_VS_TOOLS_DIR="$unix_path"
55847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55849    CYGWIN_VS_TOOLS_DIR="$unix_path"
55850  fi
55851
55852      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55853        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55854	    | $GREP -i /x64/ | $HEAD --lines 1`
55855      else
55856        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55857	    | $GREP -i /x86/ | $HEAD --lines 1`
55858      fi
55859
55860  DLL_NAME="$DLL_NAME"
55861  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55862  METHOD="search of VS100COMNTOOLS"
55863  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55864    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55865$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55866
55867    # Need to check if the found msvcr is correct architecture
55868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55869$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55870    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55872      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55873      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55874      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55875        CORRECT_MSVCR_ARCH="PE32 executable"
55876      else
55877        CORRECT_MSVCR_ARCH="PE32+ executable"
55878      fi
55879    else
55880      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55881        CORRECT_MSVCR_ARCH=386
55882      else
55883        CORRECT_MSVCR_ARCH=x86-64
55884      fi
55885    fi
55886    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55888$as_echo "ok" >&6; }
55889      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55890
55891  # Only process if variable expands to non-empty
55892
55893  if test "x$MSVC_DLL" != x; then
55894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55895
55896  # Input might be given as Windows format, start by converting to
55897  # unix format.
55898  path="$MSVC_DLL"
55899  new_path=`$CYGPATH -u "$path"`
55900
55901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55904  # "foo.exe" is OK but "foo" is an error.
55905  #
55906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55907  # It is also a way to make sure we got the proper file name for the real test later on.
55908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55909  if test "x$test_shortpath" = x; then
55910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55911$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55912    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55913  fi
55914
55915  # Call helper function which possibly converts this using DOS-style short mode.
55916  # If so, the updated path is stored in $new_path.
55917
55918  input_path="$new_path"
55919  # Check if we need to convert this using DOS-style short mode. If the path
55920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55921  # take no chances and rewrite it.
55922  # Note: m4 eats our [], so we need to use [ and ] instead.
55923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55924  if test "x$has_forbidden_chars" != x; then
55925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55929      # Going to short mode and back again did indeed matter. Since short mode is
55930      # case insensitive, let's make it lowercase to improve readability.
55931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55932      # Now convert it back to Unix-style (cygpath)
55933      input_path=`$CYGPATH -u "$shortmode_path"`
55934      new_path="$input_path"
55935    fi
55936  fi
55937
55938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55939  if test "x$test_cygdrive_prefix" = x; then
55940    # As a simple fix, exclude /usr/bin since it's not a real path.
55941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55943      # a path prefixed by /cygdrive for fixpath to work.
55944      new_path="$CYGWIN_ROOT_PATH$input_path"
55945    fi
55946  fi
55947
55948
55949  if test "x$path" != "x$new_path"; then
55950    MSVC_DLL="$new_path"
55951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55952$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55953  fi
55954
55955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55956
55957  path="$MSVC_DLL"
55958  has_colon=`$ECHO $path | $GREP ^.:`
55959  new_path="$path"
55960  if test "x$has_colon" = x; then
55961    # Not in mixed or Windows style, start by that.
55962    new_path=`cmd //c echo $path`
55963  fi
55964
55965
55966  input_path="$new_path"
55967  # Check if we need to convert this using DOS-style short mode. If the path
55968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55969  # take no chances and rewrite it.
55970  # Note: m4 eats our [], so we need to use [ and ] instead.
55971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55972  if test "x$has_forbidden_chars" != x; then
55973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55975  fi
55976
55977
55978  windows_path="$new_path"
55979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55980    unix_path=`$CYGPATH -u "$windows_path"`
55981    new_path="$unix_path"
55982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55984    new_path="$unix_path"
55985  fi
55986
55987  if test "x$path" != "x$new_path"; then
55988    MSVC_DLL="$new_path"
55989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55990$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55991  fi
55992
55993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55995
55996    else
55997      # We're on a unix platform. Hooray! :)
55998      path="$MSVC_DLL"
55999      has_space=`$ECHO "$path" | $GREP " "`
56000      if test "x$has_space" != x; then
56001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56002$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56004      fi
56005
56006      # Use eval to expand a potential ~
56007      eval path="$path"
56008      if test ! -f "$path" && test ! -d "$path"; then
56009        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56010      fi
56011
56012      if test -d "$path"; then
56013        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56014      else
56015        dir="`$DIRNAME "$path"`"
56016        base="`$BASENAME "$path"`"
56017        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56018      fi
56019    fi
56020  fi
56021
56022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56023$as_echo_n "checking for $DLL_NAME... " >&6; }
56024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56025$as_echo "$MSVC_DLL" >&6; }
56026    else
56027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56028$as_echo "incorrect, ignoring" >&6; }
56029      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56030$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56031    fi
56032  fi
56033
56034    fi
56035  fi
56036
56037  if test "x$MSVC_DLL" = x; then
56038    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56039    # (This was the original behaviour; kept since it might turn something up)
56040    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56041      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56042        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56043	    | $GREP x64 | $HEAD --lines 1`
56044      else
56045        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56046	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56047        if test "x$POSSIBLE_MSVC_DLL" = x; then
56048          # We're grasping at straws now...
56049          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56050	      | $HEAD --lines 1`
56051        fi
56052      fi
56053
56054
56055  DLL_NAME="$DLL_NAME"
56056  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56057  METHOD="search of VCINSTALLDIR"
56058  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56060$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56061
56062    # Need to check if the found msvcr is correct architecture
56063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56064$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56065    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56067      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56068      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56069      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56070        CORRECT_MSVCR_ARCH="PE32 executable"
56071      else
56072        CORRECT_MSVCR_ARCH="PE32+ executable"
56073      fi
56074    else
56075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56076        CORRECT_MSVCR_ARCH=386
56077      else
56078        CORRECT_MSVCR_ARCH=x86-64
56079      fi
56080    fi
56081    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56083$as_echo "ok" >&6; }
56084      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56085
56086  # Only process if variable expands to non-empty
56087
56088  if test "x$MSVC_DLL" != x; then
56089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56090
56091  # Input might be given as Windows format, start by converting to
56092  # unix format.
56093  path="$MSVC_DLL"
56094  new_path=`$CYGPATH -u "$path"`
56095
56096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56099  # "foo.exe" is OK but "foo" is an error.
56100  #
56101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56102  # It is also a way to make sure we got the proper file name for the real test later on.
56103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56104  if test "x$test_shortpath" = x; then
56105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56107    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56108  fi
56109
56110  # Call helper function which possibly converts this using DOS-style short mode.
56111  # If so, the updated path is stored in $new_path.
56112
56113  input_path="$new_path"
56114  # Check if we need to convert this using DOS-style short mode. If the path
56115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56116  # take no chances and rewrite it.
56117  # Note: m4 eats our [], so we need to use [ and ] instead.
56118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56119  if test "x$has_forbidden_chars" != x; then
56120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56124      # Going to short mode and back again did indeed matter. Since short mode is
56125      # case insensitive, let's make it lowercase to improve readability.
56126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56127      # Now convert it back to Unix-style (cygpath)
56128      input_path=`$CYGPATH -u "$shortmode_path"`
56129      new_path="$input_path"
56130    fi
56131  fi
56132
56133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56134  if test "x$test_cygdrive_prefix" = x; then
56135    # As a simple fix, exclude /usr/bin since it's not a real path.
56136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56138      # a path prefixed by /cygdrive for fixpath to work.
56139      new_path="$CYGWIN_ROOT_PATH$input_path"
56140    fi
56141  fi
56142
56143
56144  if test "x$path" != "x$new_path"; then
56145    MSVC_DLL="$new_path"
56146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56147$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56148  fi
56149
56150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56151
56152  path="$MSVC_DLL"
56153  has_colon=`$ECHO $path | $GREP ^.:`
56154  new_path="$path"
56155  if test "x$has_colon" = x; then
56156    # Not in mixed or Windows style, start by that.
56157    new_path=`cmd //c echo $path`
56158  fi
56159
56160
56161  input_path="$new_path"
56162  # Check if we need to convert this using DOS-style short mode. If the path
56163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56164  # take no chances and rewrite it.
56165  # Note: m4 eats our [], so we need to use [ and ] instead.
56166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56167  if test "x$has_forbidden_chars" != x; then
56168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56170  fi
56171
56172
56173  windows_path="$new_path"
56174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56175    unix_path=`$CYGPATH -u "$windows_path"`
56176    new_path="$unix_path"
56177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56179    new_path="$unix_path"
56180  fi
56181
56182  if test "x$path" != "x$new_path"; then
56183    MSVC_DLL="$new_path"
56184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56185$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56186  fi
56187
56188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56190
56191    else
56192      # We're on a unix platform. Hooray! :)
56193      path="$MSVC_DLL"
56194      has_space=`$ECHO "$path" | $GREP " "`
56195      if test "x$has_space" != x; then
56196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56197$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56199      fi
56200
56201      # Use eval to expand a potential ~
56202      eval path="$path"
56203      if test ! -f "$path" && test ! -d "$path"; then
56204        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56205      fi
56206
56207      if test -d "$path"; then
56208        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56209      else
56210        dir="`$DIRNAME "$path"`"
56211        base="`$BASENAME "$path"`"
56212        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56213      fi
56214    fi
56215  fi
56216
56217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56218$as_echo_n "checking for $DLL_NAME... " >&6; }
56219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56220$as_echo "$MSVC_DLL" >&6; }
56221    else
56222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56223$as_echo "incorrect, ignoring" >&6; }
56224      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56225$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56226    fi
56227  fi
56228
56229    fi
56230  fi
56231
56232  if test "x$MSVC_DLL" = x; then
56233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56234$as_echo_n "checking for $DLL_NAME... " >&6; }
56235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56236$as_echo "no" >&6; }
56237    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56238  fi
56239
56240      MSVCP_DLL="$MSVC_DLL"
56241    fi
56242
56243  fi
56244
56245  fi
56246
56247
56248  if test "x$NEEDS_LIB_X11" = xfalse; then
56249    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56250      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56251$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56252    fi
56253    X_CFLAGS=
56254    X_LIBS=
56255  else
56256
56257    if test "x${with_x}" = xno; then
56258      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56259    fi
56260
56261    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56262      # The user has specified a X11 base directory. Use it for includes and
56263      # libraries, unless explicitly overridden.
56264      if test "x$x_includes" = xNONE; then
56265        x_includes="${with_x}/include"
56266      fi
56267      if test "x$x_libraries" = xNONE; then
56268        x_libraries="${with_x}/lib"
56269      fi
56270    else
56271      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56272      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56273      # --x-libraries for the sysroot, if that seems to be correct.
56274      if test "x$SYSROOT" != "x"; then
56275        if test "x$x_includes" = xNONE; then
56276          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56277            x_includes="$SYSROOT/usr/X11R6/include"
56278          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56279            x_includes="$SYSROOT/usr/include"
56280          fi
56281        fi
56282        if test "x$x_libraries" = xNONE; then
56283          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56284            x_libraries="$SYSROOT/usr/X11R6/lib"
56285          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56286            x_libraries="$SYSROOT/usr/lib64"
56287          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56288            x_libraries="$SYSROOT/usr/lib"
56289          fi
56290        fi
56291      fi
56292    fi
56293
56294    # Now let autoconf do it's magic
56295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56296$as_echo_n "checking for X... " >&6; }
56297
56298
56299# Check whether --with-x was given.
56300if test "${with_x+set}" = set; then :
56301  withval=$with_x;
56302fi
56303
56304# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56305if test "x$with_x" = xno; then
56306  # The user explicitly disabled X.
56307  have_x=disabled
56308else
56309  case $x_includes,$x_libraries in #(
56310    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56311    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56312  $as_echo_n "(cached) " >&6
56313else
56314  # One or both of the vars are not set, and there is no cached value.
56315ac_x_includes=no ac_x_libraries=no
56316rm -f -r conftest.dir
56317if mkdir conftest.dir; then
56318  cd conftest.dir
56319  cat >Imakefile <<'_ACEOF'
56320incroot:
56321	@echo incroot='${INCROOT}'
56322usrlibdir:
56323	@echo usrlibdir='${USRLIBDIR}'
56324libdir:
56325	@echo libdir='${LIBDIR}'
56326_ACEOF
56327  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56328    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56329    for ac_var in incroot usrlibdir libdir; do
56330      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56331    done
56332    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56333    for ac_extension in a so sl dylib la dll; do
56334      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56335	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56336	ac_im_usrlibdir=$ac_im_libdir; break
56337      fi
56338    done
56339    # Screen out bogus values from the imake configuration.  They are
56340    # bogus both because they are the default anyway, and because
56341    # using them would break gcc on systems where it needs fixed includes.
56342    case $ac_im_incroot in
56343	/usr/include) ac_x_includes= ;;
56344	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56345    esac
56346    case $ac_im_usrlibdir in
56347	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56348	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56349    esac
56350  fi
56351  cd ..
56352  rm -f -r conftest.dir
56353fi
56354
56355# Standard set of common directories for X headers.
56356# Check X11 before X11Rn because it is often a symlink to the current release.
56357ac_x_header_dirs='
56358/usr/X11/include
56359/usr/X11R7/include
56360/usr/X11R6/include
56361/usr/X11R5/include
56362/usr/X11R4/include
56363
56364/usr/include/X11
56365/usr/include/X11R7
56366/usr/include/X11R6
56367/usr/include/X11R5
56368/usr/include/X11R4
56369
56370/usr/local/X11/include
56371/usr/local/X11R7/include
56372/usr/local/X11R6/include
56373/usr/local/X11R5/include
56374/usr/local/X11R4/include
56375
56376/usr/local/include/X11
56377/usr/local/include/X11R7
56378/usr/local/include/X11R6
56379/usr/local/include/X11R5
56380/usr/local/include/X11R4
56381
56382/usr/X386/include
56383/usr/x386/include
56384/usr/XFree86/include/X11
56385
56386/usr/include
56387/usr/local/include
56388/usr/unsupported/include
56389/usr/athena/include
56390/usr/local/x11r5/include
56391/usr/lpp/Xamples/include
56392
56393/usr/openwin/include
56394/usr/openwin/share/include'
56395
56396if test "$ac_x_includes" = no; then
56397  # Guess where to find include files, by looking for Xlib.h.
56398  # First, try using that file with no special directory specified.
56399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56400/* end confdefs.h.  */
56401#include <X11/Xlib.h>
56402_ACEOF
56403if ac_fn_cxx_try_cpp "$LINENO"; then :
56404  # We can compile using X headers with no special include directory.
56405ac_x_includes=
56406else
56407  for ac_dir in $ac_x_header_dirs; do
56408  if test -r "$ac_dir/X11/Xlib.h"; then
56409    ac_x_includes=$ac_dir
56410    break
56411  fi
56412done
56413fi
56414rm -f conftest.err conftest.i conftest.$ac_ext
56415fi # $ac_x_includes = no
56416
56417if test "$ac_x_libraries" = no; then
56418  # Check for the libraries.
56419  # See if we find them without any special options.
56420  # Don't add to $LIBS permanently.
56421  ac_save_LIBS=$LIBS
56422  LIBS="-lX11 $LIBS"
56423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56424/* end confdefs.h.  */
56425#include <X11/Xlib.h>
56426int
56427main ()
56428{
56429XrmInitialize ()
56430  ;
56431  return 0;
56432}
56433_ACEOF
56434if ac_fn_cxx_try_link "$LINENO"; then :
56435  LIBS=$ac_save_LIBS
56436# We can link X programs with no special library path.
56437ac_x_libraries=
56438else
56439  LIBS=$ac_save_LIBS
56440for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56441do
56442  # Don't even attempt the hair of trying to link an X program!
56443  for ac_extension in a so sl dylib la dll; do
56444    if test -r "$ac_dir/libX11.$ac_extension"; then
56445      ac_x_libraries=$ac_dir
56446      break 2
56447    fi
56448  done
56449done
56450fi
56451rm -f core conftest.err conftest.$ac_objext \
56452    conftest$ac_exeext conftest.$ac_ext
56453fi # $ac_x_libraries = no
56454
56455case $ac_x_includes,$ac_x_libraries in #(
56456  no,* | *,no | *\'*)
56457    # Didn't find X, or a directory has "'" in its name.
56458    ac_cv_have_x="have_x=no";; #(
56459  *)
56460    # Record where we found X for the cache.
56461    ac_cv_have_x="have_x=yes\
56462	ac_x_includes='$ac_x_includes'\
56463	ac_x_libraries='$ac_x_libraries'"
56464esac
56465fi
56466;; #(
56467    *) have_x=yes;;
56468  esac
56469  eval "$ac_cv_have_x"
56470fi # $with_x != no
56471
56472if test "$have_x" != yes; then
56473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56474$as_echo "$have_x" >&6; }
56475  no_x=yes
56476else
56477  # If each of the values was on the command line, it overrides each guess.
56478  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56479  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56480  # Update the cache value to reflect the command line values.
56481  ac_cv_have_x="have_x=yes\
56482	ac_x_includes='$x_includes'\
56483	ac_x_libraries='$x_libraries'"
56484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56485$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56486fi
56487
56488    if test "$no_x" = yes; then
56489  # Not all programs may use this symbol, but it does not hurt to define it.
56490
56491$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56492
56493  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56494else
56495  if test -n "$x_includes"; then
56496    X_CFLAGS="$X_CFLAGS -I$x_includes"
56497  fi
56498
56499  # It would also be nice to do this for all -L options, not just this one.
56500  if test -n "$x_libraries"; then
56501    X_LIBS="$X_LIBS -L$x_libraries"
56502    # For Solaris; some versions of Sun CC require a space after -R and
56503    # others require no space.  Words are not sufficient . . . .
56504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56505$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56506    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56507    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56508    ac_cxx_werror_flag=yes
56509    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56510/* end confdefs.h.  */
56511
56512int
56513main ()
56514{
56515
56516  ;
56517  return 0;
56518}
56519_ACEOF
56520if ac_fn_cxx_try_link "$LINENO"; then :
56521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56522$as_echo "no" >&6; }
56523       X_LIBS="$X_LIBS -R$x_libraries"
56524else
56525  LIBS="$ac_xsave_LIBS -R $x_libraries"
56526       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56527/* end confdefs.h.  */
56528
56529int
56530main ()
56531{
56532
56533  ;
56534  return 0;
56535}
56536_ACEOF
56537if ac_fn_cxx_try_link "$LINENO"; then :
56538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56539$as_echo "yes" >&6; }
56540	  X_LIBS="$X_LIBS -R $x_libraries"
56541else
56542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56543$as_echo "neither works" >&6; }
56544fi
56545rm -f core conftest.err conftest.$ac_objext \
56546    conftest$ac_exeext conftest.$ac_ext
56547fi
56548rm -f core conftest.err conftest.$ac_objext \
56549    conftest$ac_exeext conftest.$ac_ext
56550    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56551    LIBS=$ac_xsave_LIBS
56552  fi
56553
56554  # Check for system-dependent libraries X programs must link with.
56555  # Do this before checking for the system-independent R6 libraries
56556  # (-lICE), since we may need -lsocket or whatever for X linking.
56557
56558  if test "$ISC" = yes; then
56559    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56560  else
56561    # Martyn Johnson says this is needed for Ultrix, if the X
56562    # libraries were built with DECnet support.  And Karl Berry says
56563    # the Alpha needs dnet_stub (dnet does not exist).
56564    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56565    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56566/* end confdefs.h.  */
56567
56568/* Override any GCC internal prototype to avoid an error.
56569   Use char because int might match the return type of a GCC
56570   builtin and then its argument prototype would still apply.  */
56571#ifdef __cplusplus
56572extern "C"
56573#endif
56574char XOpenDisplay ();
56575int
56576main ()
56577{
56578return XOpenDisplay ();
56579  ;
56580  return 0;
56581}
56582_ACEOF
56583if ac_fn_cxx_try_link "$LINENO"; then :
56584
56585else
56586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56587$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56588if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56589  $as_echo_n "(cached) " >&6
56590else
56591  ac_check_lib_save_LIBS=$LIBS
56592LIBS="-ldnet  $LIBS"
56593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56594/* end confdefs.h.  */
56595
56596/* Override any GCC internal prototype to avoid an error.
56597   Use char because int might match the return type of a GCC
56598   builtin and then its argument prototype would still apply.  */
56599#ifdef __cplusplus
56600extern "C"
56601#endif
56602char dnet_ntoa ();
56603int
56604main ()
56605{
56606return dnet_ntoa ();
56607  ;
56608  return 0;
56609}
56610_ACEOF
56611if ac_fn_cxx_try_link "$LINENO"; then :
56612  ac_cv_lib_dnet_dnet_ntoa=yes
56613else
56614  ac_cv_lib_dnet_dnet_ntoa=no
56615fi
56616rm -f core conftest.err conftest.$ac_objext \
56617    conftest$ac_exeext conftest.$ac_ext
56618LIBS=$ac_check_lib_save_LIBS
56619fi
56620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56621$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56622if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56623  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56624fi
56625
56626    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56628$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56629if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56630  $as_echo_n "(cached) " >&6
56631else
56632  ac_check_lib_save_LIBS=$LIBS
56633LIBS="-ldnet_stub  $LIBS"
56634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56635/* end confdefs.h.  */
56636
56637/* Override any GCC internal prototype to avoid an error.
56638   Use char because int might match the return type of a GCC
56639   builtin and then its argument prototype would still apply.  */
56640#ifdef __cplusplus
56641extern "C"
56642#endif
56643char dnet_ntoa ();
56644int
56645main ()
56646{
56647return dnet_ntoa ();
56648  ;
56649  return 0;
56650}
56651_ACEOF
56652if ac_fn_cxx_try_link "$LINENO"; then :
56653  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56654else
56655  ac_cv_lib_dnet_stub_dnet_ntoa=no
56656fi
56657rm -f core conftest.err conftest.$ac_objext \
56658    conftest$ac_exeext conftest.$ac_ext
56659LIBS=$ac_check_lib_save_LIBS
56660fi
56661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56662$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56663if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56664  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56665fi
56666
56667    fi
56668fi
56669rm -f core conftest.err conftest.$ac_objext \
56670    conftest$ac_exeext conftest.$ac_ext
56671    LIBS="$ac_xsave_LIBS"
56672
56673    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56674    # to get the SysV transport functions.
56675    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56676    # needs -lnsl.
56677    # The nsl library prevents programs from opening the X display
56678    # on Irix 5.2, according to T.E. Dickey.
56679    # The functions gethostbyname, getservbyname, and inet_addr are
56680    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56681    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56682if test "x$ac_cv_func_gethostbyname" = xyes; then :
56683
56684fi
56685
56686    if test $ac_cv_func_gethostbyname = no; then
56687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56688$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56689if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56690  $as_echo_n "(cached) " >&6
56691else
56692  ac_check_lib_save_LIBS=$LIBS
56693LIBS="-lnsl  $LIBS"
56694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56695/* end confdefs.h.  */
56696
56697/* Override any GCC internal prototype to avoid an error.
56698   Use char because int might match the return type of a GCC
56699   builtin and then its argument prototype would still apply.  */
56700#ifdef __cplusplus
56701extern "C"
56702#endif
56703char gethostbyname ();
56704int
56705main ()
56706{
56707return gethostbyname ();
56708  ;
56709  return 0;
56710}
56711_ACEOF
56712if ac_fn_cxx_try_link "$LINENO"; then :
56713  ac_cv_lib_nsl_gethostbyname=yes
56714else
56715  ac_cv_lib_nsl_gethostbyname=no
56716fi
56717rm -f core conftest.err conftest.$ac_objext \
56718    conftest$ac_exeext conftest.$ac_ext
56719LIBS=$ac_check_lib_save_LIBS
56720fi
56721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56722$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56723if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56724  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56725fi
56726
56727      if test $ac_cv_lib_nsl_gethostbyname = no; then
56728	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56729$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56730if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56731  $as_echo_n "(cached) " >&6
56732else
56733  ac_check_lib_save_LIBS=$LIBS
56734LIBS="-lbsd  $LIBS"
56735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56736/* end confdefs.h.  */
56737
56738/* Override any GCC internal prototype to avoid an error.
56739   Use char because int might match the return type of a GCC
56740   builtin and then its argument prototype would still apply.  */
56741#ifdef __cplusplus
56742extern "C"
56743#endif
56744char gethostbyname ();
56745int
56746main ()
56747{
56748return gethostbyname ();
56749  ;
56750  return 0;
56751}
56752_ACEOF
56753if ac_fn_cxx_try_link "$LINENO"; then :
56754  ac_cv_lib_bsd_gethostbyname=yes
56755else
56756  ac_cv_lib_bsd_gethostbyname=no
56757fi
56758rm -f core conftest.err conftest.$ac_objext \
56759    conftest$ac_exeext conftest.$ac_ext
56760LIBS=$ac_check_lib_save_LIBS
56761fi
56762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56763$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56764if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56765  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56766fi
56767
56768      fi
56769    fi
56770
56771    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56772    # socket/setsockopt and other routines are undefined under SCO ODT
56773    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56774    # on later versions), says Simon Leinen: it contains gethostby*
56775    # variants that don't use the name server (or something).  -lsocket
56776    # must be given before -lnsl if both are needed.  We assume that
56777    # if connect needs -lnsl, so does gethostbyname.
56778    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56779if test "x$ac_cv_func_connect" = xyes; then :
56780
56781fi
56782
56783    if test $ac_cv_func_connect = no; then
56784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56785$as_echo_n "checking for connect in -lsocket... " >&6; }
56786if ${ac_cv_lib_socket_connect+:} false; then :
56787  $as_echo_n "(cached) " >&6
56788else
56789  ac_check_lib_save_LIBS=$LIBS
56790LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56792/* end confdefs.h.  */
56793
56794/* Override any GCC internal prototype to avoid an error.
56795   Use char because int might match the return type of a GCC
56796   builtin and then its argument prototype would still apply.  */
56797#ifdef __cplusplus
56798extern "C"
56799#endif
56800char connect ();
56801int
56802main ()
56803{
56804return connect ();
56805  ;
56806  return 0;
56807}
56808_ACEOF
56809if ac_fn_cxx_try_link "$LINENO"; then :
56810  ac_cv_lib_socket_connect=yes
56811else
56812  ac_cv_lib_socket_connect=no
56813fi
56814rm -f core conftest.err conftest.$ac_objext \
56815    conftest$ac_exeext conftest.$ac_ext
56816LIBS=$ac_check_lib_save_LIBS
56817fi
56818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56819$as_echo "$ac_cv_lib_socket_connect" >&6; }
56820if test "x$ac_cv_lib_socket_connect" = xyes; then :
56821  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56822fi
56823
56824    fi
56825
56826    # Guillermo Gomez says -lposix is necessary on A/UX.
56827    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56828if test "x$ac_cv_func_remove" = xyes; then :
56829
56830fi
56831
56832    if test $ac_cv_func_remove = no; then
56833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56834$as_echo_n "checking for remove in -lposix... " >&6; }
56835if ${ac_cv_lib_posix_remove+:} false; then :
56836  $as_echo_n "(cached) " >&6
56837else
56838  ac_check_lib_save_LIBS=$LIBS
56839LIBS="-lposix  $LIBS"
56840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56841/* end confdefs.h.  */
56842
56843/* Override any GCC internal prototype to avoid an error.
56844   Use char because int might match the return type of a GCC
56845   builtin and then its argument prototype would still apply.  */
56846#ifdef __cplusplus
56847extern "C"
56848#endif
56849char remove ();
56850int
56851main ()
56852{
56853return remove ();
56854  ;
56855  return 0;
56856}
56857_ACEOF
56858if ac_fn_cxx_try_link "$LINENO"; then :
56859  ac_cv_lib_posix_remove=yes
56860else
56861  ac_cv_lib_posix_remove=no
56862fi
56863rm -f core conftest.err conftest.$ac_objext \
56864    conftest$ac_exeext conftest.$ac_ext
56865LIBS=$ac_check_lib_save_LIBS
56866fi
56867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56868$as_echo "$ac_cv_lib_posix_remove" >&6; }
56869if test "x$ac_cv_lib_posix_remove" = xyes; then :
56870  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56871fi
56872
56873    fi
56874
56875    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56876    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56877if test "x$ac_cv_func_shmat" = xyes; then :
56878
56879fi
56880
56881    if test $ac_cv_func_shmat = no; then
56882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56883$as_echo_n "checking for shmat in -lipc... " >&6; }
56884if ${ac_cv_lib_ipc_shmat+:} false; then :
56885  $as_echo_n "(cached) " >&6
56886else
56887  ac_check_lib_save_LIBS=$LIBS
56888LIBS="-lipc  $LIBS"
56889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56890/* end confdefs.h.  */
56891
56892/* Override any GCC internal prototype to avoid an error.
56893   Use char because int might match the return type of a GCC
56894   builtin and then its argument prototype would still apply.  */
56895#ifdef __cplusplus
56896extern "C"
56897#endif
56898char shmat ();
56899int
56900main ()
56901{
56902return shmat ();
56903  ;
56904  return 0;
56905}
56906_ACEOF
56907if ac_fn_cxx_try_link "$LINENO"; then :
56908  ac_cv_lib_ipc_shmat=yes
56909else
56910  ac_cv_lib_ipc_shmat=no
56911fi
56912rm -f core conftest.err conftest.$ac_objext \
56913    conftest$ac_exeext conftest.$ac_ext
56914LIBS=$ac_check_lib_save_LIBS
56915fi
56916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56917$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56918if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56919  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56920fi
56921
56922    fi
56923  fi
56924
56925  # Check for libraries that X11R6 Xt/Xaw programs need.
56926  ac_save_LDFLAGS=$LDFLAGS
56927  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56928  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56929  # check for ICE first), but we must link in the order -lSM -lICE or
56930  # we get undefined symbols.  So assume we have SM if we have ICE.
56931  # These have to be linked with before -lX11, unlike the other
56932  # libraries we check for below, so use a different variable.
56933  # John Interrante, Karl Berry
56934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56935$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56936if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56937  $as_echo_n "(cached) " >&6
56938else
56939  ac_check_lib_save_LIBS=$LIBS
56940LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56942/* end confdefs.h.  */
56943
56944/* Override any GCC internal prototype to avoid an error.
56945   Use char because int might match the return type of a GCC
56946   builtin and then its argument prototype would still apply.  */
56947#ifdef __cplusplus
56948extern "C"
56949#endif
56950char IceConnectionNumber ();
56951int
56952main ()
56953{
56954return IceConnectionNumber ();
56955  ;
56956  return 0;
56957}
56958_ACEOF
56959if ac_fn_cxx_try_link "$LINENO"; then :
56960  ac_cv_lib_ICE_IceConnectionNumber=yes
56961else
56962  ac_cv_lib_ICE_IceConnectionNumber=no
56963fi
56964rm -f core conftest.err conftest.$ac_objext \
56965    conftest$ac_exeext conftest.$ac_ext
56966LIBS=$ac_check_lib_save_LIBS
56967fi
56968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56969$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56970if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56971  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56972fi
56973
56974  LDFLAGS=$ac_save_LDFLAGS
56975
56976fi
56977
56978
56979    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56980    # this doesn't make sense so we remove it.
56981    if test "x$COMPILE_TYPE" = xcross; then
56982      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56983    fi
56984
56985    if test "x$no_x" = xyes; then
56986
56987  # Print a helpful message on how to acquire the necessary build dependency.
56988  # x11 is the help tag: freetype, cups, alsa etc
56989  MISSING_DEPENDENCY=x11
56990
56991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56992    cygwin_help $MISSING_DEPENDENCY
56993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56994    msys_help $MISSING_DEPENDENCY
56995  else
56996    PKGHANDLER_COMMAND=
56997
56998    case $PKGHANDLER in
56999      apt-get)
57000        apt_help     $MISSING_DEPENDENCY ;;
57001      yum)
57002        yum_help     $MISSING_DEPENDENCY ;;
57003      brew)
57004        brew_help    $MISSING_DEPENDENCY ;;
57005      port)
57006        port_help    $MISSING_DEPENDENCY ;;
57007      pkgutil)
57008        pkgutil_help $MISSING_DEPENDENCY ;;
57009      pkgadd)
57010        pkgadd_help  $MISSING_DEPENDENCY ;;
57011    esac
57012
57013    if test "x$PKGHANDLER_COMMAND" != x; then
57014      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57015    fi
57016  fi
57017
57018      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57019    fi
57020
57021    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57022      OPENWIN_HOME="/usr/openwin"
57023      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57024      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57025          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57026    fi
57027
57028    ac_ext=c
57029ac_cpp='$CPP $CPPFLAGS'
57030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57032ac_compiler_gnu=$ac_cv_c_compiler_gnu
57033
57034    OLD_CFLAGS="$CFLAGS"
57035    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57036
57037    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57038    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57039do :
57040  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57041ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57042          # include <X11/Xlib.h>
57043          # include <X11/Xutil.h>
57044
57045
57046"
57047if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57048  cat >>confdefs.h <<_ACEOF
57049#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57050_ACEOF
57051 X11_HEADERS_OK=yes
57052else
57053  X11_HEADERS_OK=no; break
57054fi
57055
57056done
57057
57058
57059    if test "x$X11_HEADERS_OK" = xno; then
57060
57061  # Print a helpful message on how to acquire the necessary build dependency.
57062  # x11 is the help tag: freetype, cups, alsa etc
57063  MISSING_DEPENDENCY=x11
57064
57065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57066    cygwin_help $MISSING_DEPENDENCY
57067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57068    msys_help $MISSING_DEPENDENCY
57069  else
57070    PKGHANDLER_COMMAND=
57071
57072    case $PKGHANDLER in
57073      apt-get)
57074        apt_help     $MISSING_DEPENDENCY ;;
57075      yum)
57076        yum_help     $MISSING_DEPENDENCY ;;
57077      brew)
57078        brew_help    $MISSING_DEPENDENCY ;;
57079      port)
57080        port_help    $MISSING_DEPENDENCY ;;
57081      pkgutil)
57082        pkgutil_help $MISSING_DEPENDENCY ;;
57083      pkgadd)
57084        pkgadd_help  $MISSING_DEPENDENCY ;;
57085    esac
57086
57087    if test "x$PKGHANDLER_COMMAND" != x; then
57088      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57089    fi
57090  fi
57091
57092      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57093    fi
57094
57095    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57096    # defined in libawt_xawt.
57097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57098$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57099    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57100/* end confdefs.h.  */
57101#include <X11/extensions/Xrender.h>
57102int
57103main ()
57104{
57105XLinearGradient x;
57106  ;
57107  return 0;
57108}
57109_ACEOF
57110if ac_fn_c_try_compile "$LINENO"; then :
57111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57112$as_echo "yes" >&6; }
57113else
57114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57115$as_echo "no" >&6; }
57116         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57117fi
57118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57119
57120    CFLAGS="$OLD_CFLAGS"
57121    ac_ext=cpp
57122ac_cpp='$CXXCPP $CPPFLAGS'
57123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57126
57127  fi # NEEDS_LIB_X11
57128
57129
57130
57131
57132
57133
57134# Check whether --with-cups was given.
57135if test "${with_cups+set}" = set; then :
57136  withval=$with_cups;
57137fi
57138
57139
57140# Check whether --with-cups-include was given.
57141if test "${with_cups_include+set}" = set; then :
57142  withval=$with_cups_include;
57143fi
57144
57145
57146  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57147    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57148        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57149      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57150$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57151    fi
57152    CUPS_CFLAGS=
57153  else
57154    CUPS_FOUND=no
57155
57156    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57157      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57158    fi
57159
57160    if test "x${with_cups}" != x; then
57161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57162$as_echo_n "checking for cups headers... " >&6; }
57163      if test -s "${with_cups}/include/cups/cups.h"; then
57164        CUPS_CFLAGS="-I${with_cups}/include"
57165        CUPS_FOUND=yes
57166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57167$as_echo "$CUPS_FOUND" >&6; }
57168      else
57169        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57170      fi
57171    fi
57172    if test "x${with_cups_include}" != x; then
57173      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57174$as_echo_n "checking for cups headers... " >&6; }
57175      if test -s "${with_cups_include}/cups/cups.h"; then
57176        CUPS_CFLAGS="-I${with_cups_include}"
57177        CUPS_FOUND=yes
57178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57179$as_echo "$CUPS_FOUND" >&6; }
57180      else
57181        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57182      fi
57183    fi
57184    if test "x$CUPS_FOUND" = xno; then
57185      # Are the cups headers installed in the default /usr/include location?
57186      for ac_header in cups/cups.h cups/ppd.h
57187do :
57188  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57189ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57190if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57191  cat >>confdefs.h <<_ACEOF
57192#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57193_ACEOF
57194
57195          CUPS_FOUND=yes
57196          CUPS_CFLAGS=
57197          DEFAULT_CUPS=yes
57198
57199fi
57200
57201done
57202
57203    fi
57204    if test "x$CUPS_FOUND" = xno; then
57205
57206  # Print a helpful message on how to acquire the necessary build dependency.
57207  # cups is the help tag: freetype, cups, alsa etc
57208  MISSING_DEPENDENCY=cups
57209
57210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57211    cygwin_help $MISSING_DEPENDENCY
57212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57213    msys_help $MISSING_DEPENDENCY
57214  else
57215    PKGHANDLER_COMMAND=
57216
57217    case $PKGHANDLER in
57218      apt-get)
57219        apt_help     $MISSING_DEPENDENCY ;;
57220      yum)
57221        yum_help     $MISSING_DEPENDENCY ;;
57222      brew)
57223        brew_help    $MISSING_DEPENDENCY ;;
57224      port)
57225        port_help    $MISSING_DEPENDENCY ;;
57226      pkgutil)
57227        pkgutil_help $MISSING_DEPENDENCY ;;
57228      pkgadd)
57229        pkgadd_help  $MISSING_DEPENDENCY ;;
57230    esac
57231
57232    if test "x$PKGHANDLER_COMMAND" != x; then
57233      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57234    fi
57235  fi
57236
57237      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57238    fi
57239  fi
57240
57241
57242
57243
57244
57245# Check whether --with-freetype was given.
57246if test "${with_freetype+set}" = set; then :
57247  withval=$with_freetype;
57248fi
57249
57250
57251# Check whether --with-freetype-include was given.
57252if test "${with_freetype_include+set}" = set; then :
57253  withval=$with_freetype_include;
57254fi
57255
57256
57257# Check whether --with-freetype-lib was given.
57258if test "${with_freetype_lib+set}" = set; then :
57259  withval=$with_freetype_lib;
57260fi
57261
57262
57263# Check whether --with-freetype-src was given.
57264if test "${with_freetype_src+set}" = set; then :
57265  withval=$with_freetype_src;
57266fi
57267
57268  # Check whether --enable-freetype-bundling was given.
57269if test "${enable_freetype_bundling+set}" = set; then :
57270  enableval=$enable_freetype_bundling;
57271fi
57272
57273
57274  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57275  FREETYPE_BASE_NAME=freetype
57276  FREETYPE_CFLAGS=
57277  FREETYPE_LIBS=
57278  FREETYPE_BUNDLE_LIB_PATH=
57279
57280  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57281    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57282        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57283        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57284        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57285      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57286$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57287    fi
57288    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57289      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57290$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57291    fi
57292  else
57293    # freetype is needed to build; go get it!
57294
57295    BUNDLE_FREETYPE="$enable_freetype_bundling"
57296
57297    if  test "x$with_freetype_src" != x; then
57298      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57299        # Try to build freetype if --with-freetype-src was given on Windows
57300
57301  FREETYPE_SRC_PATH="$with_freetype_src"
57302  BUILD_FREETYPE=yes
57303
57304  # Check if the freetype sources are acessible..
57305  if ! test -d $FREETYPE_SRC_PATH; then
57306    { $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
57307$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57308    BUILD_FREETYPE=no
57309  fi
57310  # ..and contain a vc2010 project file
57311  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57312  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57313    { $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
57314$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57315    BUILD_FREETYPE=no
57316  fi
57317  # Now check if configure found a version of 'msbuild.exe'
57318  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57319    { $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
57320$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;}
57321    BUILD_FREETYPE=no
57322  fi
57323
57324  # Ready to go..
57325  if test "x$BUILD_FREETYPE" = xyes; then
57326    # msbuild requires trailing slashes for output directories
57327    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57328    freetype_lib_path_unix="$freetype_lib_path"
57329    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57330
57331  unix_path="$vcxproj_path"
57332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57333    windows_path=`$CYGPATH -m "$unix_path"`
57334    vcxproj_path="$windows_path"
57335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57336    windows_path=`cmd //c echo $unix_path`
57337    vcxproj_path="$windows_path"
57338  fi
57339
57340
57341  unix_path="$freetype_lib_path"
57342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57343    windows_path=`$CYGPATH -m "$unix_path"`
57344    freetype_lib_path="$windows_path"
57345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57346    windows_path=`cmd //c echo $unix_path`
57347    freetype_lib_path="$windows_path"
57348  fi
57349
57350
57351  unix_path="$freetype_obj_path"
57352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57353    windows_path=`$CYGPATH -m "$unix_path"`
57354    freetype_obj_path="$windows_path"
57355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57356    windows_path=`cmd //c echo $unix_path`
57357    freetype_obj_path="$windows_path"
57358  fi
57359
57360    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57361      freetype_platform=x64
57362    else
57363      freetype_platform=win32
57364    fi
57365
57366    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57367    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57368    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57369    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57370    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57371$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57372
57373    # First we try to build the freetype.dll
57374    $ECHO -e "@echo off\n"\
57375        "$MSBUILD $vcxproj_path "\
57376        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57377        "/p:Configuration=\"Release Multithreaded\" "\
57378        "/p:Platform=$freetype_platform "\
57379        "/p:ConfigurationType=DynamicLibrary "\
57380        "/p:TargetName=freetype "\
57381        "/p:OutDir=\"$freetype_lib_path\" "\
57382        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57383    cmd /c freetype.bat
57384
57385    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57386      # If that succeeds we also build freetype.lib
57387      $ECHO -e "@echo off\n"\
57388          "$MSBUILD $vcxproj_path "\
57389          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57390          "/p:Configuration=\"Release Multithreaded\" "\
57391          "/p:Platform=$freetype_platform "\
57392          "/p:ConfigurationType=StaticLibrary "\
57393          "/p:TargetName=freetype "\
57394          "/p:OutDir=\"$freetype_lib_path\" "\
57395          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57396      cmd /c freetype.bat
57397
57398      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57399        # Once we build both, lib and dll, set freetype lib and include path appropriately
57400        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57401        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57402        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57403$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57404      else
57405        BUILD_FREETYPE=no
57406      fi
57407    else
57408      BUILD_FREETYPE=no
57409    fi
57410  fi
57411
57412        if test "x$BUILD_FREETYPE" = xyes; then
57413          # Okay, we built it. Check that it works.
57414
57415  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57416  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57417  METHOD="--with-freetype-src"
57418
57419  # Let's start with an optimistic view of the world :-)
57420  FOUND_FREETYPE=yes
57421
57422  # First look for the canonical freetype main include file ft2build.h.
57423  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57424    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57425    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57426    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57427      # Fail.
57428      FOUND_FREETYPE=no
57429    fi
57430  fi
57431
57432  if test "x$FOUND_FREETYPE" = xyes; then
57433    # Include file found, let's continue the sanity check.
57434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57435$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57436
57437    # Reset to default value
57438    FREETYPE_BASE_NAME=freetype
57439    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57440    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57441      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57442          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57443        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57444        # for the .6 version explicitly.
57445        FREETYPE_BASE_NAME=freetype.6
57446        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57447        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57448$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57449      else
57450        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57451$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57452        FOUND_FREETYPE=no
57453      fi
57454    else
57455      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57456        # On Windows, we will need both .lib and .dll file.
57457        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57458          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57459$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57460          FOUND_FREETYPE=no
57461        fi
57462      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57463          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57464        # Found lib in isa dir, use that instead.
57465        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57466        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57467$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57468      fi
57469    fi
57470  fi
57471
57472  if test "x$FOUND_FREETYPE" = xyes; then
57473
57474  # Only process if variable expands to non-empty
57475
57476  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57478
57479  # Input might be given as Windows format, start by converting to
57480  # unix format.
57481  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57482  new_path=`$CYGPATH -u "$path"`
57483
57484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57487  # "foo.exe" is OK but "foo" is an error.
57488  #
57489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57490  # It is also a way to make sure we got the proper file name for the real test later on.
57491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57492  if test "x$test_shortpath" = x; then
57493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57496  fi
57497
57498  # Call helper function which possibly converts this using DOS-style short mode.
57499  # If so, the updated path is stored in $new_path.
57500
57501  input_path="$new_path"
57502  # Check if we need to convert this using DOS-style short mode. If the path
57503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57504  # take no chances and rewrite it.
57505  # Note: m4 eats our [], so we need to use [ and ] instead.
57506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57507  if test "x$has_forbidden_chars" != x; then
57508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57512      # Going to short mode and back again did indeed matter. Since short mode is
57513      # case insensitive, let's make it lowercase to improve readability.
57514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57515      # Now convert it back to Unix-style (cygpath)
57516      input_path=`$CYGPATH -u "$shortmode_path"`
57517      new_path="$input_path"
57518    fi
57519  fi
57520
57521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57522  if test "x$test_cygdrive_prefix" = x; then
57523    # As a simple fix, exclude /usr/bin since it's not a real path.
57524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57526      # a path prefixed by /cygdrive for fixpath to work.
57527      new_path="$CYGWIN_ROOT_PATH$input_path"
57528    fi
57529  fi
57530
57531
57532  if test "x$path" != "x$new_path"; then
57533    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57536  fi
57537
57538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57539
57540  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57541  has_colon=`$ECHO $path | $GREP ^.:`
57542  new_path="$path"
57543  if test "x$has_colon" = x; then
57544    # Not in mixed or Windows style, start by that.
57545    new_path=`cmd //c echo $path`
57546  fi
57547
57548
57549  input_path="$new_path"
57550  # Check if we need to convert this using DOS-style short mode. If the path
57551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57552  # take no chances and rewrite it.
57553  # Note: m4 eats our [], so we need to use [ and ] instead.
57554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57555  if test "x$has_forbidden_chars" != x; then
57556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57558  fi
57559
57560
57561  windows_path="$new_path"
57562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57563    unix_path=`$CYGPATH -u "$windows_path"`
57564    new_path="$unix_path"
57565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57567    new_path="$unix_path"
57568  fi
57569
57570  if test "x$path" != "x$new_path"; then
57571    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57574  fi
57575
57576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57578
57579    else
57580      # We're on a unix platform. Hooray! :)
57581      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57582      has_space=`$ECHO "$path" | $GREP " "`
57583      if test "x$has_space" != x; then
57584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57587      fi
57588
57589      # Use eval to expand a potential ~
57590      eval path="$path"
57591      if test ! -f "$path" && test ! -d "$path"; then
57592        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57593      fi
57594
57595      if test -d "$path"; then
57596        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57597      else
57598        dir="`$DIRNAME "$path"`"
57599        base="`$BASENAME "$path"`"
57600        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57601      fi
57602    fi
57603  fi
57604
57605
57606  # Only process if variable expands to non-empty
57607
57608  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57610
57611  # Input might be given as Windows format, start by converting to
57612  # unix format.
57613  path="$POTENTIAL_FREETYPE_LIB_PATH"
57614  new_path=`$CYGPATH -u "$path"`
57615
57616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57619  # "foo.exe" is OK but "foo" is an error.
57620  #
57621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57622  # It is also a way to make sure we got the proper file name for the real test later on.
57623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57624  if test "x$test_shortpath" = x; then
57625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57627    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57628  fi
57629
57630  # Call helper function which possibly converts this using DOS-style short mode.
57631  # If so, the updated path is stored in $new_path.
57632
57633  input_path="$new_path"
57634  # Check if we need to convert this using DOS-style short mode. If the path
57635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57636  # take no chances and rewrite it.
57637  # Note: m4 eats our [], so we need to use [ and ] instead.
57638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57639  if test "x$has_forbidden_chars" != x; then
57640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57644      # Going to short mode and back again did indeed matter. Since short mode is
57645      # case insensitive, let's make it lowercase to improve readability.
57646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57647      # Now convert it back to Unix-style (cygpath)
57648      input_path=`$CYGPATH -u "$shortmode_path"`
57649      new_path="$input_path"
57650    fi
57651  fi
57652
57653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57654  if test "x$test_cygdrive_prefix" = x; then
57655    # As a simple fix, exclude /usr/bin since it's not a real path.
57656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57658      # a path prefixed by /cygdrive for fixpath to work.
57659      new_path="$CYGWIN_ROOT_PATH$input_path"
57660    fi
57661  fi
57662
57663
57664  if test "x$path" != "x$new_path"; then
57665    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57667$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57668  fi
57669
57670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57671
57672  path="$POTENTIAL_FREETYPE_LIB_PATH"
57673  has_colon=`$ECHO $path | $GREP ^.:`
57674  new_path="$path"
57675  if test "x$has_colon" = x; then
57676    # Not in mixed or Windows style, start by that.
57677    new_path=`cmd //c echo $path`
57678  fi
57679
57680
57681  input_path="$new_path"
57682  # Check if we need to convert this using DOS-style short mode. If the path
57683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57684  # take no chances and rewrite it.
57685  # Note: m4 eats our [], so we need to use [ and ] instead.
57686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57687  if test "x$has_forbidden_chars" != x; then
57688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57690  fi
57691
57692
57693  windows_path="$new_path"
57694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57695    unix_path=`$CYGPATH -u "$windows_path"`
57696    new_path="$unix_path"
57697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57699    new_path="$unix_path"
57700  fi
57701
57702  if test "x$path" != "x$new_path"; then
57703    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57705$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57706  fi
57707
57708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57710
57711    else
57712      # We're on a unix platform. Hooray! :)
57713      path="$POTENTIAL_FREETYPE_LIB_PATH"
57714      has_space=`$ECHO "$path" | $GREP " "`
57715      if test "x$has_space" != x; then
57716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57719      fi
57720
57721      # Use eval to expand a potential ~
57722      eval path="$path"
57723      if test ! -f "$path" && test ! -d "$path"; then
57724        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57725      fi
57726
57727      if test -d "$path"; then
57728        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57729      else
57730        dir="`$DIRNAME "$path"`"
57731        base="`$BASENAME "$path"`"
57732        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57733      fi
57734    fi
57735  fi
57736
57737
57738    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57740$as_echo_n "checking for freetype includes... " >&6; }
57741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57742$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57743    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57745$as_echo_n "checking for freetype libraries... " >&6; }
57746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57747$as_echo "$FREETYPE_LIB_PATH" >&6; }
57748  fi
57749
57750          if test "x$FOUND_FREETYPE" != xyes; then
57751            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57752          fi
57753        else
57754          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57755$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57756          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57757        fi
57758      else
57759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57760$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57761      fi
57762    fi
57763
57764    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57765      # User has specified settings
57766
57767      if test "x$BUNDLE_FREETYPE" = x; then
57768        # If not specified, default is to bundle freetype
57769        BUNDLE_FREETYPE=yes
57770      fi
57771
57772      if test "x$with_freetype" != x; then
57773        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57774        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57775      fi
57776
57777      # Allow --with-freetype-lib and --with-freetype-include to override
57778      if test "x$with_freetype_include" != x; then
57779        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57780      fi
57781      if test "x$with_freetype_lib" != x; then
57782        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57783      fi
57784
57785      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57786        # Okay, we got it. Check that it works.
57787
57788  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57789  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57790  METHOD="--with-freetype"
57791
57792  # Let's start with an optimistic view of the world :-)
57793  FOUND_FREETYPE=yes
57794
57795  # First look for the canonical freetype main include file ft2build.h.
57796  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57797    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57798    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57799    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57800      # Fail.
57801      FOUND_FREETYPE=no
57802    fi
57803  fi
57804
57805  if test "x$FOUND_FREETYPE" = xyes; then
57806    # Include file found, let's continue the sanity check.
57807    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57808$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57809
57810    # Reset to default value
57811    FREETYPE_BASE_NAME=freetype
57812    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57813    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57814      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57815          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57816        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57817        # for the .6 version explicitly.
57818        FREETYPE_BASE_NAME=freetype.6
57819        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57820        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57821$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57822      else
57823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57824$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57825        FOUND_FREETYPE=no
57826      fi
57827    else
57828      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57829        # On Windows, we will need both .lib and .dll file.
57830        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57831          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57832$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57833          FOUND_FREETYPE=no
57834        fi
57835      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57836          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57837        # Found lib in isa dir, use that instead.
57838        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57839        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57840$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57841      fi
57842    fi
57843  fi
57844
57845  if test "x$FOUND_FREETYPE" = xyes; then
57846
57847  # Only process if variable expands to non-empty
57848
57849  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57851
57852  # Input might be given as Windows format, start by converting to
57853  # unix format.
57854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57855  new_path=`$CYGPATH -u "$path"`
57856
57857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57860  # "foo.exe" is OK but "foo" is an error.
57861  #
57862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57863  # It is also a way to make sure we got the proper file name for the real test later on.
57864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57865  if test "x$test_shortpath" = x; then
57866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57869  fi
57870
57871  # Call helper function which possibly converts this using DOS-style short mode.
57872  # If so, the updated path is stored in $new_path.
57873
57874  input_path="$new_path"
57875  # Check if we need to convert this using DOS-style short mode. If the path
57876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57877  # take no chances and rewrite it.
57878  # Note: m4 eats our [], so we need to use [ and ] instead.
57879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57880  if test "x$has_forbidden_chars" != x; then
57881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57885      # Going to short mode and back again did indeed matter. Since short mode is
57886      # case insensitive, let's make it lowercase to improve readability.
57887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57888      # Now convert it back to Unix-style (cygpath)
57889      input_path=`$CYGPATH -u "$shortmode_path"`
57890      new_path="$input_path"
57891    fi
57892  fi
57893
57894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57895  if test "x$test_cygdrive_prefix" = x; then
57896    # As a simple fix, exclude /usr/bin since it's not a real path.
57897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57899      # a path prefixed by /cygdrive for fixpath to work.
57900      new_path="$CYGWIN_ROOT_PATH$input_path"
57901    fi
57902  fi
57903
57904
57905  if test "x$path" != "x$new_path"; then
57906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57909  fi
57910
57911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57912
57913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57914  has_colon=`$ECHO $path | $GREP ^.:`
57915  new_path="$path"
57916  if test "x$has_colon" = x; then
57917    # Not in mixed or Windows style, start by that.
57918    new_path=`cmd //c echo $path`
57919  fi
57920
57921
57922  input_path="$new_path"
57923  # Check if we need to convert this using DOS-style short mode. If the path
57924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57925  # take no chances and rewrite it.
57926  # Note: m4 eats our [], so we need to use [ and ] instead.
57927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57928  if test "x$has_forbidden_chars" != x; then
57929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57931  fi
57932
57933
57934  windows_path="$new_path"
57935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57936    unix_path=`$CYGPATH -u "$windows_path"`
57937    new_path="$unix_path"
57938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57940    new_path="$unix_path"
57941  fi
57942
57943  if test "x$path" != "x$new_path"; then
57944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57947  fi
57948
57949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57951
57952    else
57953      # We're on a unix platform. Hooray! :)
57954      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57955      has_space=`$ECHO "$path" | $GREP " "`
57956      if test "x$has_space" != x; then
57957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57960      fi
57961
57962      # Use eval to expand a potential ~
57963      eval path="$path"
57964      if test ! -f "$path" && test ! -d "$path"; then
57965        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57966      fi
57967
57968      if test -d "$path"; then
57969        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57970      else
57971        dir="`$DIRNAME "$path"`"
57972        base="`$BASENAME "$path"`"
57973        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57974      fi
57975    fi
57976  fi
57977
57978
57979  # Only process if variable expands to non-empty
57980
57981  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57983
57984  # Input might be given as Windows format, start by converting to
57985  # unix format.
57986  path="$POTENTIAL_FREETYPE_LIB_PATH"
57987  new_path=`$CYGPATH -u "$path"`
57988
57989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57992  # "foo.exe" is OK but "foo" is an error.
57993  #
57994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57995  # It is also a way to make sure we got the proper file name for the real test later on.
57996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57997  if test "x$test_shortpath" = x; then
57998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58000    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58001  fi
58002
58003  # Call helper function which possibly converts this using DOS-style short mode.
58004  # If so, the updated path is stored in $new_path.
58005
58006  input_path="$new_path"
58007  # Check if we need to convert this using DOS-style short mode. If the path
58008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58009  # take no chances and rewrite it.
58010  # Note: m4 eats our [], so we need to use [ and ] instead.
58011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58012  if test "x$has_forbidden_chars" != x; then
58013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58017      # Going to short mode and back again did indeed matter. Since short mode is
58018      # case insensitive, let's make it lowercase to improve readability.
58019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58020      # Now convert it back to Unix-style (cygpath)
58021      input_path=`$CYGPATH -u "$shortmode_path"`
58022      new_path="$input_path"
58023    fi
58024  fi
58025
58026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58027  if test "x$test_cygdrive_prefix" = x; then
58028    # As a simple fix, exclude /usr/bin since it's not a real path.
58029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58031      # a path prefixed by /cygdrive for fixpath to work.
58032      new_path="$CYGWIN_ROOT_PATH$input_path"
58033    fi
58034  fi
58035
58036
58037  if test "x$path" != "x$new_path"; then
58038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58041  fi
58042
58043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58044
58045  path="$POTENTIAL_FREETYPE_LIB_PATH"
58046  has_colon=`$ECHO $path | $GREP ^.:`
58047  new_path="$path"
58048  if test "x$has_colon" = x; then
58049    # Not in mixed or Windows style, start by that.
58050    new_path=`cmd //c echo $path`
58051  fi
58052
58053
58054  input_path="$new_path"
58055  # Check if we need to convert this using DOS-style short mode. If the path
58056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58057  # take no chances and rewrite it.
58058  # Note: m4 eats our [], so we need to use [ and ] instead.
58059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58060  if test "x$has_forbidden_chars" != x; then
58061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58063  fi
58064
58065
58066  windows_path="$new_path"
58067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58068    unix_path=`$CYGPATH -u "$windows_path"`
58069    new_path="$unix_path"
58070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58072    new_path="$unix_path"
58073  fi
58074
58075  if test "x$path" != "x$new_path"; then
58076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58079  fi
58080
58081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58083
58084    else
58085      # We're on a unix platform. Hooray! :)
58086      path="$POTENTIAL_FREETYPE_LIB_PATH"
58087      has_space=`$ECHO "$path" | $GREP " "`
58088      if test "x$has_space" != x; then
58089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58092      fi
58093
58094      # Use eval to expand a potential ~
58095      eval path="$path"
58096      if test ! -f "$path" && test ! -d "$path"; then
58097        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58098      fi
58099
58100      if test -d "$path"; then
58101        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58102      else
58103        dir="`$DIRNAME "$path"`"
58104        base="`$BASENAME "$path"`"
58105        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58106      fi
58107    fi
58108  fi
58109
58110
58111    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58113$as_echo_n "checking for freetype includes... " >&6; }
58114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58115$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58116    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58118$as_echo_n "checking for freetype libraries... " >&6; }
58119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58120$as_echo "$FREETYPE_LIB_PATH" >&6; }
58121  fi
58122
58123        if test "x$FOUND_FREETYPE" != xyes; then
58124          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58125        fi
58126      else
58127        # User specified only one of lib or include. This is an error.
58128        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58129          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58130$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58131          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58132        else
58133          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58134$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58135          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58136        fi
58137      fi
58138    else
58139      # User did not specify settings, but we need freetype. Try to locate it.
58140
58141      if test "x$BUNDLE_FREETYPE" = x; then
58142        # If not specified, default is to bundle freetype only on windows
58143        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58144          BUNDLE_FREETYPE=yes
58145        else
58146          BUNDLE_FREETYPE=no
58147        fi
58148      fi
58149
58150      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58151      if test "x$SYSROOT" = x; then
58152        if test "x$FOUND_FREETYPE" != xyes; then
58153          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58154          if test "x$PKG_CONFIG" != x; then
58155
58156pkg_failed=no
58157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58158$as_echo_n "checking for FREETYPE... " >&6; }
58159
58160if test -n "$FREETYPE_CFLAGS"; then
58161    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58162 elif test -n "$PKG_CONFIG"; then
58163    if test -n "$PKG_CONFIG" && \
58164    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58165  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58166  ac_status=$?
58167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58168  test $ac_status = 0; }; then
58169  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58170else
58171  pkg_failed=yes
58172fi
58173 else
58174    pkg_failed=untried
58175fi
58176if test -n "$FREETYPE_LIBS"; then
58177    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58178 elif test -n "$PKG_CONFIG"; then
58179    if test -n "$PKG_CONFIG" && \
58180    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58181  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58182  ac_status=$?
58183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58184  test $ac_status = 0; }; then
58185  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58186else
58187  pkg_failed=yes
58188fi
58189 else
58190    pkg_failed=untried
58191fi
58192
58193
58194
58195if test $pkg_failed = yes; then
58196
58197if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58198        _pkg_short_errors_supported=yes
58199else
58200        _pkg_short_errors_supported=no
58201fi
58202        if test $_pkg_short_errors_supported = yes; then
58203	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58204        else
58205	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58206        fi
58207	# Put the nasty error message in config.log where it belongs
58208	echo "$FREETYPE_PKG_ERRORS" >&5
58209
58210	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58211$as_echo "no" >&6; }
58212                FOUND_FREETYPE=no
58213elif test $pkg_failed = untried; then
58214	FOUND_FREETYPE=no
58215else
58216	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58217	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58219$as_echo "yes" >&6; }
58220	FOUND_FREETYPE=yes
58221fi
58222            if test "x$FOUND_FREETYPE" = xyes; then
58223              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58224              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58225              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58226              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58227                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58228              fi
58229              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58230              if test "x$BUNDLE_FREETYPE" = xyes; then
58231                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58232$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58233                FOUND_FREETYPE=no
58234              else
58235                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58236$as_echo_n "checking for freetype... " >&6; }
58237                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58238$as_echo "yes (using pkg-config)" >&6; }
58239              fi
58240            fi
58241          fi
58242        fi
58243      fi
58244
58245      if test "x$FOUND_FREETYPE" != xyes; then
58246        # Check in well-known locations
58247        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58248          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58249
58250  windows_path="$FREETYPE_BASE_DIR"
58251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58252    unix_path=`$CYGPATH -u "$windows_path"`
58253    FREETYPE_BASE_DIR="$unix_path"
58254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58256    FREETYPE_BASE_DIR="$unix_path"
58257  fi
58258
58259
58260  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58261  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58262  METHOD="well-known location"
58263
58264  # Let's start with an optimistic view of the world :-)
58265  FOUND_FREETYPE=yes
58266
58267  # First look for the canonical freetype main include file ft2build.h.
58268  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58269    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58270    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58271    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58272      # Fail.
58273      FOUND_FREETYPE=no
58274    fi
58275  fi
58276
58277  if test "x$FOUND_FREETYPE" = xyes; then
58278    # Include file found, let's continue the sanity check.
58279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58280$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58281
58282    # Reset to default value
58283    FREETYPE_BASE_NAME=freetype
58284    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58285    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58286      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58287          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58288        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58289        # for the .6 version explicitly.
58290        FREETYPE_BASE_NAME=freetype.6
58291        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58292        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58293$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58294      else
58295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58296$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58297        FOUND_FREETYPE=no
58298      fi
58299    else
58300      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58301        # On Windows, we will need both .lib and .dll file.
58302        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58303          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58305          FOUND_FREETYPE=no
58306        fi
58307      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58308          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58309        # Found lib in isa dir, use that instead.
58310        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58311        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58312$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58313      fi
58314    fi
58315  fi
58316
58317  if test "x$FOUND_FREETYPE" = xyes; then
58318
58319  # Only process if variable expands to non-empty
58320
58321  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58323
58324  # Input might be given as Windows format, start by converting to
58325  # unix format.
58326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58327  new_path=`$CYGPATH -u "$path"`
58328
58329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58332  # "foo.exe" is OK but "foo" is an error.
58333  #
58334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58335  # It is also a way to make sure we got the proper file name for the real test later on.
58336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58337  if test "x$test_shortpath" = x; then
58338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58339$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58340    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58341  fi
58342
58343  # Call helper function which possibly converts this using DOS-style short mode.
58344  # If so, the updated path is stored in $new_path.
58345
58346  input_path="$new_path"
58347  # Check if we need to convert this using DOS-style short mode. If the path
58348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58349  # take no chances and rewrite it.
58350  # Note: m4 eats our [], so we need to use [ and ] instead.
58351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58352  if test "x$has_forbidden_chars" != x; then
58353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58357      # Going to short mode and back again did indeed matter. Since short mode is
58358      # case insensitive, let's make it lowercase to improve readability.
58359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58360      # Now convert it back to Unix-style (cygpath)
58361      input_path=`$CYGPATH -u "$shortmode_path"`
58362      new_path="$input_path"
58363    fi
58364  fi
58365
58366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58367  if test "x$test_cygdrive_prefix" = x; then
58368    # As a simple fix, exclude /usr/bin since it's not a real path.
58369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58371      # a path prefixed by /cygdrive for fixpath to work.
58372      new_path="$CYGWIN_ROOT_PATH$input_path"
58373    fi
58374  fi
58375
58376
58377  if test "x$path" != "x$new_path"; then
58378    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58380$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58381  fi
58382
58383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58384
58385  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58386  has_colon=`$ECHO $path | $GREP ^.:`
58387  new_path="$path"
58388  if test "x$has_colon" = x; then
58389    # Not in mixed or Windows style, start by that.
58390    new_path=`cmd //c echo $path`
58391  fi
58392
58393
58394  input_path="$new_path"
58395  # Check if we need to convert this using DOS-style short mode. If the path
58396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58397  # take no chances and rewrite it.
58398  # Note: m4 eats our [], so we need to use [ and ] instead.
58399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58400  if test "x$has_forbidden_chars" != x; then
58401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58403  fi
58404
58405
58406  windows_path="$new_path"
58407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58408    unix_path=`$CYGPATH -u "$windows_path"`
58409    new_path="$unix_path"
58410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58412    new_path="$unix_path"
58413  fi
58414
58415  if test "x$path" != "x$new_path"; then
58416    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58419  fi
58420
58421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58423
58424    else
58425      # We're on a unix platform. Hooray! :)
58426      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58427      has_space=`$ECHO "$path" | $GREP " "`
58428      if test "x$has_space" != x; then
58429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58432      fi
58433
58434      # Use eval to expand a potential ~
58435      eval path="$path"
58436      if test ! -f "$path" && test ! -d "$path"; then
58437        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58438      fi
58439
58440      if test -d "$path"; then
58441        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58442      else
58443        dir="`$DIRNAME "$path"`"
58444        base="`$BASENAME "$path"`"
58445        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58446      fi
58447    fi
58448  fi
58449
58450
58451  # Only process if variable expands to non-empty
58452
58453  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58455
58456  # Input might be given as Windows format, start by converting to
58457  # unix format.
58458  path="$POTENTIAL_FREETYPE_LIB_PATH"
58459  new_path=`$CYGPATH -u "$path"`
58460
58461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58464  # "foo.exe" is OK but "foo" is an error.
58465  #
58466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58467  # It is also a way to make sure we got the proper file name for the real test later on.
58468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58469  if test "x$test_shortpath" = x; then
58470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58473  fi
58474
58475  # Call helper function which possibly converts this using DOS-style short mode.
58476  # If so, the updated path is stored in $new_path.
58477
58478  input_path="$new_path"
58479  # Check if we need to convert this using DOS-style short mode. If the path
58480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58481  # take no chances and rewrite it.
58482  # Note: m4 eats our [], so we need to use [ and ] instead.
58483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58484  if test "x$has_forbidden_chars" != x; then
58485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58489      # Going to short mode and back again did indeed matter. Since short mode is
58490      # case insensitive, let's make it lowercase to improve readability.
58491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58492      # Now convert it back to Unix-style (cygpath)
58493      input_path=`$CYGPATH -u "$shortmode_path"`
58494      new_path="$input_path"
58495    fi
58496  fi
58497
58498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58499  if test "x$test_cygdrive_prefix" = x; then
58500    # As a simple fix, exclude /usr/bin since it's not a real path.
58501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58503      # a path prefixed by /cygdrive for fixpath to work.
58504      new_path="$CYGWIN_ROOT_PATH$input_path"
58505    fi
58506  fi
58507
58508
58509  if test "x$path" != "x$new_path"; then
58510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58513  fi
58514
58515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58516
58517  path="$POTENTIAL_FREETYPE_LIB_PATH"
58518  has_colon=`$ECHO $path | $GREP ^.:`
58519  new_path="$path"
58520  if test "x$has_colon" = x; then
58521    # Not in mixed or Windows style, start by that.
58522    new_path=`cmd //c echo $path`
58523  fi
58524
58525
58526  input_path="$new_path"
58527  # Check if we need to convert this using DOS-style short mode. If the path
58528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58529  # take no chances and rewrite it.
58530  # Note: m4 eats our [], so we need to use [ and ] instead.
58531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58532  if test "x$has_forbidden_chars" != x; then
58533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58535  fi
58536
58537
58538  windows_path="$new_path"
58539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58540    unix_path=`$CYGPATH -u "$windows_path"`
58541    new_path="$unix_path"
58542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58544    new_path="$unix_path"
58545  fi
58546
58547  if test "x$path" != "x$new_path"; then
58548    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58551  fi
58552
58553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58555
58556    else
58557      # We're on a unix platform. Hooray! :)
58558      path="$POTENTIAL_FREETYPE_LIB_PATH"
58559      has_space=`$ECHO "$path" | $GREP " "`
58560      if test "x$has_space" != x; then
58561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58564      fi
58565
58566      # Use eval to expand a potential ~
58567      eval path="$path"
58568      if test ! -f "$path" && test ! -d "$path"; then
58569        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58570      fi
58571
58572      if test -d "$path"; then
58573        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58574      else
58575        dir="`$DIRNAME "$path"`"
58576        base="`$BASENAME "$path"`"
58577        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58578      fi
58579    fi
58580  fi
58581
58582
58583    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58585$as_echo_n "checking for freetype includes... " >&6; }
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58587$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58588    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58590$as_echo_n "checking for freetype libraries... " >&6; }
58591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58592$as_echo "$FREETYPE_LIB_PATH" >&6; }
58593  fi
58594
58595          if test "x$FOUND_FREETYPE" != xyes; then
58596            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58597
58598  windows_path="$FREETYPE_BASE_DIR"
58599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58600    unix_path=`$CYGPATH -u "$windows_path"`
58601    FREETYPE_BASE_DIR="$unix_path"
58602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58604    FREETYPE_BASE_DIR="$unix_path"
58605  fi
58606
58607
58608  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58609  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58610  METHOD="well-known location"
58611
58612  # Let's start with an optimistic view of the world :-)
58613  FOUND_FREETYPE=yes
58614
58615  # First look for the canonical freetype main include file ft2build.h.
58616  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58617    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58618    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58619    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58620      # Fail.
58621      FOUND_FREETYPE=no
58622    fi
58623  fi
58624
58625  if test "x$FOUND_FREETYPE" = xyes; then
58626    # Include file found, let's continue the sanity check.
58627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58628$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58629
58630    # Reset to default value
58631    FREETYPE_BASE_NAME=freetype
58632    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58633    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58634      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58635          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58636        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58637        # for the .6 version explicitly.
58638        FREETYPE_BASE_NAME=freetype.6
58639        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58640        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58641$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58642      else
58643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58644$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58645        FOUND_FREETYPE=no
58646      fi
58647    else
58648      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58649        # On Windows, we will need both .lib and .dll file.
58650        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58651          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58653          FOUND_FREETYPE=no
58654        fi
58655      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58657        # Found lib in isa dir, use that instead.
58658        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58659        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58660$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58661      fi
58662    fi
58663  fi
58664
58665  if test "x$FOUND_FREETYPE" = xyes; then
58666
58667  # Only process if variable expands to non-empty
58668
58669  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58671
58672  # Input might be given as Windows format, start by converting to
58673  # unix format.
58674  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58675  new_path=`$CYGPATH -u "$path"`
58676
58677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58680  # "foo.exe" is OK but "foo" is an error.
58681  #
58682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58683  # It is also a way to make sure we got the proper file name for the real test later on.
58684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58685  if test "x$test_shortpath" = x; then
58686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58688    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58689  fi
58690
58691  # Call helper function which possibly converts this using DOS-style short mode.
58692  # If so, the updated path is stored in $new_path.
58693
58694  input_path="$new_path"
58695  # Check if we need to convert this using DOS-style short mode. If the path
58696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58697  # take no chances and rewrite it.
58698  # Note: m4 eats our [], so we need to use [ and ] instead.
58699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58700  if test "x$has_forbidden_chars" != x; then
58701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58705      # Going to short mode and back again did indeed matter. Since short mode is
58706      # case insensitive, let's make it lowercase to improve readability.
58707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58708      # Now convert it back to Unix-style (cygpath)
58709      input_path=`$CYGPATH -u "$shortmode_path"`
58710      new_path="$input_path"
58711    fi
58712  fi
58713
58714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58715  if test "x$test_cygdrive_prefix" = x; then
58716    # As a simple fix, exclude /usr/bin since it's not a real path.
58717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58719      # a path prefixed by /cygdrive for fixpath to work.
58720      new_path="$CYGWIN_ROOT_PATH$input_path"
58721    fi
58722  fi
58723
58724
58725  if test "x$path" != "x$new_path"; then
58726    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58729  fi
58730
58731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58732
58733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58734  has_colon=`$ECHO $path | $GREP ^.:`
58735  new_path="$path"
58736  if test "x$has_colon" = x; then
58737    # Not in mixed or Windows style, start by that.
58738    new_path=`cmd //c echo $path`
58739  fi
58740
58741
58742  input_path="$new_path"
58743  # Check if we need to convert this using DOS-style short mode. If the path
58744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58745  # take no chances and rewrite it.
58746  # Note: m4 eats our [], so we need to use [ and ] instead.
58747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58748  if test "x$has_forbidden_chars" != x; then
58749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58751  fi
58752
58753
58754  windows_path="$new_path"
58755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58756    unix_path=`$CYGPATH -u "$windows_path"`
58757    new_path="$unix_path"
58758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58760    new_path="$unix_path"
58761  fi
58762
58763  if test "x$path" != "x$new_path"; then
58764    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58767  fi
58768
58769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58771
58772    else
58773      # We're on a unix platform. Hooray! :)
58774      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58775      has_space=`$ECHO "$path" | $GREP " "`
58776      if test "x$has_space" != x; then
58777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58780      fi
58781
58782      # Use eval to expand a potential ~
58783      eval path="$path"
58784      if test ! -f "$path" && test ! -d "$path"; then
58785        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58786      fi
58787
58788      if test -d "$path"; then
58789        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58790      else
58791        dir="`$DIRNAME "$path"`"
58792        base="`$BASENAME "$path"`"
58793        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58794      fi
58795    fi
58796  fi
58797
58798
58799  # Only process if variable expands to non-empty
58800
58801  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58803
58804  # Input might be given as Windows format, start by converting to
58805  # unix format.
58806  path="$POTENTIAL_FREETYPE_LIB_PATH"
58807  new_path=`$CYGPATH -u "$path"`
58808
58809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58812  # "foo.exe" is OK but "foo" is an error.
58813  #
58814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58815  # It is also a way to make sure we got the proper file name for the real test later on.
58816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58817  if test "x$test_shortpath" = x; then
58818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58820    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58821  fi
58822
58823  # Call helper function which possibly converts this using DOS-style short mode.
58824  # If so, the updated path is stored in $new_path.
58825
58826  input_path="$new_path"
58827  # Check if we need to convert this using DOS-style short mode. If the path
58828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58829  # take no chances and rewrite it.
58830  # Note: m4 eats our [], so we need to use [ and ] instead.
58831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58832  if test "x$has_forbidden_chars" != x; then
58833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58837      # Going to short mode and back again did indeed matter. Since short mode is
58838      # case insensitive, let's make it lowercase to improve readability.
58839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58840      # Now convert it back to Unix-style (cygpath)
58841      input_path=`$CYGPATH -u "$shortmode_path"`
58842      new_path="$input_path"
58843    fi
58844  fi
58845
58846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58847  if test "x$test_cygdrive_prefix" = x; then
58848    # As a simple fix, exclude /usr/bin since it's not a real path.
58849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58851      # a path prefixed by /cygdrive for fixpath to work.
58852      new_path="$CYGWIN_ROOT_PATH$input_path"
58853    fi
58854  fi
58855
58856
58857  if test "x$path" != "x$new_path"; then
58858    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58861  fi
58862
58863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58864
58865  path="$POTENTIAL_FREETYPE_LIB_PATH"
58866  has_colon=`$ECHO $path | $GREP ^.:`
58867  new_path="$path"
58868  if test "x$has_colon" = x; then
58869    # Not in mixed or Windows style, start by that.
58870    new_path=`cmd //c echo $path`
58871  fi
58872
58873
58874  input_path="$new_path"
58875  # Check if we need to convert this using DOS-style short mode. If the path
58876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58877  # take no chances and rewrite it.
58878  # Note: m4 eats our [], so we need to use [ and ] instead.
58879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58880  if test "x$has_forbidden_chars" != x; then
58881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58883  fi
58884
58885
58886  windows_path="$new_path"
58887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58888    unix_path=`$CYGPATH -u "$windows_path"`
58889    new_path="$unix_path"
58890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58892    new_path="$unix_path"
58893  fi
58894
58895  if test "x$path" != "x$new_path"; then
58896    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58898$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58899  fi
58900
58901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58903
58904    else
58905      # We're on a unix platform. Hooray! :)
58906      path="$POTENTIAL_FREETYPE_LIB_PATH"
58907      has_space=`$ECHO "$path" | $GREP " "`
58908      if test "x$has_space" != x; then
58909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58910$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58912      fi
58913
58914      # Use eval to expand a potential ~
58915      eval path="$path"
58916      if test ! -f "$path" && test ! -d "$path"; then
58917        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58918      fi
58919
58920      if test -d "$path"; then
58921        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58922      else
58923        dir="`$DIRNAME "$path"`"
58924        base="`$BASENAME "$path"`"
58925        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58926      fi
58927    fi
58928  fi
58929
58930
58931    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58933$as_echo_n "checking for freetype includes... " >&6; }
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58935$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58936    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58938$as_echo_n "checking for freetype libraries... " >&6; }
58939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58940$as_echo "$FREETYPE_LIB_PATH" >&6; }
58941  fi
58942
58943          fi
58944          if test "x$FOUND_FREETYPE" != xyes; then
58945            FREETYPE_BASE_DIR="$HOME/freetype"
58946
58947  windows_path="$FREETYPE_BASE_DIR"
58948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58949    unix_path=`$CYGPATH -u "$windows_path"`
58950    FREETYPE_BASE_DIR="$unix_path"
58951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58953    FREETYPE_BASE_DIR="$unix_path"
58954  fi
58955
58956            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58957
58958  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58959  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58960  METHOD="well-known location"
58961
58962  # Let's start with an optimistic view of the world :-)
58963  FOUND_FREETYPE=yes
58964
58965  # First look for the canonical freetype main include file ft2build.h.
58966  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58967    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58968    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58969    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58970      # Fail.
58971      FOUND_FREETYPE=no
58972    fi
58973  fi
58974
58975  if test "x$FOUND_FREETYPE" = xyes; then
58976    # Include file found, let's continue the sanity check.
58977    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58978$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58979
58980    # Reset to default value
58981    FREETYPE_BASE_NAME=freetype
58982    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58983    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58984      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58985          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58986        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58987        # for the .6 version explicitly.
58988        FREETYPE_BASE_NAME=freetype.6
58989        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58990        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58991$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58992      else
58993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58994$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58995        FOUND_FREETYPE=no
58996      fi
58997    else
58998      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58999        # On Windows, we will need both .lib and .dll file.
59000        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59001          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59002$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59003          FOUND_FREETYPE=no
59004        fi
59005      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59006          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59007        # Found lib in isa dir, use that instead.
59008        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59009        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59010$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59011      fi
59012    fi
59013  fi
59014
59015  if test "x$FOUND_FREETYPE" = xyes; then
59016
59017  # Only process if variable expands to non-empty
59018
59019  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59021
59022  # Input might be given as Windows format, start by converting to
59023  # unix format.
59024  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59025  new_path=`$CYGPATH -u "$path"`
59026
59027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59030  # "foo.exe" is OK but "foo" is an error.
59031  #
59032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59033  # It is also a way to make sure we got the proper file name for the real test later on.
59034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59035  if test "x$test_shortpath" = x; then
59036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59038    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59039  fi
59040
59041  # Call helper function which possibly converts this using DOS-style short mode.
59042  # If so, the updated path is stored in $new_path.
59043
59044  input_path="$new_path"
59045  # Check if we need to convert this using DOS-style short mode. If the path
59046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59047  # take no chances and rewrite it.
59048  # Note: m4 eats our [], so we need to use [ and ] instead.
59049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59050  if test "x$has_forbidden_chars" != x; then
59051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59055      # Going to short mode and back again did indeed matter. Since short mode is
59056      # case insensitive, let's make it lowercase to improve readability.
59057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59058      # Now convert it back to Unix-style (cygpath)
59059      input_path=`$CYGPATH -u "$shortmode_path"`
59060      new_path="$input_path"
59061    fi
59062  fi
59063
59064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59065  if test "x$test_cygdrive_prefix" = x; then
59066    # As a simple fix, exclude /usr/bin since it's not a real path.
59067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59069      # a path prefixed by /cygdrive for fixpath to work.
59070      new_path="$CYGWIN_ROOT_PATH$input_path"
59071    fi
59072  fi
59073
59074
59075  if test "x$path" != "x$new_path"; then
59076    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59079  fi
59080
59081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59082
59083  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59084  has_colon=`$ECHO $path | $GREP ^.:`
59085  new_path="$path"
59086  if test "x$has_colon" = x; then
59087    # Not in mixed or Windows style, start by that.
59088    new_path=`cmd //c echo $path`
59089  fi
59090
59091
59092  input_path="$new_path"
59093  # Check if we need to convert this using DOS-style short mode. If the path
59094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59095  # take no chances and rewrite it.
59096  # Note: m4 eats our [], so we need to use [ and ] instead.
59097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59098  if test "x$has_forbidden_chars" != x; then
59099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59101  fi
59102
59103
59104  windows_path="$new_path"
59105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59106    unix_path=`$CYGPATH -u "$windows_path"`
59107    new_path="$unix_path"
59108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59110    new_path="$unix_path"
59111  fi
59112
59113  if test "x$path" != "x$new_path"; then
59114    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59117  fi
59118
59119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59121
59122    else
59123      # We're on a unix platform. Hooray! :)
59124      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59125      has_space=`$ECHO "$path" | $GREP " "`
59126      if test "x$has_space" != x; then
59127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59130      fi
59131
59132      # Use eval to expand a potential ~
59133      eval path="$path"
59134      if test ! -f "$path" && test ! -d "$path"; then
59135        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59136      fi
59137
59138      if test -d "$path"; then
59139        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59140      else
59141        dir="`$DIRNAME "$path"`"
59142        base="`$BASENAME "$path"`"
59143        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59144      fi
59145    fi
59146  fi
59147
59148
59149  # Only process if variable expands to non-empty
59150
59151  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59153
59154  # Input might be given as Windows format, start by converting to
59155  # unix format.
59156  path="$POTENTIAL_FREETYPE_LIB_PATH"
59157  new_path=`$CYGPATH -u "$path"`
59158
59159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59162  # "foo.exe" is OK but "foo" is an error.
59163  #
59164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59165  # It is also a way to make sure we got the proper file name for the real test later on.
59166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59167  if test "x$test_shortpath" = x; then
59168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59169$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59170    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59171  fi
59172
59173  # Call helper function which possibly converts this using DOS-style short mode.
59174  # If so, the updated path is stored in $new_path.
59175
59176  input_path="$new_path"
59177  # Check if we need to convert this using DOS-style short mode. If the path
59178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59179  # take no chances and rewrite it.
59180  # Note: m4 eats our [], so we need to use [ and ] instead.
59181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59182  if test "x$has_forbidden_chars" != x; then
59183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59187      # Going to short mode and back again did indeed matter. Since short mode is
59188      # case insensitive, let's make it lowercase to improve readability.
59189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59190      # Now convert it back to Unix-style (cygpath)
59191      input_path=`$CYGPATH -u "$shortmode_path"`
59192      new_path="$input_path"
59193    fi
59194  fi
59195
59196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59197  if test "x$test_cygdrive_prefix" = x; then
59198    # As a simple fix, exclude /usr/bin since it's not a real path.
59199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59201      # a path prefixed by /cygdrive for fixpath to work.
59202      new_path="$CYGWIN_ROOT_PATH$input_path"
59203    fi
59204  fi
59205
59206
59207  if test "x$path" != "x$new_path"; then
59208    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59211  fi
59212
59213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59214
59215  path="$POTENTIAL_FREETYPE_LIB_PATH"
59216  has_colon=`$ECHO $path | $GREP ^.:`
59217  new_path="$path"
59218  if test "x$has_colon" = x; then
59219    # Not in mixed or Windows style, start by that.
59220    new_path=`cmd //c echo $path`
59221  fi
59222
59223
59224  input_path="$new_path"
59225  # Check if we need to convert this using DOS-style short mode. If the path
59226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59227  # take no chances and rewrite it.
59228  # Note: m4 eats our [], so we need to use [ and ] instead.
59229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59230  if test "x$has_forbidden_chars" != x; then
59231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59233  fi
59234
59235
59236  windows_path="$new_path"
59237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59238    unix_path=`$CYGPATH -u "$windows_path"`
59239    new_path="$unix_path"
59240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59242    new_path="$unix_path"
59243  fi
59244
59245  if test "x$path" != "x$new_path"; then
59246    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59249  fi
59250
59251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59253
59254    else
59255      # We're on a unix platform. Hooray! :)
59256      path="$POTENTIAL_FREETYPE_LIB_PATH"
59257      has_space=`$ECHO "$path" | $GREP " "`
59258      if test "x$has_space" != x; then
59259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59260$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59262      fi
59263
59264      # Use eval to expand a potential ~
59265      eval path="$path"
59266      if test ! -f "$path" && test ! -d "$path"; then
59267        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59268      fi
59269
59270      if test -d "$path"; then
59271        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59272      else
59273        dir="`$DIRNAME "$path"`"
59274        base="`$BASENAME "$path"`"
59275        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59276      fi
59277    fi
59278  fi
59279
59280
59281    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59283$as_echo_n "checking for freetype includes... " >&6; }
59284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59285$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59286    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59288$as_echo_n "checking for freetype libraries... " >&6; }
59289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59290$as_echo "$FREETYPE_LIB_PATH" >&6; }
59291  fi
59292
59293            else
59294
59295  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59296  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59297  METHOD="well-known location"
59298
59299  # Let's start with an optimistic view of the world :-)
59300  FOUND_FREETYPE=yes
59301
59302  # First look for the canonical freetype main include file ft2build.h.
59303  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59304    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59305    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59306    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59307      # Fail.
59308      FOUND_FREETYPE=no
59309    fi
59310  fi
59311
59312  if test "x$FOUND_FREETYPE" = xyes; then
59313    # Include file found, let's continue the sanity check.
59314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59315$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59316
59317    # Reset to default value
59318    FREETYPE_BASE_NAME=freetype
59319    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59320    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59321      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59322          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59323        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59324        # for the .6 version explicitly.
59325        FREETYPE_BASE_NAME=freetype.6
59326        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59327        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59328$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59329      else
59330        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59332        FOUND_FREETYPE=no
59333      fi
59334    else
59335      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59336        # On Windows, we will need both .lib and .dll file.
59337        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59338          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59340          FOUND_FREETYPE=no
59341        fi
59342      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59344        # Found lib in isa dir, use that instead.
59345        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59346        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59347$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59348      fi
59349    fi
59350  fi
59351
59352  if test "x$FOUND_FREETYPE" = xyes; then
59353
59354  # Only process if variable expands to non-empty
59355
59356  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59358
59359  # Input might be given as Windows format, start by converting to
59360  # unix format.
59361  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59362  new_path=`$CYGPATH -u "$path"`
59363
59364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59367  # "foo.exe" is OK but "foo" is an error.
59368  #
59369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59370  # It is also a way to make sure we got the proper file name for the real test later on.
59371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59372  if test "x$test_shortpath" = x; then
59373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59376  fi
59377
59378  # Call helper function which possibly converts this using DOS-style short mode.
59379  # If so, the updated path is stored in $new_path.
59380
59381  input_path="$new_path"
59382  # Check if we need to convert this using DOS-style short mode. If the path
59383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59384  # take no chances and rewrite it.
59385  # Note: m4 eats our [], so we need to use [ and ] instead.
59386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59387  if test "x$has_forbidden_chars" != x; then
59388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59392      # Going to short mode and back again did indeed matter. Since short mode is
59393      # case insensitive, let's make it lowercase to improve readability.
59394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59395      # Now convert it back to Unix-style (cygpath)
59396      input_path=`$CYGPATH -u "$shortmode_path"`
59397      new_path="$input_path"
59398    fi
59399  fi
59400
59401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59402  if test "x$test_cygdrive_prefix" = x; then
59403    # As a simple fix, exclude /usr/bin since it's not a real path.
59404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59406      # a path prefixed by /cygdrive for fixpath to work.
59407      new_path="$CYGWIN_ROOT_PATH$input_path"
59408    fi
59409  fi
59410
59411
59412  if test "x$path" != "x$new_path"; then
59413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59416  fi
59417
59418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59419
59420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59421  has_colon=`$ECHO $path | $GREP ^.:`
59422  new_path="$path"
59423  if test "x$has_colon" = x; then
59424    # Not in mixed or Windows style, start by that.
59425    new_path=`cmd //c echo $path`
59426  fi
59427
59428
59429  input_path="$new_path"
59430  # Check if we need to convert this using DOS-style short mode. If the path
59431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59432  # take no chances and rewrite it.
59433  # Note: m4 eats our [], so we need to use [ and ] instead.
59434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59435  if test "x$has_forbidden_chars" != x; then
59436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59438  fi
59439
59440
59441  windows_path="$new_path"
59442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59443    unix_path=`$CYGPATH -u "$windows_path"`
59444    new_path="$unix_path"
59445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59447    new_path="$unix_path"
59448  fi
59449
59450  if test "x$path" != "x$new_path"; then
59451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59454  fi
59455
59456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59458
59459    else
59460      # We're on a unix platform. Hooray! :)
59461      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59462      has_space=`$ECHO "$path" | $GREP " "`
59463      if test "x$has_space" != x; then
59464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59467      fi
59468
59469      # Use eval to expand a potential ~
59470      eval path="$path"
59471      if test ! -f "$path" && test ! -d "$path"; then
59472        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59473      fi
59474
59475      if test -d "$path"; then
59476        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59477      else
59478        dir="`$DIRNAME "$path"`"
59479        base="`$BASENAME "$path"`"
59480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59481      fi
59482    fi
59483  fi
59484
59485
59486  # Only process if variable expands to non-empty
59487
59488  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59490
59491  # Input might be given as Windows format, start by converting to
59492  # unix format.
59493  path="$POTENTIAL_FREETYPE_LIB_PATH"
59494  new_path=`$CYGPATH -u "$path"`
59495
59496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59499  # "foo.exe" is OK but "foo" is an error.
59500  #
59501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59502  # It is also a way to make sure we got the proper file name for the real test later on.
59503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59504  if test "x$test_shortpath" = x; then
59505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59508  fi
59509
59510  # Call helper function which possibly converts this using DOS-style short mode.
59511  # If so, the updated path is stored in $new_path.
59512
59513  input_path="$new_path"
59514  # Check if we need to convert this using DOS-style short mode. If the path
59515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59516  # take no chances and rewrite it.
59517  # Note: m4 eats our [], so we need to use [ and ] instead.
59518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59519  if test "x$has_forbidden_chars" != x; then
59520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59524      # Going to short mode and back again did indeed matter. Since short mode is
59525      # case insensitive, let's make it lowercase to improve readability.
59526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59527      # Now convert it back to Unix-style (cygpath)
59528      input_path=`$CYGPATH -u "$shortmode_path"`
59529      new_path="$input_path"
59530    fi
59531  fi
59532
59533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59534  if test "x$test_cygdrive_prefix" = x; then
59535    # As a simple fix, exclude /usr/bin since it's not a real path.
59536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59538      # a path prefixed by /cygdrive for fixpath to work.
59539      new_path="$CYGWIN_ROOT_PATH$input_path"
59540    fi
59541  fi
59542
59543
59544  if test "x$path" != "x$new_path"; then
59545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59548  fi
59549
59550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59551
59552  path="$POTENTIAL_FREETYPE_LIB_PATH"
59553  has_colon=`$ECHO $path | $GREP ^.:`
59554  new_path="$path"
59555  if test "x$has_colon" = x; then
59556    # Not in mixed or Windows style, start by that.
59557    new_path=`cmd //c echo $path`
59558  fi
59559
59560
59561  input_path="$new_path"
59562  # Check if we need to convert this using DOS-style short mode. If the path
59563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59564  # take no chances and rewrite it.
59565  # Note: m4 eats our [], so we need to use [ and ] instead.
59566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59567  if test "x$has_forbidden_chars" != x; then
59568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59570  fi
59571
59572
59573  windows_path="$new_path"
59574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59575    unix_path=`$CYGPATH -u "$windows_path"`
59576    new_path="$unix_path"
59577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59579    new_path="$unix_path"
59580  fi
59581
59582  if test "x$path" != "x$new_path"; then
59583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59586  fi
59587
59588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59590
59591    else
59592      # We're on a unix platform. Hooray! :)
59593      path="$POTENTIAL_FREETYPE_LIB_PATH"
59594      has_space=`$ECHO "$path" | $GREP " "`
59595      if test "x$has_space" != x; then
59596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59599      fi
59600
59601      # Use eval to expand a potential ~
59602      eval path="$path"
59603      if test ! -f "$path" && test ! -d "$path"; then
59604        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59605      fi
59606
59607      if test -d "$path"; then
59608        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59609      else
59610        dir="`$DIRNAME "$path"`"
59611        base="`$BASENAME "$path"`"
59612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59613      fi
59614    fi
59615  fi
59616
59617
59618    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59620$as_echo_n "checking for freetype includes... " >&6; }
59621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59622$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59623    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59625$as_echo_n "checking for freetype libraries... " >&6; }
59626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59627$as_echo "$FREETYPE_LIB_PATH" >&6; }
59628  fi
59629
59630            fi
59631            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59632                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59633              # Source is available, as a last resort try to build freetype in default location
59634
59635  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59636  BUILD_FREETYPE=yes
59637
59638  # Check if the freetype sources are acessible..
59639  if ! test -d $FREETYPE_SRC_PATH; then
59640    { $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
59641$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59642    BUILD_FREETYPE=no
59643  fi
59644  # ..and contain a vc2010 project file
59645  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59646  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59647    { $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
59648$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59649    BUILD_FREETYPE=no
59650  fi
59651  # Now check if configure found a version of 'msbuild.exe'
59652  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59653    { $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
59654$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;}
59655    BUILD_FREETYPE=no
59656  fi
59657
59658  # Ready to go..
59659  if test "x$BUILD_FREETYPE" = xyes; then
59660    # msbuild requires trailing slashes for output directories
59661    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59662    freetype_lib_path_unix="$freetype_lib_path"
59663    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59664
59665  unix_path="$vcxproj_path"
59666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59667    windows_path=`$CYGPATH -m "$unix_path"`
59668    vcxproj_path="$windows_path"
59669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59670    windows_path=`cmd //c echo $unix_path`
59671    vcxproj_path="$windows_path"
59672  fi
59673
59674
59675  unix_path="$freetype_lib_path"
59676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59677    windows_path=`$CYGPATH -m "$unix_path"`
59678    freetype_lib_path="$windows_path"
59679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59680    windows_path=`cmd //c echo $unix_path`
59681    freetype_lib_path="$windows_path"
59682  fi
59683
59684
59685  unix_path="$freetype_obj_path"
59686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59687    windows_path=`$CYGPATH -m "$unix_path"`
59688    freetype_obj_path="$windows_path"
59689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59690    windows_path=`cmd //c echo $unix_path`
59691    freetype_obj_path="$windows_path"
59692  fi
59693
59694    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59695      freetype_platform=x64
59696    else
59697      freetype_platform=win32
59698    fi
59699
59700    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59701    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59702    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59703    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59704    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59705$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59706
59707    # First we try to build the freetype.dll
59708    $ECHO -e "@echo off\n"\
59709        "$MSBUILD $vcxproj_path "\
59710        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59711        "/p:Configuration=\"Release Multithreaded\" "\
59712        "/p:Platform=$freetype_platform "\
59713        "/p:ConfigurationType=DynamicLibrary "\
59714        "/p:TargetName=freetype "\
59715        "/p:OutDir=\"$freetype_lib_path\" "\
59716        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59717    cmd /c freetype.bat
59718
59719    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59720      # If that succeeds we also build freetype.lib
59721      $ECHO -e "@echo off\n"\
59722          "$MSBUILD $vcxproj_path "\
59723          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59724          "/p:Configuration=\"Release Multithreaded\" "\
59725          "/p:Platform=$freetype_platform "\
59726          "/p:ConfigurationType=StaticLibrary "\
59727          "/p:TargetName=freetype "\
59728          "/p:OutDir=\"$freetype_lib_path\" "\
59729          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59730      cmd /c freetype.bat
59731
59732      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59733        # Once we build both, lib and dll, set freetype lib and include path appropriately
59734        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59735        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59736        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59737$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59738      else
59739        BUILD_FREETYPE=no
59740      fi
59741    else
59742      BUILD_FREETYPE=no
59743    fi
59744  fi
59745
59746              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59747
59748  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59749  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59750  METHOD="well-known location"
59751
59752  # Let's start with an optimistic view of the world :-)
59753  FOUND_FREETYPE=yes
59754
59755  # First look for the canonical freetype main include file ft2build.h.
59756  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59757    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59758    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59759    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59760      # Fail.
59761      FOUND_FREETYPE=no
59762    fi
59763  fi
59764
59765  if test "x$FOUND_FREETYPE" = xyes; then
59766    # Include file found, let's continue the sanity check.
59767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59768$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59769
59770    # Reset to default value
59771    FREETYPE_BASE_NAME=freetype
59772    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59773    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59774      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59775          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59776        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59777        # for the .6 version explicitly.
59778        FREETYPE_BASE_NAME=freetype.6
59779        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59780        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59781$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59782      else
59783        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59784$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59785        FOUND_FREETYPE=no
59786      fi
59787    else
59788      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59789        # On Windows, we will need both .lib and .dll file.
59790        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59791          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59792$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59793          FOUND_FREETYPE=no
59794        fi
59795      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59796          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59797        # Found lib in isa dir, use that instead.
59798        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59799        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59800$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59801      fi
59802    fi
59803  fi
59804
59805  if test "x$FOUND_FREETYPE" = xyes; then
59806
59807  # Only process if variable expands to non-empty
59808
59809  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59811
59812  # Input might be given as Windows format, start by converting to
59813  # unix format.
59814  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59815  new_path=`$CYGPATH -u "$path"`
59816
59817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59820  # "foo.exe" is OK but "foo" is an error.
59821  #
59822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59823  # It is also a way to make sure we got the proper file name for the real test later on.
59824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59825  if test "x$test_shortpath" = x; then
59826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59827$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59828    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59829  fi
59830
59831  # Call helper function which possibly converts this using DOS-style short mode.
59832  # If so, the updated path is stored in $new_path.
59833
59834  input_path="$new_path"
59835  # Check if we need to convert this using DOS-style short mode. If the path
59836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59837  # take no chances and rewrite it.
59838  # Note: m4 eats our [], so we need to use [ and ] instead.
59839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59840  if test "x$has_forbidden_chars" != x; then
59841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59845      # Going to short mode and back again did indeed matter. Since short mode is
59846      # case insensitive, let's make it lowercase to improve readability.
59847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59848      # Now convert it back to Unix-style (cygpath)
59849      input_path=`$CYGPATH -u "$shortmode_path"`
59850      new_path="$input_path"
59851    fi
59852  fi
59853
59854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59855  if test "x$test_cygdrive_prefix" = x; then
59856    # As a simple fix, exclude /usr/bin since it's not a real path.
59857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59859      # a path prefixed by /cygdrive for fixpath to work.
59860      new_path="$CYGWIN_ROOT_PATH$input_path"
59861    fi
59862  fi
59863
59864
59865  if test "x$path" != "x$new_path"; then
59866    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59868$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59869  fi
59870
59871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59872
59873  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59874  has_colon=`$ECHO $path | $GREP ^.:`
59875  new_path="$path"
59876  if test "x$has_colon" = x; then
59877    # Not in mixed or Windows style, start by that.
59878    new_path=`cmd //c echo $path`
59879  fi
59880
59881
59882  input_path="$new_path"
59883  # Check if we need to convert this using DOS-style short mode. If the path
59884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59885  # take no chances and rewrite it.
59886  # Note: m4 eats our [], so we need to use [ and ] instead.
59887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59888  if test "x$has_forbidden_chars" != x; then
59889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59891  fi
59892
59893
59894  windows_path="$new_path"
59895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59896    unix_path=`$CYGPATH -u "$windows_path"`
59897    new_path="$unix_path"
59898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59900    new_path="$unix_path"
59901  fi
59902
59903  if test "x$path" != "x$new_path"; then
59904    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59907  fi
59908
59909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59911
59912    else
59913      # We're on a unix platform. Hooray! :)
59914      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59915      has_space=`$ECHO "$path" | $GREP " "`
59916      if test "x$has_space" != x; then
59917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59918$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59920      fi
59921
59922      # Use eval to expand a potential ~
59923      eval path="$path"
59924      if test ! -f "$path" && test ! -d "$path"; then
59925        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59926      fi
59927
59928      if test -d "$path"; then
59929        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59930      else
59931        dir="`$DIRNAME "$path"`"
59932        base="`$BASENAME "$path"`"
59933        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59934      fi
59935    fi
59936  fi
59937
59938
59939  # Only process if variable expands to non-empty
59940
59941  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59943
59944  # Input might be given as Windows format, start by converting to
59945  # unix format.
59946  path="$POTENTIAL_FREETYPE_LIB_PATH"
59947  new_path=`$CYGPATH -u "$path"`
59948
59949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59952  # "foo.exe" is OK but "foo" is an error.
59953  #
59954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59955  # It is also a way to make sure we got the proper file name for the real test later on.
59956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59957  if test "x$test_shortpath" = x; then
59958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59960    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59961  fi
59962
59963  # Call helper function which possibly converts this using DOS-style short mode.
59964  # If so, the updated path is stored in $new_path.
59965
59966  input_path="$new_path"
59967  # Check if we need to convert this using DOS-style short mode. If the path
59968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59969  # take no chances and rewrite it.
59970  # Note: m4 eats our [], so we need to use [ and ] instead.
59971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59972  if test "x$has_forbidden_chars" != x; then
59973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59977      # Going to short mode and back again did indeed matter. Since short mode is
59978      # case insensitive, let's make it lowercase to improve readability.
59979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59980      # Now convert it back to Unix-style (cygpath)
59981      input_path=`$CYGPATH -u "$shortmode_path"`
59982      new_path="$input_path"
59983    fi
59984  fi
59985
59986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59987  if test "x$test_cygdrive_prefix" = x; then
59988    # As a simple fix, exclude /usr/bin since it's not a real path.
59989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59991      # a path prefixed by /cygdrive for fixpath to work.
59992      new_path="$CYGWIN_ROOT_PATH$input_path"
59993    fi
59994  fi
59995
59996
59997  if test "x$path" != "x$new_path"; then
59998    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60000$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60001  fi
60002
60003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60004
60005  path="$POTENTIAL_FREETYPE_LIB_PATH"
60006  has_colon=`$ECHO $path | $GREP ^.:`
60007  new_path="$path"
60008  if test "x$has_colon" = x; then
60009    # Not in mixed or Windows style, start by that.
60010    new_path=`cmd //c echo $path`
60011  fi
60012
60013
60014  input_path="$new_path"
60015  # Check if we need to convert this using DOS-style short mode. If the path
60016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60017  # take no chances and rewrite it.
60018  # Note: m4 eats our [], so we need to use [ and ] instead.
60019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60020  if test "x$has_forbidden_chars" != x; then
60021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60023  fi
60024
60025
60026  windows_path="$new_path"
60027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60028    unix_path=`$CYGPATH -u "$windows_path"`
60029    new_path="$unix_path"
60030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60032    new_path="$unix_path"
60033  fi
60034
60035  if test "x$path" != "x$new_path"; then
60036    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60038$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60039  fi
60040
60041  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60043
60044    else
60045      # We're on a unix platform. Hooray! :)
60046      path="$POTENTIAL_FREETYPE_LIB_PATH"
60047      has_space=`$ECHO "$path" | $GREP " "`
60048      if test "x$has_space" != x; then
60049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60050$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60051        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60052      fi
60053
60054      # Use eval to expand a potential ~
60055      eval path="$path"
60056      if test ! -f "$path" && test ! -d "$path"; then
60057        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60058      fi
60059
60060      if test -d "$path"; then
60061        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60062      else
60063        dir="`$DIRNAME "$path"`"
60064        base="`$BASENAME "$path"`"
60065        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60066      fi
60067    fi
60068  fi
60069
60070
60071    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60073$as_echo_n "checking for freetype includes... " >&6; }
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60075$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60076    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60078$as_echo_n "checking for freetype libraries... " >&6; }
60079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60080$as_echo "$FREETYPE_LIB_PATH" >&6; }
60081  fi
60082
60083              else
60084
60085  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60086  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60087  METHOD="well-known location"
60088
60089  # Let's start with an optimistic view of the world :-)
60090  FOUND_FREETYPE=yes
60091
60092  # First look for the canonical freetype main include file ft2build.h.
60093  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60094    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60095    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60096    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60097      # Fail.
60098      FOUND_FREETYPE=no
60099    fi
60100  fi
60101
60102  if test "x$FOUND_FREETYPE" = xyes; then
60103    # Include file found, let's continue the sanity check.
60104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60105$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60106
60107    # Reset to default value
60108    FREETYPE_BASE_NAME=freetype
60109    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60110    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60111      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60112          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60113        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60114        # for the .6 version explicitly.
60115        FREETYPE_BASE_NAME=freetype.6
60116        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60117        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60118$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60119      else
60120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60121$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60122        FOUND_FREETYPE=no
60123      fi
60124    else
60125      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60126        # On Windows, we will need both .lib and .dll file.
60127        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60128          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60129$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60130          FOUND_FREETYPE=no
60131        fi
60132      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60133          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60134        # Found lib in isa dir, use that instead.
60135        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60136        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60137$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60138      fi
60139    fi
60140  fi
60141
60142  if test "x$FOUND_FREETYPE" = xyes; then
60143
60144  # Only process if variable expands to non-empty
60145
60146  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60148
60149  # Input might be given as Windows format, start by converting to
60150  # unix format.
60151  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60152  new_path=`$CYGPATH -u "$path"`
60153
60154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60157  # "foo.exe" is OK but "foo" is an error.
60158  #
60159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60160  # It is also a way to make sure we got the proper file name for the real test later on.
60161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60162  if test "x$test_shortpath" = x; then
60163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60165    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60166  fi
60167
60168  # Call helper function which possibly converts this using DOS-style short mode.
60169  # If so, the updated path is stored in $new_path.
60170
60171  input_path="$new_path"
60172  # Check if we need to convert this using DOS-style short mode. If the path
60173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60174  # take no chances and rewrite it.
60175  # Note: m4 eats our [], so we need to use [ and ] instead.
60176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60177  if test "x$has_forbidden_chars" != x; then
60178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60182      # Going to short mode and back again did indeed matter. Since short mode is
60183      # case insensitive, let's make it lowercase to improve readability.
60184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60185      # Now convert it back to Unix-style (cygpath)
60186      input_path=`$CYGPATH -u "$shortmode_path"`
60187      new_path="$input_path"
60188    fi
60189  fi
60190
60191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60192  if test "x$test_cygdrive_prefix" = x; then
60193    # As a simple fix, exclude /usr/bin since it's not a real path.
60194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60196      # a path prefixed by /cygdrive for fixpath to work.
60197      new_path="$CYGWIN_ROOT_PATH$input_path"
60198    fi
60199  fi
60200
60201
60202  if test "x$path" != "x$new_path"; then
60203    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60206  fi
60207
60208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60209
60210  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60211  has_colon=`$ECHO $path | $GREP ^.:`
60212  new_path="$path"
60213  if test "x$has_colon" = x; then
60214    # Not in mixed or Windows style, start by that.
60215    new_path=`cmd //c echo $path`
60216  fi
60217
60218
60219  input_path="$new_path"
60220  # Check if we need to convert this using DOS-style short mode. If the path
60221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60222  # take no chances and rewrite it.
60223  # Note: m4 eats our [], so we need to use [ and ] instead.
60224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60225  if test "x$has_forbidden_chars" != x; then
60226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60228  fi
60229
60230
60231  windows_path="$new_path"
60232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60233    unix_path=`$CYGPATH -u "$windows_path"`
60234    new_path="$unix_path"
60235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60237    new_path="$unix_path"
60238  fi
60239
60240  if test "x$path" != "x$new_path"; then
60241    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60244  fi
60245
60246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60248
60249    else
60250      # We're on a unix platform. Hooray! :)
60251      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60252      has_space=`$ECHO "$path" | $GREP " "`
60253      if test "x$has_space" != x; then
60254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60257      fi
60258
60259      # Use eval to expand a potential ~
60260      eval path="$path"
60261      if test ! -f "$path" && test ! -d "$path"; then
60262        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60263      fi
60264
60265      if test -d "$path"; then
60266        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60267      else
60268        dir="`$DIRNAME "$path"`"
60269        base="`$BASENAME "$path"`"
60270        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60271      fi
60272    fi
60273  fi
60274
60275
60276  # Only process if variable expands to non-empty
60277
60278  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60280
60281  # Input might be given as Windows format, start by converting to
60282  # unix format.
60283  path="$POTENTIAL_FREETYPE_LIB_PATH"
60284  new_path=`$CYGPATH -u "$path"`
60285
60286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60289  # "foo.exe" is OK but "foo" is an error.
60290  #
60291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60292  # It is also a way to make sure we got the proper file name for the real test later on.
60293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60294  if test "x$test_shortpath" = x; then
60295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60297    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60298  fi
60299
60300  # Call helper function which possibly converts this using DOS-style short mode.
60301  # If so, the updated path is stored in $new_path.
60302
60303  input_path="$new_path"
60304  # Check if we need to convert this using DOS-style short mode. If the path
60305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60306  # take no chances and rewrite it.
60307  # Note: m4 eats our [], so we need to use [ and ] instead.
60308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60309  if test "x$has_forbidden_chars" != x; then
60310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60314      # Going to short mode and back again did indeed matter. Since short mode is
60315      # case insensitive, let's make it lowercase to improve readability.
60316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60317      # Now convert it back to Unix-style (cygpath)
60318      input_path=`$CYGPATH -u "$shortmode_path"`
60319      new_path="$input_path"
60320    fi
60321  fi
60322
60323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60324  if test "x$test_cygdrive_prefix" = x; then
60325    # As a simple fix, exclude /usr/bin since it's not a real path.
60326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60328      # a path prefixed by /cygdrive for fixpath to work.
60329      new_path="$CYGWIN_ROOT_PATH$input_path"
60330    fi
60331  fi
60332
60333
60334  if test "x$path" != "x$new_path"; then
60335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60338  fi
60339
60340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60341
60342  path="$POTENTIAL_FREETYPE_LIB_PATH"
60343  has_colon=`$ECHO $path | $GREP ^.:`
60344  new_path="$path"
60345  if test "x$has_colon" = x; then
60346    # Not in mixed or Windows style, start by that.
60347    new_path=`cmd //c echo $path`
60348  fi
60349
60350
60351  input_path="$new_path"
60352  # Check if we need to convert this using DOS-style short mode. If the path
60353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60354  # take no chances and rewrite it.
60355  # Note: m4 eats our [], so we need to use [ and ] instead.
60356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60357  if test "x$has_forbidden_chars" != x; then
60358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60360  fi
60361
60362
60363  windows_path="$new_path"
60364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60365    unix_path=`$CYGPATH -u "$windows_path"`
60366    new_path="$unix_path"
60367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60369    new_path="$unix_path"
60370  fi
60371
60372  if test "x$path" != "x$new_path"; then
60373    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60376  fi
60377
60378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60380
60381    else
60382      # We're on a unix platform. Hooray! :)
60383      path="$POTENTIAL_FREETYPE_LIB_PATH"
60384      has_space=`$ECHO "$path" | $GREP " "`
60385      if test "x$has_space" != x; then
60386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60389      fi
60390
60391      # Use eval to expand a potential ~
60392      eval path="$path"
60393      if test ! -f "$path" && test ! -d "$path"; then
60394        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60395      fi
60396
60397      if test -d "$path"; then
60398        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60399      else
60400        dir="`$DIRNAME "$path"`"
60401        base="`$BASENAME "$path"`"
60402        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60403      fi
60404    fi
60405  fi
60406
60407
60408    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60410$as_echo_n "checking for freetype includes... " >&6; }
60411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60412$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60413    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60415$as_echo_n "checking for freetype libraries... " >&6; }
60416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60417$as_echo "$FREETYPE_LIB_PATH" >&6; }
60418  fi
60419
60420              fi
60421            fi
60422          fi
60423        else
60424          FREETYPE_BASE_DIR="$SYSROOT/usr"
60425
60426  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60427  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60428  METHOD="well-known location"
60429
60430  # Let's start with an optimistic view of the world :-)
60431  FOUND_FREETYPE=yes
60432
60433  # First look for the canonical freetype main include file ft2build.h.
60434  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60435    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60436    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60437    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60438      # Fail.
60439      FOUND_FREETYPE=no
60440    fi
60441  fi
60442
60443  if test "x$FOUND_FREETYPE" = xyes; then
60444    # Include file found, let's continue the sanity check.
60445    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60446$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60447
60448    # Reset to default value
60449    FREETYPE_BASE_NAME=freetype
60450    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60451    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60452      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60453          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60454        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60455        # for the .6 version explicitly.
60456        FREETYPE_BASE_NAME=freetype.6
60457        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60458        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60459$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60460      else
60461        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60462$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60463        FOUND_FREETYPE=no
60464      fi
60465    else
60466      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60467        # On Windows, we will need both .lib and .dll file.
60468        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60469          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60470$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60471          FOUND_FREETYPE=no
60472        fi
60473      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60475        # Found lib in isa dir, use that instead.
60476        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60477        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60478$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60479      fi
60480    fi
60481  fi
60482
60483  if test "x$FOUND_FREETYPE" = xyes; then
60484
60485  # Only process if variable expands to non-empty
60486
60487  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60489
60490  # Input might be given as Windows format, start by converting to
60491  # unix format.
60492  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60493  new_path=`$CYGPATH -u "$path"`
60494
60495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60498  # "foo.exe" is OK but "foo" is an error.
60499  #
60500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60501  # It is also a way to make sure we got the proper file name for the real test later on.
60502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60503  if test "x$test_shortpath" = x; then
60504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60507  fi
60508
60509  # Call helper function which possibly converts this using DOS-style short mode.
60510  # If so, the updated path is stored in $new_path.
60511
60512  input_path="$new_path"
60513  # Check if we need to convert this using DOS-style short mode. If the path
60514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60515  # take no chances and rewrite it.
60516  # Note: m4 eats our [], so we need to use [ and ] instead.
60517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60518  if test "x$has_forbidden_chars" != x; then
60519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60523      # Going to short mode and back again did indeed matter. Since short mode is
60524      # case insensitive, let's make it lowercase to improve readability.
60525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60526      # Now convert it back to Unix-style (cygpath)
60527      input_path=`$CYGPATH -u "$shortmode_path"`
60528      new_path="$input_path"
60529    fi
60530  fi
60531
60532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60533  if test "x$test_cygdrive_prefix" = x; then
60534    # As a simple fix, exclude /usr/bin since it's not a real path.
60535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60537      # a path prefixed by /cygdrive for fixpath to work.
60538      new_path="$CYGWIN_ROOT_PATH$input_path"
60539    fi
60540  fi
60541
60542
60543  if test "x$path" != "x$new_path"; then
60544    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60547  fi
60548
60549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60550
60551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60552  has_colon=`$ECHO $path | $GREP ^.:`
60553  new_path="$path"
60554  if test "x$has_colon" = x; then
60555    # Not in mixed or Windows style, start by that.
60556    new_path=`cmd //c echo $path`
60557  fi
60558
60559
60560  input_path="$new_path"
60561  # Check if we need to convert this using DOS-style short mode. If the path
60562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60563  # take no chances and rewrite it.
60564  # Note: m4 eats our [], so we need to use [ and ] instead.
60565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60566  if test "x$has_forbidden_chars" != x; then
60567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60569  fi
60570
60571
60572  windows_path="$new_path"
60573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60574    unix_path=`$CYGPATH -u "$windows_path"`
60575    new_path="$unix_path"
60576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60578    new_path="$unix_path"
60579  fi
60580
60581  if test "x$path" != "x$new_path"; then
60582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60585  fi
60586
60587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60589
60590    else
60591      # We're on a unix platform. Hooray! :)
60592      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60593      has_space=`$ECHO "$path" | $GREP " "`
60594      if test "x$has_space" != x; then
60595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60598      fi
60599
60600      # Use eval to expand a potential ~
60601      eval path="$path"
60602      if test ! -f "$path" && test ! -d "$path"; then
60603        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60604      fi
60605
60606      if test -d "$path"; then
60607        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60608      else
60609        dir="`$DIRNAME "$path"`"
60610        base="`$BASENAME "$path"`"
60611        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60612      fi
60613    fi
60614  fi
60615
60616
60617  # Only process if variable expands to non-empty
60618
60619  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60621
60622  # Input might be given as Windows format, start by converting to
60623  # unix format.
60624  path="$POTENTIAL_FREETYPE_LIB_PATH"
60625  new_path=`$CYGPATH -u "$path"`
60626
60627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60630  # "foo.exe" is OK but "foo" is an error.
60631  #
60632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60633  # It is also a way to make sure we got the proper file name for the real test later on.
60634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60635  if test "x$test_shortpath" = x; then
60636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60638    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60639  fi
60640
60641  # Call helper function which possibly converts this using DOS-style short mode.
60642  # If so, the updated path is stored in $new_path.
60643
60644  input_path="$new_path"
60645  # Check if we need to convert this using DOS-style short mode. If the path
60646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60647  # take no chances and rewrite it.
60648  # Note: m4 eats our [], so we need to use [ and ] instead.
60649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60650  if test "x$has_forbidden_chars" != x; then
60651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60655      # Going to short mode and back again did indeed matter. Since short mode is
60656      # case insensitive, let's make it lowercase to improve readability.
60657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60658      # Now convert it back to Unix-style (cygpath)
60659      input_path=`$CYGPATH -u "$shortmode_path"`
60660      new_path="$input_path"
60661    fi
60662  fi
60663
60664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60665  if test "x$test_cygdrive_prefix" = x; then
60666    # As a simple fix, exclude /usr/bin since it's not a real path.
60667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60669      # a path prefixed by /cygdrive for fixpath to work.
60670      new_path="$CYGWIN_ROOT_PATH$input_path"
60671    fi
60672  fi
60673
60674
60675  if test "x$path" != "x$new_path"; then
60676    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60678$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60679  fi
60680
60681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60682
60683  path="$POTENTIAL_FREETYPE_LIB_PATH"
60684  has_colon=`$ECHO $path | $GREP ^.:`
60685  new_path="$path"
60686  if test "x$has_colon" = x; then
60687    # Not in mixed or Windows style, start by that.
60688    new_path=`cmd //c echo $path`
60689  fi
60690
60691
60692  input_path="$new_path"
60693  # Check if we need to convert this using DOS-style short mode. If the path
60694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60695  # take no chances and rewrite it.
60696  # Note: m4 eats our [], so we need to use [ and ] instead.
60697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60698  if test "x$has_forbidden_chars" != x; then
60699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60701  fi
60702
60703
60704  windows_path="$new_path"
60705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60706    unix_path=`$CYGPATH -u "$windows_path"`
60707    new_path="$unix_path"
60708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60710    new_path="$unix_path"
60711  fi
60712
60713  if test "x$path" != "x$new_path"; then
60714    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60717  fi
60718
60719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60721
60722    else
60723      # We're on a unix platform. Hooray! :)
60724      path="$POTENTIAL_FREETYPE_LIB_PATH"
60725      has_space=`$ECHO "$path" | $GREP " "`
60726      if test "x$has_space" != x; then
60727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60730      fi
60731
60732      # Use eval to expand a potential ~
60733      eval path="$path"
60734      if test ! -f "$path" && test ! -d "$path"; then
60735        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60736      fi
60737
60738      if test -d "$path"; then
60739        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60740      else
60741        dir="`$DIRNAME "$path"`"
60742        base="`$BASENAME "$path"`"
60743        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60744      fi
60745    fi
60746  fi
60747
60748
60749    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60751$as_echo_n "checking for freetype includes... " >&6; }
60752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60753$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60754    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60756$as_echo_n "checking for freetype libraries... " >&6; }
60757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60758$as_echo "$FREETYPE_LIB_PATH" >&6; }
60759  fi
60760
60761
60762          if test "x$FOUND_FREETYPE" != xyes; then
60763            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60764
60765  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60766  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60767  METHOD="well-known location"
60768
60769  # Let's start with an optimistic view of the world :-)
60770  FOUND_FREETYPE=yes
60771
60772  # First look for the canonical freetype main include file ft2build.h.
60773  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60774    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60775    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60776    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60777      # Fail.
60778      FOUND_FREETYPE=no
60779    fi
60780  fi
60781
60782  if test "x$FOUND_FREETYPE" = xyes; then
60783    # Include file found, let's continue the sanity check.
60784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60785$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60786
60787    # Reset to default value
60788    FREETYPE_BASE_NAME=freetype
60789    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60790    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60791      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60793        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60794        # for the .6 version explicitly.
60795        FREETYPE_BASE_NAME=freetype.6
60796        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60797        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60798$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60799      else
60800        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60802        FOUND_FREETYPE=no
60803      fi
60804    else
60805      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60806        # On Windows, we will need both .lib and .dll file.
60807        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60808          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60809$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60810          FOUND_FREETYPE=no
60811        fi
60812      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60814        # Found lib in isa dir, use that instead.
60815        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60816        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60817$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60818      fi
60819    fi
60820  fi
60821
60822  if test "x$FOUND_FREETYPE" = xyes; then
60823
60824  # Only process if variable expands to non-empty
60825
60826  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60828
60829  # Input might be given as Windows format, start by converting to
60830  # unix format.
60831  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60832  new_path=`$CYGPATH -u "$path"`
60833
60834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60837  # "foo.exe" is OK but "foo" is an error.
60838  #
60839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60840  # It is also a way to make sure we got the proper file name for the real test later on.
60841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60842  if test "x$test_shortpath" = x; then
60843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60845    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60846  fi
60847
60848  # Call helper function which possibly converts this using DOS-style short mode.
60849  # If so, the updated path is stored in $new_path.
60850
60851  input_path="$new_path"
60852  # Check if we need to convert this using DOS-style short mode. If the path
60853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60854  # take no chances and rewrite it.
60855  # Note: m4 eats our [], so we need to use [ and ] instead.
60856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60857  if test "x$has_forbidden_chars" != x; then
60858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60862      # Going to short mode and back again did indeed matter. Since short mode is
60863      # case insensitive, let's make it lowercase to improve readability.
60864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60865      # Now convert it back to Unix-style (cygpath)
60866      input_path=`$CYGPATH -u "$shortmode_path"`
60867      new_path="$input_path"
60868    fi
60869  fi
60870
60871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60872  if test "x$test_cygdrive_prefix" = x; then
60873    # As a simple fix, exclude /usr/bin since it's not a real path.
60874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60876      # a path prefixed by /cygdrive for fixpath to work.
60877      new_path="$CYGWIN_ROOT_PATH$input_path"
60878    fi
60879  fi
60880
60881
60882  if test "x$path" != "x$new_path"; then
60883    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60886  fi
60887
60888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60889
60890  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60891  has_colon=`$ECHO $path | $GREP ^.:`
60892  new_path="$path"
60893  if test "x$has_colon" = x; then
60894    # Not in mixed or Windows style, start by that.
60895    new_path=`cmd //c echo $path`
60896  fi
60897
60898
60899  input_path="$new_path"
60900  # Check if we need to convert this using DOS-style short mode. If the path
60901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60902  # take no chances and rewrite it.
60903  # Note: m4 eats our [], so we need to use [ and ] instead.
60904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60905  if test "x$has_forbidden_chars" != x; then
60906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60908  fi
60909
60910
60911  windows_path="$new_path"
60912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60913    unix_path=`$CYGPATH -u "$windows_path"`
60914    new_path="$unix_path"
60915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60917    new_path="$unix_path"
60918  fi
60919
60920  if test "x$path" != "x$new_path"; then
60921    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60924  fi
60925
60926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60928
60929    else
60930      # We're on a unix platform. Hooray! :)
60931      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60932      has_space=`$ECHO "$path" | $GREP " "`
60933      if test "x$has_space" != x; then
60934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60937      fi
60938
60939      # Use eval to expand a potential ~
60940      eval path="$path"
60941      if test ! -f "$path" && test ! -d "$path"; then
60942        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60943      fi
60944
60945      if test -d "$path"; then
60946        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60947      else
60948        dir="`$DIRNAME "$path"`"
60949        base="`$BASENAME "$path"`"
60950        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60951      fi
60952    fi
60953  fi
60954
60955
60956  # Only process if variable expands to non-empty
60957
60958  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60960
60961  # Input might be given as Windows format, start by converting to
60962  # unix format.
60963  path="$POTENTIAL_FREETYPE_LIB_PATH"
60964  new_path=`$CYGPATH -u "$path"`
60965
60966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60969  # "foo.exe" is OK but "foo" is an error.
60970  #
60971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60972  # It is also a way to make sure we got the proper file name for the real test later on.
60973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60974  if test "x$test_shortpath" = x; then
60975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60976$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60977    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60978  fi
60979
60980  # Call helper function which possibly converts this using DOS-style short mode.
60981  # If so, the updated path is stored in $new_path.
60982
60983  input_path="$new_path"
60984  # Check if we need to convert this using DOS-style short mode. If the path
60985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60986  # take no chances and rewrite it.
60987  # Note: m4 eats our [], so we need to use [ and ] instead.
60988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60989  if test "x$has_forbidden_chars" != x; then
60990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60994      # Going to short mode and back again did indeed matter. Since short mode is
60995      # case insensitive, let's make it lowercase to improve readability.
60996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60997      # Now convert it back to Unix-style (cygpath)
60998      input_path=`$CYGPATH -u "$shortmode_path"`
60999      new_path="$input_path"
61000    fi
61001  fi
61002
61003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61004  if test "x$test_cygdrive_prefix" = x; then
61005    # As a simple fix, exclude /usr/bin since it's not a real path.
61006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61008      # a path prefixed by /cygdrive for fixpath to work.
61009      new_path="$CYGWIN_ROOT_PATH$input_path"
61010    fi
61011  fi
61012
61013
61014  if test "x$path" != "x$new_path"; then
61015    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61018  fi
61019
61020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61021
61022  path="$POTENTIAL_FREETYPE_LIB_PATH"
61023  has_colon=`$ECHO $path | $GREP ^.:`
61024  new_path="$path"
61025  if test "x$has_colon" = x; then
61026    # Not in mixed or Windows style, start by that.
61027    new_path=`cmd //c echo $path`
61028  fi
61029
61030
61031  input_path="$new_path"
61032  # Check if we need to convert this using DOS-style short mode. If the path
61033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61034  # take no chances and rewrite it.
61035  # Note: m4 eats our [], so we need to use [ and ] instead.
61036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61037  if test "x$has_forbidden_chars" != x; then
61038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61040  fi
61041
61042
61043  windows_path="$new_path"
61044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61045    unix_path=`$CYGPATH -u "$windows_path"`
61046    new_path="$unix_path"
61047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61049    new_path="$unix_path"
61050  fi
61051
61052  if test "x$path" != "x$new_path"; then
61053    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61056  fi
61057
61058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61060
61061    else
61062      # We're on a unix platform. Hooray! :)
61063      path="$POTENTIAL_FREETYPE_LIB_PATH"
61064      has_space=`$ECHO "$path" | $GREP " "`
61065      if test "x$has_space" != x; then
61066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61069      fi
61070
61071      # Use eval to expand a potential ~
61072      eval path="$path"
61073      if test ! -f "$path" && test ! -d "$path"; then
61074        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61075      fi
61076
61077      if test -d "$path"; then
61078        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61079      else
61080        dir="`$DIRNAME "$path"`"
61081        base="`$BASENAME "$path"`"
61082        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61083      fi
61084    fi
61085  fi
61086
61087
61088    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61090$as_echo_n "checking for freetype includes... " >&6; }
61091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61092$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61093    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61095$as_echo_n "checking for freetype libraries... " >&6; }
61096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61097$as_echo "$FREETYPE_LIB_PATH" >&6; }
61098  fi
61099
61100          fi
61101          if test "x$FOUND_FREETYPE" != xyes; then
61102            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61103
61104  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61105  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61106  METHOD="well-known location"
61107
61108  # Let's start with an optimistic view of the world :-)
61109  FOUND_FREETYPE=yes
61110
61111  # First look for the canonical freetype main include file ft2build.h.
61112  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61113    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61114    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61115    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61116      # Fail.
61117      FOUND_FREETYPE=no
61118    fi
61119  fi
61120
61121  if test "x$FOUND_FREETYPE" = xyes; then
61122    # Include file found, let's continue the sanity check.
61123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61124$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61125
61126    # Reset to default value
61127    FREETYPE_BASE_NAME=freetype
61128    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61129    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61130      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61131          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61132        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61133        # for the .6 version explicitly.
61134        FREETYPE_BASE_NAME=freetype.6
61135        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61136        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61137$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61138      else
61139        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61140$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61141        FOUND_FREETYPE=no
61142      fi
61143    else
61144      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61145        # On Windows, we will need both .lib and .dll file.
61146        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61147          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61148$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61149          FOUND_FREETYPE=no
61150        fi
61151      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61153        # Found lib in isa dir, use that instead.
61154        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61155        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61156$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61157      fi
61158    fi
61159  fi
61160
61161  if test "x$FOUND_FREETYPE" = xyes; then
61162
61163  # Only process if variable expands to non-empty
61164
61165  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61167
61168  # Input might be given as Windows format, start by converting to
61169  # unix format.
61170  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61171  new_path=`$CYGPATH -u "$path"`
61172
61173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61176  # "foo.exe" is OK but "foo" is an error.
61177  #
61178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61179  # It is also a way to make sure we got the proper file name for the real test later on.
61180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61181  if test "x$test_shortpath" = x; then
61182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61184    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61185  fi
61186
61187  # Call helper function which possibly converts this using DOS-style short mode.
61188  # If so, the updated path is stored in $new_path.
61189
61190  input_path="$new_path"
61191  # Check if we need to convert this using DOS-style short mode. If the path
61192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61193  # take no chances and rewrite it.
61194  # Note: m4 eats our [], so we need to use [ and ] instead.
61195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61196  if test "x$has_forbidden_chars" != x; then
61197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61201      # Going to short mode and back again did indeed matter. Since short mode is
61202      # case insensitive, let's make it lowercase to improve readability.
61203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61204      # Now convert it back to Unix-style (cygpath)
61205      input_path=`$CYGPATH -u "$shortmode_path"`
61206      new_path="$input_path"
61207    fi
61208  fi
61209
61210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61211  if test "x$test_cygdrive_prefix" = x; then
61212    # As a simple fix, exclude /usr/bin since it's not a real path.
61213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61215      # a path prefixed by /cygdrive for fixpath to work.
61216      new_path="$CYGWIN_ROOT_PATH$input_path"
61217    fi
61218  fi
61219
61220
61221  if test "x$path" != "x$new_path"; then
61222    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61225  fi
61226
61227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61228
61229  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61230  has_colon=`$ECHO $path | $GREP ^.:`
61231  new_path="$path"
61232  if test "x$has_colon" = x; then
61233    # Not in mixed or Windows style, start by that.
61234    new_path=`cmd //c echo $path`
61235  fi
61236
61237
61238  input_path="$new_path"
61239  # Check if we need to convert this using DOS-style short mode. If the path
61240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61241  # take no chances and rewrite it.
61242  # Note: m4 eats our [], so we need to use [ and ] instead.
61243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61244  if test "x$has_forbidden_chars" != x; then
61245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61247  fi
61248
61249
61250  windows_path="$new_path"
61251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61252    unix_path=`$CYGPATH -u "$windows_path"`
61253    new_path="$unix_path"
61254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61256    new_path="$unix_path"
61257  fi
61258
61259  if test "x$path" != "x$new_path"; then
61260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61263  fi
61264
61265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61267
61268    else
61269      # We're on a unix platform. Hooray! :)
61270      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61271      has_space=`$ECHO "$path" | $GREP " "`
61272      if test "x$has_space" != x; then
61273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61276      fi
61277
61278      # Use eval to expand a potential ~
61279      eval path="$path"
61280      if test ! -f "$path" && test ! -d "$path"; then
61281        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61282      fi
61283
61284      if test -d "$path"; then
61285        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61286      else
61287        dir="`$DIRNAME "$path"`"
61288        base="`$BASENAME "$path"`"
61289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61290      fi
61291    fi
61292  fi
61293
61294
61295  # Only process if variable expands to non-empty
61296
61297  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61299
61300  # Input might be given as Windows format, start by converting to
61301  # unix format.
61302  path="$POTENTIAL_FREETYPE_LIB_PATH"
61303  new_path=`$CYGPATH -u "$path"`
61304
61305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61308  # "foo.exe" is OK but "foo" is an error.
61309  #
61310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61311  # It is also a way to make sure we got the proper file name for the real test later on.
61312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61313  if test "x$test_shortpath" = x; then
61314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61316    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61317  fi
61318
61319  # Call helper function which possibly converts this using DOS-style short mode.
61320  # If so, the updated path is stored in $new_path.
61321
61322  input_path="$new_path"
61323  # Check if we need to convert this using DOS-style short mode. If the path
61324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61325  # take no chances and rewrite it.
61326  # Note: m4 eats our [], so we need to use [ and ] instead.
61327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61328  if test "x$has_forbidden_chars" != x; then
61329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61333      # Going to short mode and back again did indeed matter. Since short mode is
61334      # case insensitive, let's make it lowercase to improve readability.
61335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61336      # Now convert it back to Unix-style (cygpath)
61337      input_path=`$CYGPATH -u "$shortmode_path"`
61338      new_path="$input_path"
61339    fi
61340  fi
61341
61342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61343  if test "x$test_cygdrive_prefix" = x; then
61344    # As a simple fix, exclude /usr/bin since it's not a real path.
61345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61347      # a path prefixed by /cygdrive for fixpath to work.
61348      new_path="$CYGWIN_ROOT_PATH$input_path"
61349    fi
61350  fi
61351
61352
61353  if test "x$path" != "x$new_path"; then
61354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61357  fi
61358
61359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61360
61361  path="$POTENTIAL_FREETYPE_LIB_PATH"
61362  has_colon=`$ECHO $path | $GREP ^.:`
61363  new_path="$path"
61364  if test "x$has_colon" = x; then
61365    # Not in mixed or Windows style, start by that.
61366    new_path=`cmd //c echo $path`
61367  fi
61368
61369
61370  input_path="$new_path"
61371  # Check if we need to convert this using DOS-style short mode. If the path
61372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61373  # take no chances and rewrite it.
61374  # Note: m4 eats our [], so we need to use [ and ] instead.
61375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61376  if test "x$has_forbidden_chars" != x; then
61377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61379  fi
61380
61381
61382  windows_path="$new_path"
61383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61384    unix_path=`$CYGPATH -u "$windows_path"`
61385    new_path="$unix_path"
61386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61388    new_path="$unix_path"
61389  fi
61390
61391  if test "x$path" != "x$new_path"; then
61392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61395  fi
61396
61397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61399
61400    else
61401      # We're on a unix platform. Hooray! :)
61402      path="$POTENTIAL_FREETYPE_LIB_PATH"
61403      has_space=`$ECHO "$path" | $GREP " "`
61404      if test "x$has_space" != x; then
61405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61408      fi
61409
61410      # Use eval to expand a potential ~
61411      eval path="$path"
61412      if test ! -f "$path" && test ! -d "$path"; then
61413        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61414      fi
61415
61416      if test -d "$path"; then
61417        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61418      else
61419        dir="`$DIRNAME "$path"`"
61420        base="`$BASENAME "$path"`"
61421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61422      fi
61423    fi
61424  fi
61425
61426
61427    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61429$as_echo_n "checking for freetype includes... " >&6; }
61430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61431$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61432    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61434$as_echo_n "checking for freetype libraries... " >&6; }
61435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61436$as_echo "$FREETYPE_LIB_PATH" >&6; }
61437  fi
61438
61439          fi
61440
61441          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61442            if test "x$FOUND_FREETYPE" != xyes; then
61443              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61444              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61445
61446  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61447  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61448  METHOD="well-known location"
61449
61450  # Let's start with an optimistic view of the world :-)
61451  FOUND_FREETYPE=yes
61452
61453  # First look for the canonical freetype main include file ft2build.h.
61454  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61455    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61456    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61457    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61458      # Fail.
61459      FOUND_FREETYPE=no
61460    fi
61461  fi
61462
61463  if test "x$FOUND_FREETYPE" = xyes; then
61464    # Include file found, let's continue the sanity check.
61465    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61466$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61467
61468    # Reset to default value
61469    FREETYPE_BASE_NAME=freetype
61470    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61471    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61472      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61473          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61474        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61475        # for the .6 version explicitly.
61476        FREETYPE_BASE_NAME=freetype.6
61477        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61478        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61479$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61480      else
61481        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61483        FOUND_FREETYPE=no
61484      fi
61485    else
61486      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61487        # On Windows, we will need both .lib and .dll file.
61488        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61489          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61491          FOUND_FREETYPE=no
61492        fi
61493      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61494          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61495        # Found lib in isa dir, use that instead.
61496        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61497        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61498$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61499      fi
61500    fi
61501  fi
61502
61503  if test "x$FOUND_FREETYPE" = xyes; then
61504
61505  # Only process if variable expands to non-empty
61506
61507  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61509
61510  # Input might be given as Windows format, start by converting to
61511  # unix format.
61512  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61513  new_path=`$CYGPATH -u "$path"`
61514
61515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61518  # "foo.exe" is OK but "foo" is an error.
61519  #
61520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61521  # It is also a way to make sure we got the proper file name for the real test later on.
61522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61523  if test "x$test_shortpath" = x; then
61524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61527  fi
61528
61529  # Call helper function which possibly converts this using DOS-style short mode.
61530  # If so, the updated path is stored in $new_path.
61531
61532  input_path="$new_path"
61533  # Check if we need to convert this using DOS-style short mode. If the path
61534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61535  # take no chances and rewrite it.
61536  # Note: m4 eats our [], so we need to use [ and ] instead.
61537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61538  if test "x$has_forbidden_chars" != x; then
61539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61543      # Going to short mode and back again did indeed matter. Since short mode is
61544      # case insensitive, let's make it lowercase to improve readability.
61545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61546      # Now convert it back to Unix-style (cygpath)
61547      input_path=`$CYGPATH -u "$shortmode_path"`
61548      new_path="$input_path"
61549    fi
61550  fi
61551
61552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61553  if test "x$test_cygdrive_prefix" = x; then
61554    # As a simple fix, exclude /usr/bin since it's not a real path.
61555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61557      # a path prefixed by /cygdrive for fixpath to work.
61558      new_path="$CYGWIN_ROOT_PATH$input_path"
61559    fi
61560  fi
61561
61562
61563  if test "x$path" != "x$new_path"; then
61564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61567  fi
61568
61569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61570
61571  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61572  has_colon=`$ECHO $path | $GREP ^.:`
61573  new_path="$path"
61574  if test "x$has_colon" = x; then
61575    # Not in mixed or Windows style, start by that.
61576    new_path=`cmd //c echo $path`
61577  fi
61578
61579
61580  input_path="$new_path"
61581  # Check if we need to convert this using DOS-style short mode. If the path
61582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61583  # take no chances and rewrite it.
61584  # Note: m4 eats our [], so we need to use [ and ] instead.
61585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61586  if test "x$has_forbidden_chars" != x; then
61587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61589  fi
61590
61591
61592  windows_path="$new_path"
61593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61594    unix_path=`$CYGPATH -u "$windows_path"`
61595    new_path="$unix_path"
61596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61598    new_path="$unix_path"
61599  fi
61600
61601  if test "x$path" != "x$new_path"; then
61602    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61605  fi
61606
61607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61609
61610    else
61611      # We're on a unix platform. Hooray! :)
61612      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61613      has_space=`$ECHO "$path" | $GREP " "`
61614      if test "x$has_space" != x; then
61615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61618      fi
61619
61620      # Use eval to expand a potential ~
61621      eval path="$path"
61622      if test ! -f "$path" && test ! -d "$path"; then
61623        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61624      fi
61625
61626      if test -d "$path"; then
61627        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61628      else
61629        dir="`$DIRNAME "$path"`"
61630        base="`$BASENAME "$path"`"
61631        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61632      fi
61633    fi
61634  fi
61635
61636
61637  # Only process if variable expands to non-empty
61638
61639  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61641
61642  # Input might be given as Windows format, start by converting to
61643  # unix format.
61644  path="$POTENTIAL_FREETYPE_LIB_PATH"
61645  new_path=`$CYGPATH -u "$path"`
61646
61647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61650  # "foo.exe" is OK but "foo" is an error.
61651  #
61652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61653  # It is also a way to make sure we got the proper file name for the real test later on.
61654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61655  if test "x$test_shortpath" = x; then
61656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61659  fi
61660
61661  # Call helper function which possibly converts this using DOS-style short mode.
61662  # If so, the updated path is stored in $new_path.
61663
61664  input_path="$new_path"
61665  # Check if we need to convert this using DOS-style short mode. If the path
61666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61667  # take no chances and rewrite it.
61668  # Note: m4 eats our [], so we need to use [ and ] instead.
61669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61670  if test "x$has_forbidden_chars" != x; then
61671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61675      # Going to short mode and back again did indeed matter. Since short mode is
61676      # case insensitive, let's make it lowercase to improve readability.
61677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61678      # Now convert it back to Unix-style (cygpath)
61679      input_path=`$CYGPATH -u "$shortmode_path"`
61680      new_path="$input_path"
61681    fi
61682  fi
61683
61684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61685  if test "x$test_cygdrive_prefix" = x; then
61686    # As a simple fix, exclude /usr/bin since it's not a real path.
61687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61689      # a path prefixed by /cygdrive for fixpath to work.
61690      new_path="$CYGWIN_ROOT_PATH$input_path"
61691    fi
61692  fi
61693
61694
61695  if test "x$path" != "x$new_path"; then
61696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61699  fi
61700
61701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61702
61703  path="$POTENTIAL_FREETYPE_LIB_PATH"
61704  has_colon=`$ECHO $path | $GREP ^.:`
61705  new_path="$path"
61706  if test "x$has_colon" = x; then
61707    # Not in mixed or Windows style, start by that.
61708    new_path=`cmd //c echo $path`
61709  fi
61710
61711
61712  input_path="$new_path"
61713  # Check if we need to convert this using DOS-style short mode. If the path
61714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61715  # take no chances and rewrite it.
61716  # Note: m4 eats our [], so we need to use [ and ] instead.
61717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61718  if test "x$has_forbidden_chars" != x; then
61719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61721  fi
61722
61723
61724  windows_path="$new_path"
61725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61726    unix_path=`$CYGPATH -u "$windows_path"`
61727    new_path="$unix_path"
61728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61730    new_path="$unix_path"
61731  fi
61732
61733  if test "x$path" != "x$new_path"; then
61734    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61737  fi
61738
61739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61741
61742    else
61743      # We're on a unix platform. Hooray! :)
61744      path="$POTENTIAL_FREETYPE_LIB_PATH"
61745      has_space=`$ECHO "$path" | $GREP " "`
61746      if test "x$has_space" != x; then
61747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61750      fi
61751
61752      # Use eval to expand a potential ~
61753      eval path="$path"
61754      if test ! -f "$path" && test ! -d "$path"; then
61755        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61756      fi
61757
61758      if test -d "$path"; then
61759        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61760      else
61761        dir="`$DIRNAME "$path"`"
61762        base="`$BASENAME "$path"`"
61763        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61764      fi
61765    fi
61766  fi
61767
61768
61769    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61771$as_echo_n "checking for freetype includes... " >&6; }
61772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61773$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61774    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61776$as_echo_n "checking for freetype libraries... " >&6; }
61777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61778$as_echo "$FREETYPE_LIB_PATH" >&6; }
61779  fi
61780
61781            fi
61782          fi
61783
61784          if test "x$FOUND_FREETYPE" != xyes; then
61785            FREETYPE_BASE_DIR="$SYSROOT/usr"
61786            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61787
61788  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61789  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61790  METHOD="well-known location"
61791
61792  # Let's start with an optimistic view of the world :-)
61793  FOUND_FREETYPE=yes
61794
61795  # First look for the canonical freetype main include file ft2build.h.
61796  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61797    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61798    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61799    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61800      # Fail.
61801      FOUND_FREETYPE=no
61802    fi
61803  fi
61804
61805  if test "x$FOUND_FREETYPE" = xyes; then
61806    # Include file found, let's continue the sanity check.
61807    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61808$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61809
61810    # Reset to default value
61811    FREETYPE_BASE_NAME=freetype
61812    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61813    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61814      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61815          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61816        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61817        # for the .6 version explicitly.
61818        FREETYPE_BASE_NAME=freetype.6
61819        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61820        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61821$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61822      else
61823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61824$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61825        FOUND_FREETYPE=no
61826      fi
61827    else
61828      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61829        # On Windows, we will need both .lib and .dll file.
61830        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61831          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61832$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61833          FOUND_FREETYPE=no
61834        fi
61835      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61836          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61837        # Found lib in isa dir, use that instead.
61838        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61839        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61840$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61841      fi
61842    fi
61843  fi
61844
61845  if test "x$FOUND_FREETYPE" = xyes; then
61846
61847  # Only process if variable expands to non-empty
61848
61849  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61851
61852  # Input might be given as Windows format, start by converting to
61853  # unix format.
61854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61855  new_path=`$CYGPATH -u "$path"`
61856
61857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61860  # "foo.exe" is OK but "foo" is an error.
61861  #
61862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61863  # It is also a way to make sure we got the proper file name for the real test later on.
61864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61865  if test "x$test_shortpath" = x; then
61866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61869  fi
61870
61871  # Call helper function which possibly converts this using DOS-style short mode.
61872  # If so, the updated path is stored in $new_path.
61873
61874  input_path="$new_path"
61875  # Check if we need to convert this using DOS-style short mode. If the path
61876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61877  # take no chances and rewrite it.
61878  # Note: m4 eats our [], so we need to use [ and ] instead.
61879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61880  if test "x$has_forbidden_chars" != x; then
61881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61885      # Going to short mode and back again did indeed matter. Since short mode is
61886      # case insensitive, let's make it lowercase to improve readability.
61887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61888      # Now convert it back to Unix-style (cygpath)
61889      input_path=`$CYGPATH -u "$shortmode_path"`
61890      new_path="$input_path"
61891    fi
61892  fi
61893
61894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61895  if test "x$test_cygdrive_prefix" = x; then
61896    # As a simple fix, exclude /usr/bin since it's not a real path.
61897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61899      # a path prefixed by /cygdrive for fixpath to work.
61900      new_path="$CYGWIN_ROOT_PATH$input_path"
61901    fi
61902  fi
61903
61904
61905  if test "x$path" != "x$new_path"; then
61906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61909  fi
61910
61911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61912
61913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61914  has_colon=`$ECHO $path | $GREP ^.:`
61915  new_path="$path"
61916  if test "x$has_colon" = x; then
61917    # Not in mixed or Windows style, start by that.
61918    new_path=`cmd //c echo $path`
61919  fi
61920
61921
61922  input_path="$new_path"
61923  # Check if we need to convert this using DOS-style short mode. If the path
61924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61925  # take no chances and rewrite it.
61926  # Note: m4 eats our [], so we need to use [ and ] instead.
61927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61928  if test "x$has_forbidden_chars" != x; then
61929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61931  fi
61932
61933
61934  windows_path="$new_path"
61935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61936    unix_path=`$CYGPATH -u "$windows_path"`
61937    new_path="$unix_path"
61938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61940    new_path="$unix_path"
61941  fi
61942
61943  if test "x$path" != "x$new_path"; then
61944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61947  fi
61948
61949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61951
61952    else
61953      # We're on a unix platform. Hooray! :)
61954      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61955      has_space=`$ECHO "$path" | $GREP " "`
61956      if test "x$has_space" != x; then
61957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61960      fi
61961
61962      # Use eval to expand a potential ~
61963      eval path="$path"
61964      if test ! -f "$path" && test ! -d "$path"; then
61965        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61966      fi
61967
61968      if test -d "$path"; then
61969        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61970      else
61971        dir="`$DIRNAME "$path"`"
61972        base="`$BASENAME "$path"`"
61973        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61974      fi
61975    fi
61976  fi
61977
61978
61979  # Only process if variable expands to non-empty
61980
61981  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61983
61984  # Input might be given as Windows format, start by converting to
61985  # unix format.
61986  path="$POTENTIAL_FREETYPE_LIB_PATH"
61987  new_path=`$CYGPATH -u "$path"`
61988
61989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61992  # "foo.exe" is OK but "foo" is an error.
61993  #
61994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61995  # It is also a way to make sure we got the proper file name for the real test later on.
61996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61997  if test "x$test_shortpath" = x; then
61998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62000    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62001  fi
62002
62003  # Call helper function which possibly converts this using DOS-style short mode.
62004  # If so, the updated path is stored in $new_path.
62005
62006  input_path="$new_path"
62007  # Check if we need to convert this using DOS-style short mode. If the path
62008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62009  # take no chances and rewrite it.
62010  # Note: m4 eats our [], so we need to use [ and ] instead.
62011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62012  if test "x$has_forbidden_chars" != x; then
62013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62017      # Going to short mode and back again did indeed matter. Since short mode is
62018      # case insensitive, let's make it lowercase to improve readability.
62019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62020      # Now convert it back to Unix-style (cygpath)
62021      input_path=`$CYGPATH -u "$shortmode_path"`
62022      new_path="$input_path"
62023    fi
62024  fi
62025
62026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62027  if test "x$test_cygdrive_prefix" = x; then
62028    # As a simple fix, exclude /usr/bin since it's not a real path.
62029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62031      # a path prefixed by /cygdrive for fixpath to work.
62032      new_path="$CYGWIN_ROOT_PATH$input_path"
62033    fi
62034  fi
62035
62036
62037  if test "x$path" != "x$new_path"; then
62038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62041  fi
62042
62043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62044
62045  path="$POTENTIAL_FREETYPE_LIB_PATH"
62046  has_colon=`$ECHO $path | $GREP ^.:`
62047  new_path="$path"
62048  if test "x$has_colon" = x; then
62049    # Not in mixed or Windows style, start by that.
62050    new_path=`cmd //c echo $path`
62051  fi
62052
62053
62054  input_path="$new_path"
62055  # Check if we need to convert this using DOS-style short mode. If the path
62056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62057  # take no chances and rewrite it.
62058  # Note: m4 eats our [], so we need to use [ and ] instead.
62059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62060  if test "x$has_forbidden_chars" != x; then
62061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62063  fi
62064
62065
62066  windows_path="$new_path"
62067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62068    unix_path=`$CYGPATH -u "$windows_path"`
62069    new_path="$unix_path"
62070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62072    new_path="$unix_path"
62073  fi
62074
62075  if test "x$path" != "x$new_path"; then
62076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62079  fi
62080
62081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62083
62084    else
62085      # We're on a unix platform. Hooray! :)
62086      path="$POTENTIAL_FREETYPE_LIB_PATH"
62087      has_space=`$ECHO "$path" | $GREP " "`
62088      if test "x$has_space" != x; then
62089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62092      fi
62093
62094      # Use eval to expand a potential ~
62095      eval path="$path"
62096      if test ! -f "$path" && test ! -d "$path"; then
62097        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62098      fi
62099
62100      if test -d "$path"; then
62101        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62102      else
62103        dir="`$DIRNAME "$path"`"
62104        base="`$BASENAME "$path"`"
62105        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62106      fi
62107    fi
62108  fi
62109
62110
62111    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62113$as_echo_n "checking for freetype includes... " >&6; }
62114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62115$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62116    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62118$as_echo_n "checking for freetype libraries... " >&6; }
62119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62120$as_echo "$FREETYPE_LIB_PATH" >&6; }
62121  fi
62122
62123            else
62124
62125  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62126  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62127  METHOD="well-known location"
62128
62129  # Let's start with an optimistic view of the world :-)
62130  FOUND_FREETYPE=yes
62131
62132  # First look for the canonical freetype main include file ft2build.h.
62133  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62134    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62135    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62136    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62137      # Fail.
62138      FOUND_FREETYPE=no
62139    fi
62140  fi
62141
62142  if test "x$FOUND_FREETYPE" = xyes; then
62143    # Include file found, let's continue the sanity check.
62144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62145$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62146
62147    # Reset to default value
62148    FREETYPE_BASE_NAME=freetype
62149    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62150    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62151      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62153        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62154        # for the .6 version explicitly.
62155        FREETYPE_BASE_NAME=freetype.6
62156        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62157        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62158$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62159      else
62160        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62162        FOUND_FREETYPE=no
62163      fi
62164    else
62165      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62166        # On Windows, we will need both .lib and .dll file.
62167        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62168          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62170          FOUND_FREETYPE=no
62171        fi
62172      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62173          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62174        # Found lib in isa dir, use that instead.
62175        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62176        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62177$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62178      fi
62179    fi
62180  fi
62181
62182  if test "x$FOUND_FREETYPE" = xyes; then
62183
62184  # Only process if variable expands to non-empty
62185
62186  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62188
62189  # Input might be given as Windows format, start by converting to
62190  # unix format.
62191  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62192  new_path=`$CYGPATH -u "$path"`
62193
62194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62197  # "foo.exe" is OK but "foo" is an error.
62198  #
62199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62200  # It is also a way to make sure we got the proper file name for the real test later on.
62201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62202  if test "x$test_shortpath" = x; then
62203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62206  fi
62207
62208  # Call helper function which possibly converts this using DOS-style short mode.
62209  # If so, the updated path is stored in $new_path.
62210
62211  input_path="$new_path"
62212  # Check if we need to convert this using DOS-style short mode. If the path
62213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62214  # take no chances and rewrite it.
62215  # Note: m4 eats our [], so we need to use [ and ] instead.
62216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62217  if test "x$has_forbidden_chars" != x; then
62218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62222      # Going to short mode and back again did indeed matter. Since short mode is
62223      # case insensitive, let's make it lowercase to improve readability.
62224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62225      # Now convert it back to Unix-style (cygpath)
62226      input_path=`$CYGPATH -u "$shortmode_path"`
62227      new_path="$input_path"
62228    fi
62229  fi
62230
62231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62232  if test "x$test_cygdrive_prefix" = x; then
62233    # As a simple fix, exclude /usr/bin since it's not a real path.
62234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62236      # a path prefixed by /cygdrive for fixpath to work.
62237      new_path="$CYGWIN_ROOT_PATH$input_path"
62238    fi
62239  fi
62240
62241
62242  if test "x$path" != "x$new_path"; then
62243    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62246  fi
62247
62248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62249
62250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62251  has_colon=`$ECHO $path | $GREP ^.:`
62252  new_path="$path"
62253  if test "x$has_colon" = x; then
62254    # Not in mixed or Windows style, start by that.
62255    new_path=`cmd //c echo $path`
62256  fi
62257
62258
62259  input_path="$new_path"
62260  # Check if we need to convert this using DOS-style short mode. If the path
62261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62262  # take no chances and rewrite it.
62263  # Note: m4 eats our [], so we need to use [ and ] instead.
62264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62265  if test "x$has_forbidden_chars" != x; then
62266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62268  fi
62269
62270
62271  windows_path="$new_path"
62272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62273    unix_path=`$CYGPATH -u "$windows_path"`
62274    new_path="$unix_path"
62275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62277    new_path="$unix_path"
62278  fi
62279
62280  if test "x$path" != "x$new_path"; then
62281    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62284  fi
62285
62286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62288
62289    else
62290      # We're on a unix platform. Hooray! :)
62291      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62292      has_space=`$ECHO "$path" | $GREP " "`
62293      if test "x$has_space" != x; then
62294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62297      fi
62298
62299      # Use eval to expand a potential ~
62300      eval path="$path"
62301      if test ! -f "$path" && test ! -d "$path"; then
62302        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62303      fi
62304
62305      if test -d "$path"; then
62306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62307      else
62308        dir="`$DIRNAME "$path"`"
62309        base="`$BASENAME "$path"`"
62310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62311      fi
62312    fi
62313  fi
62314
62315
62316  # Only process if variable expands to non-empty
62317
62318  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62320
62321  # Input might be given as Windows format, start by converting to
62322  # unix format.
62323  path="$POTENTIAL_FREETYPE_LIB_PATH"
62324  new_path=`$CYGPATH -u "$path"`
62325
62326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62329  # "foo.exe" is OK but "foo" is an error.
62330  #
62331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62332  # It is also a way to make sure we got the proper file name for the real test later on.
62333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62334  if test "x$test_shortpath" = x; then
62335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62338  fi
62339
62340  # Call helper function which possibly converts this using DOS-style short mode.
62341  # If so, the updated path is stored in $new_path.
62342
62343  input_path="$new_path"
62344  # Check if we need to convert this using DOS-style short mode. If the path
62345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62346  # take no chances and rewrite it.
62347  # Note: m4 eats our [], so we need to use [ and ] instead.
62348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62349  if test "x$has_forbidden_chars" != x; then
62350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62354      # Going to short mode and back again did indeed matter. Since short mode is
62355      # case insensitive, let's make it lowercase to improve readability.
62356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62357      # Now convert it back to Unix-style (cygpath)
62358      input_path=`$CYGPATH -u "$shortmode_path"`
62359      new_path="$input_path"
62360    fi
62361  fi
62362
62363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62364  if test "x$test_cygdrive_prefix" = x; then
62365    # As a simple fix, exclude /usr/bin since it's not a real path.
62366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62368      # a path prefixed by /cygdrive for fixpath to work.
62369      new_path="$CYGWIN_ROOT_PATH$input_path"
62370    fi
62371  fi
62372
62373
62374  if test "x$path" != "x$new_path"; then
62375    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62378  fi
62379
62380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62381
62382  path="$POTENTIAL_FREETYPE_LIB_PATH"
62383  has_colon=`$ECHO $path | $GREP ^.:`
62384  new_path="$path"
62385  if test "x$has_colon" = x; then
62386    # Not in mixed or Windows style, start by that.
62387    new_path=`cmd //c echo $path`
62388  fi
62389
62390
62391  input_path="$new_path"
62392  # Check if we need to convert this using DOS-style short mode. If the path
62393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62394  # take no chances and rewrite it.
62395  # Note: m4 eats our [], so we need to use [ and ] instead.
62396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62397  if test "x$has_forbidden_chars" != x; then
62398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62400  fi
62401
62402
62403  windows_path="$new_path"
62404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62405    unix_path=`$CYGPATH -u "$windows_path"`
62406    new_path="$unix_path"
62407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62409    new_path="$unix_path"
62410  fi
62411
62412  if test "x$path" != "x$new_path"; then
62413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62416  fi
62417
62418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62420
62421    else
62422      # We're on a unix platform. Hooray! :)
62423      path="$POTENTIAL_FREETYPE_LIB_PATH"
62424      has_space=`$ECHO "$path" | $GREP " "`
62425      if test "x$has_space" != x; then
62426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62429      fi
62430
62431      # Use eval to expand a potential ~
62432      eval path="$path"
62433      if test ! -f "$path" && test ! -d "$path"; then
62434        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62435      fi
62436
62437      if test -d "$path"; then
62438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62439      else
62440        dir="`$DIRNAME "$path"`"
62441        base="`$BASENAME "$path"`"
62442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62443      fi
62444    fi
62445  fi
62446
62447
62448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62450$as_echo_n "checking for freetype includes... " >&6; }
62451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62455$as_echo_n "checking for freetype libraries... " >&6; }
62456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62457$as_echo "$FREETYPE_LIB_PATH" >&6; }
62458  fi
62459
62460              if test "x$FOUND_FREETYPE" != xyes; then
62461
62462  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62463  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62464  METHOD="well-known location"
62465
62466  # Let's start with an optimistic view of the world :-)
62467  FOUND_FREETYPE=yes
62468
62469  # First look for the canonical freetype main include file ft2build.h.
62470  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62471    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62472    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62473    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62474      # Fail.
62475      FOUND_FREETYPE=no
62476    fi
62477  fi
62478
62479  if test "x$FOUND_FREETYPE" = xyes; then
62480    # Include file found, let's continue the sanity check.
62481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62483
62484    # Reset to default value
62485    FREETYPE_BASE_NAME=freetype
62486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62488      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62490        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62491        # for the .6 version explicitly.
62492        FREETYPE_BASE_NAME=freetype.6
62493        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62494        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62495$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62496      else
62497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62499        FOUND_FREETYPE=no
62500      fi
62501    else
62502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62503        # On Windows, we will need both .lib and .dll file.
62504        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62507          FOUND_FREETYPE=no
62508        fi
62509      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62510          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62511        # Found lib in isa dir, use that instead.
62512        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62513        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62514$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62515      fi
62516    fi
62517  fi
62518
62519  if test "x$FOUND_FREETYPE" = xyes; then
62520
62521  # Only process if variable expands to non-empty
62522
62523  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62525
62526  # Input might be given as Windows format, start by converting to
62527  # unix format.
62528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62529  new_path=`$CYGPATH -u "$path"`
62530
62531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62534  # "foo.exe" is OK but "foo" is an error.
62535  #
62536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62537  # It is also a way to make sure we got the proper file name for the real test later on.
62538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62539  if test "x$test_shortpath" = x; then
62540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62543  fi
62544
62545  # Call helper function which possibly converts this using DOS-style short mode.
62546  # If so, the updated path is stored in $new_path.
62547
62548  input_path="$new_path"
62549  # Check if we need to convert this using DOS-style short mode. If the path
62550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62551  # take no chances and rewrite it.
62552  # Note: m4 eats our [], so we need to use [ and ] instead.
62553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62554  if test "x$has_forbidden_chars" != x; then
62555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62559      # Going to short mode and back again did indeed matter. Since short mode is
62560      # case insensitive, let's make it lowercase to improve readability.
62561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62562      # Now convert it back to Unix-style (cygpath)
62563      input_path=`$CYGPATH -u "$shortmode_path"`
62564      new_path="$input_path"
62565    fi
62566  fi
62567
62568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62569  if test "x$test_cygdrive_prefix" = x; then
62570    # As a simple fix, exclude /usr/bin since it's not a real path.
62571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62573      # a path prefixed by /cygdrive for fixpath to work.
62574      new_path="$CYGWIN_ROOT_PATH$input_path"
62575    fi
62576  fi
62577
62578
62579  if test "x$path" != "x$new_path"; then
62580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62583  fi
62584
62585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62586
62587  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62588  has_colon=`$ECHO $path | $GREP ^.:`
62589  new_path="$path"
62590  if test "x$has_colon" = x; then
62591    # Not in mixed or Windows style, start by that.
62592    new_path=`cmd //c echo $path`
62593  fi
62594
62595
62596  input_path="$new_path"
62597  # Check if we need to convert this using DOS-style short mode. If the path
62598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62599  # take no chances and rewrite it.
62600  # Note: m4 eats our [], so we need to use [ and ] instead.
62601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62602  if test "x$has_forbidden_chars" != x; then
62603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62605  fi
62606
62607
62608  windows_path="$new_path"
62609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62610    unix_path=`$CYGPATH -u "$windows_path"`
62611    new_path="$unix_path"
62612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62614    new_path="$unix_path"
62615  fi
62616
62617  if test "x$path" != "x$new_path"; then
62618    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62621  fi
62622
62623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62625
62626    else
62627      # We're on a unix platform. Hooray! :)
62628      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62629      has_space=`$ECHO "$path" | $GREP " "`
62630      if test "x$has_space" != x; then
62631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62634      fi
62635
62636      # Use eval to expand a potential ~
62637      eval path="$path"
62638      if test ! -f "$path" && test ! -d "$path"; then
62639        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62640      fi
62641
62642      if test -d "$path"; then
62643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62644      else
62645        dir="`$DIRNAME "$path"`"
62646        base="`$BASENAME "$path"`"
62647        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62648      fi
62649    fi
62650  fi
62651
62652
62653  # Only process if variable expands to non-empty
62654
62655  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62657
62658  # Input might be given as Windows format, start by converting to
62659  # unix format.
62660  path="$POTENTIAL_FREETYPE_LIB_PATH"
62661  new_path=`$CYGPATH -u "$path"`
62662
62663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62666  # "foo.exe" is OK but "foo" is an error.
62667  #
62668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62669  # It is also a way to make sure we got the proper file name for the real test later on.
62670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62671  if test "x$test_shortpath" = x; then
62672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62675  fi
62676
62677  # Call helper function which possibly converts this using DOS-style short mode.
62678  # If so, the updated path is stored in $new_path.
62679
62680  input_path="$new_path"
62681  # Check if we need to convert this using DOS-style short mode. If the path
62682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62683  # take no chances and rewrite it.
62684  # Note: m4 eats our [], so we need to use [ and ] instead.
62685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62686  if test "x$has_forbidden_chars" != x; then
62687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62691      # Going to short mode and back again did indeed matter. Since short mode is
62692      # case insensitive, let's make it lowercase to improve readability.
62693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62694      # Now convert it back to Unix-style (cygpath)
62695      input_path=`$CYGPATH -u "$shortmode_path"`
62696      new_path="$input_path"
62697    fi
62698  fi
62699
62700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62701  if test "x$test_cygdrive_prefix" = x; then
62702    # As a simple fix, exclude /usr/bin since it's not a real path.
62703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62705      # a path prefixed by /cygdrive for fixpath to work.
62706      new_path="$CYGWIN_ROOT_PATH$input_path"
62707    fi
62708  fi
62709
62710
62711  if test "x$path" != "x$new_path"; then
62712    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62715  fi
62716
62717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62718
62719  path="$POTENTIAL_FREETYPE_LIB_PATH"
62720  has_colon=`$ECHO $path | $GREP ^.:`
62721  new_path="$path"
62722  if test "x$has_colon" = x; then
62723    # Not in mixed or Windows style, start by that.
62724    new_path=`cmd //c echo $path`
62725  fi
62726
62727
62728  input_path="$new_path"
62729  # Check if we need to convert this using DOS-style short mode. If the path
62730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62731  # take no chances and rewrite it.
62732  # Note: m4 eats our [], so we need to use [ and ] instead.
62733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62734  if test "x$has_forbidden_chars" != x; then
62735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62737  fi
62738
62739
62740  windows_path="$new_path"
62741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62742    unix_path=`$CYGPATH -u "$windows_path"`
62743    new_path="$unix_path"
62744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62746    new_path="$unix_path"
62747  fi
62748
62749  if test "x$path" != "x$new_path"; then
62750    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62753  fi
62754
62755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62757
62758    else
62759      # We're on a unix platform. Hooray! :)
62760      path="$POTENTIAL_FREETYPE_LIB_PATH"
62761      has_space=`$ECHO "$path" | $GREP " "`
62762      if test "x$has_space" != x; then
62763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62766      fi
62767
62768      # Use eval to expand a potential ~
62769      eval path="$path"
62770      if test ! -f "$path" && test ! -d "$path"; then
62771        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62772      fi
62773
62774      if test -d "$path"; then
62775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62776      else
62777        dir="`$DIRNAME "$path"`"
62778        base="`$BASENAME "$path"`"
62779        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62780      fi
62781    fi
62782  fi
62783
62784
62785    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62787$as_echo_n "checking for freetype includes... " >&6; }
62788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62789$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62790    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62792$as_echo_n "checking for freetype libraries... " >&6; }
62793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62794$as_echo "$FREETYPE_LIB_PATH" >&6; }
62795  fi
62796
62797              fi
62798            fi
62799          fi
62800        fi
62801      fi # end check in well-known locations
62802
62803      if test "x$FOUND_FREETYPE" != xyes; then
62804
62805  # Print a helpful message on how to acquire the necessary build dependency.
62806  # freetype is the help tag: freetype, cups, alsa etc
62807  MISSING_DEPENDENCY=freetype
62808
62809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62810    cygwin_help $MISSING_DEPENDENCY
62811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62812    msys_help $MISSING_DEPENDENCY
62813  else
62814    PKGHANDLER_COMMAND=
62815
62816    case $PKGHANDLER in
62817      apt-get)
62818        apt_help     $MISSING_DEPENDENCY ;;
62819      yum)
62820        yum_help     $MISSING_DEPENDENCY ;;
62821      brew)
62822        brew_help    $MISSING_DEPENDENCY ;;
62823      port)
62824        port_help    $MISSING_DEPENDENCY ;;
62825      pkgutil)
62826        pkgutil_help $MISSING_DEPENDENCY ;;
62827      pkgadd)
62828        pkgadd_help  $MISSING_DEPENDENCY ;;
62829    esac
62830
62831    if test "x$PKGHANDLER_COMMAND" != x; then
62832      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62833    fi
62834  fi
62835
62836        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62837      fi
62838    fi # end user specified settings
62839
62840    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62841    if test "x$FREETYPE_CFLAGS" = x; then
62842
62843  # Only process if variable expands to non-empty
62844
62845  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62847
62848  # Input might be given as Windows format, start by converting to
62849  # unix format.
62850  path="$FREETYPE_INCLUDE_PATH"
62851  new_path=`$CYGPATH -u "$path"`
62852
62853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62856  # "foo.exe" is OK but "foo" is an error.
62857  #
62858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62859  # It is also a way to make sure we got the proper file name for the real test later on.
62860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62861  if test "x$test_shortpath" = x; then
62862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62863$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62864    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62865  fi
62866
62867  # Call helper function which possibly converts this using DOS-style short mode.
62868  # If so, the updated path is stored in $new_path.
62869
62870  input_path="$new_path"
62871  # Check if we need to convert this using DOS-style short mode. If the path
62872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62873  # take no chances and rewrite it.
62874  # Note: m4 eats our [], so we need to use [ and ] instead.
62875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62876  if test "x$has_forbidden_chars" != x; then
62877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62881      # Going to short mode and back again did indeed matter. Since short mode is
62882      # case insensitive, let's make it lowercase to improve readability.
62883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62884      # Now convert it back to Unix-style (cygpath)
62885      input_path=`$CYGPATH -u "$shortmode_path"`
62886      new_path="$input_path"
62887    fi
62888  fi
62889
62890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62891  if test "x$test_cygdrive_prefix" = x; then
62892    # As a simple fix, exclude /usr/bin since it's not a real path.
62893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62895      # a path prefixed by /cygdrive for fixpath to work.
62896      new_path="$CYGWIN_ROOT_PATH$input_path"
62897    fi
62898  fi
62899
62900
62901  if test "x$path" != "x$new_path"; then
62902    FREETYPE_INCLUDE_PATH="$new_path"
62903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62904$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62905  fi
62906
62907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62908
62909  path="$FREETYPE_INCLUDE_PATH"
62910  has_colon=`$ECHO $path | $GREP ^.:`
62911  new_path="$path"
62912  if test "x$has_colon" = x; then
62913    # Not in mixed or Windows style, start by that.
62914    new_path=`cmd //c echo $path`
62915  fi
62916
62917
62918  input_path="$new_path"
62919  # Check if we need to convert this using DOS-style short mode. If the path
62920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62921  # take no chances and rewrite it.
62922  # Note: m4 eats our [], so we need to use [ and ] instead.
62923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62924  if test "x$has_forbidden_chars" != x; then
62925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62927  fi
62928
62929
62930  windows_path="$new_path"
62931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62932    unix_path=`$CYGPATH -u "$windows_path"`
62933    new_path="$unix_path"
62934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62936    new_path="$unix_path"
62937  fi
62938
62939  if test "x$path" != "x$new_path"; then
62940    FREETYPE_INCLUDE_PATH="$new_path"
62941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62942$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62943  fi
62944
62945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62947
62948    else
62949      # We're on a unix platform. Hooray! :)
62950      path="$FREETYPE_INCLUDE_PATH"
62951      has_space=`$ECHO "$path" | $GREP " "`
62952      if test "x$has_space" != x; then
62953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62954$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62956      fi
62957
62958      # Use eval to expand a potential ~
62959      eval path="$path"
62960      if test ! -f "$path" && test ! -d "$path"; then
62961        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62962      fi
62963
62964      if test -d "$path"; then
62965        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62966      else
62967        dir="`$DIRNAME "$path"`"
62968        base="`$BASENAME "$path"`"
62969        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62970      fi
62971    fi
62972  fi
62973
62974      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62975        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62976      else
62977        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62978      fi
62979    fi
62980
62981    if test "x$FREETYPE_LIBS" = x; then
62982
62983  # Only process if variable expands to non-empty
62984
62985  if test "x$FREETYPE_LIB_PATH" != x; then
62986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62987
62988  # Input might be given as Windows format, start by converting to
62989  # unix format.
62990  path="$FREETYPE_LIB_PATH"
62991  new_path=`$CYGPATH -u "$path"`
62992
62993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62996  # "foo.exe" is OK but "foo" is an error.
62997  #
62998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62999  # It is also a way to make sure we got the proper file name for the real test later on.
63000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63001  if test "x$test_shortpath" = x; then
63002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63003$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63004    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63005  fi
63006
63007  # Call helper function which possibly converts this using DOS-style short mode.
63008  # If so, the updated path is stored in $new_path.
63009
63010  input_path="$new_path"
63011  # Check if we need to convert this using DOS-style short mode. If the path
63012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63013  # take no chances and rewrite it.
63014  # Note: m4 eats our [], so we need to use [ and ] instead.
63015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63016  if test "x$has_forbidden_chars" != x; then
63017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63021      # Going to short mode and back again did indeed matter. Since short mode is
63022      # case insensitive, let's make it lowercase to improve readability.
63023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63024      # Now convert it back to Unix-style (cygpath)
63025      input_path=`$CYGPATH -u "$shortmode_path"`
63026      new_path="$input_path"
63027    fi
63028  fi
63029
63030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63031  if test "x$test_cygdrive_prefix" = x; then
63032    # As a simple fix, exclude /usr/bin since it's not a real path.
63033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63035      # a path prefixed by /cygdrive for fixpath to work.
63036      new_path="$CYGWIN_ROOT_PATH$input_path"
63037    fi
63038  fi
63039
63040
63041  if test "x$path" != "x$new_path"; then
63042    FREETYPE_LIB_PATH="$new_path"
63043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63044$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63045  fi
63046
63047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63048
63049  path="$FREETYPE_LIB_PATH"
63050  has_colon=`$ECHO $path | $GREP ^.:`
63051  new_path="$path"
63052  if test "x$has_colon" = x; then
63053    # Not in mixed or Windows style, start by that.
63054    new_path=`cmd //c echo $path`
63055  fi
63056
63057
63058  input_path="$new_path"
63059  # Check if we need to convert this using DOS-style short mode. If the path
63060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63061  # take no chances and rewrite it.
63062  # Note: m4 eats our [], so we need to use [ and ] instead.
63063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63064  if test "x$has_forbidden_chars" != x; then
63065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63067  fi
63068
63069
63070  windows_path="$new_path"
63071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63072    unix_path=`$CYGPATH -u "$windows_path"`
63073    new_path="$unix_path"
63074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63076    new_path="$unix_path"
63077  fi
63078
63079  if test "x$path" != "x$new_path"; then
63080    FREETYPE_LIB_PATH="$new_path"
63081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63082$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63083  fi
63084
63085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63087
63088    else
63089      # We're on a unix platform. Hooray! :)
63090      path="$FREETYPE_LIB_PATH"
63091      has_space=`$ECHO "$path" | $GREP " "`
63092      if test "x$has_space" != x; then
63093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63094$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63096      fi
63097
63098      # Use eval to expand a potential ~
63099      eval path="$path"
63100      if test ! -f "$path" && test ! -d "$path"; then
63101        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63102      fi
63103
63104      if test -d "$path"; then
63105        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63106      else
63107        dir="`$DIRNAME "$path"`"
63108        base="`$BASENAME "$path"`"
63109        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63110      fi
63111    fi
63112  fi
63113
63114      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63115        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63116      else
63117        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63118      fi
63119    fi
63120
63121    # Try to compile it
63122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63123$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63124    ac_ext=cpp
63125ac_cpp='$CXXCPP $CPPFLAGS'
63126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63129
63130    PREV_CXXCFLAGS="$CXXFLAGS"
63131    PREV_LIBS="$LIBS"
63132    PREV_CXX="$CXX"
63133    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63134    LIBS="$LIBS $FREETYPE_LIBS"
63135    CXX="$FIXPATH $CXX"
63136    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63137/* end confdefs.h.  */
63138
63139          #include<ft2build.h>
63140          #include FT_FREETYPE_H
63141          int main () {
63142            FT_Init_FreeType(NULL);
63143            return 0;
63144          }
63145
63146_ACEOF
63147if ac_fn_cxx_try_link "$LINENO"; then :
63148
63149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63150$as_echo "yes" >&6; }
63151
63152else
63153
63154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63155$as_echo "no" >&6; }
63156          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63157$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63158          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63159$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63160
63161
63162  # Print a helpful message on how to acquire the necessary build dependency.
63163  # freetype is the help tag: freetype, cups, alsa etc
63164  MISSING_DEPENDENCY=freetype
63165
63166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63167    cygwin_help $MISSING_DEPENDENCY
63168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63169    msys_help $MISSING_DEPENDENCY
63170  else
63171    PKGHANDLER_COMMAND=
63172
63173    case $PKGHANDLER in
63174      apt-get)
63175        apt_help     $MISSING_DEPENDENCY ;;
63176      yum)
63177        yum_help     $MISSING_DEPENDENCY ;;
63178      brew)
63179        brew_help    $MISSING_DEPENDENCY ;;
63180      port)
63181        port_help    $MISSING_DEPENDENCY ;;
63182      pkgutil)
63183        pkgutil_help $MISSING_DEPENDENCY ;;
63184      pkgadd)
63185        pkgadd_help  $MISSING_DEPENDENCY ;;
63186    esac
63187
63188    if test "x$PKGHANDLER_COMMAND" != x; then
63189      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63190    fi
63191  fi
63192
63193
63194          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63195
63196
63197fi
63198rm -f core conftest.err conftest.$ac_objext \
63199    conftest$ac_exeext conftest.$ac_ext
63200    CXXCFLAGS="$PREV_CXXFLAGS"
63201    LIBS="$PREV_LIBS"
63202    CXX="$PREV_CXX"
63203    ac_ext=cpp
63204ac_cpp='$CXXCPP $CPPFLAGS'
63205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63208
63209
63210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63211$as_echo_n "checking if we should bundle freetype... " >&6; }
63212    if test "x$BUNDLE_FREETYPE" = xyes; then
63213      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63214    fi
63215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63216$as_echo "$BUNDLE_FREETYPE" >&6; }
63217
63218  fi # end freetype needed
63219
63220
63221
63222
63223
63224
63225
63226# Check whether --with-alsa was given.
63227if test "${with_alsa+set}" = set; then :
63228  withval=$with_alsa;
63229fi
63230
63231
63232# Check whether --with-alsa-include was given.
63233if test "${with_alsa_include+set}" = set; then :
63234  withval=$with_alsa_include;
63235fi
63236
63237
63238# Check whether --with-alsa-lib was given.
63239if test "${with_alsa_lib+set}" = set; then :
63240  withval=$with_alsa_lib;
63241fi
63242
63243
63244  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63245    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63246        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63247        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63248      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63249$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63250    fi
63251    ALSA_CFLAGS=
63252    ALSA_LIBS=
63253  else
63254    ALSA_FOUND=no
63255
63256    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63257      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63258    fi
63259
63260    if test "x${with_alsa}" != x; then
63261      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63262      ALSA_CFLAGS="-I${with_alsa}/include"
63263      ALSA_FOUND=yes
63264    fi
63265    if test "x${with_alsa_include}" != x; then
63266      ALSA_CFLAGS="-I${with_alsa_include}"
63267      ALSA_FOUND=yes
63268    fi
63269    if test "x${with_alsa_lib}" != x; then
63270      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63271      ALSA_FOUND=yes
63272    fi
63273    # Do not try pkg-config if we have a sysroot set.
63274    if test "x$SYSROOT" = x; then
63275      if test "x$ALSA_FOUND" = xno; then
63276
63277pkg_failed=no
63278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63279$as_echo_n "checking for ALSA... " >&6; }
63280
63281if test -n "$ALSA_CFLAGS"; then
63282    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63283 elif test -n "$PKG_CONFIG"; then
63284    if test -n "$PKG_CONFIG" && \
63285    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63286  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63287  ac_status=$?
63288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63289  test $ac_status = 0; }; then
63290  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63291else
63292  pkg_failed=yes
63293fi
63294 else
63295    pkg_failed=untried
63296fi
63297if test -n "$ALSA_LIBS"; then
63298    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63299 elif test -n "$PKG_CONFIG"; then
63300    if test -n "$PKG_CONFIG" && \
63301    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63302  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63303  ac_status=$?
63304  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63305  test $ac_status = 0; }; then
63306  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63307else
63308  pkg_failed=yes
63309fi
63310 else
63311    pkg_failed=untried
63312fi
63313
63314
63315
63316if test $pkg_failed = yes; then
63317
63318if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63319        _pkg_short_errors_supported=yes
63320else
63321        _pkg_short_errors_supported=no
63322fi
63323        if test $_pkg_short_errors_supported = yes; then
63324	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63325        else
63326	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63327        fi
63328	# Put the nasty error message in config.log where it belongs
63329	echo "$ALSA_PKG_ERRORS" >&5
63330
63331	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63332$as_echo "no" >&6; }
63333                ALSA_FOUND=no
63334elif test $pkg_failed = untried; then
63335	ALSA_FOUND=no
63336else
63337	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63338	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63340$as_echo "yes" >&6; }
63341	ALSA_FOUND=yes
63342fi
63343      fi
63344    fi
63345    if test "x$ALSA_FOUND" = xno; then
63346      for ac_header in alsa/asoundlib.h
63347do :
63348  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63349if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63350  cat >>confdefs.h <<_ACEOF
63351#define HAVE_ALSA_ASOUNDLIB_H 1
63352_ACEOF
63353
63354            ALSA_FOUND=yes
63355            ALSA_CFLAGS=-Iignoreme
63356            ALSA_LIBS=-lasound
63357            DEFAULT_ALSA=yes
63358
63359else
63360  ALSA_FOUND=no
63361
63362fi
63363
63364done
63365
63366    fi
63367    if test "x$ALSA_FOUND" = xno; then
63368
63369  # Print a helpful message on how to acquire the necessary build dependency.
63370  # alsa is the help tag: freetype, cups, alsa etc
63371  MISSING_DEPENDENCY=alsa
63372
63373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63374    cygwin_help $MISSING_DEPENDENCY
63375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63376    msys_help $MISSING_DEPENDENCY
63377  else
63378    PKGHANDLER_COMMAND=
63379
63380    case $PKGHANDLER in
63381      apt-get)
63382        apt_help     $MISSING_DEPENDENCY ;;
63383      yum)
63384        yum_help     $MISSING_DEPENDENCY ;;
63385      brew)
63386        brew_help    $MISSING_DEPENDENCY ;;
63387      port)
63388        port_help    $MISSING_DEPENDENCY ;;
63389      pkgutil)
63390        pkgutil_help $MISSING_DEPENDENCY ;;
63391      pkgadd)
63392        pkgadd_help  $MISSING_DEPENDENCY ;;
63393    esac
63394
63395    if test "x$PKGHANDLER_COMMAND" != x; then
63396      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63397    fi
63398  fi
63399
63400      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63401    fi
63402  fi
63403
63404
63405
63406
63407
63408
63409# Check whether --with-libffi was given.
63410if test "${with_libffi+set}" = set; then :
63411  withval=$with_libffi;
63412fi
63413
63414
63415# Check whether --with-libffi-include was given.
63416if test "${with_libffi_include+set}" = set; then :
63417  withval=$with_libffi_include;
63418fi
63419
63420
63421# Check whether --with-libffi-lib was given.
63422if test "${with_libffi_lib+set}" = set; then :
63423  withval=$with_libffi_lib;
63424fi
63425
63426  # Check whether --enable-libffi-bundling was given.
63427if test "${enable_libffi_bundling+set}" = set; then :
63428  enableval=$enable_libffi_bundling;
63429fi
63430
63431
63432  if test "x$NEEDS_LIB_FFI" = xfalse; then
63433    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63434        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63435        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63436      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63437$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63438    fi
63439    LIBFFI_CFLAGS=
63440    LIBFFI_LIBS=
63441  else
63442    LIBFFI_FOUND=no
63443
63444    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63445      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63446    fi
63447
63448    if test "x${with_libffi}" != x; then
63449      LIBFFI_LIB_PATH="${with_libffi}/lib"
63450      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63451      LIBFFI_CFLAGS="-I${with_libffi}/include"
63452      LIBFFI_FOUND=yes
63453    fi
63454    if test "x${with_libffi_include}" != x; then
63455      LIBFFI_CFLAGS="-I${with_libffi_include}"
63456      LIBFFI_FOUND=yes
63457    fi
63458    if test "x${with_libffi_lib}" != x; then
63459      LIBFFI_LIB_PATH="${with_libffi_lib}"
63460      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63461      LIBFFI_FOUND=yes
63462    fi
63463    # Do not try pkg-config if we have a sysroot set.
63464    if test "x$SYSROOT" = x; then
63465      if test "x$LIBFFI_FOUND" = xno; then
63466        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63467
63468pkg_failed=no
63469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63470$as_echo_n "checking for LIBFFI... " >&6; }
63471
63472if test -n "$LIBFFI_CFLAGS"; then
63473    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63474 elif test -n "$PKG_CONFIG"; then
63475    if test -n "$PKG_CONFIG" && \
63476    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63477  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63478  ac_status=$?
63479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63480  test $ac_status = 0; }; then
63481  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63482else
63483  pkg_failed=yes
63484fi
63485 else
63486    pkg_failed=untried
63487fi
63488if test -n "$LIBFFI_LIBS"; then
63489    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63490 elif test -n "$PKG_CONFIG"; then
63491    if test -n "$PKG_CONFIG" && \
63492    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63493  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63494  ac_status=$?
63495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63496  test $ac_status = 0; }; then
63497  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63498else
63499  pkg_failed=yes
63500fi
63501 else
63502    pkg_failed=untried
63503fi
63504
63505
63506
63507if test $pkg_failed = yes; then
63508
63509if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63510        _pkg_short_errors_supported=yes
63511else
63512        _pkg_short_errors_supported=no
63513fi
63514        if test $_pkg_short_errors_supported = yes; then
63515	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63516        else
63517	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63518        fi
63519	# Put the nasty error message in config.log where it belongs
63520	echo "$LIBFFI_PKG_ERRORS" >&5
63521
63522	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63523$as_echo "no" >&6; }
63524                LIBFFI_FOUND=no
63525elif test $pkg_failed = untried; then
63526	LIBFFI_FOUND=no
63527else
63528	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63529	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63531$as_echo "yes" >&6; }
63532	LIBFFI_FOUND=yes
63533fi
63534      fi
63535    fi
63536    if test "x$LIBFFI_FOUND" = xno; then
63537      for ac_header in ffi.h
63538do :
63539  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63540if test "x$ac_cv_header_ffi_h" = xyes; then :
63541  cat >>confdefs.h <<_ACEOF
63542#define HAVE_FFI_H 1
63543_ACEOF
63544
63545            LIBFFI_FOUND=yes
63546            LIBFFI_CFLAGS=
63547            LIBFFI_LIBS=-lffi
63548
63549else
63550  LIBFFI_FOUND=no
63551
63552fi
63553
63554done
63555
63556    fi
63557    if test "x$LIBFFI_FOUND" = xno; then
63558
63559  # Print a helpful message on how to acquire the necessary build dependency.
63560  # ffi is the help tag: freetype, cups, alsa etc
63561  MISSING_DEPENDENCY=ffi
63562
63563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63564    cygwin_help $MISSING_DEPENDENCY
63565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63566    msys_help $MISSING_DEPENDENCY
63567  else
63568    PKGHANDLER_COMMAND=
63569
63570    case $PKGHANDLER in
63571      apt-get)
63572        apt_help     $MISSING_DEPENDENCY ;;
63573      yum)
63574        yum_help     $MISSING_DEPENDENCY ;;
63575      brew)
63576        brew_help    $MISSING_DEPENDENCY ;;
63577      port)
63578        port_help    $MISSING_DEPENDENCY ;;
63579      pkgutil)
63580        pkgutil_help $MISSING_DEPENDENCY ;;
63581      pkgadd)
63582        pkgadd_help  $MISSING_DEPENDENCY ;;
63583    esac
63584
63585    if test "x$PKGHANDLER_COMMAND" != x; then
63586      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63587    fi
63588  fi
63589
63590      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63591    fi
63592
63593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63594$as_echo_n "checking if libffi works... " >&6; }
63595    ac_ext=c
63596ac_cpp='$CPP $CPPFLAGS'
63597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63599ac_compiler_gnu=$ac_cv_c_compiler_gnu
63600
63601    OLD_CFLAGS="$CFLAGS"
63602    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63603    OLD_LIBS="$LIBS"
63604    LIBS="$LIBS $LIBFFI_LIBS"
63605    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63606/* end confdefs.h.  */
63607#include <ffi.h>
63608int
63609main ()
63610{
63611
63612          ffi_call(NULL, NULL, NULL, NULL);
63613          return 0;
63614
63615  ;
63616  return 0;
63617}
63618_ACEOF
63619if ac_fn_c_try_link "$LINENO"; then :
63620  LIBFFI_WORKS=yes
63621else
63622  LIBFFI_WORKS=no
63623
63624fi
63625rm -f core conftest.err conftest.$ac_objext \
63626    conftest$ac_exeext conftest.$ac_ext
63627    CFLAGS="$OLD_CFLAGS"
63628    LIBS="$OLD_LIBS"
63629    ac_ext=cpp
63630ac_cpp='$CXXCPP $CPPFLAGS'
63631ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63632ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63633ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63634
63635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63636$as_echo "$LIBFFI_WORKS" >&6; }
63637
63638    if test "x$LIBFFI_WORKS" = xno; then
63639
63640  # Print a helpful message on how to acquire the necessary build dependency.
63641  # ffi is the help tag: freetype, cups, alsa etc
63642  MISSING_DEPENDENCY=ffi
63643
63644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63645    cygwin_help $MISSING_DEPENDENCY
63646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63647    msys_help $MISSING_DEPENDENCY
63648  else
63649    PKGHANDLER_COMMAND=
63650
63651    case $PKGHANDLER in
63652      apt-get)
63653        apt_help     $MISSING_DEPENDENCY ;;
63654      yum)
63655        yum_help     $MISSING_DEPENDENCY ;;
63656      brew)
63657        brew_help    $MISSING_DEPENDENCY ;;
63658      port)
63659        port_help    $MISSING_DEPENDENCY ;;
63660      pkgutil)
63661        pkgutil_help $MISSING_DEPENDENCY ;;
63662      pkgadd)
63663        pkgadd_help  $MISSING_DEPENDENCY ;;
63664    esac
63665
63666    if test "x$PKGHANDLER_COMMAND" != x; then
63667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63668    fi
63669  fi
63670
63671      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63672    fi
63673
63674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63675$as_echo_n "checking if libffi should be bundled... " >&6; }
63676    if test "x$enable_libffi_bundling" = "x"; then
63677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63678$as_echo "no" >&6; }
63679      ENABLE_LIBFFI_BUNDLING=false
63680    elif  test "x$enable_libffi_bundling" = "xno"; then
63681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63682$as_echo "no, forced" >&6; }
63683      ENABLE_LIBFFI_BUNDLING=false
63684    elif  test "x$enable_libffi_bundling" = "xyes"; then
63685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63686$as_echo "yes, forced" >&6; }
63687      ENABLE_LIBFFI_BUNDLING=true
63688    else
63689      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63690    fi
63691
63692    # Find the libffi.so.X to bundle
63693    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63695$as_echo_n "checking for libffi lib file location... " >&6; }
63696      if test "x${LIBFFI_LIB_PATH}" != x; then
63697        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63698          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63699        else
63700          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63701        fi
63702      else
63703        # If we don't have an explicit path, look in a few obvious places
63704        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63705          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63706            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63707          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63708            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63709          else
63710            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63711          fi
63712        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63713          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63714            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63715          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63716            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63717          else
63718            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63719          fi
63720        else
63721          # Fallback on the default /usr/lib dir
63722          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63723            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63724          else
63725            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63726          fi
63727        fi
63728      fi
63729      # Make sure the wildcard is evaluated
63730      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63732$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63733    fi
63734  fi
63735
63736
63737
63738
63739
63740
63741
63742  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63743    # Extract the first word of "llvm-config", so it can be a program name with args.
63744set dummy llvm-config; ac_word=$2
63745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63746$as_echo_n "checking for $ac_word... " >&6; }
63747if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63748  $as_echo_n "(cached) " >&6
63749else
63750  if test -n "$LLVM_CONFIG"; then
63751  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63752else
63753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63754for as_dir in $PATH
63755do
63756  IFS=$as_save_IFS
63757  test -z "$as_dir" && as_dir=.
63758    for ac_exec_ext in '' $ac_executable_extensions; do
63759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63760    ac_cv_prog_LLVM_CONFIG="llvm-config"
63761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63762    break 2
63763  fi
63764done
63765  done
63766IFS=$as_save_IFS
63767
63768fi
63769fi
63770LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63771if test -n "$LLVM_CONFIG"; then
63772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63773$as_echo "$LLVM_CONFIG" >&6; }
63774else
63775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63776$as_echo "no" >&6; }
63777fi
63778
63779
63780
63781    if test "x$LLVM_CONFIG" != xllvm-config; then
63782      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63783    fi
63784
63785    llvm_components="jit mcjit engine nativecodegen native"
63786    unset LLVM_CFLAGS
63787    for flag in $("$LLVM_CONFIG" --cxxflags); do
63788      if echo "${flag}" | grep -q '^-[ID]'; then
63789        if test "${flag}" != "-D_DEBUG" ; then
63790          if test "${LLVM_CFLAGS}" != "" ; then
63791            LLVM_CFLAGS="${LLVM_CFLAGS} "
63792          fi
63793          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63794        fi
63795      fi
63796    done
63797    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63798    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63799
63800    unset LLVM_LDFLAGS
63801    for flag in $("${LLVM_CONFIG}" --ldflags); do
63802      if echo "${flag}" | grep -q '^-L'; then
63803        if test "${LLVM_LDFLAGS}" != ""; then
63804          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63805        fi
63806        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63807      fi
63808    done
63809
63810    unset LLVM_LIBS
63811    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63812      if echo "${flag}" | grep -q '^-l'; then
63813        if test "${LLVM_LIBS}" != ""; then
63814          LLVM_LIBS="${LLVM_LIBS} "
63815        fi
63816        LLVM_LIBS="${LLVM_LIBS}${flag}"
63817      fi
63818    done
63819
63820    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63821    # always properly detect -ltinfo
63822    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63823
63824
63825
63826
63827  fi
63828
63829
63830
63831# Check whether --with-libjpeg was given.
63832if test "${with_libjpeg+set}" = set; then :
63833  withval=$with_libjpeg;
63834fi
63835
63836
63837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63838$as_echo_n "checking for which libjpeg to use... " >&6; }
63839  # default is bundled
63840  DEFAULT_LIBJPEG=bundled
63841  # if user didn't specify, use DEFAULT_LIBJPEG
63842  if test "x${with_libjpeg}" = "x"; then
63843    with_libjpeg=${DEFAULT_LIBJPEG}
63844  fi
63845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63846$as_echo "${with_libjpeg}" >&6; }
63847
63848  if test "x${with_libjpeg}" = "xbundled"; then
63849    USE_EXTERNAL_LIBJPEG=false
63850  elif test "x${with_libjpeg}" = "xsystem"; then
63851    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63852if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63853
63854else
63855   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63856fi
63857
63858
63859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63860$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63861if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63862  $as_echo_n "(cached) " >&6
63863else
63864  ac_check_lib_save_LIBS=$LIBS
63865LIBS="-ljpeg  $LIBS"
63866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63867/* end confdefs.h.  */
63868
63869/* Override any GCC internal prototype to avoid an error.
63870   Use char because int might match the return type of a GCC
63871   builtin and then its argument prototype would still apply.  */
63872#ifdef __cplusplus
63873extern "C"
63874#endif
63875char jpeg_CreateDecompress ();
63876int
63877main ()
63878{
63879return jpeg_CreateDecompress ();
63880  ;
63881  return 0;
63882}
63883_ACEOF
63884if ac_fn_cxx_try_link "$LINENO"; then :
63885  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63886else
63887  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63888fi
63889rm -f core conftest.err conftest.$ac_objext \
63890    conftest$ac_exeext conftest.$ac_ext
63891LIBS=$ac_check_lib_save_LIBS
63892fi
63893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63894$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63895if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63896  cat >>confdefs.h <<_ACEOF
63897#define HAVE_LIBJPEG 1
63898_ACEOF
63899
63900  LIBS="-ljpeg $LIBS"
63901
63902else
63903   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63904fi
63905
63906
63907    USE_EXTERNAL_LIBJPEG=true
63908  else
63909    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63910  fi
63911
63912
63913
63914
63915
63916# Check whether --with-giflib was given.
63917if test "${with_giflib+set}" = set; then :
63918  withval=$with_giflib;
63919fi
63920
63921
63922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63923$as_echo_n "checking for which giflib to use... " >&6; }
63924  # default is bundled
63925  DEFAULT_GIFLIB=bundled
63926  # if user didn't specify, use DEFAULT_GIFLIB
63927  if test "x${with_giflib}" = "x"; then
63928    with_giflib=${DEFAULT_GIFLIB}
63929  fi
63930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63931$as_echo "${with_giflib}" >&6; }
63932
63933  if test "x${with_giflib}" = "xbundled"; then
63934    USE_EXTERNAL_LIBGIF=false
63935  elif test "x${with_giflib}" = "xsystem"; then
63936    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63937if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63938
63939else
63940   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63941fi
63942
63943
63944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63945$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63946if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63947  $as_echo_n "(cached) " >&6
63948else
63949  ac_check_lib_save_LIBS=$LIBS
63950LIBS="-lgif  $LIBS"
63951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63952/* end confdefs.h.  */
63953
63954/* Override any GCC internal prototype to avoid an error.
63955   Use char because int might match the return type of a GCC
63956   builtin and then its argument prototype would still apply.  */
63957#ifdef __cplusplus
63958extern "C"
63959#endif
63960char DGifGetCode ();
63961int
63962main ()
63963{
63964return DGifGetCode ();
63965  ;
63966  return 0;
63967}
63968_ACEOF
63969if ac_fn_cxx_try_link "$LINENO"; then :
63970  ac_cv_lib_gif_DGifGetCode=yes
63971else
63972  ac_cv_lib_gif_DGifGetCode=no
63973fi
63974rm -f core conftest.err conftest.$ac_objext \
63975    conftest$ac_exeext conftest.$ac_ext
63976LIBS=$ac_check_lib_save_LIBS
63977fi
63978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63979$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63980if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63981  cat >>confdefs.h <<_ACEOF
63982#define HAVE_LIBGIF 1
63983_ACEOF
63984
63985  LIBS="-lgif $LIBS"
63986
63987else
63988   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63989fi
63990
63991
63992    USE_EXTERNAL_LIBGIF=true
63993  else
63994    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63995  fi
63996
63997
63998
63999
64000
64001# Check whether --with-libpng was given.
64002if test "${with_libpng+set}" = set; then :
64003  withval=$with_libpng;
64004fi
64005
64006
64007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64008$as_echo_n "checking for which libpng to use... " >&6; }
64009
64010  # default is bundled
64011  DEFAULT_LIBPNG=bundled
64012  # if user didn't specify, use DEFAULT_LIBPNG
64013  if test "x${with_libpng}" = "x"; then
64014    with_libpng=${DEFAULT_LIBPNG}
64015  fi
64016
64017  if test "x${with_libpng}" = "xbundled"; then
64018    USE_EXTERNAL_LIBPNG=false
64019    PNG_CFLAGS=""
64020    PNG_LIBS=""
64021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64022$as_echo "bundled" >&6; }
64023  elif test "x${with_libpng}" = "xsystem"; then
64024
64025pkg_failed=no
64026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64027$as_echo_n "checking for PNG... " >&6; }
64028
64029if test -n "$PNG_CFLAGS"; then
64030    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64031 elif test -n "$PKG_CONFIG"; then
64032    if test -n "$PKG_CONFIG" && \
64033    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64034  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64035  ac_status=$?
64036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64037  test $ac_status = 0; }; then
64038  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64039else
64040  pkg_failed=yes
64041fi
64042 else
64043    pkg_failed=untried
64044fi
64045if test -n "$PNG_LIBS"; then
64046    pkg_cv_PNG_LIBS="$PNG_LIBS"
64047 elif test -n "$PKG_CONFIG"; then
64048    if test -n "$PKG_CONFIG" && \
64049    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64050  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64051  ac_status=$?
64052  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64053  test $ac_status = 0; }; then
64054  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64055else
64056  pkg_failed=yes
64057fi
64058 else
64059    pkg_failed=untried
64060fi
64061
64062
64063
64064if test $pkg_failed = yes; then
64065
64066if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64067        _pkg_short_errors_supported=yes
64068else
64069        _pkg_short_errors_supported=no
64070fi
64071        if test $_pkg_short_errors_supported = yes; then
64072	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64073        else
64074	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64075        fi
64076	# Put the nasty error message in config.log where it belongs
64077	echo "$PNG_PKG_ERRORS" >&5
64078
64079	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64080$as_echo "no" >&6; }
64081                LIBPNG_FOUND=no
64082elif test $pkg_failed = untried; then
64083	LIBPNG_FOUND=no
64084else
64085	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64086	PNG_LIBS=$pkg_cv_PNG_LIBS
64087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64088$as_echo "yes" >&6; }
64089	LIBPNG_FOUND=yes
64090fi
64091    if test "x${LIBPNG_FOUND}" = "xyes"; then
64092      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64093      USE_EXTERNAL_LIBPNG=true
64094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64095$as_echo "system" >&6; }
64096    else
64097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64098$as_echo "system not found" >&6; }
64099      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64100    fi
64101  else
64102    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64103  fi
64104
64105
64106
64107
64108
64109
64110
64111# Check whether --with-zlib was given.
64112if test "${with_zlib+set}" = set; then :
64113  withval=$with_zlib;
64114fi
64115
64116
64117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64118$as_echo_n "checking for compress in -lz... " >&6; }
64119if ${ac_cv_lib_z_compress+:} false; then :
64120  $as_echo_n "(cached) " >&6
64121else
64122  ac_check_lib_save_LIBS=$LIBS
64123LIBS="-lz  $LIBS"
64124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64125/* end confdefs.h.  */
64126
64127/* Override any GCC internal prototype to avoid an error.
64128   Use char because int might match the return type of a GCC
64129   builtin and then its argument prototype would still apply.  */
64130#ifdef __cplusplus
64131extern "C"
64132#endif
64133char compress ();
64134int
64135main ()
64136{
64137return compress ();
64138  ;
64139  return 0;
64140}
64141_ACEOF
64142if ac_fn_cxx_try_link "$LINENO"; then :
64143  ac_cv_lib_z_compress=yes
64144else
64145  ac_cv_lib_z_compress=no
64146fi
64147rm -f core conftest.err conftest.$ac_objext \
64148    conftest$ac_exeext conftest.$ac_ext
64149LIBS=$ac_check_lib_save_LIBS
64150fi
64151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64152$as_echo "$ac_cv_lib_z_compress" >&6; }
64153if test "x$ac_cv_lib_z_compress" = xyes; then :
64154   ZLIB_FOUND=yes
64155else
64156   ZLIB_FOUND=no
64157fi
64158
64159
64160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64161$as_echo_n "checking for which zlib to use... " >&6; }
64162
64163  DEFAULT_ZLIB=system
64164  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64165    # On windows default is bundled...on others default is system
64166    DEFAULT_ZLIB=bundled
64167  fi
64168
64169  if test "x${ZLIB_FOUND}" != "xyes"; then
64170    # If we don't find any system...set default to bundled
64171    DEFAULT_ZLIB=bundled
64172  fi
64173
64174  # If user didn't specify, use DEFAULT_ZLIB
64175  if test "x${with_zlib}" = "x"; then
64176    with_zlib=${DEFAULT_ZLIB}
64177  fi
64178
64179  if test "x${with_zlib}" = "xbundled"; then
64180    USE_EXTERNAL_LIBZ=false
64181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64182$as_echo "bundled" >&6; }
64183  elif test "x${with_zlib}" = "xsystem"; then
64184    if test "x${ZLIB_FOUND}" = "xyes"; then
64185      USE_EXTERNAL_LIBZ=true
64186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64187$as_echo "system" >&6; }
64188    else
64189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64190$as_echo "system not found" >&6; }
64191      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64192    fi
64193  else
64194    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64195  fi
64196
64197
64198
64199
64200
64201# Check whether --with-lcms was given.
64202if test "${with_lcms+set}" = set; then :
64203  withval=$with_lcms;
64204fi
64205
64206
64207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64208$as_echo_n "checking for which lcms to use... " >&6; }
64209
64210  DEFAULT_LCMS=bundled
64211  # If user didn't specify, use DEFAULT_LCMS
64212  if test "x${with_lcms}" = "x"; then
64213    with_lcms=${DEFAULT_LCMS}
64214  fi
64215
64216  if test "x${with_lcms}" = "xbundled"; then
64217    USE_EXTERNAL_LCMS=false
64218    LCMS_CFLAGS=""
64219    LCMS_LIBS=""
64220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64221$as_echo "bundled" >&6; }
64222  elif test "x${with_lcms}" = "xsystem"; then
64223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64224$as_echo "system" >&6; }
64225
64226pkg_failed=no
64227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64228$as_echo_n "checking for LCMS... " >&6; }
64229
64230if test -n "$LCMS_CFLAGS"; then
64231    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64232 elif test -n "$PKG_CONFIG"; then
64233    if test -n "$PKG_CONFIG" && \
64234    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64235  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64236  ac_status=$?
64237  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64238  test $ac_status = 0; }; then
64239  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64240else
64241  pkg_failed=yes
64242fi
64243 else
64244    pkg_failed=untried
64245fi
64246if test -n "$LCMS_LIBS"; then
64247    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64248 elif test -n "$PKG_CONFIG"; then
64249    if test -n "$PKG_CONFIG" && \
64250    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64251  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64252  ac_status=$?
64253  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64254  test $ac_status = 0; }; then
64255  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64256else
64257  pkg_failed=yes
64258fi
64259 else
64260    pkg_failed=untried
64261fi
64262
64263
64264
64265if test $pkg_failed = yes; then
64266
64267if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64268        _pkg_short_errors_supported=yes
64269else
64270        _pkg_short_errors_supported=no
64271fi
64272        if test $_pkg_short_errors_supported = yes; then
64273	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64274        else
64275	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64276        fi
64277	# Put the nasty error message in config.log where it belongs
64278	echo "$LCMS_PKG_ERRORS" >&5
64279
64280	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64281$as_echo "no" >&6; }
64282                LCMS_FOUND=no
64283elif test $pkg_failed = untried; then
64284	LCMS_FOUND=no
64285else
64286	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64287	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64289$as_echo "yes" >&6; }
64290	LCMS_FOUND=yes
64291fi
64292    if test "x${LCMS_FOUND}" = "xyes"; then
64293      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64294      USE_EXTERNAL_LCMS=true
64295    else
64296      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64297    fi
64298  else
64299    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64300  fi
64301
64302
64303
64304
64305
64306
64307
64308
64309
64310
64311
64312
64313
64314  # Setup libm (the maths library)
64315  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64317$as_echo_n "checking for cos in -lm... " >&6; }
64318if ${ac_cv_lib_m_cos+:} false; then :
64319  $as_echo_n "(cached) " >&6
64320else
64321  ac_check_lib_save_LIBS=$LIBS
64322LIBS="-lm  $LIBS"
64323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64324/* end confdefs.h.  */
64325
64326/* Override any GCC internal prototype to avoid an error.
64327   Use char because int might match the return type of a GCC
64328   builtin and then its argument prototype would still apply.  */
64329#ifdef __cplusplus
64330extern "C"
64331#endif
64332char cos ();
64333int
64334main ()
64335{
64336return cos ();
64337  ;
64338  return 0;
64339}
64340_ACEOF
64341if ac_fn_cxx_try_link "$LINENO"; then :
64342  ac_cv_lib_m_cos=yes
64343else
64344  ac_cv_lib_m_cos=no
64345fi
64346rm -f core conftest.err conftest.$ac_objext \
64347    conftest$ac_exeext conftest.$ac_ext
64348LIBS=$ac_check_lib_save_LIBS
64349fi
64350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64351$as_echo "$ac_cv_lib_m_cos" >&6; }
64352if test "x$ac_cv_lib_m_cos" = xyes; then :
64353  cat >>confdefs.h <<_ACEOF
64354#define HAVE_LIBM 1
64355_ACEOF
64356
64357  LIBS="-lm $LIBS"
64358
64359else
64360
64361        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64362$as_echo "$as_me: Maths library was not found" >&6;}
64363
64364fi
64365
64366    LIBM="-lm"
64367  else
64368    LIBM=""
64369  fi
64370
64371
64372  # Setup libdl (for dynamic library loading)
64373  save_LIBS="$LIBS"
64374  LIBS=""
64375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64376$as_echo_n "checking for dlopen in -ldl... " >&6; }
64377if ${ac_cv_lib_dl_dlopen+:} false; then :
64378  $as_echo_n "(cached) " >&6
64379else
64380  ac_check_lib_save_LIBS=$LIBS
64381LIBS="-ldl  $LIBS"
64382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64383/* end confdefs.h.  */
64384
64385/* Override any GCC internal prototype to avoid an error.
64386   Use char because int might match the return type of a GCC
64387   builtin and then its argument prototype would still apply.  */
64388#ifdef __cplusplus
64389extern "C"
64390#endif
64391char dlopen ();
64392int
64393main ()
64394{
64395return dlopen ();
64396  ;
64397  return 0;
64398}
64399_ACEOF
64400if ac_fn_cxx_try_link "$LINENO"; then :
64401  ac_cv_lib_dl_dlopen=yes
64402else
64403  ac_cv_lib_dl_dlopen=no
64404fi
64405rm -f core conftest.err conftest.$ac_objext \
64406    conftest$ac_exeext conftest.$ac_ext
64407LIBS=$ac_check_lib_save_LIBS
64408fi
64409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64410$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64411if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64412  cat >>confdefs.h <<_ACEOF
64413#define HAVE_LIBDL 1
64414_ACEOF
64415
64416  LIBS="-ldl $LIBS"
64417
64418fi
64419
64420  LIBDL="$LIBS"
64421
64422  LIBS="$save_LIBS"
64423
64424  # Deprecated libraries, keep the flags for backwards compatibility
64425  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64426
64427
64428# Check whether --with-dxsdk was given.
64429if test "${with_dxsdk+set}" = set; then :
64430  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64431$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64432fi
64433
64434
64435
64436
64437# Check whether --with-dxsdk-lib was given.
64438if test "${with_dxsdk_lib+set}" = set; then :
64439  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64440$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64441fi
64442
64443
64444
64445
64446# Check whether --with-dxsdk-include was given.
64447if test "${with_dxsdk_include+set}" = set; then :
64448  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64449$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64450fi
64451
64452
64453  fi
64454
64455  # Control if libzip can use mmap. Available for purposes of overriding.
64456  LIBZIP_CAN_USE_MMAP=true
64457
64458
64459
64460  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64461    # Find the root of the Solaris Studio installation from the compiler path
64462    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64463    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64465$as_echo_n "checking for libstlport.so.1... " >&6; }
64466    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64467      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64468      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64469    fi
64470    if test -f "$STLPORT_LIB"; then
64471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64472$as_echo "yes, $STLPORT_LIB" >&6; }
64473
64474  # Only process if variable expands to non-empty
64475
64476  if test "x$STLPORT_LIB" != x; then
64477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64478
64479  # Input might be given as Windows format, start by converting to
64480  # unix format.
64481  path="$STLPORT_LIB"
64482  new_path=`$CYGPATH -u "$path"`
64483
64484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64487  # "foo.exe" is OK but "foo" is an error.
64488  #
64489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64490  # It is also a way to make sure we got the proper file name for the real test later on.
64491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64492  if test "x$test_shortpath" = x; then
64493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64494$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64495    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64496  fi
64497
64498  # Call helper function which possibly converts this using DOS-style short mode.
64499  # If so, the updated path is stored in $new_path.
64500
64501  input_path="$new_path"
64502  # Check if we need to convert this using DOS-style short mode. If the path
64503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64504  # take no chances and rewrite it.
64505  # Note: m4 eats our [], so we need to use [ and ] instead.
64506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64507  if test "x$has_forbidden_chars" != x; then
64508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64512      # Going to short mode and back again did indeed matter. Since short mode is
64513      # case insensitive, let's make it lowercase to improve readability.
64514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64515      # Now convert it back to Unix-style (cygpath)
64516      input_path=`$CYGPATH -u "$shortmode_path"`
64517      new_path="$input_path"
64518    fi
64519  fi
64520
64521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64522  if test "x$test_cygdrive_prefix" = x; then
64523    # As a simple fix, exclude /usr/bin since it's not a real path.
64524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64526      # a path prefixed by /cygdrive for fixpath to work.
64527      new_path="$CYGWIN_ROOT_PATH$input_path"
64528    fi
64529  fi
64530
64531
64532  if test "x$path" != "x$new_path"; then
64533    STLPORT_LIB="$new_path"
64534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64535$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64536  fi
64537
64538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64539
64540  path="$STLPORT_LIB"
64541  has_colon=`$ECHO $path | $GREP ^.:`
64542  new_path="$path"
64543  if test "x$has_colon" = x; then
64544    # Not in mixed or Windows style, start by that.
64545    new_path=`cmd //c echo $path`
64546  fi
64547
64548
64549  input_path="$new_path"
64550  # Check if we need to convert this using DOS-style short mode. If the path
64551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64552  # take no chances and rewrite it.
64553  # Note: m4 eats our [], so we need to use [ and ] instead.
64554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64555  if test "x$has_forbidden_chars" != x; then
64556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64558  fi
64559
64560
64561  windows_path="$new_path"
64562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64563    unix_path=`$CYGPATH -u "$windows_path"`
64564    new_path="$unix_path"
64565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64567    new_path="$unix_path"
64568  fi
64569
64570  if test "x$path" != "x$new_path"; then
64571    STLPORT_LIB="$new_path"
64572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64573$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64574  fi
64575
64576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64578
64579    else
64580      # We're on a unix platform. Hooray! :)
64581      path="$STLPORT_LIB"
64582      has_space=`$ECHO "$path" | $GREP " "`
64583      if test "x$has_space" != x; then
64584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64585$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64587      fi
64588
64589      # Use eval to expand a potential ~
64590      eval path="$path"
64591      if test ! -f "$path" && test ! -d "$path"; then
64592        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64593      fi
64594
64595      if test -d "$path"; then
64596        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64597      else
64598        dir="`$DIRNAME "$path"`"
64599        base="`$BASENAME "$path"`"
64600        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64601      fi
64602    fi
64603  fi
64604
64605    else
64606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64607$as_echo "no, not found at $STLPORT_LIB" >&6; }
64608      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64609    fi
64610
64611  fi
64612
64613
64614
64615# Check whether --with-libelf was given.
64616if test "${with_libelf+set}" = set; then :
64617  withval=$with_libelf;
64618fi
64619
64620
64621# Check whether --with-libelf-include was given.
64622if test "${with_libelf_include+set}" = set; then :
64623  withval=$with_libelf_include;
64624fi
64625
64626
64627# Check whether --with-libelf-lib was given.
64628if test "${with_libelf_lib+set}" = set; then :
64629  withval=$with_libelf_lib;
64630fi
64631
64632
64633  if test "x$ENABLE_AOT" = xfalse; then
64634    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64635        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64636        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64637      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64638$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64639    fi
64640    LIBELF_CFLAGS=
64641    LIBELF_LIBS=
64642  else
64643    LIBELF_FOUND=no
64644
64645    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64646      ENABLE_AOT="false"
64647      if test "x${enable_aot}" = xyes; then
64648        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64649      fi
64650    else
64651      if test "x${with_libelf}" != x; then
64652        ELF_LIBS="-L${with_libelf}/lib -lelf"
64653        ELF_CFLAGS="-I${with_libelf}/include"
64654        LIBELF_FOUND=yes
64655      fi
64656      if test "x${with_libelf_include}" != x; then
64657        ELF_CFLAGS="-I${with_libelf_include}"
64658        LIBELF_FOUND=yes
64659      fi
64660      if test "x${with_libelf_lib}" != x; then
64661        ELF_LIBS="-L${with_libelf_lib} -lelf"
64662        LIBELF_FOUND=yes
64663      fi
64664      # Do not try pkg-config if we have a sysroot set.
64665      if test "x$SYSROOT" = x; then
64666        if test "x$LIBELF_FOUND" = xno; then
64667          # Figure out ELF_CFLAGS and ELF_LIBS
64668
64669pkg_failed=no
64670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64671$as_echo_n "checking for ELF... " >&6; }
64672
64673if test -n "$ELF_CFLAGS"; then
64674    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64675 elif test -n "$PKG_CONFIG"; then
64676    if test -n "$PKG_CONFIG" && \
64677    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64678  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64679  ac_status=$?
64680  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64681  test $ac_status = 0; }; then
64682  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64683else
64684  pkg_failed=yes
64685fi
64686 else
64687    pkg_failed=untried
64688fi
64689if test -n "$ELF_LIBS"; then
64690    pkg_cv_ELF_LIBS="$ELF_LIBS"
64691 elif test -n "$PKG_CONFIG"; then
64692    if test -n "$PKG_CONFIG" && \
64693    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64694  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64695  ac_status=$?
64696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64697  test $ac_status = 0; }; then
64698  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64699else
64700  pkg_failed=yes
64701fi
64702 else
64703    pkg_failed=untried
64704fi
64705
64706
64707
64708if test $pkg_failed = yes; then
64709
64710if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64711        _pkg_short_errors_supported=yes
64712else
64713        _pkg_short_errors_supported=no
64714fi
64715        if test $_pkg_short_errors_supported = yes; then
64716	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64717        else
64718	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64719        fi
64720	# Put the nasty error message in config.log where it belongs
64721	echo "$ELF_PKG_ERRORS" >&5
64722
64723	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64724$as_echo "no" >&6; }
64725                LIBELF_FOUND=no
64726elif test $pkg_failed = untried; then
64727	LIBELF_FOUND=no
64728else
64729	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64730	ELF_LIBS=$pkg_cv_ELF_LIBS
64731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64732$as_echo "yes" >&6; }
64733	LIBELF_FOUND=yes
64734fi
64735        fi
64736      fi
64737      if test "x$LIBELF_FOUND" = xno; then
64738        for ac_header in libelf.h
64739do :
64740  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64741if test "x$ac_cv_header_libelf_h" = xyes; then :
64742  cat >>confdefs.h <<_ACEOF
64743#define HAVE_LIBELF_H 1
64744_ACEOF
64745
64746              LIBELF_FOUND=yes
64747              ELF_CFLAGS=
64748              ELF_LIBS=-lelf
64749
64750else
64751  LIBELF_FOUND=no
64752
64753fi
64754
64755done
64756
64757      fi
64758      if test "x$LIBELF_FOUND" = xno; then
64759        ENABLE_AOT="false"
64760
64761  # Print a helpful message on how to acquire the necessary build dependency.
64762  # elf is the help tag: freetype, cups, alsa etc
64763  MISSING_DEPENDENCY=elf
64764
64765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64766    cygwin_help $MISSING_DEPENDENCY
64767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64768    msys_help $MISSING_DEPENDENCY
64769  else
64770    PKGHANDLER_COMMAND=
64771
64772    case $PKGHANDLER in
64773      apt-get)
64774        apt_help     $MISSING_DEPENDENCY ;;
64775      yum)
64776        yum_help     $MISSING_DEPENDENCY ;;
64777      brew)
64778        brew_help    $MISSING_DEPENDENCY ;;
64779      port)
64780        port_help    $MISSING_DEPENDENCY ;;
64781      pkgutil)
64782        pkgutil_help $MISSING_DEPENDENCY ;;
64783      pkgadd)
64784        pkgadd_help  $MISSING_DEPENDENCY ;;
64785    esac
64786
64787    if test "x$PKGHANDLER_COMMAND" != x; then
64788      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64789    fi
64790  fi
64791
64792        if test "x${enable_aot}" = xyes; then
64793          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64794        else
64795          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64796$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64797        fi
64798      else
64799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64800$as_echo_n "checking if libelf works... " >&6; }
64801        ac_ext=c
64802ac_cpp='$CPP $CPPFLAGS'
64803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64805ac_compiler_gnu=$ac_cv_c_compiler_gnu
64806
64807        OLD_CFLAGS="$CFLAGS"
64808        CFLAGS="$CFLAGS $ELF_CFLAGS"
64809        OLD_LIBS="$LIBS"
64810        LIBS="$LIBS $ELF_LIBS"
64811        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64812/* end confdefs.h.  */
64813#include <libelf.h>
64814int
64815main ()
64816{
64817
64818              elf_version(0);
64819              return 0;
64820
64821  ;
64822  return 0;
64823}
64824_ACEOF
64825if ac_fn_c_try_link "$LINENO"; then :
64826  LIBELF_WORKS=yes
64827else
64828  LIBELF_WORKS=no
64829
64830fi
64831rm -f core conftest.err conftest.$ac_objext \
64832    conftest$ac_exeext conftest.$ac_ext
64833        CFLAGS="$OLD_CFLAGS"
64834        LIBS="$OLD_LIBS"
64835        ac_ext=cpp
64836ac_cpp='$CXXCPP $CPPFLAGS'
64837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64840
64841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64842$as_echo "$LIBELF_WORKS" >&6; }
64843
64844        if test "x$LIBELF_WORKS" = xno; then
64845          ENABLE_AOT="false"
64846
64847  # Print a helpful message on how to acquire the necessary build dependency.
64848  # elf is the help tag: freetype, cups, alsa etc
64849  MISSING_DEPENDENCY=elf
64850
64851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64852    cygwin_help $MISSING_DEPENDENCY
64853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64854    msys_help $MISSING_DEPENDENCY
64855  else
64856    PKGHANDLER_COMMAND=
64857
64858    case $PKGHANDLER in
64859      apt-get)
64860        apt_help     $MISSING_DEPENDENCY ;;
64861      yum)
64862        yum_help     $MISSING_DEPENDENCY ;;
64863      brew)
64864        brew_help    $MISSING_DEPENDENCY ;;
64865      port)
64866        port_help    $MISSING_DEPENDENCY ;;
64867      pkgutil)
64868        pkgutil_help $MISSING_DEPENDENCY ;;
64869      pkgadd)
64870        pkgadd_help  $MISSING_DEPENDENCY ;;
64871    esac
64872
64873    if test "x$PKGHANDLER_COMMAND" != x; then
64874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64875    fi
64876  fi
64877
64878          if test "x$enable_aot" = "xyes"; then
64879            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64880          else
64881            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64882$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64883          fi
64884        fi
64885      fi
64886    fi
64887  fi
64888
64889
64890
64891
64892
64893
64894
64895
64896
64897
64898
64899
64900
64901
64902
64903
64904
64905
64906# Hotspot setup depends on lib checks (AOT needs libelf).
64907
64908
64909  # The user can in some cases supply additional jvm features. For the custom
64910  # variant, this defines the entire variant.
64911
64912# Check whether --with-jvm-features was given.
64913if test "${with_jvm_features+set}" = set; then :
64914  withval=$with_jvm_features;
64915fi
64916
64917  if test "x$with_jvm_features" != x; then
64918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64919$as_echo_n "checking additional JVM features... " >&6; }
64920    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64922$as_echo "$JVM_FEATURES" >&6; }
64923  fi
64924
64925  # Override hotspot cpu definitions for ARM platforms
64926  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64927    HOTSPOT_TARGET_CPU=arm_32
64928    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64929    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64930    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64931  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64932    HOTSPOT_TARGET_CPU=arm_64
64933    HOTSPOT_TARGET_CPU_ARCH=arm
64934    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64935    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64936  fi
64937
64938  # Verify that dependencies are met for explicitly set features.
64939  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64940    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64941  fi
64942
64943  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64944    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64945  fi
64946
64947  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64948    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64949  fi
64950
64951  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64952    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64953  fi
64954
64955  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64956    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64957  fi
64958
64959  # Turn on additional features based on other parts of configure
64960  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64961    JVM_FEATURES="$JVM_FEATURES dtrace"
64962  else
64963    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64964      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64965    fi
64966  fi
64967
64968  if test "x$STATIC_BUILD" = "xtrue"; then
64969    JVM_FEATURES="$JVM_FEATURES static-build"
64970  else
64971    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64972      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64973    fi
64974  fi
64975
64976  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64977    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64978      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64979    fi
64980  fi
64981
64982  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64983    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64984      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64985    fi
64986  fi
64987
64988  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64989  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64990     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64991     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64992    JVM_FEATURES_jvmci="jvmci"
64993  else
64994    JVM_FEATURES_jvmci=""
64995  fi
64996
64997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64998$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64999  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65001$as_echo "yes, forced" >&6; }
65002    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65003      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65004    fi
65005    INCLUDE_GRAAL="true"
65006  else
65007    # By default enable graal build where AOT is available
65008    if test "x$ENABLE_AOT" = "xtrue"; then
65009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65010$as_echo "yes" >&6; }
65011      JVM_FEATURES_graal="graal"
65012      INCLUDE_GRAAL="true"
65013    else
65014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65015$as_echo "no" >&6; }
65016      JVM_FEATURES_graal=""
65017      INCLUDE_GRAAL="false"
65018    fi
65019  fi
65020
65021
65022
65023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65024$as_echo_n "checking if aot should be enabled... " >&6; }
65025  if test "x$ENABLE_AOT" = "xtrue"; then
65026    if test "x$enable_aot" = "xyes"; then
65027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65028$as_echo "yes, forced" >&6; }
65029    else
65030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65031$as_echo "yes" >&6; }
65032    fi
65033    JVM_FEATURES_aot="aot"
65034  else
65035    if test "x$enable_aot" = "xno"; then
65036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65037$as_echo "no, forced" >&6; }
65038    else
65039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65040$as_echo "no" >&6; }
65041    fi
65042    JVM_FEATURES_aot=""
65043  fi
65044
65045  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65046    # Default to use link time optimizations on minimal on arm
65047    JVM_FEATURES_link_time_opt="link-time-opt"
65048  else
65049    JVM_FEATURES_link_time_opt=""
65050  fi
65051
65052  # All variants but minimal (and custom) get these features
65053  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65054
65055  # Enable features depending on variant.
65056  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65057  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65058  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65059  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65060  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65061  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65062  JVM_FEATURES_custom="$JVM_FEATURES"
65063
65064
65065
65066
65067
65068
65069
65070
65071
65072  # Used for verification of Makefiles by check-jvm-feature
65073
65074
65075  # We don't support --with-jvm-interpreter anymore, use zero instead.
65076
65077
65078# Check whether --with-jvm-interpreter was given.
65079if test "${with_jvm_interpreter+set}" = set; then :
65080  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65081$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65082fi
65083
65084
65085
65086
65087###############################################################################
65088#
65089# We need to do some final tweaking, when everything else is done.
65090#
65091###############################################################################
65092
65093
65094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65095$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65096
65097  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65098    ENABLE_INTREE_EC=true
65099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65100$as_echo "yes" >&6; }
65101  else
65102    ENABLE_INTREE_EC=false
65103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65104$as_echo "no" >&6; }
65105  fi
65106
65107
65108
65109
65110  # Check whether --enable-jtreg-failure-handler was given.
65111if test "${enable_jtreg_failure_handler+set}" = set; then :
65112  enableval=$enable_jtreg_failure_handler;
65113fi
65114
65115
65116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65117$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65118
65119  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65120    if test "x$JT_HOME" = "x"; then
65121      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65122    else
65123      BUILD_FAILURE_HANDLER=true
65124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65125$as_echo "yes, forced" >&6; }
65126    fi
65127  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65128    BUILD_FAILURE_HANDLER=false
65129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65130$as_echo "no, forced" >&6; }
65131  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65132      || test "x$enable_jtreg_failure_handler" = "x"; then
65133    if test "x$JT_HOME" = "x"; then
65134      BUILD_FAILURE_HANDLER=false
65135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65136$as_echo "no, missing jtreg" >&6; }
65137    else
65138      BUILD_FAILURE_HANDLER=true
65139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65140$as_echo "yes, jtreg present" >&6; }
65141    fi
65142  else
65143    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65144  fi
65145
65146
65147
65148
65149  # Check whether --enable-generate-classlist was given.
65150if test "${enable_generate_classlist+set}" = set; then :
65151  enableval=$enable_generate_classlist;
65152fi
65153
65154
65155  # Check if it's likely that it's possible to generate the classlist. Depending
65156  # on exact jvm configuration it could be possible anyway.
65157  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65158    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65159  else
65160    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65161  fi
65162
65163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65164$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65165  if test "x$enable_generate_classlist" = "xyes"; then
65166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65167$as_echo "yes, forced" >&6; }
65168    ENABLE_GENERATE_CLASSLIST="true"
65169    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65170      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65171$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65172    fi
65173  elif test "x$enable_generate_classlist" = "xno"; then
65174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65175$as_echo "no, forced" >&6; }
65176    ENABLE_GENERATE_CLASSLIST="false"
65177  elif test "x$enable_generate_classlist" = "x"; then
65178    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65180$as_echo "yes" >&6; }
65181      ENABLE_GENERATE_CLASSLIST="true"
65182    else
65183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65184$as_echo "no" >&6; }
65185      ENABLE_GENERATE_CLASSLIST="false"
65186    fi
65187  else
65188    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65189  fi
65190
65191
65192
65193
65194###############################################################################
65195#
65196# Configure parts of the build that only affect the build performance,
65197# not the result.
65198#
65199###############################################################################
65200
65201
65202  # How many cores do we have on this build system?
65203
65204# Check whether --with-num-cores was given.
65205if test "${with_num_cores+set}" = set; then :
65206  withval=$with_num_cores;
65207fi
65208
65209  if test "x$with_num_cores" = x; then
65210    # The number of cores were not specified, try to probe them.
65211
65212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65213$as_echo_n "checking for number of cores... " >&6; }
65214  NUM_CORES=1
65215  FOUND_CORES=no
65216
65217  if test -f /proc/cpuinfo; then
65218    # Looks like a Linux (or cygwin) system
65219    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65220    FOUND_CORES=yes
65221  elif test -x /usr/sbin/psrinfo; then
65222    # Looks like a Solaris system
65223    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65224    FOUND_CORES=yes
65225  elif test -x /usr/sbin/sysctl; then
65226    # Looks like a MacOSX system
65227    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65228    FOUND_CORES=yes
65229  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65230    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65231    FOUND_CORES=yes
65232  elif test -n "$NUMBER_OF_PROCESSORS"; then
65233    # On windows, look in the env
65234    NUM_CORES=$NUMBER_OF_PROCESSORS
65235    FOUND_CORES=yes
65236  fi
65237
65238  if test "x$FOUND_CORES" = xyes; then
65239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65240$as_echo "$NUM_CORES" >&6; }
65241  else
65242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65243$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65244    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65245$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65246  fi
65247
65248  else
65249    NUM_CORES=$with_num_cores
65250  fi
65251
65252
65253
65254  # How much memory do we have on this build system?
65255
65256# Check whether --with-memory-size was given.
65257if test "${with_memory_size+set}" = set; then :
65258  withval=$with_memory_size;
65259fi
65260
65261  if test "x$with_memory_size" = x; then
65262    # The memory size was not specified, try to probe it.
65263
65264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65265$as_echo_n "checking for memory size... " >&6; }
65266  # Default to 1024 MB
65267  MEMORY_SIZE=1024
65268  FOUND_MEM=no
65269
65270  if test -f /proc/meminfo; then
65271    # Looks like a Linux (or cygwin) system
65272    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65273    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65274    FOUND_MEM=yes
65275  elif test -x /usr/sbin/prtconf; then
65276    # Looks like a Solaris or AIX system
65277    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65278    FOUND_MEM=yes
65279  elif test -x /usr/sbin/sysctl; then
65280    # Looks like a MacOSX system
65281    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65282    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65283    FOUND_MEM=yes
65284  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65285    # Windows, but without cygwin
65286    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65287    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65288    FOUND_MEM=yes
65289  fi
65290
65291  if test "x$FOUND_MEM" = xyes; then
65292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65293$as_echo "$MEMORY_SIZE MB" >&6; }
65294  else
65295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65296$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65298$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65299  fi
65300
65301  else
65302    MEMORY_SIZE=$with_memory_size
65303  fi
65304
65305
65306
65307  # Provide a decent default number of parallel jobs for make depending on
65308  # number of cores, amount of memory and machine architecture.
65309
65310# Check whether --with-jobs was given.
65311if test "${with_jobs+set}" = set; then :
65312  withval=$with_jobs;
65313fi
65314
65315  if test "x$with_jobs" = x; then
65316    # Number of jobs was not specified, calculate.
65317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65318$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65319    # Approximate memory in GB.
65320    memory_gb=`expr $MEMORY_SIZE / 1024`
65321    # Pick the lowest of memory in gb and number of cores.
65322    if test "$memory_gb" -lt "$NUM_CORES"; then
65323      JOBS="$memory_gb"
65324    else
65325      JOBS="$NUM_CORES"
65326    fi
65327    if test "$JOBS" -eq "0"; then
65328      JOBS=1
65329    fi
65330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65331$as_echo "$JOBS" >&6; }
65332  else
65333    JOBS=$with_jobs
65334  fi
65335
65336
65337
65338  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65339
65340# Check whether --with-test-jobs was given.
65341if test "${with_test_jobs+set}" = set; then :
65342  withval=$with_test_jobs;
65343fi
65344
65345  if test "x$with_test_jobs" = x; then
65346      TEST_JOBS=0
65347  else
65348      TEST_JOBS=$with_test_jobs
65349  fi
65350
65351
65352
65353# Setup arguments for the boot jdk (after cores and memory have been setup)
65354
65355  ##############################################################################
65356  #
65357  # Specify jvm options for anything that is run with the Boot JDK.
65358  # Not all JVM:s accept the same arguments on the command line.
65359  #
65360
65361# Check whether --with-boot-jdk-jvmargs was given.
65362if test "${with_boot_jdk_jvmargs+set}" = set; then :
65363  withval=$with_boot_jdk_jvmargs;
65364fi
65365
65366
65367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65368$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65369
65370  # Disable special log output when a debug build is used as Boot JDK...
65371
65372  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65373  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65374  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65375  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65376  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65377  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65378    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65379    JVM_ARG_OK=true
65380  else
65381    $ECHO "Arg failed:" >&5
65382    $ECHO "$OUTPUT" >&5
65383    JVM_ARG_OK=false
65384  fi
65385
65386
65387  # Force en-US environment
65388
65389  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65390  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65391  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65392  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65393  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65394  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65395    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65396    JVM_ARG_OK=true
65397  else
65398    $ECHO "Arg failed:" >&5
65399    $ECHO "$OUTPUT" >&5
65400    JVM_ARG_OK=false
65401  fi
65402
65403
65404  # Apply user provided options.
65405
65406  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65407  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65408  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65409  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65410  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65411  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65412    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65413    JVM_ARG_OK=true
65414  else
65415    $ECHO "Arg failed:" >&5
65416    $ECHO "$OUTPUT" >&5
65417    JVM_ARG_OK=false
65418  fi
65419
65420
65421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65422$as_echo "$boot_jdk_jvmargs" >&6; }
65423
65424  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65425  JAVA_FLAGS=$boot_jdk_jvmargs
65426
65427
65428
65429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65430$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65431
65432  # Starting amount of heap memory.
65433
65434  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65435  $ECHO "Command: $JAVA -Xms64M -version" >&5
65436  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65437  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65438  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65439  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65440    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65441    JVM_ARG_OK=true
65442  else
65443    $ECHO "Arg failed:" >&5
65444    $ECHO "$OUTPUT" >&5
65445    JVM_ARG_OK=false
65446  fi
65447
65448  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65449
65450  # Maximum amount of heap memory and stack size.
65451  JVM_HEAP_LIMIT_32="1024"
65452  # Running a 64 bit JVM allows for and requires a bigger heap
65453  JVM_HEAP_LIMIT_64="1600"
65454  STACK_SIZE_32=768
65455  STACK_SIZE_64=1536
65456  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65457  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65458    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65459  fi
65460  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65461    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65462  fi
65463  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65464    JVM_HEAP_LIMIT_32=512
65465    JVM_HEAP_LIMIT_64=512
65466  fi
65467
65468  if test "x$BOOT_JDK_BITS" = "x32"; then
65469    STACK_SIZE=$STACK_SIZE_32
65470    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65471  else
65472    STACK_SIZE=$STACK_SIZE_64
65473    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65474  fi
65475
65476  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65477  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65478  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65479  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65480  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65481  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65482    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65483    JVM_ARG_OK=true
65484  else
65485    $ECHO "Arg failed:" >&5
65486    $ECHO "$OUTPUT" >&5
65487    JVM_ARG_OK=false
65488  fi
65489
65490
65491  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65492  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65493  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65494  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65495  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65496  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65497    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65498    JVM_ARG_OK=true
65499  else
65500    $ECHO "Arg failed:" >&5
65501    $ECHO "$OUTPUT" >&5
65502    JVM_ARG_OK=false
65503  fi
65504
65505
65506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65507$as_echo "$boot_jdk_jvmargs_big" >&6; }
65508
65509  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65510
65511
65512  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65513    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65514    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65515  else
65516    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65517    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65518  fi
65519  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65520  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65522$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65524$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65525
65526
65527  # By default, the main javac compilations use big
65528  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65529
65530
65531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65532$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65533
65534  # Use serial gc for small short lived tools if possible
65535
65536  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65537  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65538  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65539  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65540  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65541  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65542    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65543    JVM_ARG_OK=true
65544  else
65545    $ECHO "Arg failed:" >&5
65546    $ECHO "$OUTPUT" >&5
65547    JVM_ARG_OK=false
65548  fi
65549
65550
65551  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65552  $ECHO "Command: $JAVA -Xms32M -version" >&5
65553  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65554  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65555  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65556  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65557    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65558    JVM_ARG_OK=true
65559  else
65560    $ECHO "Arg failed:" >&5
65561    $ECHO "$OUTPUT" >&5
65562    JVM_ARG_OK=false
65563  fi
65564
65565
65566  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65567  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65568  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65569  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65570  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65571  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65572    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65573    JVM_ARG_OK=true
65574  else
65575    $ECHO "Arg failed:" >&5
65576    $ECHO "$OUTPUT" >&5
65577    JVM_ARG_OK=false
65578  fi
65579
65580
65581  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65582  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65583  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65584  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65585  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65586  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65587    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65588    JVM_ARG_OK=true
65589  else
65590    $ECHO "Arg failed:" >&5
65591    $ECHO "$OUTPUT" >&5
65592    JVM_ARG_OK=false
65593  fi
65594
65595
65596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65597$as_echo "$boot_jdk_jvmargs_small" >&6; }
65598
65599  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65600
65601
65602  JAVA_TOOL_FLAGS_SMALL=""
65603  for f in $JAVA_FLAGS_SMALL; do
65604    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65605  done
65606
65607
65608
65609# Setup smart javac (after cores and memory have been setup)
65610
65611
65612# Check whether --with-sjavac-server-java was given.
65613if test "${with_sjavac_server_java+set}" = set; then :
65614  withval=$with_sjavac_server_java;
65615fi
65616
65617
65618  if test "x$with_sjavac_server_java" != x; then
65619    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65620    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65621    if test "x$FOUND_VERSION" = x; then
65622      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65623    fi
65624  else
65625    SJAVAC_SERVER_JAVA="$JAVA"
65626  fi
65627
65628
65629  if test "$MEMORY_SIZE" -gt "3000"; then
65630
65631  $ECHO "Check if jvm arg is ok: -d64" >&5
65632  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65633  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65634  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65635  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65636  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65637    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65638    JVM_ARG_OK=true
65639  else
65640    $ECHO "Arg failed:" >&5
65641    $ECHO "$OUTPUT" >&5
65642    JVM_ARG_OK=false
65643  fi
65644
65645    if test "$JVM_ARG_OK" = true; then
65646      JVM_64BIT=true
65647      JVM_ARG_OK=false
65648    fi
65649  fi
65650
65651  MX_VALUE=`expr $MEMORY_SIZE / 2`
65652  if test "$JVM_64BIT" = true; then
65653    # Set ms lower than mx since more than one instance of the server might
65654    # get launched at the same time before they figure out which instance won.
65655    MS_VALUE=512
65656    if test "$MX_VALUE" -gt "2048"; then
65657      MX_VALUE=2048
65658    fi
65659  else
65660    MS_VALUE=256
65661    if test "$MX_VALUE" -gt "1500"; then
65662      MX_VALUE=1500
65663    fi
65664  fi
65665  if test "$MX_VALUE" -lt "512"; then
65666    MX_VALUE=512
65667  fi
65668
65669  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65670  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65671  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65672  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65673  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65674  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65675    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65676    JVM_ARG_OK=true
65677  else
65678    $ECHO "Arg failed:" >&5
65679    $ECHO "$OUTPUT" >&5
65680    JVM_ARG_OK=false
65681  fi
65682
65683
65684
65685  # Check whether --enable-sjavac was given.
65686if test "${enable_sjavac+set}" = set; then :
65687  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65688else
65689  ENABLE_SJAVAC="no"
65690fi
65691
65692  if test "x$JVM_ARG_OK" = "xfalse"; then
65693    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65694$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65695    ENABLE_SJAVAC="no"
65696  fi
65697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65698$as_echo_n "checking whether to use sjavac... " >&6; }
65699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65700$as_echo "$ENABLE_SJAVAC" >&6; }
65701
65702
65703  # Check whether --enable-javac-server was given.
65704if test "${enable_javac_server+set}" = set; then :
65705  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65706else
65707  ENABLE_JAVAC_SERVER="yes"
65708fi
65709
65710  if test "x$JVM_ARG_OK" = "xfalse"; then
65711    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65712$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65713    ENABLE_JAVAC_SERVER="no"
65714  fi
65715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65716$as_echo_n "checking whether to use javac server... " >&6; }
65717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65718$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65719
65720
65721  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65722    # When using a server javac, the small client instances do not need much
65723    # resources.
65724    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65725  fi
65726
65727
65728# Setup use of icecc if requested
65729
65730  # Check whether --enable-icecc was given.
65731if test "${enable_icecc+set}" = set; then :
65732  enableval=$enable_icecc;
65733fi
65734
65735
65736  if test "x${enable_icecc}" = "xyes"; then
65737
65738
65739
65740  # Publish this variable in the help.
65741
65742
65743  if [ -z "${ICECC_CMD+x}" ]; then
65744    # The variable is not set by user, try to locate tool using the code snippet
65745    for ac_prog in icecc
65746do
65747  # Extract the first word of "$ac_prog", so it can be a program name with args.
65748set dummy $ac_prog; ac_word=$2
65749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65750$as_echo_n "checking for $ac_word... " >&6; }
65751if ${ac_cv_path_ICECC_CMD+:} false; then :
65752  $as_echo_n "(cached) " >&6
65753else
65754  case $ICECC_CMD in
65755  [\\/]* | ?:[\\/]*)
65756  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65757  ;;
65758  *)
65759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65760for as_dir in $PATH
65761do
65762  IFS=$as_save_IFS
65763  test -z "$as_dir" && as_dir=.
65764    for ac_exec_ext in '' $ac_executable_extensions; do
65765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65766    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65768    break 2
65769  fi
65770done
65771  done
65772IFS=$as_save_IFS
65773
65774  ;;
65775esac
65776fi
65777ICECC_CMD=$ac_cv_path_ICECC_CMD
65778if test -n "$ICECC_CMD"; then
65779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65780$as_echo "$ICECC_CMD" >&6; }
65781else
65782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65783$as_echo "no" >&6; }
65784fi
65785
65786
65787  test -n "$ICECC_CMD" && break
65788done
65789
65790  else
65791    # The variable is set, but is it from the command line or the environment?
65792
65793    # Try to remove the string !ICECC_CMD! from our list.
65794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65796      # If it failed, the variable was not from the command line. Ignore it,
65797      # but warn the user (except for BASH, which is always set by the calling BASH).
65798      if test "xICECC_CMD" != xBASH; then
65799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65800$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65801      fi
65802      # Try to locate tool using the code snippet
65803      for ac_prog in icecc
65804do
65805  # Extract the first word of "$ac_prog", so it can be a program name with args.
65806set dummy $ac_prog; ac_word=$2
65807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65808$as_echo_n "checking for $ac_word... " >&6; }
65809if ${ac_cv_path_ICECC_CMD+:} false; then :
65810  $as_echo_n "(cached) " >&6
65811else
65812  case $ICECC_CMD in
65813  [\\/]* | ?:[\\/]*)
65814  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65815  ;;
65816  *)
65817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65818for as_dir in $PATH
65819do
65820  IFS=$as_save_IFS
65821  test -z "$as_dir" && as_dir=.
65822    for ac_exec_ext in '' $ac_executable_extensions; do
65823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65824    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65826    break 2
65827  fi
65828done
65829  done
65830IFS=$as_save_IFS
65831
65832  ;;
65833esac
65834fi
65835ICECC_CMD=$ac_cv_path_ICECC_CMD
65836if test -n "$ICECC_CMD"; then
65837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65838$as_echo "$ICECC_CMD" >&6; }
65839else
65840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65841$as_echo "no" >&6; }
65842fi
65843
65844
65845  test -n "$ICECC_CMD" && break
65846done
65847
65848    else
65849      # If it succeeded, then it was overridden by the user. We will use it
65850      # for the tool.
65851
65852      # First remove it from the list of overridden variables, so we can test
65853      # for unknown variables in the end.
65854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65855
65856      # Check if we try to supply an empty value
65857      if test "x$ICECC_CMD" = x; then
65858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65859$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65861$as_echo_n "checking for ICECC_CMD... " >&6; }
65862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65863$as_echo "disabled" >&6; }
65864      else
65865        # Check if the provided tool contains a complete path.
65866        tool_specified="$ICECC_CMD"
65867        tool_basename="${tool_specified##*/}"
65868        if test "x$tool_basename" = "x$tool_specified"; then
65869          # A command without a complete path is provided, search $PATH.
65870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65871$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65872          # Extract the first word of "$tool_basename", so it can be a program name with args.
65873set dummy $tool_basename; ac_word=$2
65874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65875$as_echo_n "checking for $ac_word... " >&6; }
65876if ${ac_cv_path_ICECC_CMD+:} false; then :
65877  $as_echo_n "(cached) " >&6
65878else
65879  case $ICECC_CMD in
65880  [\\/]* | ?:[\\/]*)
65881  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65882  ;;
65883  *)
65884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65885for as_dir in $PATH
65886do
65887  IFS=$as_save_IFS
65888  test -z "$as_dir" && as_dir=.
65889    for ac_exec_ext in '' $ac_executable_extensions; do
65890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65891    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65893    break 2
65894  fi
65895done
65896  done
65897IFS=$as_save_IFS
65898
65899  ;;
65900esac
65901fi
65902ICECC_CMD=$ac_cv_path_ICECC_CMD
65903if test -n "$ICECC_CMD"; then
65904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65905$as_echo "$ICECC_CMD" >&6; }
65906else
65907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65908$as_echo "no" >&6; }
65909fi
65910
65911
65912          if test "x$ICECC_CMD" = x; then
65913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65914          fi
65915        else
65916          # Otherwise we believe it is a complete path. Use it as it is.
65917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65918$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65920$as_echo_n "checking for ICECC_CMD... " >&6; }
65921          if test ! -x "$tool_specified"; then
65922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65923$as_echo "not found" >&6; }
65924            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65925          fi
65926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65927$as_echo "$tool_specified" >&6; }
65928        fi
65929      fi
65930    fi
65931
65932  fi
65933
65934
65935
65936  if test "x$ICECC_CMD" = x; then
65937    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65938  fi
65939
65940
65941    old_path="$PATH"
65942
65943    # Look for icecc-create-env in some known places
65944    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65945
65946
65947
65948  # Publish this variable in the help.
65949
65950
65951  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65952    # The variable is not set by user, try to locate tool using the code snippet
65953    for ac_prog in icecc-create-env
65954do
65955  # Extract the first word of "$ac_prog", so it can be a program name with args.
65956set dummy $ac_prog; ac_word=$2
65957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65958$as_echo_n "checking for $ac_word... " >&6; }
65959if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65960  $as_echo_n "(cached) " >&6
65961else
65962  case $ICECC_CREATE_ENV in
65963  [\\/]* | ?:[\\/]*)
65964  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65965  ;;
65966  *)
65967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65968for as_dir in $PATH
65969do
65970  IFS=$as_save_IFS
65971  test -z "$as_dir" && as_dir=.
65972    for ac_exec_ext in '' $ac_executable_extensions; do
65973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65974    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65976    break 2
65977  fi
65978done
65979  done
65980IFS=$as_save_IFS
65981
65982  ;;
65983esac
65984fi
65985ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65986if test -n "$ICECC_CREATE_ENV"; then
65987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65988$as_echo "$ICECC_CREATE_ENV" >&6; }
65989else
65990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65991$as_echo "no" >&6; }
65992fi
65993
65994
65995  test -n "$ICECC_CREATE_ENV" && break
65996done
65997
65998  else
65999    # The variable is set, but is it from the command line or the environment?
66000
66001    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66004      # If it failed, the variable was not from the command line. Ignore it,
66005      # but warn the user (except for BASH, which is always set by the calling BASH).
66006      if test "xICECC_CREATE_ENV" != xBASH; then
66007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66008$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66009      fi
66010      # Try to locate tool using the code snippet
66011      for ac_prog in icecc-create-env
66012do
66013  # Extract the first word of "$ac_prog", so it can be a program name with args.
66014set dummy $ac_prog; ac_word=$2
66015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66016$as_echo_n "checking for $ac_word... " >&6; }
66017if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66018  $as_echo_n "(cached) " >&6
66019else
66020  case $ICECC_CREATE_ENV in
66021  [\\/]* | ?:[\\/]*)
66022  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66023  ;;
66024  *)
66025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66026for as_dir in $PATH
66027do
66028  IFS=$as_save_IFS
66029  test -z "$as_dir" && as_dir=.
66030    for ac_exec_ext in '' $ac_executable_extensions; do
66031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66032    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66034    break 2
66035  fi
66036done
66037  done
66038IFS=$as_save_IFS
66039
66040  ;;
66041esac
66042fi
66043ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66044if test -n "$ICECC_CREATE_ENV"; then
66045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66046$as_echo "$ICECC_CREATE_ENV" >&6; }
66047else
66048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66049$as_echo "no" >&6; }
66050fi
66051
66052
66053  test -n "$ICECC_CREATE_ENV" && break
66054done
66055
66056    else
66057      # If it succeeded, then it was overridden by the user. We will use it
66058      # for the tool.
66059
66060      # First remove it from the list of overridden variables, so we can test
66061      # for unknown variables in the end.
66062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66063
66064      # Check if we try to supply an empty value
66065      if test "x$ICECC_CREATE_ENV" = x; then
66066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66067$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66069$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66071$as_echo "disabled" >&6; }
66072      else
66073        # Check if the provided tool contains a complete path.
66074        tool_specified="$ICECC_CREATE_ENV"
66075        tool_basename="${tool_specified##*/}"
66076        if test "x$tool_basename" = "x$tool_specified"; then
66077          # A command without a complete path is provided, search $PATH.
66078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66079$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66080          # Extract the first word of "$tool_basename", so it can be a program name with args.
66081set dummy $tool_basename; ac_word=$2
66082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66083$as_echo_n "checking for $ac_word... " >&6; }
66084if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66085  $as_echo_n "(cached) " >&6
66086else
66087  case $ICECC_CREATE_ENV in
66088  [\\/]* | ?:[\\/]*)
66089  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66090  ;;
66091  *)
66092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66093for as_dir in $PATH
66094do
66095  IFS=$as_save_IFS
66096  test -z "$as_dir" && as_dir=.
66097    for ac_exec_ext in '' $ac_executable_extensions; do
66098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66099    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66101    break 2
66102  fi
66103done
66104  done
66105IFS=$as_save_IFS
66106
66107  ;;
66108esac
66109fi
66110ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66111if test -n "$ICECC_CREATE_ENV"; then
66112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66113$as_echo "$ICECC_CREATE_ENV" >&6; }
66114else
66115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66116$as_echo "no" >&6; }
66117fi
66118
66119
66120          if test "x$ICECC_CREATE_ENV" = x; then
66121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66122          fi
66123        else
66124          # Otherwise we believe it is a complete path. Use it as it is.
66125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66126$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66128$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66129          if test ! -x "$tool_specified"; then
66130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66131$as_echo "not found" >&6; }
66132            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66133          fi
66134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66135$as_echo "$tool_specified" >&6; }
66136        fi
66137      fi
66138    fi
66139
66140  fi
66141
66142
66143
66144  if test "x$ICECC_CREATE_ENV" = x; then
66145    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66146  fi
66147
66148
66149    # Use icecc-create-env to create a minimal compilation environment that can
66150    # be sent to the other hosts in the icecream cluster.
66151    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66152    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66153    # Older versions of icecc does not have the --gcc parameter
66154    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66155      icecc_gcc_arg="--gcc"
66156    fi
66157    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66158
66159  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66160      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66161          ${icecc_create_env_log} 2>&1 )
66162  if test "$?" != "0"; then
66163    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66164$as_echo "$as_me: icecc-create-env output:" >&6;}
66165    cat \
66166          ${icecc_create_env_log}
66167    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66168  fi
66169
66170    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66171      # For clang, the icecc compilerwrapper is needed. It usually resides next
66172      # to icecc-create-env.
66173
66174
66175
66176  # Publish this variable in the help.
66177
66178
66179  if [ -z "${ICECC_WRAPPER+x}" ]; then
66180    # The variable is not set by user, try to locate tool using the code snippet
66181    for ac_prog in compilerwrapper
66182do
66183  # Extract the first word of "$ac_prog", so it can be a program name with args.
66184set dummy $ac_prog; ac_word=$2
66185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66186$as_echo_n "checking for $ac_word... " >&6; }
66187if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66188  $as_echo_n "(cached) " >&6
66189else
66190  case $ICECC_WRAPPER in
66191  [\\/]* | ?:[\\/]*)
66192  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66193  ;;
66194  *)
66195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66196for as_dir in $PATH
66197do
66198  IFS=$as_save_IFS
66199  test -z "$as_dir" && as_dir=.
66200    for ac_exec_ext in '' $ac_executable_extensions; do
66201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66202    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66204    break 2
66205  fi
66206done
66207  done
66208IFS=$as_save_IFS
66209
66210  ;;
66211esac
66212fi
66213ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66214if test -n "$ICECC_WRAPPER"; then
66215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66216$as_echo "$ICECC_WRAPPER" >&6; }
66217else
66218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66219$as_echo "no" >&6; }
66220fi
66221
66222
66223  test -n "$ICECC_WRAPPER" && break
66224done
66225
66226  else
66227    # The variable is set, but is it from the command line or the environment?
66228
66229    # Try to remove the string !ICECC_WRAPPER! from our list.
66230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66232      # If it failed, the variable was not from the command line. Ignore it,
66233      # but warn the user (except for BASH, which is always set by the calling BASH).
66234      if test "xICECC_WRAPPER" != xBASH; then
66235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66236$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66237      fi
66238      # Try to locate tool using the code snippet
66239      for ac_prog in compilerwrapper
66240do
66241  # Extract the first word of "$ac_prog", so it can be a program name with args.
66242set dummy $ac_prog; ac_word=$2
66243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66244$as_echo_n "checking for $ac_word... " >&6; }
66245if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66246  $as_echo_n "(cached) " >&6
66247else
66248  case $ICECC_WRAPPER in
66249  [\\/]* | ?:[\\/]*)
66250  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66251  ;;
66252  *)
66253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66254for as_dir in $PATH
66255do
66256  IFS=$as_save_IFS
66257  test -z "$as_dir" && as_dir=.
66258    for ac_exec_ext in '' $ac_executable_extensions; do
66259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66260    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66262    break 2
66263  fi
66264done
66265  done
66266IFS=$as_save_IFS
66267
66268  ;;
66269esac
66270fi
66271ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66272if test -n "$ICECC_WRAPPER"; then
66273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66274$as_echo "$ICECC_WRAPPER" >&6; }
66275else
66276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66277$as_echo "no" >&6; }
66278fi
66279
66280
66281  test -n "$ICECC_WRAPPER" && break
66282done
66283
66284    else
66285      # If it succeeded, then it was overridden by the user. We will use it
66286      # for the tool.
66287
66288      # First remove it from the list of overridden variables, so we can test
66289      # for unknown variables in the end.
66290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66291
66292      # Check if we try to supply an empty value
66293      if test "x$ICECC_WRAPPER" = x; then
66294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66295$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66297$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66299$as_echo "disabled" >&6; }
66300      else
66301        # Check if the provided tool contains a complete path.
66302        tool_specified="$ICECC_WRAPPER"
66303        tool_basename="${tool_specified##*/}"
66304        if test "x$tool_basename" = "x$tool_specified"; then
66305          # A command without a complete path is provided, search $PATH.
66306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66307$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66308          # Extract the first word of "$tool_basename", so it can be a program name with args.
66309set dummy $tool_basename; ac_word=$2
66310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66311$as_echo_n "checking for $ac_word... " >&6; }
66312if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66313  $as_echo_n "(cached) " >&6
66314else
66315  case $ICECC_WRAPPER in
66316  [\\/]* | ?:[\\/]*)
66317  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66318  ;;
66319  *)
66320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66321for as_dir in $PATH
66322do
66323  IFS=$as_save_IFS
66324  test -z "$as_dir" && as_dir=.
66325    for ac_exec_ext in '' $ac_executable_extensions; do
66326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66327    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66329    break 2
66330  fi
66331done
66332  done
66333IFS=$as_save_IFS
66334
66335  ;;
66336esac
66337fi
66338ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66339if test -n "$ICECC_WRAPPER"; then
66340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66341$as_echo "$ICECC_WRAPPER" >&6; }
66342else
66343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66344$as_echo "no" >&6; }
66345fi
66346
66347
66348          if test "x$ICECC_WRAPPER" = x; then
66349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66350          fi
66351        else
66352          # Otherwise we believe it is a complete path. Use it as it is.
66353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66354$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66356$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66357          if test ! -x "$tool_specified"; then
66358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66359$as_echo "not found" >&6; }
66360            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66361          fi
66362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66363$as_echo "$tool_specified" >&6; }
66364        fi
66365      fi
66366    fi
66367
66368  fi
66369
66370
66371
66372  if test "x$ICECC_WRAPPER" = x; then
66373    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66374  fi
66375
66376
66377
66378  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66379      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66380  if test "$?" != "0"; then
66381    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66382$as_echo "$as_me: icecc-create-env output:" >&6;}
66383    cat ${icecc_create_env_log}
66384    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66385  fi
66386
66387    else
66388      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66389    fi
66390    PATH="$old_path"
66391    # The bundle with the compiler gets a name based on checksums. Parse log file
66392    # to find it.
66393    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66394    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66395    if test ! -f ${ICECC_ENV_BUNDLE}; then
66396      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66397    fi
66398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66399$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66401$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66402    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66403
66404    if test "x${COMPILE_TYPE}" = "xcross"; then
66405      # If cross compiling, create a separate env package for the build compiler
66406      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66407      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66408      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66409
66410  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66411      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66412            ${icecc_create_env_log_build} 2>&1 )
66413  if test "$?" != "0"; then
66414    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66415$as_echo "$as_me: icecc-create-env output:" >&6;}
66416    cat \
66417            ${icecc_create_env_log_build}
66418    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66419  fi
66420
66421      elif test "x${BUILD_CC##*/}" = "xclang"; then
66422
66423  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66424      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66425  if test "$?" != "0"; then
66426    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66427$as_echo "$as_me: icecc-create-env output:" >&6;}
66428    cat ${icecc_create_env_log_build}
66429    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66430  fi
66431
66432      else
66433        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66434      fi
66435      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66436      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66437      if test ! -f ${ICECC_ENV_BUNDLE}; then
66438        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66439      fi
66440      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66441$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66443$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66444      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66445          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66446    else
66447      BUILD_ICECC="${ICECC}"
66448    fi
66449
66450
66451  fi
66452
66453
66454# Can the C/C++ compiler use precompiled headers?
66455
66456
66457  ###############################################################################
66458  #
66459  # Can the C/C++ compiler use precompiled headers?
66460  #
66461  # Check whether --enable-precompiled-headers was given.
66462if test "${enable_precompiled_headers+set}" = set; then :
66463  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66464else
66465  ENABLE_PRECOMPH=yes
66466fi
66467
66468
66469  USE_PRECOMPILED_HEADER=true
66470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66471$as_echo_n "checking If precompiled header is enabled... " >&6; }
66472  if test "x$ENABLE_PRECOMPH" = xno; then
66473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66474$as_echo "no, forced" >&6; }
66475    USE_PRECOMPILED_HEADER=false
66476  elif test "x$ICECC" != "x"; then
66477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66478$as_echo "no, does not work effectively with icecc" >&6; }
66479    USE_PRECOMPILED_HEADER=false
66480  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66482$as_echo "no, does not work with Solaris Studio" >&6; }
66483    USE_PRECOMPILED_HEADER=false
66484  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66486$as_echo "no, does not work with xlc" >&6; }
66487    USE_PRECOMPILED_HEADER=false
66488  else
66489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66490$as_echo "yes" >&6; }
66491  fi
66492
66493  if test "x$ENABLE_PRECOMPH" = xyes; then
66494    # Check that the compiler actually supports precomp headers.
66495    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66497$as_echo_n "checking that precompiled headers work... " >&6; }
66498      echo "int alfa();" > conftest.h
66499      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66500      if test ! -f conftest.hpp.gch; then
66501        USE_PRECOMPILED_HEADER=false
66502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66503$as_echo "no" >&6; }
66504      else
66505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66506$as_echo "yes" >&6; }
66507      fi
66508      $RM conftest.h conftest.hpp.gch
66509    fi
66510  fi
66511
66512
66513
66514
66515# Setup use of ccache, if available
66516
66517  # Check whether --enable-ccache was given.
66518if test "${enable_ccache+set}" = set; then :
66519  enableval=$enable_ccache;
66520fi
66521
66522
66523  CCACHE_STATUS=
66524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66525$as_echo_n "checking is ccache enabled... " >&6; }
66526  if test "x$enable_ccache" = xyes; then
66527    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66529$as_echo "yes" >&6; }
66530      OLD_PATH="$PATH"
66531      if test "x$TOOLCHAIN_PATH" != x; then
66532        PATH=$TOOLCHAIN_PATH:$PATH
66533      fi
66534
66535
66536
66537  # Publish this variable in the help.
66538
66539
66540  if [ -z "${CCACHE+x}" ]; then
66541    # The variable is not set by user, try to locate tool using the code snippet
66542    for ac_prog in ccache
66543do
66544  # Extract the first word of "$ac_prog", so it can be a program name with args.
66545set dummy $ac_prog; ac_word=$2
66546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66547$as_echo_n "checking for $ac_word... " >&6; }
66548if ${ac_cv_path_CCACHE+:} false; then :
66549  $as_echo_n "(cached) " >&6
66550else
66551  case $CCACHE in
66552  [\\/]* | ?:[\\/]*)
66553  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66554  ;;
66555  *)
66556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66557for as_dir in $PATH
66558do
66559  IFS=$as_save_IFS
66560  test -z "$as_dir" && as_dir=.
66561    for ac_exec_ext in '' $ac_executable_extensions; do
66562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66563    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66565    break 2
66566  fi
66567done
66568  done
66569IFS=$as_save_IFS
66570
66571  ;;
66572esac
66573fi
66574CCACHE=$ac_cv_path_CCACHE
66575if test -n "$CCACHE"; then
66576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66577$as_echo "$CCACHE" >&6; }
66578else
66579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66580$as_echo "no" >&6; }
66581fi
66582
66583
66584  test -n "$CCACHE" && break
66585done
66586
66587  else
66588    # The variable is set, but is it from the command line or the environment?
66589
66590    # Try to remove the string !CCACHE! from our list.
66591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66593      # If it failed, the variable was not from the command line. Ignore it,
66594      # but warn the user (except for BASH, which is always set by the calling BASH).
66595      if test "xCCACHE" != xBASH; then
66596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66597$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66598      fi
66599      # Try to locate tool using the code snippet
66600      for ac_prog in ccache
66601do
66602  # Extract the first word of "$ac_prog", so it can be a program name with args.
66603set dummy $ac_prog; ac_word=$2
66604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66605$as_echo_n "checking for $ac_word... " >&6; }
66606if ${ac_cv_path_CCACHE+:} false; then :
66607  $as_echo_n "(cached) " >&6
66608else
66609  case $CCACHE in
66610  [\\/]* | ?:[\\/]*)
66611  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66612  ;;
66613  *)
66614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66615for as_dir in $PATH
66616do
66617  IFS=$as_save_IFS
66618  test -z "$as_dir" && as_dir=.
66619    for ac_exec_ext in '' $ac_executable_extensions; do
66620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66621    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66623    break 2
66624  fi
66625done
66626  done
66627IFS=$as_save_IFS
66628
66629  ;;
66630esac
66631fi
66632CCACHE=$ac_cv_path_CCACHE
66633if test -n "$CCACHE"; then
66634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66635$as_echo "$CCACHE" >&6; }
66636else
66637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66638$as_echo "no" >&6; }
66639fi
66640
66641
66642  test -n "$CCACHE" && break
66643done
66644
66645    else
66646      # If it succeeded, then it was overridden by the user. We will use it
66647      # for the tool.
66648
66649      # First remove it from the list of overridden variables, so we can test
66650      # for unknown variables in the end.
66651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66652
66653      # Check if we try to supply an empty value
66654      if test "x$CCACHE" = x; then
66655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66656$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66658$as_echo_n "checking for CCACHE... " >&6; }
66659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66660$as_echo "disabled" >&6; }
66661      else
66662        # Check if the provided tool contains a complete path.
66663        tool_specified="$CCACHE"
66664        tool_basename="${tool_specified##*/}"
66665        if test "x$tool_basename" = "x$tool_specified"; then
66666          # A command without a complete path is provided, search $PATH.
66667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66668$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66669          # Extract the first word of "$tool_basename", so it can be a program name with args.
66670set dummy $tool_basename; ac_word=$2
66671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66672$as_echo_n "checking for $ac_word... " >&6; }
66673if ${ac_cv_path_CCACHE+:} false; then :
66674  $as_echo_n "(cached) " >&6
66675else
66676  case $CCACHE in
66677  [\\/]* | ?:[\\/]*)
66678  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66679  ;;
66680  *)
66681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66682for as_dir in $PATH
66683do
66684  IFS=$as_save_IFS
66685  test -z "$as_dir" && as_dir=.
66686    for ac_exec_ext in '' $ac_executable_extensions; do
66687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66688    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66690    break 2
66691  fi
66692done
66693  done
66694IFS=$as_save_IFS
66695
66696  ;;
66697esac
66698fi
66699CCACHE=$ac_cv_path_CCACHE
66700if test -n "$CCACHE"; then
66701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66702$as_echo "$CCACHE" >&6; }
66703else
66704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66705$as_echo "no" >&6; }
66706fi
66707
66708
66709          if test "x$CCACHE" = x; then
66710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66711          fi
66712        else
66713          # Otherwise we believe it is a complete path. Use it as it is.
66714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66715$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66717$as_echo_n "checking for CCACHE... " >&6; }
66718          if test ! -x "$tool_specified"; then
66719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66720$as_echo "not found" >&6; }
66721            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66722          fi
66723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66724$as_echo "$tool_specified" >&6; }
66725        fi
66726      fi
66727    fi
66728
66729  fi
66730
66731
66732
66733  if test "x$CCACHE" = x; then
66734    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66735  fi
66736
66737
66738      PATH="$OLD_PATH"
66739      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66740      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66741    else
66742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66743$as_echo "no" >&6; }
66744      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66745$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66746    fi
66747  elif test "x$enable_ccache" = xno; then
66748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66749$as_echo "no, explicitly disabled" >&6; }
66750    CCACHE_STATUS="Disabled"
66751  elif test "x$enable_ccache" = x; then
66752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66753$as_echo "no" >&6; }
66754  else
66755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66756$as_echo "unknown" >&6; }
66757    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66758  fi
66759
66760
66761
66762# Check whether --with-ccache-dir was given.
66763if test "${with_ccache_dir+set}" = set; then :
66764  withval=$with_ccache_dir;
66765fi
66766
66767
66768  if test "x$with_ccache_dir" != x; then
66769    # When using a non home ccache directory, assume the use is to share ccache files
66770    # with other users. Thus change the umask.
66771    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66772    if test "x$CCACHE" = x; then
66773      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66774$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66775    fi
66776  fi
66777
66778  if test "x$CCACHE" != x; then
66779
66780  if test "x$CCACHE" != x; then
66781    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66782      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66783          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66784      if test "x$HAS_BAD_CCACHE" != "x"; then
66785        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66786      fi
66787    fi
66788    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66789      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66790          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66791      if test "x$HAS_BAD_CCACHE" != "x"; then
66792        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66793      fi
66794      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66795$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66796      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66797      PUSHED_FLAGS="$CXXFLAGS"
66798      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66799      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66800/* end confdefs.h.  */
66801
66802int
66803main ()
66804{
66805
66806  ;
66807  return 0;
66808}
66809_ACEOF
66810if ac_fn_cxx_try_compile "$LINENO"; then :
66811  CC_KNOWS_CCACHE_TRICK=yes
66812else
66813  CC_KNOWS_CCACHE_TRICK=no
66814fi
66815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66816      CXXFLAGS="$PUSHED_FLAGS"
66817      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66819$as_echo "yes" >&6; }
66820        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66821
66822        CCACHE_SLOPPINESS=pch_defines,time_macros
66823      else
66824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66825$as_echo "no" >&6; }
66826        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66827      fi
66828    fi
66829
66830    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66831        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66832
66833    if test "x$SET_CCACHE_DIR" != x; then
66834      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66835      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66836    fi
66837  fi
66838
66839  fi
66840
66841
66842###############################################################################
66843#
66844# And now the finish...
66845#
66846###############################################################################
66847
66848# Check for some common pitfalls
66849
66850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66851    file_to_test="$SRC_ROOT/LICENSE"
66852    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66853      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
66854    fi
66855  fi
66856
66857
66858  # Did user specify any unknown variables?
66859
66860  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66861    # Replace the separating ! with spaces before presenting for end user.
66862    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66863    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66864$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66865  fi
66866
66867
66868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66869$as_echo_n "checking if build directory is on local disk... " >&6; }
66870
66871  # df -l lists only local disks; if the given directory is not found then
66872  # a non-zero exit code is given
66873  if test "x$DF" = x; then
66874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66875      # msys does not have df; use Windows "net use" instead.
66876      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66877      if test "x$IS_NETWORK_DISK" = x; then
66878        OUTPUT_DIR_IS_LOCAL="yes"
66879      else
66880        OUTPUT_DIR_IS_LOCAL="no"
66881      fi
66882    else
66883      # No df here, say it's local
66884      OUTPUT_DIR_IS_LOCAL="yes"
66885    fi
66886  else
66887    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66888      OUTPUT_DIR_IS_LOCAL="yes"
66889    else
66890      OUTPUT_DIR_IS_LOCAL="no"
66891    fi
66892  fi
66893
66894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66895$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66896
66897
66898
66899  # Check if the user has any old-style ALT_ variables set.
66900  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66901
66902  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66903  # Since we can't properly handle the dependencies for this, warn the user about the situation
66904  if test -e $OUTPUT_ROOT/spec.gmk; then
66905    IS_RECONFIGURE=yes
66906  else
66907    IS_RECONFIGURE=no
66908  fi
66909
66910
66911# At the end, call the custom hook. (Dummy macro if no custom sources available)
66912
66913
66914# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66915
66916  # Keep feature lists sorted and free of duplicates
66917  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66918  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66919  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66920  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66921  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66922  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66923  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66924
66925  # Validate features
66926  for variant in $JVM_VARIANTS; do
66927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66928$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66929    features_var_name=JVM_FEATURES_$variant
66930    JVM_FEATURES_TO_TEST=${!features_var_name}
66931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66932$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66933    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66934    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66935    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66936    if test "x$INVALID_FEATURES" != x; then
66937      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66938    fi
66939  done
66940
66941
66942# We're messing a bit with internal autoconf variables to put the config.status
66943# in the output directory instead of the current directory.
66944CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66945
66946# Create the actual output files. Now the main work of configure is done.
66947cat >confcache <<\_ACEOF
66948# This file is a shell script that caches the results of configure
66949# tests run on this system so they can be shared between configure
66950# scripts and configure runs, see configure's option --config-cache.
66951# It is not useful on other systems.  If it contains results you don't
66952# want to keep, you may remove or edit it.
66953#
66954# config.status only pays attention to the cache file if you give it
66955# the --recheck option to rerun configure.
66956#
66957# `ac_cv_env_foo' variables (set or unset) will be overridden when
66958# loading this file, other *unset* `ac_cv_foo' will be assigned the
66959# following values.
66960
66961_ACEOF
66962
66963# The following way of writing the cache mishandles newlines in values,
66964# but we know of no workaround that is simple, portable, and efficient.
66965# So, we kill variables containing newlines.
66966# Ultrix sh set writes to stderr and can't be redirected directly,
66967# and sets the high bit in the cache file unless we assign to the vars.
66968(
66969  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66970    eval ac_val=\$$ac_var
66971    case $ac_val in #(
66972    *${as_nl}*)
66973      case $ac_var in #(
66974      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66975$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66976      esac
66977      case $ac_var in #(
66978      _ | IFS | as_nl) ;; #(
66979      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66980      *) { eval $ac_var=; unset $ac_var;} ;;
66981      esac ;;
66982    esac
66983  done
66984
66985  (set) 2>&1 |
66986    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66987    *${as_nl}ac_space=\ *)
66988      # `set' does not quote correctly, so add quotes: double-quote
66989      # substitution turns \\\\ into \\, and sed turns \\ into \.
66990      sed -n \
66991	"s/'/'\\\\''/g;
66992	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66993      ;; #(
66994    *)
66995      # `set' quotes correctly as required by POSIX, so do not add quotes.
66996      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66997      ;;
66998    esac |
66999    sort
67000) |
67001  sed '
67002     /^ac_cv_env_/b end
67003     t clear
67004     :clear
67005     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67006     t end
67007     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67008     :end' >>confcache
67009if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67010  if test -w "$cache_file"; then
67011    if test "x$cache_file" != "x/dev/null"; then
67012      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67013$as_echo "$as_me: updating cache $cache_file" >&6;}
67014      if test ! -f "$cache_file" || test -h "$cache_file"; then
67015	cat confcache >"$cache_file"
67016      else
67017        case $cache_file in #(
67018        */* | ?:*)
67019	  mv -f confcache "$cache_file"$$ &&
67020	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67021        *)
67022	  mv -f confcache "$cache_file" ;;
67023	esac
67024      fi
67025    fi
67026  else
67027    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67028$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67029  fi
67030fi
67031rm -f confcache
67032
67033test "x$prefix" = xNONE && prefix=$ac_default_prefix
67034# Let make expand exec_prefix.
67035test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67036
67037# Transform confdefs.h into DEFS.
67038# Protect against shell expansion while executing Makefile rules.
67039# Protect against Makefile macro expansion.
67040#
67041# If the first sed substitution is executed (which looks for macros that
67042# take arguments), then branch to the quote section.  Otherwise,
67043# look for a macro that doesn't take arguments.
67044ac_script='
67045:mline
67046/\\$/{
67047 N
67048 s,\\\n,,
67049 b mline
67050}
67051t clear
67052:clear
67053s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67054t quote
67055s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67056t quote
67057b any
67058:quote
67059s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67060s/\[/\\&/g
67061s/\]/\\&/g
67062s/\$/$$/g
67063H
67064:any
67065${
67066	g
67067	s/^\n//
67068	s/\n/ /g
67069	p
67070}
67071'
67072DEFS=`sed -n "$ac_script" confdefs.h`
67073
67074
67075ac_libobjs=
67076ac_ltlibobjs=
67077U=
67078for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67079  # 1. Remove the extension, and $U if already installed.
67080  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67081  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67082  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67083  #    will be set to the directory where LIBOBJS objects are built.
67084  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67085  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67086done
67087LIBOBJS=$ac_libobjs
67088
67089LTLIBOBJS=$ac_ltlibobjs
67090
67091
67092
67093: "${CONFIG_STATUS=./config.status}"
67094ac_write_fail=0
67095ac_clean_files_save=$ac_clean_files
67096ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67097{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67098$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67099as_write_fail=0
67100cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67101#! $SHELL
67102# Generated by $as_me.
67103# Run this file to recreate the current configuration.
67104# Compiler output produced by configure, useful for debugging
67105# configure, is in config.log if it exists.
67106
67107debug=false
67108ac_cs_recheck=false
67109ac_cs_silent=false
67110
67111SHELL=\${CONFIG_SHELL-$SHELL}
67112export SHELL
67113_ASEOF
67114cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67115## -------------------- ##
67116## M4sh Initialization. ##
67117## -------------------- ##
67118
67119# Be more Bourne compatible
67120DUALCASE=1; export DUALCASE # for MKS sh
67121if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67122  emulate sh
67123  NULLCMD=:
67124  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67125  # is contrary to our usage.  Disable this feature.
67126  alias -g '${1+"$@"}'='"$@"'
67127  setopt NO_GLOB_SUBST
67128else
67129  case `(set -o) 2>/dev/null` in #(
67130  *posix*) :
67131    set -o posix ;; #(
67132  *) :
67133     ;;
67134esac
67135fi
67136
67137
67138as_nl='
67139'
67140export as_nl
67141# Printing a long string crashes Solaris 7 /usr/bin/printf.
67142as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67143as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67144as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67145# Prefer a ksh shell builtin over an external printf program on Solaris,
67146# but without wasting forks for bash or zsh.
67147if test -z "$BASH_VERSION$ZSH_VERSION" \
67148    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67149  as_echo='print -r --'
67150  as_echo_n='print -rn --'
67151elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67152  as_echo='printf %s\n'
67153  as_echo_n='printf %s'
67154else
67155  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67156    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67157    as_echo_n='/usr/ucb/echo -n'
67158  else
67159    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67160    as_echo_n_body='eval
67161      arg=$1;
67162      case $arg in #(
67163      *"$as_nl"*)
67164	expr "X$arg" : "X\\(.*\\)$as_nl";
67165	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67166      esac;
67167      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67168    '
67169    export as_echo_n_body
67170    as_echo_n='sh -c $as_echo_n_body as_echo'
67171  fi
67172  export as_echo_body
67173  as_echo='sh -c $as_echo_body as_echo'
67174fi
67175
67176# The user is always right.
67177if test "${PATH_SEPARATOR+set}" != set; then
67178  PATH_SEPARATOR=:
67179  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67180    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67181      PATH_SEPARATOR=';'
67182  }
67183fi
67184
67185
67186# IFS
67187# We need space, tab and new line, in precisely that order.  Quoting is
67188# there to prevent editors from complaining about space-tab.
67189# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67190# splitting by setting IFS to empty value.)
67191IFS=" ""	$as_nl"
67192
67193# Find who we are.  Look in the path if we contain no directory separator.
67194as_myself=
67195case $0 in #((
67196  *[\\/]* ) as_myself=$0 ;;
67197  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67198for as_dir in $PATH
67199do
67200  IFS=$as_save_IFS
67201  test -z "$as_dir" && as_dir=.
67202    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67203  done
67204IFS=$as_save_IFS
67205
67206     ;;
67207esac
67208# We did not find ourselves, most probably we were run as `sh COMMAND'
67209# in which case we are not to be found in the path.
67210if test "x$as_myself" = x; then
67211  as_myself=$0
67212fi
67213if test ! -f "$as_myself"; then
67214  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67215  exit 1
67216fi
67217
67218# Unset variables that we do not need and which cause bugs (e.g. in
67219# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67220# suppresses any "Segmentation fault" message there.  '((' could
67221# trigger a bug in pdksh 5.2.14.
67222for as_var in BASH_ENV ENV MAIL MAILPATH
67223do eval test x\${$as_var+set} = xset \
67224  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67225done
67226PS1='$ '
67227PS2='> '
67228PS4='+ '
67229
67230# NLS nuisances.
67231LC_ALL=C
67232export LC_ALL
67233LANGUAGE=C
67234export LANGUAGE
67235
67236# CDPATH.
67237(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67238
67239
67240# as_fn_error STATUS ERROR [LINENO LOG_FD]
67241# ----------------------------------------
67242# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67243# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67244# script with STATUS, using 1 if that was 0.
67245as_fn_error ()
67246{
67247  as_status=$1; test $as_status -eq 0 && as_status=1
67248  if test "$4"; then
67249    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67250    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67251  fi
67252  $as_echo "$as_me: error: $2" >&2
67253  as_fn_exit $as_status
67254} # as_fn_error
67255
67256
67257# as_fn_set_status STATUS
67258# -----------------------
67259# Set $? to STATUS, without forking.
67260as_fn_set_status ()
67261{
67262  return $1
67263} # as_fn_set_status
67264
67265# as_fn_exit STATUS
67266# -----------------
67267# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67268as_fn_exit ()
67269{
67270  set +e
67271  as_fn_set_status $1
67272  exit $1
67273} # as_fn_exit
67274
67275# as_fn_unset VAR
67276# ---------------
67277# Portably unset VAR.
67278as_fn_unset ()
67279{
67280  { eval $1=; unset $1;}
67281}
67282as_unset=as_fn_unset
67283# as_fn_append VAR VALUE
67284# ----------------------
67285# Append the text in VALUE to the end of the definition contained in VAR. Take
67286# advantage of any shell optimizations that allow amortized linear growth over
67287# repeated appends, instead of the typical quadratic growth present in naive
67288# implementations.
67289if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67290  eval 'as_fn_append ()
67291  {
67292    eval $1+=\$2
67293  }'
67294else
67295  as_fn_append ()
67296  {
67297    eval $1=\$$1\$2
67298  }
67299fi # as_fn_append
67300
67301# as_fn_arith ARG...
67302# ------------------
67303# Perform arithmetic evaluation on the ARGs, and store the result in the
67304# global $as_val. Take advantage of shells that can avoid forks. The arguments
67305# must be portable across $(()) and expr.
67306if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67307  eval 'as_fn_arith ()
67308  {
67309    as_val=$(( $* ))
67310  }'
67311else
67312  as_fn_arith ()
67313  {
67314    as_val=`expr "$@" || test $? -eq 1`
67315  }
67316fi # as_fn_arith
67317
67318
67319if expr a : '\(a\)' >/dev/null 2>&1 &&
67320   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67321  as_expr=expr
67322else
67323  as_expr=false
67324fi
67325
67326if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67327  as_basename=basename
67328else
67329  as_basename=false
67330fi
67331
67332if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67333  as_dirname=dirname
67334else
67335  as_dirname=false
67336fi
67337
67338as_me=`$as_basename -- "$0" ||
67339$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67340	 X"$0" : 'X\(//\)$' \| \
67341	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67342$as_echo X/"$0" |
67343    sed '/^.*\/\([^/][^/]*\)\/*$/{
67344	    s//\1/
67345	    q
67346	  }
67347	  /^X\/\(\/\/\)$/{
67348	    s//\1/
67349	    q
67350	  }
67351	  /^X\/\(\/\).*/{
67352	    s//\1/
67353	    q
67354	  }
67355	  s/.*/./; q'`
67356
67357# Avoid depending upon Character Ranges.
67358as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67359as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67360as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67361as_cr_digits='0123456789'
67362as_cr_alnum=$as_cr_Letters$as_cr_digits
67363
67364ECHO_C= ECHO_N= ECHO_T=
67365case `echo -n x` in #(((((
67366-n*)
67367  case `echo 'xy\c'` in
67368  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67369  xy)  ECHO_C='\c';;
67370  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67371       ECHO_T='	';;
67372  esac;;
67373*)
67374  ECHO_N='-n';;
67375esac
67376
67377rm -f conf$$ conf$$.exe conf$$.file
67378if test -d conf$$.dir; then
67379  rm -f conf$$.dir/conf$$.file
67380else
67381  rm -f conf$$.dir
67382  mkdir conf$$.dir 2>/dev/null
67383fi
67384if (echo >conf$$.file) 2>/dev/null; then
67385  if ln -s conf$$.file conf$$ 2>/dev/null; then
67386    as_ln_s='ln -s'
67387    # ... but there are two gotchas:
67388    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67389    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67390    # In both cases, we have to default to `cp -pR'.
67391    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67392      as_ln_s='cp -pR'
67393  elif ln conf$$.file conf$$ 2>/dev/null; then
67394    as_ln_s=ln
67395  else
67396    as_ln_s='cp -pR'
67397  fi
67398else
67399  as_ln_s='cp -pR'
67400fi
67401rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67402rmdir conf$$.dir 2>/dev/null
67403
67404
67405# as_fn_mkdir_p
67406# -------------
67407# Create "$as_dir" as a directory, including parents if necessary.
67408as_fn_mkdir_p ()
67409{
67410
67411  case $as_dir in #(
67412  -*) as_dir=./$as_dir;;
67413  esac
67414  test -d "$as_dir" || eval $as_mkdir_p || {
67415    as_dirs=
67416    while :; do
67417      case $as_dir in #(
67418      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67419      *) as_qdir=$as_dir;;
67420      esac
67421      as_dirs="'$as_qdir' $as_dirs"
67422      as_dir=`$as_dirname -- "$as_dir" ||
67423$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67424	 X"$as_dir" : 'X\(//\)[^/]' \| \
67425	 X"$as_dir" : 'X\(//\)$' \| \
67426	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67427$as_echo X"$as_dir" |
67428    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67429	    s//\1/
67430	    q
67431	  }
67432	  /^X\(\/\/\)[^/].*/{
67433	    s//\1/
67434	    q
67435	  }
67436	  /^X\(\/\/\)$/{
67437	    s//\1/
67438	    q
67439	  }
67440	  /^X\(\/\).*/{
67441	    s//\1/
67442	    q
67443	  }
67444	  s/.*/./; q'`
67445      test -d "$as_dir" && break
67446    done
67447    test -z "$as_dirs" || eval "mkdir $as_dirs"
67448  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67449
67450
67451} # as_fn_mkdir_p
67452if mkdir -p . 2>/dev/null; then
67453  as_mkdir_p='mkdir -p "$as_dir"'
67454else
67455  test -d ./-p && rmdir ./-p
67456  as_mkdir_p=false
67457fi
67458
67459
67460# as_fn_executable_p FILE
67461# -----------------------
67462# Test if FILE is an executable regular file.
67463as_fn_executable_p ()
67464{
67465  test -f "$1" && test -x "$1"
67466} # as_fn_executable_p
67467as_test_x='test -x'
67468as_executable_p=as_fn_executable_p
67469
67470# Sed expression to map a string onto a valid CPP name.
67471as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67472
67473# Sed expression to map a string onto a valid variable name.
67474as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67475
67476
67477exec 6>&1
67478## ----------------------------------- ##
67479## Main body of $CONFIG_STATUS script. ##
67480## ----------------------------------- ##
67481_ASEOF
67482test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67483
67484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67485# Save the log message, to keep $0 and so on meaningful, and to
67486# report actual input values of CONFIG_FILES etc. instead of their
67487# values after options handling.
67488ac_log="
67489This file was extended by OpenJDK $as_me jdk9, which was
67490generated by GNU Autoconf 2.69.  Invocation command line was
67491
67492  CONFIG_FILES    = $CONFIG_FILES
67493  CONFIG_HEADERS  = $CONFIG_HEADERS
67494  CONFIG_LINKS    = $CONFIG_LINKS
67495  CONFIG_COMMANDS = $CONFIG_COMMANDS
67496  $ $0 $@
67497
67498on `(hostname || uname -n) 2>/dev/null | sed 1q`
67499"
67500
67501_ACEOF
67502
67503case $ac_config_files in *"
67504"*) set x $ac_config_files; shift; ac_config_files=$*;;
67505esac
67506
67507
67508
67509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67510# Files that config.status was made for.
67511config_files="$ac_config_files"
67512
67513_ACEOF
67514
67515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67516ac_cs_usage="\
67517\`$as_me' instantiates files and other configuration actions
67518from templates according to the current configuration.  Unless the files
67519and actions are specified as TAGs, all are instantiated by default.
67520
67521Usage: $0 [OPTION]... [TAG]...
67522
67523  -h, --help       print this help, then exit
67524  -V, --version    print version number and configuration settings, then exit
67525      --config     print configuration, then exit
67526  -q, --quiet, --silent
67527                   do not print progress messages
67528  -d, --debug      don't remove temporary files
67529      --recheck    update $as_me by reconfiguring in the same conditions
67530      --file=FILE[:TEMPLATE]
67531                   instantiate the configuration file FILE
67532
67533Configuration files:
67534$config_files
67535
67536Report bugs to <build-dev@openjdk.java.net>.
67537OpenJDK home page: <http://openjdk.java.net>."
67538
67539_ACEOF
67540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67541ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67542ac_cs_version="\\
67543OpenJDK config.status jdk9
67544configured by $0, generated by GNU Autoconf 2.69,
67545  with options \\"\$ac_cs_config\\"
67546
67547Copyright (C) 2012 Free Software Foundation, Inc.
67548This config.status script is free software; the Free Software Foundation
67549gives unlimited permission to copy, distribute and modify it."
67550
67551ac_pwd='$ac_pwd'
67552srcdir='$srcdir'
67553AWK='$AWK'
67554test -n "\$AWK" || AWK=awk
67555_ACEOF
67556
67557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67558# The default lists apply if the user does not specify any file.
67559ac_need_defaults=:
67560while test $# != 0
67561do
67562  case $1 in
67563  --*=?*)
67564    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67565    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67566    ac_shift=:
67567    ;;
67568  --*=)
67569    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67570    ac_optarg=
67571    ac_shift=:
67572    ;;
67573  *)
67574    ac_option=$1
67575    ac_optarg=$2
67576    ac_shift=shift
67577    ;;
67578  esac
67579
67580  case $ac_option in
67581  # Handling of the options.
67582  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67583    ac_cs_recheck=: ;;
67584  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67585    $as_echo "$ac_cs_version"; exit ;;
67586  --config | --confi | --conf | --con | --co | --c )
67587    $as_echo "$ac_cs_config"; exit ;;
67588  --debug | --debu | --deb | --de | --d | -d )
67589    debug=: ;;
67590  --file | --fil | --fi | --f )
67591    $ac_shift
67592    case $ac_optarg in
67593    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67594    '') as_fn_error $? "missing file argument" ;;
67595    esac
67596    as_fn_append CONFIG_FILES " '$ac_optarg'"
67597    ac_need_defaults=false;;
67598  --he | --h |  --help | --hel | -h )
67599    $as_echo "$ac_cs_usage"; exit ;;
67600  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67601  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67602    ac_cs_silent=: ;;
67603
67604  # This is an error.
67605  -*) as_fn_error $? "unrecognized option: \`$1'
67606Try \`$0 --help' for more information." ;;
67607
67608  *) as_fn_append ac_config_targets " $1"
67609     ac_need_defaults=false ;;
67610
67611  esac
67612  shift
67613done
67614
67615ac_configure_extra_args=
67616
67617if $ac_cs_silent; then
67618  exec 6>/dev/null
67619  ac_configure_extra_args="$ac_configure_extra_args --silent"
67620fi
67621
67622_ACEOF
67623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67624if \$ac_cs_recheck; then
67625  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67626  shift
67627  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67628  CONFIG_SHELL='$SHELL'
67629  export CONFIG_SHELL
67630  exec "\$@"
67631fi
67632
67633_ACEOF
67634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67635exec 5>>config.log
67636{
67637  echo
67638  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67639## Running $as_me. ##
67640_ASBOX
67641  $as_echo "$ac_log"
67642} >&5
67643
67644_ACEOF
67645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67646_ACEOF
67647
67648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67649
67650# Handling of arguments.
67651for ac_config_target in $ac_config_targets
67652do
67653  case $ac_config_target in
67654    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67655    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67656    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67657    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67658    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67659
67660  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67661  esac
67662done
67663
67664
67665# If the user did not use the arguments to specify the items to instantiate,
67666# then the envvar interface is used.  Set only those that are not.
67667# We use the long form for the default assignment because of an extremely
67668# bizarre bug on SunOS 4.1.3.
67669if $ac_need_defaults; then
67670  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67671fi
67672
67673# Have a temporary directory for convenience.  Make it in the build tree
67674# simply because there is no reason against having it here, and in addition,
67675# creating and moving files from /tmp can sometimes cause problems.
67676# Hook for its removal unless debugging.
67677# Note that there is a small window in which the directory will not be cleaned:
67678# after its creation but before its name has been assigned to `$tmp'.
67679$debug ||
67680{
67681  tmp= ac_tmp=
67682  trap 'exit_status=$?
67683  : "${ac_tmp:=$tmp}"
67684  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67685' 0
67686  trap 'as_fn_exit 1' 1 2 13 15
67687}
67688# Create a (secure) tmp directory for tmp files.
67689
67690{
67691  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67692  test -d "$tmp"
67693}  ||
67694{
67695  tmp=./conf$$-$RANDOM
67696  (umask 077 && mkdir "$tmp")
67697} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67698ac_tmp=$tmp
67699
67700# Set up the scripts for CONFIG_FILES section.
67701# No need to generate them if there are no CONFIG_FILES.
67702# This happens for instance with `./config.status config.h'.
67703if test -n "$CONFIG_FILES"; then
67704
67705
67706ac_cr=`echo X | tr X '\015'`
67707# On cygwin, bash can eat \r inside `` if the user requested igncr.
67708# But we know of no other shell where ac_cr would be empty at this
67709# point, so we can use a bashism as a fallback.
67710if test "x$ac_cr" = x; then
67711  eval ac_cr=\$\'\\r\'
67712fi
67713ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67714if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67715  ac_cs_awk_cr='\\r'
67716else
67717  ac_cs_awk_cr=$ac_cr
67718fi
67719
67720echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67721_ACEOF
67722
67723
67724{
67725  echo "cat >conf$$subs.awk <<_ACEOF" &&
67726  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67727  echo "_ACEOF"
67728} >conf$$subs.sh ||
67729  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67730ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67731ac_delim='%!_!# '
67732for ac_last_try in false false false false false :; do
67733  . ./conf$$subs.sh ||
67734    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67735
67736  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67737  if test $ac_delim_n = $ac_delim_num; then
67738    break
67739  elif $ac_last_try; then
67740    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67741  else
67742    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67743  fi
67744done
67745rm -f conf$$subs.sh
67746
67747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67748cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67749_ACEOF
67750sed -n '
67751h
67752s/^/S["/; s/!.*/"]=/
67753p
67754g
67755s/^[^!]*!//
67756:repl
67757t repl
67758s/'"$ac_delim"'$//
67759t delim
67760:nl
67761h
67762s/\(.\{148\}\)..*/\1/
67763t more1
67764s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67765p
67766n
67767b repl
67768:more1
67769s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67770p
67771g
67772s/.\{148\}//
67773t nl
67774:delim
67775h
67776s/\(.\{148\}\)..*/\1/
67777t more2
67778s/["\\]/\\&/g; s/^/"/; s/$/"/
67779p
67780b
67781:more2
67782s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67783p
67784g
67785s/.\{148\}//
67786t delim
67787' <conf$$subs.awk | sed '
67788/^[^""]/{
67789  N
67790  s/\n//
67791}
67792' >>$CONFIG_STATUS || ac_write_fail=1
67793rm -f conf$$subs.awk
67794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67795_ACAWK
67796cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67797  for (key in S) S_is_set[key] = 1
67798  FS = ""
67799
67800}
67801{
67802  line = $ 0
67803  nfields = split(line, field, "@")
67804  substed = 0
67805  len = length(field[1])
67806  for (i = 2; i < nfields; i++) {
67807    key = field[i]
67808    keylen = length(key)
67809    if (S_is_set[key]) {
67810      value = S[key]
67811      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67812      len += length(value) + length(field[++i])
67813      substed = 1
67814    } else
67815      len += 1 + keylen
67816  }
67817
67818  print line
67819}
67820
67821_ACAWK
67822_ACEOF
67823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67824if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67825  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67826else
67827  cat
67828fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67829  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67830_ACEOF
67831
67832# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67833# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67834# trailing colons and then remove the whole line if VPATH becomes empty
67835# (actually we leave an empty line to preserve line numbers).
67836if test "x$srcdir" = x.; then
67837  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67838h
67839s///
67840s/^/:/
67841s/[	 ]*$/:/
67842s/:\$(srcdir):/:/g
67843s/:\${srcdir}:/:/g
67844s/:@srcdir@:/:/g
67845s/^:*//
67846s/:*$//
67847x
67848s/\(=[	 ]*\).*/\1/
67849G
67850s/\n//
67851s/^[^=]*=[	 ]*$//
67852}'
67853fi
67854
67855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67856fi # test -n "$CONFIG_FILES"
67857
67858
67859eval set X "  :F $CONFIG_FILES      "
67860shift
67861for ac_tag
67862do
67863  case $ac_tag in
67864  :[FHLC]) ac_mode=$ac_tag; continue;;
67865  esac
67866  case $ac_mode$ac_tag in
67867  :[FHL]*:*);;
67868  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67869  :[FH]-) ac_tag=-:-;;
67870  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67871  esac
67872  ac_save_IFS=$IFS
67873  IFS=:
67874  set x $ac_tag
67875  IFS=$ac_save_IFS
67876  shift
67877  ac_file=$1
67878  shift
67879
67880  case $ac_mode in
67881  :L) ac_source=$1;;
67882  :[FH])
67883    ac_file_inputs=
67884    for ac_f
67885    do
67886      case $ac_f in
67887      -) ac_f="$ac_tmp/stdin";;
67888      *) # Look for the file first in the build tree, then in the source tree
67889	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67890	 # because $ac_f cannot contain `:'.
67891	 test -f "$ac_f" ||
67892	   case $ac_f in
67893	   [\\/$]*) false;;
67894	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67895	   esac ||
67896	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67897      esac
67898      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67899      as_fn_append ac_file_inputs " '$ac_f'"
67900    done
67901
67902    # Let's still pretend it is `configure' which instantiates (i.e., don't
67903    # use $as_me), people would be surprised to read:
67904    #    /* config.h.  Generated by config.status.  */
67905    configure_input='Generated from '`
67906	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67907	`' by configure.'
67908    if test x"$ac_file" != x-; then
67909      configure_input="$ac_file.  $configure_input"
67910      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67911$as_echo "$as_me: creating $ac_file" >&6;}
67912    fi
67913    # Neutralize special characters interpreted by sed in replacement strings.
67914    case $configure_input in #(
67915    *\&* | *\|* | *\\* )
67916       ac_sed_conf_input=`$as_echo "$configure_input" |
67917       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67918    *) ac_sed_conf_input=$configure_input;;
67919    esac
67920
67921    case $ac_tag in
67922    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67923      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67924    esac
67925    ;;
67926  esac
67927
67928  ac_dir=`$as_dirname -- "$ac_file" ||
67929$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67930	 X"$ac_file" : 'X\(//\)[^/]' \| \
67931	 X"$ac_file" : 'X\(//\)$' \| \
67932	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67933$as_echo X"$ac_file" |
67934    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67935	    s//\1/
67936	    q
67937	  }
67938	  /^X\(\/\/\)[^/].*/{
67939	    s//\1/
67940	    q
67941	  }
67942	  /^X\(\/\/\)$/{
67943	    s//\1/
67944	    q
67945	  }
67946	  /^X\(\/\).*/{
67947	    s//\1/
67948	    q
67949	  }
67950	  s/.*/./; q'`
67951  as_dir="$ac_dir"; as_fn_mkdir_p
67952  ac_builddir=.
67953
67954case "$ac_dir" in
67955.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67956*)
67957  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67958  # A ".." for each directory in $ac_dir_suffix.
67959  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67960  case $ac_top_builddir_sub in
67961  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67962  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67963  esac ;;
67964esac
67965ac_abs_top_builddir=$ac_pwd
67966ac_abs_builddir=$ac_pwd$ac_dir_suffix
67967# for backward compatibility:
67968ac_top_builddir=$ac_top_build_prefix
67969
67970case $srcdir in
67971  .)  # We are building in place.
67972    ac_srcdir=.
67973    ac_top_srcdir=$ac_top_builddir_sub
67974    ac_abs_top_srcdir=$ac_pwd ;;
67975  [\\/]* | ?:[\\/]* )  # Absolute name.
67976    ac_srcdir=$srcdir$ac_dir_suffix;
67977    ac_top_srcdir=$srcdir
67978    ac_abs_top_srcdir=$srcdir ;;
67979  *) # Relative name.
67980    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67981    ac_top_srcdir=$ac_top_build_prefix$srcdir
67982    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67983esac
67984ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67985
67986
67987  case $ac_mode in
67988  :F)
67989  #
67990  # CONFIG_FILE
67991  #
67992
67993_ACEOF
67994
67995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67996# If the template does not know about datarootdir, expand it.
67997# FIXME: This hack should be removed a few years after 2.60.
67998ac_datarootdir_hack=; ac_datarootdir_seen=
67999ac_sed_dataroot='
68000/datarootdir/ {
68001  p
68002  q
68003}
68004/@datadir@/p
68005/@docdir@/p
68006/@infodir@/p
68007/@localedir@/p
68008/@mandir@/p'
68009case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68010*datarootdir*) ac_datarootdir_seen=yes;;
68011*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68012  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68013$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68014_ACEOF
68015cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68016  ac_datarootdir_hack='
68017  s&@datadir@&$datadir&g
68018  s&@docdir@&$docdir&g
68019  s&@infodir@&$infodir&g
68020  s&@localedir@&$localedir&g
68021  s&@mandir@&$mandir&g
68022  s&\\\${datarootdir}&$datarootdir&g' ;;
68023esac
68024_ACEOF
68025
68026# Neutralize VPATH when `$srcdir' = `.'.
68027# Shell code in configure.ac might set extrasub.
68028# FIXME: do we really want to maintain this feature?
68029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68030ac_sed_extra="$ac_vpsub
68031$extrasub
68032_ACEOF
68033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68034:t
68035/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68036s|@configure_input@|$ac_sed_conf_input|;t t
68037s&@top_builddir@&$ac_top_builddir_sub&;t t
68038s&@top_build_prefix@&$ac_top_build_prefix&;t t
68039s&@srcdir@&$ac_srcdir&;t t
68040s&@abs_srcdir@&$ac_abs_srcdir&;t t
68041s&@top_srcdir@&$ac_top_srcdir&;t t
68042s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68043s&@builddir@&$ac_builddir&;t t
68044s&@abs_builddir@&$ac_abs_builddir&;t t
68045s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68046$ac_datarootdir_hack
68047"
68048eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68049  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68050
68051test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68052  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68053  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68054      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68055  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68056which seems to be undefined.  Please make sure it is defined" >&5
68057$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68058which seems to be undefined.  Please make sure it is defined" >&2;}
68059
68060  rm -f "$ac_tmp/stdin"
68061  case $ac_file in
68062  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68063  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68064  esac \
68065  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68066 ;;
68067
68068
68069
68070  esac
68071
68072done # for ac_tag
68073
68074
68075as_fn_exit 0
68076_ACEOF
68077ac_clean_files=$ac_clean_files_save
68078
68079test $ac_write_fail = 0 ||
68080  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68081
68082
68083# configure is writing to config.log, and then calls config.status.
68084# config.status does its own redirection, appending to config.log.
68085# Unfortunately, on DOS this fails, as config.log is still kept open
68086# by configure, so config.status won't be able to write to it; its
68087# output is simply discarded.  So we exec the FD to /dev/null,
68088# effectively closing config.log, so it can be properly (re)opened and
68089# appended to by config.status.  When coming back to configure, we
68090# need to make the FD available again.
68091if test "$no_create" != yes; then
68092  ac_cs_success=:
68093  ac_config_status_args=
68094  test "$silent" = yes &&
68095    ac_config_status_args="$ac_config_status_args --quiet"
68096  exec 5>/dev/null
68097  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68098  exec 5>>config.log
68099  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68100  # would make configure fail if this is the last instruction.
68101  $ac_cs_success || as_fn_exit 1
68102fi
68103if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68104  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68105$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68106fi
68107
68108
68109# After AC_OUTPUT, we need to do final work
68110
68111
68112  # Try to move config.log (generated by autoconf) to the configure-support directory.
68113  if test -e ./config.log; then
68114    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68115  fi
68116
68117  # Rotate our log file (configure.log)
68118  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68119    $RM -f "$OUTPUT_ROOT/configure.log.old"
68120  fi
68121  if test -e "$OUTPUT_ROOT/configure.log"; then
68122    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68123  fi
68124
68125  # Move configure.log from current directory to the build output root
68126  if test -e ./configure.log; then
68127    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68128  fi
68129
68130  # Make the compare script executable
68131  $CHMOD +x $OUTPUT_ROOT/compare.sh
68132
68133
68134# Finally output some useful information to the user
68135
68136  # Finally output some useful information to the user
68137
68138  printf "\n"
68139  printf "====================================================\n"
68140  if test "x$no_create" != "xyes"; then
68141    if test "x$IS_RECONFIGURE" != "xyes"; then
68142      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68143    else
68144      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68145    fi
68146  else
68147    if test "x$IS_RECONFIGURE" != "xyes"; then
68148      printf "A configuration has been successfully checked but not created\n"
68149    else
68150      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68151    fi
68152  fi
68153  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68154    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68155  else
68156    printf "using default settings.\n"
68157  fi
68158
68159  printf "\n"
68160  printf "Configuration summary:\n"
68161  printf "* Debug level:    $DEBUG_LEVEL\n"
68162  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68163  printf "* JDK variant:    $JDK_VARIANT\n"
68164  printf "* JVM variants:   $JVM_VARIANTS\n"
68165  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68166  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68167
68168  printf "\n"
68169  printf "Tools summary:\n"
68170  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68171    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68172  fi
68173  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68174  if test "x$TOOLCHAIN_VERSION" != "x"; then
68175    print_version=" $TOOLCHAIN_VERSION"
68176  fi
68177  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68178  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68179  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68180
68181  printf "\n"
68182  printf "Build performance summary:\n"
68183  printf "* Cores to use:   $JOBS\n"
68184  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68185  if test "x$CCACHE_STATUS" != "x"; then
68186    printf "* ccache status:  $CCACHE_STATUS\n"
68187  fi
68188  printf "\n"
68189
68190  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68191    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68192    printf "will result in longer build times.\n"
68193    printf "\n"
68194  fi
68195
68196  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68197    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68198    printf "These are not respected, and will be ignored. It is recommended\n"
68199    printf "that you clean your environment. The following variables are set:\n"
68200    printf "$FOUND_ALT_VARIABLES\n"
68201    printf "\n"
68202  fi
68203
68204  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68205    printf "WARNING: Your build output directory is not on a local disk.\n"
68206    printf "This will severely degrade build performance!\n"
68207    printf "It is recommended that you create an output directory on a local disk,\n"
68208    printf "and run the configure script again from that directory.\n"
68209    printf "\n"
68210  fi
68211
68212  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68213    printf "WARNING: The result of this configuration has overridden an older\n"
68214    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68215    printf "proper build. Failure to do so might result in strange build problems.\n"
68216    printf "\n"
68217  fi
68218
68219  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68220    printf "WARNING: The result of this configuration was not saved.\n"
68221    printf "You should run without '--no-create | -n' to create the configuration.\n"
68222    printf "\n"
68223  fi
68224
68225
68226
68227  # Locate config.log.
68228  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68229    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68230  elif test -e "./config.log"; then
68231    CONFIG_LOG_PATH="."
68232  fi
68233
68234  if test -e "$CONFIG_LOG_PATH/config.log"; then
68235    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68236    if test $? -eq 0; then
68237      printf "The following warnings were produced. Repeated here for convenience:\n"
68238      # We must quote sed expression (using []) to stop m4 from eating the [].
68239      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68240      printf "\n"
68241    fi
68242  fi
68243
68244