generated-configure.sh revision 2419:57d9fc714673
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707INCLUDE_DTRACE
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715HOTSPOT_SET_WARNINGS_AS_ERRORS
716WARNINGS_AS_ERRORS
717COMPILER_SUPPORTS_TARGET_BITS_FLAG
718ZERO_ARCHFLAG
719LDFLAGS_TESTEXE
720LDFLAGS_TESTLIB
721CXXFLAGS_TESTEXE
722CXXFLAGS_TESTLIB
723CFLAGS_TESTEXE
724CFLAGS_TESTLIB
725OPENJDK_BUILD_JVM_LIBS
726OPENJDK_BUILD_JVM_ASFLAGS
727OPENJDK_BUILD_JVM_LDFLAGS
728OPENJDK_BUILD_JVM_CFLAGS
729OPENJDK_BUILD_LDFLAGS_HASH_STYLE
730OPENJDK_BUILD_LDFLAGS_CXX_JDK
731OPENJDK_BUILD_JDKEXE_LIBS
732OPENJDK_BUILD_JDKLIB_LIBS
733OPENJDK_BUILD_LDFLAGS_JDKEXE
734OPENJDK_BUILD_LDFLAGS_JDKLIB
735OPENJDK_BUILD_CXXFLAGS_JDKEXE
736OPENJDK_BUILD_CXXFLAGS_JDKLIB
737OPENJDK_BUILD_CFLAGS_JDKEXE
738OPENJDK_BUILD_CFLAGS_JDKLIB
739OPENJDK_BUILD_CXXSTD_CXXFLAG
740JVM_LIBS
741JVM_ASFLAGS
742JVM_LDFLAGS
743JVM_CFLAGS
744LDFLAGS_HASH_STYLE
745LDFLAGS_CXX_JDK
746JDKEXE_LIBS
747JDKLIB_LIBS
748LDFLAGS_JDKEXE
749LDFLAGS_JDKLIB
750CXXFLAGS_JDKEXE
751CXXFLAGS_JDKLIB
752CFLAGS_JDKEXE
753CFLAGS_JDKLIB
754MACOSX_VERSION_MIN
755CXXSTD_CXXFLAG
756JDK_ARCH_ABI_PROP_NAME
757CXX_O_FLAG_SIZE
758CXX_O_FLAG_NONE
759CXX_O_FLAG_DEBUG
760CXX_O_FLAG_NORM
761CXX_O_FLAG_HI
762CXX_O_FLAG_HIGHEST
763CXX_O_FLAG_HIGHEST_JVM
764C_O_FLAG_SIZE
765C_O_FLAG_NONE
766C_O_FLAG_DEBUG
767C_O_FLAG_NORM
768C_O_FLAG_HI
769C_O_FLAG_HIGHEST
770C_O_FLAG_HIGHEST_JVM
771JVM_CFLAGS_SYMBOLS
772CXXFLAGS_DEBUG_SYMBOLS
773CFLAGS_DEBUG_SYMBOLS
774CXX_FLAG_DEPS
775C_FLAG_DEPS
776SHARED_LIBRARY_FLAGS
777SET_SHARED_LIBRARY_MAPFILE
778SET_SHARED_LIBRARY_NAME
779SET_SHARED_LIBRARY_ORIGIN
780SET_EXECUTABLE_ORIGIN
781CXX_FLAG_REORDER
782C_FLAG_REORDER
783JVM_RCFLAGS
784RC_FLAGS
785AR_OUT_OPTION
786LD_OUT_OPTION
787EXE_OUT_OPTION
788CC_OUT_OPTION
789STRIPFLAGS
790ARFLAGS
791COMPILER_BINDCMD_FILE_FLAG
792COMPILER_COMMAND_FILE_FLAG
793COMPILER_TARGET_BITS_FLAG
794JT_HOME
795JTREGEXE
796HOTSPOT_TOOLCHAIN_TYPE
797USING_BROKEN_SUSE_LD
798PACKAGE_PATH
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_MAN
872IMPORT_MODULES_LEGAL
873IMPORT_MODULES_CONF
874IMPORT_MODULES_LIBS
875IMPORT_MODULES_CMDS
876IMPORT_MODULES_CLASSES
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIPEXE
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969JVM_VARIANT_MAIN
970VALID_JVM_VARIANTS
971JVM_VARIANTS
972DEBUG_LEVEL
973HOTSPOT_DEBUG_LEVEL
974JDK_VARIANT
975USERNAME
976CANONICAL_TOPDIR
977ORIGINAL_TOPDIR
978TOPDIR
979PATH_SEP
980ZERO_ARCHDEF
981HOTSPOT_BUILD_CPU_DEFINE
982HOTSPOT_BUILD_CPU_ARCH
983HOTSPOT_BUILD_CPU
984HOTSPOT_BUILD_OS_TYPE
985HOTSPOT_BUILD_OS
986OPENJDK_BUILD_BUNDLE_PLATFORM
987OPENJDK_BUILD_CPU_BUNDLE
988OPENJDK_BUILD_OS_BUNDLE
989OPENJDK_BUILD_OS_EXPORT_DIR
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LEGACY_LIB
993OPENJDK_BUILD_CPU_LEGACY
994HOTSPOT_TARGET_CPU_DEFINE
995HOTSPOT_TARGET_CPU_ARCH
996HOTSPOT_TARGET_CPU
997HOTSPOT_TARGET_OS_TYPE
998HOTSPOT_TARGET_OS
999DEFINE_CROSS_COMPILE_ARCH
1000LP64
1001OPENJDK_TARGET_BUNDLE_PLATFORM
1002OPENJDK_TARGET_CPU_BUNDLE
1003OPENJDK_TARGET_OS_BUNDLE
1004OPENJDK_TARGET_OS_EXPORT_DIR
1005OPENJDK_TARGET_CPU_OSARCH
1006OPENJDK_TARGET_CPU_ISADIR
1007OPENJDK_TARGET_CPU_LEGACY_LIB
1008OPENJDK_TARGET_CPU_LEGACY
1009REQUIRED_OS_VERSION
1010REQUIRED_OS_NAME
1011COMPILE_TYPE
1012OPENJDK_TARGET_CPU_ENDIAN
1013OPENJDK_TARGET_CPU_BITS
1014OPENJDK_TARGET_CPU_ARCH
1015OPENJDK_TARGET_CPU
1016OPENJDK_TARGET_OS_ENV
1017OPENJDK_TARGET_OS_TYPE
1018OPENJDK_TARGET_OS
1019OPENJDK_BUILD_CPU_ENDIAN
1020OPENJDK_BUILD_CPU_BITS
1021OPENJDK_BUILD_CPU_ARCH
1022OPENJDK_BUILD_CPU
1023OPENJDK_BUILD_OS_ENV
1024OPENJDK_BUILD_OS_TYPE
1025OPENJDK_BUILD_OS
1026OPENJDK_BUILD_AUTOCONF_NAME
1027OPENJDK_TARGET_AUTOCONF_NAME
1028target_os
1029target_vendor
1030target_cpu
1031target
1032host_os
1033host_vendor
1034host_cpu
1035host
1036build_os
1037build_vendor
1038build_cpu
1039build
1040NICE
1041CPIO
1042DF
1043READLINK
1044CYGPATH
1045SED
1046FGREP
1047EGREP
1048GREP
1049AWK
1050XARGS
1051WHICH
1052WC
1053UNIQ
1054UNAME
1055TR
1056TOUCH
1057TEE
1058TAR
1059TAIL
1060SORT
1061SH
1062RMDIR
1063RM
1064PRINTF
1065NAWK
1066MV
1067MKTEMP
1068MKDIR
1069LS
1070LN
1071GZIP
1072GUNZIP
1073HEAD
1074FIND
1075FILE
1076EXPR
1077ECHO
1078DIRNAME
1079DIFF
1080DATE
1081CUT
1082CP
1083COMM
1084CMP
1085CHMOD
1086CAT
1087BASH
1088BASENAME
1089DATE_WHEN_CONFIGURED
1090ORIGINAL_PATH
1091CONFIGURE_COMMAND_LINE
1092target_alias
1093host_alias
1094build_alias
1095LIBS
1096ECHO_T
1097ECHO_N
1098ECHO_C
1099DEFS
1100mandir
1101localedir
1102libdir
1103psdir
1104pdfdir
1105dvidir
1106htmldir
1107infodir
1108docdir
1109oldincludedir
1110includedir
1111localstatedir
1112sharedstatedir
1113sysconfdir
1114datadir
1115datarootdir
1116libexecdir
1117sbindir
1118bindir
1119program_transform_name
1120prefix
1121exec_prefix
1122PACKAGE_URL
1123PACKAGE_BUGREPORT
1124PACKAGE_STRING
1125PACKAGE_VERSION
1126PACKAGE_TARNAME
1127PACKAGE_NAME
1128PATH_SEPARATOR
1129SHELL'
1130ac_subst_files=''
1131ac_user_opts='
1132enable_option_checking
1133with_target_bits
1134enable_openjdk_only
1135with_custom_make_dir
1136with_jdk_variant
1137enable_debug
1138with_debug_level
1139with_jvm_variants
1140with_cpu_port
1141with_devkit
1142with_sys_root
1143with_sysroot
1144with_tools_dir
1145with_toolchain_path
1146with_extra_path
1147with_sdk_name
1148with_conf_name
1149with_output_sync
1150with_default_make_target
1151enable_headless_only
1152with_cacerts_file
1153enable_unlimited_crypto
1154with_copyright_year
1155enable_keep_packaged_modules
1156with_milestone
1157with_update_version
1158with_user_release_suffix
1159with_build_number
1160with_version_string
1161with_version_pre
1162with_version_opt
1163with_version_build
1164with_version_major
1165with_version_minor
1166with_version_security
1167with_version_patch
1168with_boot_jdk
1169with_build_jdk
1170with_add_source_root
1171with_override_source_root
1172with_adds_and_overrides
1173with_override_langtools
1174with_override_corba
1175with_override_jaxp
1176with_override_jaxws
1177with_override_hotspot
1178with_override_nashorn
1179with_override_jdk
1180with_import_hotspot
1181with_import_modules
1182enable_static_build
1183with_toolchain_type
1184with_extra_cflags
1185with_extra_cxxflags
1186with_extra_ldflags
1187with_toolchain_version
1188with_build_devkit
1189with_jtreg
1190with_abi_profile
1191enable_warnings_as_errors
1192with_native_debug_symbols
1193enable_debug_symbols
1194enable_zip_debug_info
1195enable_native_coverage
1196enable_dtrace
1197enable_aot
1198enable_hotspot_gtest
1199with_stdc__lib
1200with_msvcr_dll
1201with_msvcp_dll
1202with_x
1203with_cups
1204with_cups_include
1205with_freetype
1206with_freetype_include
1207with_freetype_lib
1208with_freetype_src
1209enable_freetype_bundling
1210with_alsa
1211with_alsa_include
1212with_alsa_lib
1213with_libffi
1214with_libffi_include
1215with_libffi_lib
1216enable_libffi_bundling
1217with_libjpeg
1218with_giflib
1219with_libpng
1220with_zlib
1221with_lcms
1222with_dxsdk
1223with_dxsdk_lib
1224with_dxsdk_include
1225with_libelf
1226with_libelf_include
1227with_libelf_lib
1228with_jvm_features
1229with_jvm_interpreter
1230enable_jtreg_failure_handler
1231enable_generate_classlist
1232with_num_cores
1233with_memory_size
1234with_jobs
1235with_test_jobs
1236with_boot_jdk_jvmargs
1237with_sjavac_server_java
1238enable_sjavac
1239enable_javac_server
1240enable_icecc
1241enable_precompiled_headers
1242enable_ccache
1243with_ccache_dir
1244'
1245      ac_precious_vars='build_alias
1246host_alias
1247target_alias
1248BASENAME
1249BASH
1250CAT
1251CHMOD
1252CMP
1253COMM
1254CP
1255CUT
1256DATE
1257DIFF
1258DIRNAME
1259ECHO
1260EXPR
1261FILE
1262FIND
1263HEAD
1264GUNZIP
1265GZIP
1266LN
1267LS
1268MKDIR
1269MKTEMP
1270MV
1271NAWK
1272PRINTF
1273RM
1274RMDIR
1275SH
1276SORT
1277TAIL
1278TAR
1279TEE
1280TOUCH
1281TR
1282UNAME
1283UNIQ
1284WC
1285WHICH
1286XARGS
1287AWK
1288GREP
1289EGREP
1290FGREP
1291SED
1292CYGPATH
1293READLINK
1294DF
1295CPIO
1296NICE
1297MAKE
1298UNZIP
1299ZIPEXE
1300LDD
1301OTOOL
1302READELF
1303HG
1304STAT
1305TIME
1306DTRACE
1307PATCH
1308DSYMUTIL
1309XATTR
1310CODESIGN
1311SETFILE
1312PKG_CONFIG
1313JAVA
1314JAVAC
1315JAVAH
1316JAR
1317JARSIGNER
1318CC
1319CFLAGS
1320LDFLAGS
1321LIBS
1322CPPFLAGS
1323CXX
1324CXXFLAGS
1325CCC
1326CPP
1327CXXCPP
1328AS
1329AR
1330LIPO
1331STRIP
1332NM
1333GNM
1334OBJCOPY
1335OBJDUMP
1336BUILD_CC
1337BUILD_CXX
1338BUILD_NM
1339BUILD_AR
1340BUILD_OBJCOPY
1341BUILD_STRIP
1342JTREGEXE
1343XMKMF
1344FREETYPE_CFLAGS
1345FREETYPE_LIBS
1346ALSA_CFLAGS
1347ALSA_LIBS
1348LIBFFI_CFLAGS
1349LIBFFI_LIBS
1350PNG_CFLAGS
1351PNG_LIBS
1352LCMS_CFLAGS
1353LCMS_LIBS
1354ELF_CFLAGS
1355ELF_LIBS
1356ICECC_CMD
1357ICECC_CREATE_ENV
1358ICECC_WRAPPER
1359CCACHE'
1360
1361
1362# Initialize some variables set by options.
1363ac_init_help=
1364ac_init_version=false
1365ac_unrecognized_opts=
1366ac_unrecognized_sep=
1367# The variables have the same names as the options, with
1368# dashes changed to underlines.
1369cache_file=/dev/null
1370exec_prefix=NONE
1371no_create=
1372no_recursion=
1373prefix=NONE
1374program_prefix=NONE
1375program_suffix=NONE
1376program_transform_name=s,x,x,
1377silent=
1378site=
1379srcdir=
1380verbose=
1381x_includes=NONE
1382x_libraries=NONE
1383
1384# Installation directory options.
1385# These are left unexpanded so users can "make install exec_prefix=/foo"
1386# and all the variables that are supposed to be based on exec_prefix
1387# by default will actually change.
1388# Use braces instead of parens because sh, perl, etc. also accept them.
1389# (The list follows the same order as the GNU Coding Standards.)
1390bindir='${exec_prefix}/bin'
1391sbindir='${exec_prefix}/sbin'
1392libexecdir='${exec_prefix}/libexec'
1393datarootdir='${prefix}/share'
1394datadir='${datarootdir}'
1395sysconfdir='${prefix}/etc'
1396sharedstatedir='${prefix}/com'
1397localstatedir='${prefix}/var'
1398includedir='${prefix}/include'
1399oldincludedir='/usr/include'
1400docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1401infodir='${datarootdir}/info'
1402htmldir='${docdir}'
1403dvidir='${docdir}'
1404pdfdir='${docdir}'
1405psdir='${docdir}'
1406libdir='${exec_prefix}/lib'
1407localedir='${datarootdir}/locale'
1408mandir='${datarootdir}/man'
1409
1410ac_prev=
1411ac_dashdash=
1412for ac_option
1413do
1414  # If the previous option needs an argument, assign it.
1415  if test -n "$ac_prev"; then
1416    eval $ac_prev=\$ac_option
1417    ac_prev=
1418    continue
1419  fi
1420
1421  case $ac_option in
1422  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1423  *=)   ac_optarg= ;;
1424  *)    ac_optarg=yes ;;
1425  esac
1426
1427  # Accept the important Cygnus configure options, so we can diagnose typos.
1428
1429  case $ac_dashdash$ac_option in
1430  --)
1431    ac_dashdash=yes ;;
1432
1433  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1434    ac_prev=bindir ;;
1435  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1436    bindir=$ac_optarg ;;
1437
1438  -build | --build | --buil | --bui | --bu)
1439    ac_prev=build_alias ;;
1440  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1441    build_alias=$ac_optarg ;;
1442
1443  -cache-file | --cache-file | --cache-fil | --cache-fi \
1444  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1445    ac_prev=cache_file ;;
1446  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1447  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1448    cache_file=$ac_optarg ;;
1449
1450  --config-cache | -C)
1451    cache_file=config.cache ;;
1452
1453  -datadir | --datadir | --datadi | --datad)
1454    ac_prev=datadir ;;
1455  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1456    datadir=$ac_optarg ;;
1457
1458  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1459  | --dataroo | --dataro | --datar)
1460    ac_prev=datarootdir ;;
1461  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1462  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1463    datarootdir=$ac_optarg ;;
1464
1465  -disable-* | --disable-*)
1466    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1467    # Reject names that are not valid shell variable names.
1468    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1469      as_fn_error $? "invalid feature name: $ac_useropt"
1470    ac_useropt_orig=$ac_useropt
1471    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1472    case $ac_user_opts in
1473      *"
1474"enable_$ac_useropt"
1475"*) ;;
1476      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1477	 ac_unrecognized_sep=', ';;
1478    esac
1479    eval enable_$ac_useropt=no ;;
1480
1481  -docdir | --docdir | --docdi | --doc | --do)
1482    ac_prev=docdir ;;
1483  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1484    docdir=$ac_optarg ;;
1485
1486  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1487    ac_prev=dvidir ;;
1488  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1489    dvidir=$ac_optarg ;;
1490
1491  -enable-* | --enable-*)
1492    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1493    # Reject names that are not valid shell variable names.
1494    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1495      as_fn_error $? "invalid feature name: $ac_useropt"
1496    ac_useropt_orig=$ac_useropt
1497    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1498    case $ac_user_opts in
1499      *"
1500"enable_$ac_useropt"
1501"*) ;;
1502      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1503	 ac_unrecognized_sep=', ';;
1504    esac
1505    eval enable_$ac_useropt=\$ac_optarg ;;
1506
1507  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1508  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1509  | --exec | --exe | --ex)
1510    ac_prev=exec_prefix ;;
1511  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1512  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1513  | --exec=* | --exe=* | --ex=*)
1514    exec_prefix=$ac_optarg ;;
1515
1516  -gas | --gas | --ga | --g)
1517    # Obsolete; use --with-gas.
1518    with_gas=yes ;;
1519
1520  -help | --help | --hel | --he | -h)
1521    ac_init_help=long ;;
1522  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1523    ac_init_help=recursive ;;
1524  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1525    ac_init_help=short ;;
1526
1527  -host | --host | --hos | --ho)
1528    ac_prev=host_alias ;;
1529  -host=* | --host=* | --hos=* | --ho=*)
1530    host_alias=$ac_optarg ;;
1531
1532  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1533    ac_prev=htmldir ;;
1534  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1535  | --ht=*)
1536    htmldir=$ac_optarg ;;
1537
1538  -includedir | --includedir | --includedi | --included | --include \
1539  | --includ | --inclu | --incl | --inc)
1540    ac_prev=includedir ;;
1541  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1542  | --includ=* | --inclu=* | --incl=* | --inc=*)
1543    includedir=$ac_optarg ;;
1544
1545  -infodir | --infodir | --infodi | --infod | --info | --inf)
1546    ac_prev=infodir ;;
1547  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1548    infodir=$ac_optarg ;;
1549
1550  -libdir | --libdir | --libdi | --libd)
1551    ac_prev=libdir ;;
1552  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1553    libdir=$ac_optarg ;;
1554
1555  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1556  | --libexe | --libex | --libe)
1557    ac_prev=libexecdir ;;
1558  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1559  | --libexe=* | --libex=* | --libe=*)
1560    libexecdir=$ac_optarg ;;
1561
1562  -localedir | --localedir | --localedi | --localed | --locale)
1563    ac_prev=localedir ;;
1564  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1565    localedir=$ac_optarg ;;
1566
1567  -localstatedir | --localstatedir | --localstatedi | --localstated \
1568  | --localstate | --localstat | --localsta | --localst | --locals)
1569    ac_prev=localstatedir ;;
1570  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1571  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1572    localstatedir=$ac_optarg ;;
1573
1574  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1575    ac_prev=mandir ;;
1576  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1577    mandir=$ac_optarg ;;
1578
1579  -nfp | --nfp | --nf)
1580    # Obsolete; use --without-fp.
1581    with_fp=no ;;
1582
1583  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1584  | --no-cr | --no-c | -n)
1585    no_create=yes ;;
1586
1587  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1588  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1589    no_recursion=yes ;;
1590
1591  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1592  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1593  | --oldin | --oldi | --old | --ol | --o)
1594    ac_prev=oldincludedir ;;
1595  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1596  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1597  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1598    oldincludedir=$ac_optarg ;;
1599
1600  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1601    ac_prev=prefix ;;
1602  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1603    prefix=$ac_optarg ;;
1604
1605  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1606  | --program-pre | --program-pr | --program-p)
1607    ac_prev=program_prefix ;;
1608  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1609  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1610    program_prefix=$ac_optarg ;;
1611
1612  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1613  | --program-suf | --program-su | --program-s)
1614    ac_prev=program_suffix ;;
1615  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1616  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1617    program_suffix=$ac_optarg ;;
1618
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    ac_prev=program_transform_name ;;
1627  -program-transform-name=* | --program-transform-name=* \
1628  | --program-transform-nam=* | --program-transform-na=* \
1629  | --program-transform-n=* | --program-transform-=* \
1630  | --program-transform=* | --program-transfor=* \
1631  | --program-transfo=* | --program-transf=* \
1632  | --program-trans=* | --program-tran=* \
1633  | --progr-tra=* | --program-tr=* | --program-t=*)
1634    program_transform_name=$ac_optarg ;;
1635
1636  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1637    ac_prev=pdfdir ;;
1638  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1639    pdfdir=$ac_optarg ;;
1640
1641  -psdir | --psdir | --psdi | --psd | --ps)
1642    ac_prev=psdir ;;
1643  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1644    psdir=$ac_optarg ;;
1645
1646  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1647  | -silent | --silent | --silen | --sile | --sil)
1648    silent=yes ;;
1649
1650  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1651    ac_prev=sbindir ;;
1652  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1653  | --sbi=* | --sb=*)
1654    sbindir=$ac_optarg ;;
1655
1656  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1657  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1658  | --sharedst | --shareds | --shared | --share | --shar \
1659  | --sha | --sh)
1660    ac_prev=sharedstatedir ;;
1661  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1662  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1663  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1664  | --sha=* | --sh=*)
1665    sharedstatedir=$ac_optarg ;;
1666
1667  -site | --site | --sit)
1668    ac_prev=site ;;
1669  -site=* | --site=* | --sit=*)
1670    site=$ac_optarg ;;
1671
1672  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1673    ac_prev=srcdir ;;
1674  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1675    srcdir=$ac_optarg ;;
1676
1677  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1678  | --syscon | --sysco | --sysc | --sys | --sy)
1679    ac_prev=sysconfdir ;;
1680  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1681  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1682    sysconfdir=$ac_optarg ;;
1683
1684  -target | --target | --targe | --targ | --tar | --ta | --t)
1685    ac_prev=target_alias ;;
1686  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1687    target_alias=$ac_optarg ;;
1688
1689  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1690    verbose=yes ;;
1691
1692  -version | --version | --versio | --versi | --vers | -V)
1693    ac_init_version=: ;;
1694
1695  -with-* | --with-*)
1696    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1697    # Reject names that are not valid shell variable names.
1698    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1699      as_fn_error $? "invalid package name: $ac_useropt"
1700    ac_useropt_orig=$ac_useropt
1701    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1702    case $ac_user_opts in
1703      *"
1704"with_$ac_useropt"
1705"*) ;;
1706      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1707	 ac_unrecognized_sep=', ';;
1708    esac
1709    eval with_$ac_useropt=\$ac_optarg ;;
1710
1711  -without-* | --without-*)
1712    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1713    # Reject names that are not valid shell variable names.
1714    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1715      as_fn_error $? "invalid package name: $ac_useropt"
1716    ac_useropt_orig=$ac_useropt
1717    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1718    case $ac_user_opts in
1719      *"
1720"with_$ac_useropt"
1721"*) ;;
1722      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1723	 ac_unrecognized_sep=', ';;
1724    esac
1725    eval with_$ac_useropt=no ;;
1726
1727  --x)
1728    # Obsolete; use --with-x.
1729    with_x=yes ;;
1730
1731  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1732  | --x-incl | --x-inc | --x-in | --x-i)
1733    ac_prev=x_includes ;;
1734  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1735  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1736    x_includes=$ac_optarg ;;
1737
1738  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1739  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1740    ac_prev=x_libraries ;;
1741  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1742  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1743    x_libraries=$ac_optarg ;;
1744
1745  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1746Try \`$0 --help' for more information"
1747    ;;
1748
1749  *=*)
1750    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1751    # Reject names that are not valid shell variable names.
1752    case $ac_envvar in #(
1753      '' | [0-9]* | *[!_$as_cr_alnum]* )
1754      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1755    esac
1756    eval $ac_envvar=\$ac_optarg
1757    export $ac_envvar ;;
1758
1759  *)
1760    # FIXME: should be removed in autoconf 3.0.
1761    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1762    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1763      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1764    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1765    ;;
1766
1767  esac
1768done
1769
1770if test -n "$ac_prev"; then
1771  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1772  as_fn_error $? "missing argument to $ac_option"
1773fi
1774
1775if test -n "$ac_unrecognized_opts"; then
1776  case $enable_option_checking in
1777    no) ;;
1778    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1779    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1780  esac
1781fi
1782
1783# Check all directory arguments for consistency.
1784for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1785		datadir sysconfdir sharedstatedir localstatedir includedir \
1786		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1787		libdir localedir mandir
1788do
1789  eval ac_val=\$$ac_var
1790  # Remove trailing slashes.
1791  case $ac_val in
1792    */ )
1793      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1794      eval $ac_var=\$ac_val;;
1795  esac
1796  # Be sure to have absolute directory names.
1797  case $ac_val in
1798    [\\/$]* | ?:[\\/]* )  continue;;
1799    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1800  esac
1801  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1802done
1803
1804# There might be people who depend on the old broken behavior: `$host'
1805# used to hold the argument of --host etc.
1806# FIXME: To remove some day.
1807build=$build_alias
1808host=$host_alias
1809target=$target_alias
1810
1811# FIXME: To remove some day.
1812if test "x$host_alias" != x; then
1813  if test "x$build_alias" = x; then
1814    cross_compiling=maybe
1815  elif test "x$build_alias" != "x$host_alias"; then
1816    cross_compiling=yes
1817  fi
1818fi
1819
1820ac_tool_prefix=
1821test -n "$host_alias" && ac_tool_prefix=$host_alias-
1822
1823test "$silent" = yes && exec 6>/dev/null
1824
1825
1826ac_pwd=`pwd` && test -n "$ac_pwd" &&
1827ac_ls_di=`ls -di .` &&
1828ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1829  as_fn_error $? "working directory cannot be determined"
1830test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1831  as_fn_error $? "pwd does not report name of working directory"
1832
1833
1834# Find the source files, if location was not specified.
1835if test -z "$srcdir"; then
1836  ac_srcdir_defaulted=yes
1837  # Try the directory containing this script, then the parent directory.
1838  ac_confdir=`$as_dirname -- "$as_myself" ||
1839$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1840	 X"$as_myself" : 'X\(//\)[^/]' \| \
1841	 X"$as_myself" : 'X\(//\)$' \| \
1842	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1843$as_echo X"$as_myself" |
1844    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\/\)[^/].*/{
1849	    s//\1/
1850	    q
1851	  }
1852	  /^X\(\/\/\)$/{
1853	    s//\1/
1854	    q
1855	  }
1856	  /^X\(\/\).*/{
1857	    s//\1/
1858	    q
1859	  }
1860	  s/.*/./; q'`
1861  srcdir=$ac_confdir
1862  if test ! -r "$srcdir/$ac_unique_file"; then
1863    srcdir=..
1864  fi
1865else
1866  ac_srcdir_defaulted=no
1867fi
1868if test ! -r "$srcdir/$ac_unique_file"; then
1869  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1870  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1871fi
1872ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1873ac_abs_confdir=`(
1874	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1875	pwd)`
1876# When building in place, set srcdir=.
1877if test "$ac_abs_confdir" = "$ac_pwd"; then
1878  srcdir=.
1879fi
1880# Remove unnecessary trailing slashes from srcdir.
1881# Double slashes in file names in object file debugging info
1882# mess up M-x gdb in Emacs.
1883case $srcdir in
1884*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1885esac
1886for ac_var in $ac_precious_vars; do
1887  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1888  eval ac_env_${ac_var}_value=\$${ac_var}
1889  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1890  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1891done
1892
1893#
1894# Report the --help message.
1895#
1896if test "$ac_init_help" = "long"; then
1897  # Omit some internal or obsolete options to make the list less imposing.
1898  # This message is too long to be a string in the A/UX 3.1 sh.
1899  cat <<_ACEOF
1900\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1901
1902Usage: $0 [OPTION]... [VAR=VALUE]...
1903
1904To assign environment variables (e.g., CC, CFLAGS...), specify them as
1905VAR=VALUE.  See below for descriptions of some of the useful variables.
1906
1907Defaults for the options are specified in brackets.
1908
1909Configuration:
1910  -h, --help              display this help and exit
1911      --help=short        display options specific to this package
1912      --help=recursive    display the short help of all the included packages
1913  -V, --version           display version information and exit
1914  -q, --quiet, --silent   do not print \`checking ...' messages
1915      --cache-file=FILE   cache test results in FILE [disabled]
1916  -C, --config-cache      alias for \`--cache-file=config.cache'
1917  -n, --no-create         do not create output files
1918      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1919
1920Installation directories:
1921  --prefix=PREFIX         install architecture-independent files in PREFIX
1922                          [$ac_default_prefix]
1923  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1924                          [PREFIX]
1925
1926By default, \`make install' will install all the files in
1927\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1928an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1929for instance \`--prefix=\$HOME'.
1930
1931For better control, use the options below.
1932
1933Fine tuning of the installation directories:
1934  --bindir=DIR            user executables [EPREFIX/bin]
1935  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1936  --libexecdir=DIR        program executables [EPREFIX/libexec]
1937  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1938  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1939  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1940  --libdir=DIR            object code libraries [EPREFIX/lib]
1941  --includedir=DIR        C header files [PREFIX/include]
1942  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1943  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1944  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1945  --infodir=DIR           info documentation [DATAROOTDIR/info]
1946  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1947  --mandir=DIR            man documentation [DATAROOTDIR/man]
1948  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1949  --htmldir=DIR           html documentation [DOCDIR]
1950  --dvidir=DIR            dvi documentation [DOCDIR]
1951  --pdfdir=DIR            pdf documentation [DOCDIR]
1952  --psdir=DIR             ps documentation [DOCDIR]
1953_ACEOF
1954
1955  cat <<\_ACEOF
1956
1957X features:
1958  --x-includes=DIR    X include files are in DIR
1959  --x-libraries=DIR   X library files are in DIR
1960
1961System types:
1962  --build=BUILD     configure for building on BUILD [guessed]
1963  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1964  --target=TARGET   configure for building compilers for TARGET [HOST]
1965_ACEOF
1966fi
1967
1968if test -n "$ac_init_help"; then
1969  case $ac_init_help in
1970     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1971   esac
1972  cat <<\_ACEOF
1973
1974Optional Features:
1975  --disable-option-checking  ignore unrecognized --enable/--with options
1976  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1977  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1978  --enable-openjdk-only   suppress building custom source even if present
1979                          [disabled]
1980  --enable-debug          set the debug level to fastdebug (shorthand for
1981                          --with-debug-level=fastdebug) [disabled]
1982  --enable-headless-only  only build headless (no GUI) support [disabled]
1983  --disable-unlimited-crypto
1984                          Disable unlimited crypto policy [enabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --enable-aot[=yes/no/auto]
2002                          enable ahead of time compilation feature. Default is
2003                          auto, where aot is enabled if all dependencies are
2004                          present.
2005  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2006  --disable-freetype-bundling
2007                          disable bundling of the freetype library with the
2008                          build result [enabled on Windows or when using
2009                          --with-freetype, disabled otherwise]
2010  --enable-libffi-bundling
2011                          enable bundling of libffi.so to make the built JDK
2012                          runnable on more systems
2013  --enable-jtreg-failure-handler
2014                          forces build of the jtreg failure handler to be
2015                          enabled, missing dependencies become fatal errors.
2016                          Default is auto, where the failure handler is built
2017                          if all dependencies are present and otherwise just
2018                          disabled.
2019  --disable-generate-classlist
2020                          forces enabling or disabling of the generation of a
2021                          CDS classlist at build time. Default is to generate
2022                          it when either the server or client JVMs are built.
2023  --enable-sjavac         use sjavac to do fast incremental compiles
2024                          [disabled]
2025  --disable-javac-server  disable javac server [enabled]
2026  --enable-icecc          enable distribted compilation of native code using
2027                          icecc/icecream [disabled]
2028  --disable-precompiled-headers
2029                          disable using precompiled headers when compiling C++
2030                          [enabled]
2031  --enable-ccache         enable using ccache to speed up recompilations
2032                          [disabled]
2033
2034Optional Packages:
2035  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2036  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2037  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2038                          support it), e.g. --with-target-bits=32 [guessed]
2039  --with-custom-make-dir  Deprecated. Option is kept for backwards
2040                          compatibility and is ignored
2041  --with-jdk-variant      JDK variant to build (normal) [normal]
2042  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2043                          optimized) [release]
2044  --with-jvm-variants     JVM variants (separated by commas) to build
2045                          (server,client,minimal,core,zero,zeroshark,custom)
2046                          [server]
2047  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2048                          (arm64,aarch64) [aarch64]
2049  --with-devkit           use this devkit for compilers, tools and resources
2050  --with-sys-root         alias for --with-sysroot for backwards compatability
2051  --with-sysroot          use this directory as sysroot
2052  --with-tools-dir        alias for --with-toolchain-path for backwards
2053                          compatibility
2054  --with-toolchain-path   prepend these directories when searching for
2055                          toolchain binaries (compilers etc)
2056  --with-extra-path       prepend these directories to the default path
2057  --with-sdk-name         use the platform SDK of the given name. [macosx]
2058  --with-conf-name        use this as the name of the configuration [generated
2059                          from important configuration options]
2060  --with-output-sync      set make output sync type if supported by make.
2061                          [recurse]
2062  --with-default-make-target
2063                          set the default make target [exploded-image]
2064  --with-cacerts-file     specify alternative cacerts file
2065  --with-copyright-year   Set copyright year value for build [current year]
2066  --with-milestone        Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-update-version   Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-user-release-suffix
2071                          Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-build-number     Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-version-string   Set version string [calculated]
2076  --with-version-pre      Set the base part of the version 'PRE' field
2077                          (pre-release identifier) ['internal']
2078  --with-version-opt      Set version 'OPT' field (build metadata)
2079                          [<timestamp>.<user>.<dirname>]
2080  --with-version-build    Set version 'BUILD' field (build number) [not
2081                          specified]
2082  --with-version-major    Set version 'MAJOR' field (first number) [current
2083                          source value]
2084  --with-version-minor    Set version 'MINOR' field (second number) [current
2085                          source value]
2086  --with-version-security Set version 'SECURITY' field (third number) [current
2087                          source value]
2088  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2089                          specified]
2090  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2091  --with-build-jdk        path to JDK of same version as is being built[the
2092                          newly built JDK]
2093  --with-add-source-root  Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-source-root
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-adds-and-overrides
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-langtools
2102                          Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-corba   Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-jaxp    Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-jaxws   Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-hotspot Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-nashorn Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-override-jdk     Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-import_hotspot   Deprecated. Option is kept for backwards
2117                          compatibility and is ignored
2118  --with-import-modules   import a set of prebuilt modules either as a zip
2119                          file or an exploded directory
2120  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2121                          to show possible values [platform dependent]
2122  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2123  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2124  --with-extra-ldflags    extra flags to be used when linking jdk
2125  --with-toolchain-version
2126                          the version of the toolchain to look for, use
2127                          '--help' to show possible values [platform
2128                          dependent]
2129  --with-build-devkit     Devkit to use for the build platform toolchain
2130  --with-jtreg            Regression Test Harness [probed]
2131  --with-abi-profile      specify ABI profile for ARM builds
2132                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2133                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2134                          [toolchain dependent]
2135  --with-native-debug-symbols
2136                          set the native debug symbol configuration (none,
2137                          internal, external, zipped) [varying]
2138  --with-stdc++lib=<static>,<dynamic>,<default>
2139                          force linking of the C++ runtime on Linux to either
2140                          static or dynamic, default is static with dynamic as
2141                          fallback
2142  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                          (Windows only) [probed]
2144  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                          (Windows only) [probed]
2146  --with-x                use the X Window System
2147  --with-cups             specify prefix directory for the cups package
2148                          (expecting the headers under PATH/include)
2149  --with-cups-include     specify directory for the cups include files
2150  --with-freetype         specify prefix directory for the freetype package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-freetype-include specify directory for the freetype include files
2154  --with-freetype-lib     specify directory for the freetype library
2155  --with-freetype-src     specify directory with freetype sources to
2156                          automatically build the library (experimental,
2157                          Windows-only)
2158  --with-alsa             specify prefix directory for the alsa package
2159                          (expecting the libraries under PATH/lib and the
2160                          headers under PATH/include)
2161  --with-alsa-include     specify directory for the alsa include files
2162  --with-alsa-lib         specify directory for the alsa library
2163  --with-libffi           specify prefix directory for the libffi package
2164                          (expecting the libraries under PATH/lib and the
2165                          headers under PATH/include)
2166  --with-libffi-include   specify directory for the libffi include files
2167  --with-libffi-lib       specify directory for the libffi library
2168  --with-libjpeg          use libjpeg from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-giflib           use giflib from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-libpng           use libpng from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-zlib             use zlib from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-lcms             use lcms2 from build system or OpenJDK source
2177                          (system, bundled) [bundled]
2178  --with-dxsdk            Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-dxsdk-include    Deprecated. Option is kept for backwards
2183                          compatibility and is ignored
2184  --with-libelf           specify prefix directory for the libelf package
2185                          (expecting the libraries under PATH/lib and the
2186                          headers under PATH/include)
2187  --with-libelf-include   specify directory for the libelf include files
2188  --with-libelf-lib       specify directory for the libelf library
2189  --with-jvm-features     additional JVM features to enable (separated by
2190                          comma), use '--help' to show possible values [none]
2191  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2192                          compatibility and is ignored
2193  --with-num-cores        number of cores in the build system, e.g.
2194                          --with-num-cores=8 [probed]
2195  --with-memory-size      memory (in MB) available in the build system, e.g.
2196                          --with-memory-size=1024 [probed]
2197  --with-jobs             number of parallel jobs to let make run [calculated
2198                          based on cores and memory]
2199  --with-test-jobs        number of parallel tests jobs to run [based on build
2200                          jobs]
2201  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2202                          invocations of boot JDK, overriding the default
2203                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2204                          -enableassertions"
2205  --with-sjavac-server-java
2206                          use this java binary for running the sjavac
2207                          background server [Boot JDK java]
2208  --with-ccache-dir       where to store ccache files [~/.ccache]
2209
2210Some influential environment variables:
2211  BASENAME    Override default value for BASENAME
2212  BASH        Override default value for BASH
2213  CAT         Override default value for CAT
2214  CHMOD       Override default value for CHMOD
2215  CMP         Override default value for CMP
2216  COMM        Override default value for COMM
2217  CP          Override default value for CP
2218  CUT         Override default value for CUT
2219  DATE        Override default value for DATE
2220  DIFF        Override default value for DIFF
2221  DIRNAME     Override default value for DIRNAME
2222  ECHO        Override default value for ECHO
2223  EXPR        Override default value for EXPR
2224  FILE        Override default value for FILE
2225  FIND        Override default value for FIND
2226  HEAD        Override default value for HEAD
2227  GUNZIP      Override default value for GUNZIP
2228  GZIP        Override default value for GZIP
2229  LN          Override default value for LN
2230  LS          Override default value for LS
2231  MKDIR       Override default value for MKDIR
2232  MKTEMP      Override default value for MKTEMP
2233  MV          Override default value for MV
2234  NAWK        Override default value for NAWK
2235  PRINTF      Override default value for PRINTF
2236  RM          Override default value for RM
2237  RMDIR       Override default value for RMDIR
2238  SH          Override default value for SH
2239  SORT        Override default value for SORT
2240  TAIL        Override default value for TAIL
2241  TAR         Override default value for TAR
2242  TEE         Override default value for TEE
2243  TOUCH       Override default value for TOUCH
2244  TR          Override default value for TR
2245  UNAME       Override default value for UNAME
2246  UNIQ        Override default value for UNIQ
2247  WC          Override default value for WC
2248  WHICH       Override default value for WHICH
2249  XARGS       Override default value for XARGS
2250  AWK         Override default value for AWK
2251  GREP        Override default value for GREP
2252  EGREP       Override default value for EGREP
2253  FGREP       Override default value for FGREP
2254  SED         Override default value for SED
2255  CYGPATH     Override default value for CYGPATH
2256  READLINK    Override default value for READLINK
2257  DF          Override default value for DF
2258  CPIO        Override default value for CPIO
2259  NICE        Override default value for NICE
2260  MAKE        Override default value for MAKE
2261  UNZIP       Override default value for UNZIP
2262  ZIPEXE      Override default value for ZIPEXE
2263  LDD         Override default value for LDD
2264  OTOOL       Override default value for OTOOL
2265  READELF     Override default value for READELF
2266  HG          Override default value for HG
2267  STAT        Override default value for STAT
2268  TIME        Override default value for TIME
2269  DTRACE      Override default value for DTRACE
2270  PATCH       Override default value for PATCH
2271  DSYMUTIL    Override default value for DSYMUTIL
2272  XATTR       Override default value for XATTR
2273  CODESIGN    Override default value for CODESIGN
2274  SETFILE     Override default value for SETFILE
2275  PKG_CONFIG  path to pkg-config utility
2276  JAVA        Override default value for JAVA
2277  JAVAC       Override default value for JAVAC
2278  JAVAH       Override default value for JAVAH
2279  JAR         Override default value for JAR
2280  JARSIGNER   Override default value for JARSIGNER
2281  CC          C compiler command
2282  CFLAGS      C compiler flags
2283  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2284              nonstandard directory <lib dir>
2285  LIBS        libraries to pass to the linker, e.g. -l<library>
2286  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2287              you have headers in a nonstandard directory <include dir>
2288  CXX         C++ compiler command
2289  CXXFLAGS    C++ compiler flags
2290  CPP         C preprocessor
2291  CXXCPP      C++ preprocessor
2292  AS          Override default value for AS
2293  AR          Override default value for AR
2294  LIPO        Override default value for LIPO
2295  STRIP       Override default value for STRIP
2296  NM          Override default value for NM
2297  GNM         Override default value for GNM
2298  OBJCOPY     Override default value for OBJCOPY
2299  OBJDUMP     Override default value for OBJDUMP
2300  BUILD_CC    Override default value for BUILD_CC
2301  BUILD_CXX   Override default value for BUILD_CXX
2302  BUILD_NM    Override default value for BUILD_NM
2303  BUILD_AR    Override default value for BUILD_AR
2304  BUILD_OBJCOPY
2305              Override default value for BUILD_OBJCOPY
2306  BUILD_STRIP Override default value for BUILD_STRIP
2307  JTREGEXE    Override default value for JTREGEXE
2308  XMKMF       Path to xmkmf, Makefile generator for X Window System
2309  FREETYPE_CFLAGS
2310              C compiler flags for FREETYPE, overriding pkg-config
2311  FREETYPE_LIBS
2312              linker flags for FREETYPE, overriding pkg-config
2313  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2314  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2315  LIBFFI_CFLAGS
2316              C compiler flags for LIBFFI, overriding pkg-config
2317  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2318  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2319  PNG_LIBS    linker flags for PNG, overriding pkg-config
2320  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2321  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2322  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2323  ELF_LIBS    linker flags for ELF, overriding pkg-config
2324  ICECC_CMD   Override default value for ICECC_CMD
2325  ICECC_CREATE_ENV
2326              Override default value for ICECC_CREATE_ENV
2327  ICECC_WRAPPER
2328              Override default value for ICECC_WRAPPER
2329  CCACHE      Override default value for CCACHE
2330
2331Use these variables to override the choices made by `configure' or to help
2332it to find libraries and programs with nonstandard names/locations.
2333
2334Report bugs to <build-dev@openjdk.java.net>.
2335OpenJDK home page: <http://openjdk.java.net>.
2336_ACEOF
2337ac_status=$?
2338fi
2339
2340if test "$ac_init_help" = "recursive"; then
2341  # If there are subdirs, report their specific --help.
2342  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2343    test -d "$ac_dir" ||
2344      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2345      continue
2346    ac_builddir=.
2347
2348case "$ac_dir" in
2349.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2350*)
2351  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2352  # A ".." for each directory in $ac_dir_suffix.
2353  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2354  case $ac_top_builddir_sub in
2355  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2356  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2357  esac ;;
2358esac
2359ac_abs_top_builddir=$ac_pwd
2360ac_abs_builddir=$ac_pwd$ac_dir_suffix
2361# for backward compatibility:
2362ac_top_builddir=$ac_top_build_prefix
2363
2364case $srcdir in
2365  .)  # We are building in place.
2366    ac_srcdir=.
2367    ac_top_srcdir=$ac_top_builddir_sub
2368    ac_abs_top_srcdir=$ac_pwd ;;
2369  [\\/]* | ?:[\\/]* )  # Absolute name.
2370    ac_srcdir=$srcdir$ac_dir_suffix;
2371    ac_top_srcdir=$srcdir
2372    ac_abs_top_srcdir=$srcdir ;;
2373  *) # Relative name.
2374    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2375    ac_top_srcdir=$ac_top_build_prefix$srcdir
2376    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2377esac
2378ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2379
2380    cd "$ac_dir" || { ac_status=$?; continue; }
2381    # Check for guested configure.
2382    if test -f "$ac_srcdir/configure.gnu"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2385    elif test -f "$ac_srcdir/configure"; then
2386      echo &&
2387      $SHELL "$ac_srcdir/configure" --help=recursive
2388    else
2389      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2390    fi || ac_status=$?
2391    cd "$ac_pwd" || { ac_status=$?; break; }
2392  done
2393fi
2394
2395test -n "$ac_init_help" && exit $ac_status
2396if $ac_init_version; then
2397  cat <<\_ACEOF
2398OpenJDK configure jdk9
2399generated by GNU Autoconf 2.69
2400
2401Copyright (C) 2012 Free Software Foundation, Inc.
2402This configure script is free software; the Free Software Foundation
2403gives unlimited permission to copy, distribute and modify it.
2404_ACEOF
2405  exit
2406fi
2407
2408## ------------------------ ##
2409## Autoconf initialization. ##
2410## ------------------------ ##
2411
2412# ac_fn_c_try_compile LINENO
2413# --------------------------
2414# Try to compile conftest.$ac_ext, and return whether this succeeded.
2415ac_fn_c_try_compile ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  rm -f conftest.$ac_objext
2419  if { { ac_try="$ac_compile"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_compile") 2>conftest.err
2427  ac_status=$?
2428  if test -s conftest.err; then
2429    grep -v '^ *+' conftest.err >conftest.er1
2430    cat conftest.er1 >&5
2431    mv -f conftest.er1 conftest.err
2432  fi
2433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434  test $ac_status = 0; } && {
2435	 test -z "$ac_c_werror_flag" ||
2436	 test ! -s conftest.err
2437       } && test -s conftest.$ac_objext; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_c_try_compile
2449
2450# ac_fn_cxx_try_compile LINENO
2451# ----------------------------
2452# Try to compile conftest.$ac_ext, and return whether this succeeded.
2453ac_fn_cxx_try_compile ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  rm -f conftest.$ac_objext
2457  if { { ac_try="$ac_compile"
2458case "(($ac_try" in
2459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460  *) ac_try_echo=$ac_try;;
2461esac
2462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463$as_echo "$ac_try_echo"; } >&5
2464  (eval "$ac_compile") 2>conftest.err
2465  ac_status=$?
2466  if test -s conftest.err; then
2467    grep -v '^ *+' conftest.err >conftest.er1
2468    cat conftest.er1 >&5
2469    mv -f conftest.er1 conftest.err
2470  fi
2471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472  test $ac_status = 0; } && {
2473	 test -z "$ac_cxx_werror_flag" ||
2474	 test ! -s conftest.err
2475       } && test -s conftest.$ac_objext; then :
2476  ac_retval=0
2477else
2478  $as_echo "$as_me: failed program was:" >&5
2479sed 's/^/| /' conftest.$ac_ext >&5
2480
2481	ac_retval=1
2482fi
2483  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_compile
2487
2488# ac_fn_c_try_cpp LINENO
2489# ----------------------
2490# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2491ac_fn_c_try_cpp ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if { { ac_try="$ac_cpp conftest.$ac_ext"
2495case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2502  ac_status=$?
2503  if test -s conftest.err; then
2504    grep -v '^ *+' conftest.err >conftest.er1
2505    cat conftest.er1 >&5
2506    mv -f conftest.er1 conftest.err
2507  fi
2508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2509  test $ac_status = 0; } > conftest.i && {
2510	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2511	 test ! -s conftest.err
2512       }; then :
2513  ac_retval=0
2514else
2515  $as_echo "$as_me: failed program was:" >&5
2516sed 's/^/| /' conftest.$ac_ext >&5
2517
2518    ac_retval=1
2519fi
2520  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2521  as_fn_set_status $ac_retval
2522
2523} # ac_fn_c_try_cpp
2524
2525# ac_fn_cxx_try_cpp LINENO
2526# ------------------------
2527# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2528ac_fn_cxx_try_cpp ()
2529{
2530  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2531  if { { ac_try="$ac_cpp conftest.$ac_ext"
2532case "(($ac_try" in
2533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534  *) ac_try_echo=$ac_try;;
2535esac
2536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537$as_echo "$ac_try_echo"; } >&5
2538  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2539  ac_status=$?
2540  if test -s conftest.err; then
2541    grep -v '^ *+' conftest.err >conftest.er1
2542    cat conftest.er1 >&5
2543    mv -f conftest.er1 conftest.err
2544  fi
2545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2546  test $ac_status = 0; } > conftest.i && {
2547	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2548	 test ! -s conftest.err
2549       }; then :
2550  ac_retval=0
2551else
2552  $as_echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
2554
2555    ac_retval=1
2556fi
2557  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2558  as_fn_set_status $ac_retval
2559
2560} # ac_fn_cxx_try_cpp
2561
2562# ac_fn_c_try_link LINENO
2563# -----------------------
2564# Try to link conftest.$ac_ext, and return whether this succeeded.
2565ac_fn_c_try_link ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  rm -f conftest.$ac_objext conftest$ac_exeext
2569  if { { ac_try="$ac_link"
2570case "(($ac_try" in
2571  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2572  *) ac_try_echo=$ac_try;;
2573esac
2574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2575$as_echo "$ac_try_echo"; } >&5
2576  (eval "$ac_link") 2>conftest.err
2577  ac_status=$?
2578  if test -s conftest.err; then
2579    grep -v '^ *+' conftest.err >conftest.er1
2580    cat conftest.er1 >&5
2581    mv -f conftest.er1 conftest.err
2582  fi
2583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2584  test $ac_status = 0; } && {
2585	 test -z "$ac_c_werror_flag" ||
2586	 test ! -s conftest.err
2587       } && test -s conftest$ac_exeext && {
2588	 test "$cross_compiling" = yes ||
2589	 test -x conftest$ac_exeext
2590       }; then :
2591  ac_retval=0
2592else
2593  $as_echo "$as_me: failed program was:" >&5
2594sed 's/^/| /' conftest.$ac_ext >&5
2595
2596	ac_retval=1
2597fi
2598  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2599  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2600  # interfere with the next link command; also delete a directory that is
2601  # left behind by Apple's compiler.  We do this before executing the actions.
2602  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2603  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2604  as_fn_set_status $ac_retval
2605
2606} # ac_fn_c_try_link
2607
2608# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2609# ---------------------------------------------------------
2610# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2611# the include files in INCLUDES and setting the cache variable VAR
2612# accordingly.
2613ac_fn_cxx_check_header_mongrel ()
2614{
2615  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2616  if eval \${$3+:} false; then :
2617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2618$as_echo_n "checking for $2... " >&6; }
2619if eval \${$3+:} false; then :
2620  $as_echo_n "(cached) " >&6
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625else
2626  # Is the header compilable?
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2628$as_echo_n "checking $2 usability... " >&6; }
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631$4
2632#include <$2>
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_header_compiler=yes
2636else
2637  ac_header_compiler=no
2638fi
2639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2641$as_echo "$ac_header_compiler" >&6; }
2642
2643# Is the header present?
2644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2645$as_echo_n "checking $2 presence... " >&6; }
2646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647/* end confdefs.h.  */
2648#include <$2>
2649_ACEOF
2650if ac_fn_cxx_try_cpp "$LINENO"; then :
2651  ac_header_preproc=yes
2652else
2653  ac_header_preproc=no
2654fi
2655rm -f conftest.err conftest.i conftest.$ac_ext
2656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2657$as_echo "$ac_header_preproc" >&6; }
2658
2659# So?  What about this header?
2660case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2661  yes:no: )
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2663$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2666    ;;
2667  no:yes:* )
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2669$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2671$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2673$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2675$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2678( $as_echo "## ----------------------------------------- ##
2679## Report this to build-dev@openjdk.java.net ##
2680## ----------------------------------------- ##"
2681     ) | sed "s/^/$as_me: WARNING:     /" >&2
2682    ;;
2683esac
2684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2685$as_echo_n "checking for $2... " >&6; }
2686if eval \${$3+:} false; then :
2687  $as_echo_n "(cached) " >&6
2688else
2689  eval "$3=\$ac_header_compiler"
2690fi
2691eval ac_res=\$$3
2692	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2693$as_echo "$ac_res" >&6; }
2694fi
2695  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2696
2697} # ac_fn_cxx_check_header_mongrel
2698
2699# ac_fn_cxx_try_run LINENO
2700# ------------------------
2701# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2702# that executables *can* be run.
2703ac_fn_cxx_try_run ()
2704{
2705  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2706  if { { ac_try="$ac_link"
2707case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_link") 2>&5
2714  ac_status=$?
2715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2717  { { case "(($ac_try" in
2718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719  *) ac_try_echo=$ac_try;;
2720esac
2721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2722$as_echo "$ac_try_echo"; } >&5
2723  (eval "$ac_try") 2>&5
2724  ac_status=$?
2725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2726  test $ac_status = 0; }; }; then :
2727  ac_retval=0
2728else
2729  $as_echo "$as_me: program exited with status $ac_status" >&5
2730       $as_echo "$as_me: failed program was:" >&5
2731sed 's/^/| /' conftest.$ac_ext >&5
2732
2733       ac_retval=$ac_status
2734fi
2735  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737  as_fn_set_status $ac_retval
2738
2739} # ac_fn_cxx_try_run
2740
2741# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2742# ---------------------------------------------------------
2743# Tests whether HEADER exists and can be compiled using the include files in
2744# INCLUDES, setting the cache variable VAR accordingly.
2745ac_fn_cxx_check_header_compile ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749$as_echo_n "checking for $2... " >&6; }
2750if eval \${$3+:} false; then :
2751  $as_echo_n "(cached) " >&6
2752else
2753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754/* end confdefs.h.  */
2755$4
2756#include <$2>
2757_ACEOF
2758if ac_fn_cxx_try_compile "$LINENO"; then :
2759  eval "$3=yes"
2760else
2761  eval "$3=no"
2762fi
2763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2764fi
2765eval ac_res=\$$3
2766	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2767$as_echo "$ac_res" >&6; }
2768  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2769
2770} # ac_fn_cxx_check_header_compile
2771
2772# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2773# ----------------------------------------------
2774# Tries to find the compile-time value of EXPR in a program that includes
2775# INCLUDES, setting VAR accordingly. Returns whether the value could be
2776# computed
2777ac_fn_cxx_compute_int ()
2778{
2779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780  if test "$cross_compiling" = yes; then
2781    # Depending upon the size, compute the lo and hi bounds.
2782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) >= 0)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_lo=0 ac_mid=0
2798  while :; do
2799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801$4
2802int
2803main ()
2804{
2805static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2806test_array [0] = 0;
2807return test_array [0];
2808
2809  ;
2810  return 0;
2811}
2812_ACEOF
2813if ac_fn_cxx_try_compile "$LINENO"; then :
2814  ac_hi=$ac_mid; break
2815else
2816  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2817			if test $ac_lo -le $ac_mid; then
2818			  ac_lo= ac_hi=
2819			  break
2820			fi
2821			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2822fi
2823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824  done
2825else
2826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828$4
2829int
2830main ()
2831{
2832static int test_array [1 - 2 * !(($2) < 0)];
2833test_array [0] = 0;
2834return test_array [0];
2835
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_compile "$LINENO"; then :
2841  ac_hi=-1 ac_mid=-1
2842  while :; do
2843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2844/* end confdefs.h.  */
2845$4
2846int
2847main ()
2848{
2849static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2850test_array [0] = 0;
2851return test_array [0];
2852
2853  ;
2854  return 0;
2855}
2856_ACEOF
2857if ac_fn_cxx_try_compile "$LINENO"; then :
2858  ac_lo=$ac_mid; break
2859else
2860  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2861			if test $ac_mid -le $ac_hi; then
2862			  ac_lo= ac_hi=
2863			  break
2864			fi
2865			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868  done
2869else
2870  ac_lo= ac_hi=
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875# Binary search between lo and hi bounds.
2876while test "x$ac_lo" != "x$ac_hi"; do
2877  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881int
2882main ()
2883{
2884static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2885test_array [0] = 0;
2886return test_array [0];
2887
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892if ac_fn_cxx_try_compile "$LINENO"; then :
2893  ac_hi=$ac_mid
2894else
2895  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898done
2899case $ac_lo in #((
2900?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2901'') ac_retval=1 ;;
2902esac
2903  else
2904    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2905/* end confdefs.h.  */
2906$4
2907static long int longval () { return $2; }
2908static unsigned long int ulongval () { return $2; }
2909#include <stdio.h>
2910#include <stdlib.h>
2911int
2912main ()
2913{
2914
2915  FILE *f = fopen ("conftest.val", "w");
2916  if (! f)
2917    return 1;
2918  if (($2) < 0)
2919    {
2920      long int i = longval ();
2921      if (i != ($2))
2922	return 1;
2923      fprintf (f, "%ld", i);
2924    }
2925  else
2926    {
2927      unsigned long int i = ulongval ();
2928      if (i != ($2))
2929	return 1;
2930      fprintf (f, "%lu", i);
2931    }
2932  /* Do not output a trailing newline, as this causes \r\n confusion
2933     on some platforms.  */
2934  return ferror (f) || fclose (f) != 0;
2935
2936  ;
2937  return 0;
2938}
2939_ACEOF
2940if ac_fn_cxx_try_run "$LINENO"; then :
2941  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2942else
2943  ac_retval=1
2944fi
2945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2946  conftest.$ac_objext conftest.beam conftest.$ac_ext
2947rm -f conftest.val
2948
2949  fi
2950  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2951  as_fn_set_status $ac_retval
2952
2953} # ac_fn_cxx_compute_int
2954
2955# ac_fn_cxx_try_link LINENO
2956# -------------------------
2957# Try to link conftest.$ac_ext, and return whether this succeeded.
2958ac_fn_cxx_try_link ()
2959{
2960  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2961  rm -f conftest.$ac_objext conftest$ac_exeext
2962  if { { ac_try="$ac_link"
2963case "(($ac_try" in
2964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2965  *) ac_try_echo=$ac_try;;
2966esac
2967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2968$as_echo "$ac_try_echo"; } >&5
2969  (eval "$ac_link") 2>conftest.err
2970  ac_status=$?
2971  if test -s conftest.err; then
2972    grep -v '^ *+' conftest.err >conftest.er1
2973    cat conftest.er1 >&5
2974    mv -f conftest.er1 conftest.err
2975  fi
2976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2977  test $ac_status = 0; } && {
2978	 test -z "$ac_cxx_werror_flag" ||
2979	 test ! -s conftest.err
2980       } && test -s conftest$ac_exeext && {
2981	 test "$cross_compiling" = yes ||
2982	 test -x conftest$ac_exeext
2983       }; then :
2984  ac_retval=0
2985else
2986  $as_echo "$as_me: failed program was:" >&5
2987sed 's/^/| /' conftest.$ac_ext >&5
2988
2989	ac_retval=1
2990fi
2991  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2992  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2993  # interfere with the next link command; also delete a directory that is
2994  # left behind by Apple's compiler.  We do this before executing the actions.
2995  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2996  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2997  as_fn_set_status $ac_retval
2998
2999} # ac_fn_cxx_try_link
3000
3001# ac_fn_cxx_check_func LINENO FUNC VAR
3002# ------------------------------------
3003# Tests whether FUNC exists, setting the cache variable VAR accordingly
3004ac_fn_cxx_check_func ()
3005{
3006  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3008$as_echo_n "checking for $2... " >&6; }
3009if eval \${$3+:} false; then :
3010  $as_echo_n "(cached) " >&6
3011else
3012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h.  */
3014/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3015   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3016#define $2 innocuous_$2
3017
3018/* System header to define __stub macros and hopefully few prototypes,
3019    which can conflict with char $2 (); below.
3020    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3021    <limits.h> exists even on freestanding compilers.  */
3022
3023#ifdef __STDC__
3024# include <limits.h>
3025#else
3026# include <assert.h>
3027#endif
3028
3029#undef $2
3030
3031/* Override any GCC internal prototype to avoid an error.
3032   Use char because int might match the return type of a GCC
3033   builtin and then its argument prototype would still apply.  */
3034#ifdef __cplusplus
3035extern "C"
3036#endif
3037char $2 ();
3038/* The GNU C library defines this for functions which it implements
3039    to always fail with ENOSYS.  Some functions are actually named
3040    something starting with __ and the normal name is an alias.  */
3041#if defined __stub_$2 || defined __stub___$2
3042choke me
3043#endif
3044
3045int
3046main ()
3047{
3048return $2 ();
3049  ;
3050  return 0;
3051}
3052_ACEOF
3053if ac_fn_cxx_try_link "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext \
3059    conftest$ac_exeext conftest.$ac_ext
3060fi
3061eval ac_res=\$$3
3062	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063$as_echo "$ac_res" >&6; }
3064  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3065
3066} # ac_fn_cxx_check_func
3067
3068# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3069# -------------------------------------------------------
3070# Tests whether HEADER exists and can be compiled using the include files in
3071# INCLUDES, setting the cache variable VAR accordingly.
3072ac_fn_c_check_header_compile ()
3073{
3074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3076$as_echo_n "checking for $2... " >&6; }
3077if eval \${$3+:} false; then :
3078  $as_echo_n "(cached) " >&6
3079else
3080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081/* end confdefs.h.  */
3082$4
3083#include <$2>
3084_ACEOF
3085if ac_fn_c_try_compile "$LINENO"; then :
3086  eval "$3=yes"
3087else
3088  eval "$3=no"
3089fi
3090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3091fi
3092eval ac_res=\$$3
3093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3094$as_echo "$ac_res" >&6; }
3095  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3096
3097} # ac_fn_c_check_header_compile
3098cat >config.log <<_ACEOF
3099This file contains any messages produced by compilers while
3100running configure, to aid debugging if configure makes a mistake.
3101
3102It was created by OpenJDK $as_me jdk9, which was
3103generated by GNU Autoconf 2.69.  Invocation command line was
3104
3105  $ $0 $@
3106
3107_ACEOF
3108exec 5>>config.log
3109{
3110cat <<_ASUNAME
3111## --------- ##
3112## Platform. ##
3113## --------- ##
3114
3115hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3116uname -m = `(uname -m) 2>/dev/null || echo unknown`
3117uname -r = `(uname -r) 2>/dev/null || echo unknown`
3118uname -s = `(uname -s) 2>/dev/null || echo unknown`
3119uname -v = `(uname -v) 2>/dev/null || echo unknown`
3120
3121/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3122/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3123
3124/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3125/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3126/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3127/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3128/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3129/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3130/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3131
3132_ASUNAME
3133
3134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3135for as_dir in $PATH
3136do
3137  IFS=$as_save_IFS
3138  test -z "$as_dir" && as_dir=.
3139    $as_echo "PATH: $as_dir"
3140  done
3141IFS=$as_save_IFS
3142
3143} >&5
3144
3145cat >&5 <<_ACEOF
3146
3147
3148## ----------- ##
3149## Core tests. ##
3150## ----------- ##
3151
3152_ACEOF
3153
3154
3155# Keep a trace of the command line.
3156# Strip out --no-create and --no-recursion so they do not pile up.
3157# Strip out --silent because we don't want to record it for future runs.
3158# Also quote any args containing shell meta-characters.
3159# Make two passes to allow for proper duplicate-argument suppression.
3160ac_configure_args=
3161ac_configure_args0=
3162ac_configure_args1=
3163ac_must_keep_next=false
3164for ac_pass in 1 2
3165do
3166  for ac_arg
3167  do
3168    case $ac_arg in
3169    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3170    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3171    | -silent | --silent | --silen | --sile | --sil)
3172      continue ;;
3173    *\'*)
3174      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3175    esac
3176    case $ac_pass in
3177    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3178    2)
3179      as_fn_append ac_configure_args1 " '$ac_arg'"
3180      if test $ac_must_keep_next = true; then
3181	ac_must_keep_next=false # Got value, back to normal.
3182      else
3183	case $ac_arg in
3184	  *=* | --config-cache | -C | -disable-* | --disable-* \
3185	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3186	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3187	  | -with-* | --with-* | -without-* | --without-* | --x)
3188	    case "$ac_configure_args0 " in
3189	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3190	    esac
3191	    ;;
3192	  -* ) ac_must_keep_next=true ;;
3193	esac
3194      fi
3195      as_fn_append ac_configure_args " '$ac_arg'"
3196      ;;
3197    esac
3198  done
3199done
3200{ ac_configure_args0=; unset ac_configure_args0;}
3201{ ac_configure_args1=; unset ac_configure_args1;}
3202
3203# When interrupted or exit'd, cleanup temporary files, and complete
3204# config.log.  We remove comments because anyway the quotes in there
3205# would cause problems or look ugly.
3206# WARNING: Use '\'' to represent an apostrophe within the trap.
3207# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3208trap 'exit_status=$?
3209  # Save into config.log some information that might help in debugging.
3210  {
3211    echo
3212
3213    $as_echo "## ---------------- ##
3214## Cache variables. ##
3215## ---------------- ##"
3216    echo
3217    # The following way of writing the cache mishandles newlines in values,
3218(
3219  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3220    eval ac_val=\$$ac_var
3221    case $ac_val in #(
3222    *${as_nl}*)
3223      case $ac_var in #(
3224      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3225$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3226      esac
3227      case $ac_var in #(
3228      _ | IFS | as_nl) ;; #(
3229      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3230      *) { eval $ac_var=; unset $ac_var;} ;;
3231      esac ;;
3232    esac
3233  done
3234  (set) 2>&1 |
3235    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3236    *${as_nl}ac_space=\ *)
3237      sed -n \
3238	"s/'\''/'\''\\\\'\'''\''/g;
3239	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3240      ;; #(
3241    *)
3242      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3243      ;;
3244    esac |
3245    sort
3246)
3247    echo
3248
3249    $as_echo "## ----------------- ##
3250## Output variables. ##
3251## ----------------- ##"
3252    echo
3253    for ac_var in $ac_subst_vars
3254    do
3255      eval ac_val=\$$ac_var
3256      case $ac_val in
3257      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3258      esac
3259      $as_echo "$ac_var='\''$ac_val'\''"
3260    done | sort
3261    echo
3262
3263    if test -n "$ac_subst_files"; then
3264      $as_echo "## ------------------- ##
3265## File substitutions. ##
3266## ------------------- ##"
3267      echo
3268      for ac_var in $ac_subst_files
3269      do
3270	eval ac_val=\$$ac_var
3271	case $ac_val in
3272	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3273	esac
3274	$as_echo "$ac_var='\''$ac_val'\''"
3275      done | sort
3276      echo
3277    fi
3278
3279    if test -s confdefs.h; then
3280      $as_echo "## ----------- ##
3281## confdefs.h. ##
3282## ----------- ##"
3283      echo
3284      cat confdefs.h
3285      echo
3286    fi
3287    test "$ac_signal" != 0 &&
3288      $as_echo "$as_me: caught signal $ac_signal"
3289    $as_echo "$as_me: exit $exit_status"
3290  } >&5
3291  rm -f core *.core core.conftest.* &&
3292    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3293    exit $exit_status
3294' 0
3295for ac_signal in 1 2 13 15; do
3296  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3297done
3298ac_signal=0
3299
3300# confdefs.h avoids OS command line length limits that DEFS can exceed.
3301rm -f -r conftest* confdefs.h
3302
3303$as_echo "/* confdefs.h */" > confdefs.h
3304
3305# Predefined preprocessor variables.
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_NAME "$PACKAGE_NAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_VERSION "$PACKAGE_VERSION"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_STRING "$PACKAGE_STRING"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3325_ACEOF
3326
3327cat >>confdefs.h <<_ACEOF
3328#define PACKAGE_URL "$PACKAGE_URL"
3329_ACEOF
3330
3331
3332# Let the site file select an alternate cache file if it wants to.
3333# Prefer an explicitly selected file to automatically selected ones.
3334ac_site_file1=NONE
3335ac_site_file2=NONE
3336if test -n "$CONFIG_SITE"; then
3337  # We do not want a PATH search for config.site.
3338  case $CONFIG_SITE in #((
3339    -*)  ac_site_file1=./$CONFIG_SITE;;
3340    */*) ac_site_file1=$CONFIG_SITE;;
3341    *)   ac_site_file1=./$CONFIG_SITE;;
3342  esac
3343elif test "x$prefix" != xNONE; then
3344  ac_site_file1=$prefix/share/config.site
3345  ac_site_file2=$prefix/etc/config.site
3346else
3347  ac_site_file1=$ac_default_prefix/share/config.site
3348  ac_site_file2=$ac_default_prefix/etc/config.site
3349fi
3350for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3351do
3352  test "x$ac_site_file" = xNONE && continue
3353  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3354    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3355$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3356    sed 's/^/| /' "$ac_site_file" >&5
3357    . "$ac_site_file" \
3358      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3360as_fn_error $? "failed to load site script $ac_site_file
3361See \`config.log' for more details" "$LINENO" 5; }
3362  fi
3363done
3364
3365if test -r "$cache_file"; then
3366  # Some versions of bash will fail to source /dev/null (special files
3367  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3368  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3369    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3370$as_echo "$as_me: loading cache $cache_file" >&6;}
3371    case $cache_file in
3372      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3373      *)                      . "./$cache_file";;
3374    esac
3375  fi
3376else
3377  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3378$as_echo "$as_me: creating cache $cache_file" >&6;}
3379  >$cache_file
3380fi
3381
3382# Check that the precious variables saved in the cache have kept the same
3383# value.
3384ac_cache_corrupted=false
3385for ac_var in $ac_precious_vars; do
3386  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3387  eval ac_new_set=\$ac_env_${ac_var}_set
3388  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3389  eval ac_new_val=\$ac_env_${ac_var}_value
3390  case $ac_old_set,$ac_new_set in
3391    set,)
3392      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3393$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3394      ac_cache_corrupted=: ;;
3395    ,set)
3396      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3397$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3398      ac_cache_corrupted=: ;;
3399    ,);;
3400    *)
3401      if test "x$ac_old_val" != "x$ac_new_val"; then
3402	# differences in whitespace do not lead to failure.
3403	ac_old_val_w=`echo x $ac_old_val`
3404	ac_new_val_w=`echo x $ac_new_val`
3405	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3406	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3407$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3408	  ac_cache_corrupted=:
3409	else
3410	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3411$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3412	  eval $ac_var=\$ac_old_val
3413	fi
3414	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3415$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3416	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3417$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3418      fi;;
3419  esac
3420  # Pass precious variables to config.status.
3421  if test "$ac_new_set" = set; then
3422    case $ac_new_val in
3423    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3424    *) ac_arg=$ac_var=$ac_new_val ;;
3425    esac
3426    case " $ac_configure_args " in
3427      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3428      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3429    esac
3430  fi
3431done
3432if $ac_cache_corrupted; then
3433  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3435  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3436$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3437  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3438fi
3439## -------------------- ##
3440## Main body of script. ##
3441## -------------------- ##
3442
3443ac_ext=c
3444ac_cpp='$CPP $CPPFLAGS'
3445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448
3449
3450
3451ac_aux_dir=
3452for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3453  if test -f "$ac_dir/install-sh"; then
3454    ac_aux_dir=$ac_dir
3455    ac_install_sh="$ac_aux_dir/install-sh -c"
3456    break
3457  elif test -f "$ac_dir/install.sh"; then
3458    ac_aux_dir=$ac_dir
3459    ac_install_sh="$ac_aux_dir/install.sh -c"
3460    break
3461  elif test -f "$ac_dir/shtool"; then
3462    ac_aux_dir=$ac_dir
3463    ac_install_sh="$ac_aux_dir/shtool install -c"
3464    break
3465  fi
3466done
3467if test -z "$ac_aux_dir"; then
3468  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
3469fi
3470
3471# These three variables are undocumented and unsupported,
3472# and are intended to be withdrawn in a future Autoconf release.
3473# They can cause serious problems if a builder's source tree is in a directory
3474# whose full name contains unusual characters.
3475ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3476ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3477ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3478
3479
3480# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3481
3482#
3483# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3485#
3486# This code is free software; you can redistribute it and/or modify it
3487# under the terms of the GNU General Public License version 2 only, as
3488# published by the Free Software Foundation.  Oracle designates this
3489# particular file as subject to the "Classpath" exception as provided
3490# by Oracle in the LICENSE file that accompanied this code.
3491#
3492# This code is distributed in the hope that it will be useful, but WITHOUT
3493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3495# version 2 for more details (a copy is included in the LICENSE file that
3496# accompanied this code).
3497#
3498# You should have received a copy of the GNU General Public License version
3499# 2 along with this work; if not, write to the Free Software Foundation,
3500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3501#
3502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3503# or visit www.oracle.com if you need additional information or have any
3504# questions.
3505#
3506
3507#
3508# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3509#
3510# This program is free software; you can redistribute it and/or modify
3511# it under the terms of the GNU General Public License as published by
3512# the Free Software Foundation; either version 2 of the License, or
3513# (at your option) any later version.
3514#
3515# This program is distributed in the hope that it will be useful, but
3516# WITHOUT ANY WARRANTY; without even the implied warranty of
3517# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3518# General Public License for more details.
3519#
3520# You should have received a copy of the GNU General Public License
3521# along with this program; if not, write to the Free Software
3522# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3523#
3524# As a special exception to the GNU General Public License, if you
3525# distribute this file as part of a program that contains a
3526# configuration script generated by Autoconf, you may include it under
3527# the same distribution terms that you use for the rest of that program.
3528
3529# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3530# ----------------------------------
3531# PKG_PROG_PKG_CONFIG
3532
3533# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3534#
3535# Check to see whether a particular set of modules exists.  Similar
3536# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3537#
3538#
3539# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3540# this or PKG_CHECK_MODULES is called, or make sure to call
3541# PKG_CHECK_EXISTS manually
3542# --------------------------------------------------------------
3543
3544
3545
3546# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3547# ---------------------------------------------
3548# _PKG_CONFIG
3549
3550# _PKG_SHORT_ERRORS_SUPPORTED
3551# -----------------------------
3552# _PKG_SHORT_ERRORS_SUPPORTED
3553
3554
3555# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3556# [ACTION-IF-NOT-FOUND])
3557#
3558#
3559# Note that if there is a possibility the first call to
3560# PKG_CHECK_MODULES might not happen, you should be sure to include an
3561# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3562#
3563#
3564# --------------------------------------------------------------
3565# PKG_CHECK_MODULES
3566
3567
3568# Include these first...
3569#
3570# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3572#
3573# This code is free software; you can redistribute it and/or modify it
3574# under the terms of the GNU General Public License version 2 only, as
3575# published by the Free Software Foundation.  Oracle designates this
3576# particular file as subject to the "Classpath" exception as provided
3577# by Oracle in the LICENSE file that accompanied this code.
3578#
3579# This code is distributed in the hope that it will be useful, but WITHOUT
3580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3582# version 2 for more details (a copy is included in the LICENSE file that
3583# accompanied this code).
3584#
3585# You should have received a copy of the GNU General Public License version
3586# 2 along with this work; if not, write to the Free Software Foundation,
3587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3588#
3589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3590# or visit www.oracle.com if you need additional information or have any
3591# questions.
3592#
3593
3594# Create a function/macro that takes a series of named arguments. The call is
3595# similar to AC_DEFUN, but the setup of the function looks like this:
3596# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3597# ... do something
3598#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3599# ])
3600# A star (*) in front of a named argument means that it is required and it's
3601# presence will be verified. To pass e.g. the first value as a normal indexed
3602# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3603# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3604# "ARG_FOO".
3605#
3606# The generated function can be called like this:
3607# MYFUNC(FOO: [foo-val],
3608#     BAR: [
3609#         $ECHO hello world
3610#     ])
3611# Note that the argument value must start on the same line as the argument name.
3612#
3613# Argument 1: Name of the function to define
3614# Argument 2: List of legal named arguments, with a * prefix for required arguments
3615# Argument 3: Argument array to treat as named, typically $@
3616# Argument 4: The main function body
3617
3618
3619# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3620# If so, then append $1 to $2 \
3621# Also set JVM_ARG_OK to true/false depending on outcome.
3622
3623
3624# Appends a string to a path variable, only adding the : when needed.
3625
3626
3627# Prepends a string to a path variable, only adding the : when needed.
3628
3629
3630# This will make sure the given variable points to a full and proper
3631# path. This means:
3632# 1) There will be no spaces in the path. On unix platforms,
3633#    spaces in the path will result in an error. On Windows,
3634#    the path will be rewritten using short-style to be space-free.
3635# 2) The path will be absolute, and it will be in unix-style (on
3636#     cygwin).
3637# $1: The name of the variable to fix
3638
3639
3640# This will make sure the given variable points to a executable
3641# with a full and proper path. This means:
3642# 1) There will be no spaces in the path. On unix platforms,
3643#    spaces in the path will result in an error. On Windows,
3644#    the path will be rewritten using short-style to be space-free.
3645# 2) The path will be absolute, and it will be in unix-style (on
3646#     cygwin).
3647# Any arguments given to the executable is preserved.
3648# If the input variable does not have a directory specification, then
3649# it need to be in the PATH.
3650# $1: The name of the variable to fix
3651
3652
3653
3654
3655# Register a --with argument but mark it as deprecated
3656# $1: The name of the with argument to deprecate, not including --with-
3657
3658
3659# Register a --enable argument but mark it as deprecated
3660# $1: The name of the with argument to deprecate, not including --enable-
3661# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3662# $3: Messages to user.
3663
3664
3665
3666
3667# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3668# $1: variable to check
3669
3670
3671# Check that there are no unprocessed overridden variables left.
3672# If so, they are an incorrect argument and we will exit with an error.
3673
3674
3675# Setup a tool for the given variable. If correctly specified by the user,
3676# use that value, otherwise search for the tool using the supplied code snippet.
3677# $1: variable to set
3678# $2: code snippet to call to look for the tool
3679# $3: code snippet to call if variable was used to find tool
3680
3681
3682# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3683# $1: variable to set
3684# $2: executable name (or list of names) to look for
3685# $3: [path]
3686
3687
3688# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3689# $1: variable to set
3690# $2: executable name (or list of names) to look for
3691
3692
3693# Like BASIC_PATH_PROGS but fails if no tool was found.
3694# $1: variable to set
3695# $2: executable name (or list of names) to look for
3696# $3: [path]
3697
3698
3699# Like BASIC_SETUP_TOOL but fails if no tool was found.
3700# $1: variable to set
3701# $2: autoconf macro to call to look for the special tool
3702
3703
3704# Setup the most fundamental tools that relies on not much else to set up,
3705# but is used by much of the early bootstrap code.
3706
3707
3708# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3709
3710
3711# Evaluates platform specific overrides for devkit variables.
3712# $1: Name of variable
3713
3714
3715
3716
3717
3718
3719#%%% Simple tools %%%
3720
3721# Check if we have found a usable version of make
3722# $1: the path to a potential make binary (or empty)
3723# $2: the description on how we found this
3724
3725
3726
3727
3728# Goes looking for a usable version of GNU make.
3729
3730
3731
3732
3733
3734
3735
3736
3737# Check if build directory is on local disk. If not possible to determine,
3738# we prefer to claim it's local.
3739# Argument 1: directory to test
3740# Argument 2: what to do if it is on local disk
3741# Argument 3: what to do otherwise (remote disk or failure)
3742
3743
3744# Check that source files have basic read permissions set. This might
3745# not be the case in cygwin in certain conditions.
3746
3747
3748
3749
3750# Check for support for specific options in bash
3751
3752
3753################################################################################
3754#
3755# Default make target
3756#
3757
3758
3759# Code to run after AC_OUTPUT
3760
3761
3762#
3763# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787
3788
3789
3790
3791# Helper function which possibly converts a path using DOS-style short mode.
3792# If so, the updated path is stored in $new_path.
3793# $1: The path to check
3794
3795
3796# Helper function which possibly converts a path using DOS-style short mode.
3797# If so, the updated path is stored in $new_path.
3798# $1: The path to check
3799
3800
3801# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3802# and could probably be heavily simplified. However, all changes in this
3803# area tend to need lot of testing in different scenarios, and in lack of
3804# proper unit testing, cleaning this up has not been deemed worth the effort
3805# at the moment.
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3816
3817
3818
3819
3820# ... then the rest
3821#
3822# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846########################################################################
3847# This file handles detection of the Boot JDK. The Boot JDK detection
3848# process has been developed as a response to solve a complex real-world
3849# problem. Initially, it was simple, but it has grown as platform after
3850# platform, idiosyncracy after idiosyncracy has been supported.
3851#
3852# The basic idea is this:
3853# 1) You need an acceptable *) JDK to use as a Boot JDK
3854# 2) There are several ways to locate a JDK, that are mostly platform
3855#    dependent **)
3856# 3) You can have multiple JDKs installed
3857# 4) If possible, configure should try to dig out an acceptable JDK
3858#    automatically, without having to resort to command-line options
3859#
3860# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3861#     javac) and not a JRE, etc.
3862#
3863# **) On Windows we typically use a well-known path.
3864#     On MacOSX we typically use the tool java_home.
3865#     On Linux we typically find javac in the $PATH, and then follow a
3866#     chain of symlinks that often ends up in a real JDK.
3867#
3868# This leads to the code where we check in different ways to locate a
3869# JDK, and if one is found, check if it is acceptable. If not, we print
3870# our reasons for rejecting it (useful when debugging non-working
3871# configure situations) and continue checking the next one.
3872########################################################################
3873
3874# Execute the check given as argument, and verify the result
3875# If the Boot JDK was previously found, do nothing
3876# $1 A command line (typically autoconf macro) to execute
3877
3878
3879# Test: Is bootjdk explicitly set by command line arguments?
3880
3881
3882# Test: Is $JAVA_HOME set?
3883
3884
3885# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3886
3887
3888# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3889# $1: Argument to the java_home binary (optional)
3890
3891
3892# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3893
3894
3895# Look for a jdk in the given path. If there are multiple, try to select the newest.
3896# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3897# $1 = Path to directory containing jdk installations.
3898# $2 = String to append to the found JDK directory to get the proper JDK home
3899
3900
3901# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3902# environmental variable as base for where to look.
3903# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3904
3905
3906# Test: Is there a JDK installed in default, well-known locations?
3907
3908
3909# Check that a command-line tool in the Boot JDK is correct
3910# $1 = name of variable to assign
3911# $2 = name of binary
3912
3913
3914###############################################################################
3915#
3916# We need a Boot JDK to bootstrap the build.
3917#
3918
3919
3920
3921
3922
3923# BUILD_JDK: the location of the latest JDK that can run
3924#   on the host system and supports the target class file version
3925#   generated in this JDK build.  This variable should only be
3926#   used after the launchers are built.
3927#
3928
3929# Execute the check given as argument, and verify the result.
3930# If the JDK was previously found, do nothing.
3931# $1 A command line (typically autoconf macro) to execute
3932
3933
3934# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3935# is different than the host system doing the build (e.g. cross-compilation),
3936# a special BUILD_JDK is built as part of the build process.  An external
3937# prebuilt BUILD_JDK can also be supplied.
3938
3939
3940#
3941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3943#
3944# This code is free software; you can redistribute it and/or modify it
3945# under the terms of the GNU General Public License version 2 only, as
3946# published by the Free Software Foundation.  Oracle designates this
3947# particular file as subject to the "Classpath" exception as provided
3948# by Oracle in the LICENSE file that accompanied this code.
3949#
3950# This code is distributed in the hope that it will be useful, but WITHOUT
3951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3953# version 2 for more details (a copy is included in the LICENSE file that
3954# accompanied this code).
3955#
3956# You should have received a copy of the GNU General Public License version
3957# 2 along with this work; if not, write to the Free Software Foundation,
3958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3959#
3960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3961# or visit www.oracle.com if you need additional information or have any
3962# questions.
3963#
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981################################################################################
3982#
3983# Runs icecc-create-env once and prints the error if it fails
3984#
3985# $1: arguments to icecc-create-env
3986# $2: log file
3987#
3988
3989
3990################################################################################
3991#
3992# Optionally enable distributed compilation of native code using icecc/icecream
3993#
3994
3995
3996
3997
3998
3999
4000
4001#
4002# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4004#
4005# This code is free software; you can redistribute it and/or modify it
4006# under the terms of the GNU General Public License version 2 only, as
4007# published by the Free Software Foundation.  Oracle designates this
4008# particular file as subject to the "Classpath" exception as provided
4009# by Oracle in the LICENSE file that accompanied this code.
4010#
4011# This code is distributed in the hope that it will be useful, but WITHOUT
4012# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4013# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4014# version 2 for more details (a copy is included in the LICENSE file that
4015# accompanied this code).
4016#
4017# You should have received a copy of the GNU General Public License version
4018# 2 along with this work; if not, write to the Free Software Foundation,
4019# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4020#
4021# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4022# or visit www.oracle.com if you need additional information or have any
4023# questions.
4024#
4025
4026################################################################################
4027#
4028# Setup ABI profile (for arm)
4029#
4030
4031
4032# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4033# corresponding configure arguments instead
4034
4035
4036# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4037# that configure can use them while detecting compilers.
4038# TOOLCHAIN_TYPE is available here.
4039# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4040
4041
4042
4043
4044
4045
4046# Documentation on common flags used for solstudio in HIGHEST.
4047#
4048# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4049#          done with care, there are some assumptions below that need to
4050#          be understood about the use of pointers, and IEEE behavior.
4051#
4052# -fns: Use non-standard floating point mode (not IEEE 754)
4053# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4054# -fsingle: Use single precision floating point with 'float'
4055# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4056#   (Source with excessing pointer casting and data access with mixed
4057#    pointer types are not recommended)
4058# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4059#   (If you expect perfect errno behavior, do not use this)
4060# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4061# -xrestrict: Pointer parameters to functions do not overlap
4062#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4063#    If you pass in multiple pointers to the same data, do not use this)
4064# -xlibmil: Inline some library routines
4065#   (If you expect perfect errno behavior, do not use this)
4066# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4067#   (If you expect perfect errno behavior, do not use this)
4068#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4069
4070    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4071    # Bug?
4072    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4073    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4074    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4075    #fi
4076
4077
4078
4079
4080
4081
4082################################################################################
4083# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4084#      conditionals against.
4085# $2 - Optional prefix for each variable defined.
4086
4087
4088# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                  IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                    IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C++ compiler supports an argument
4100
4101
4102
4103
4104# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the C and C++ compilers support an argument
4108
4109
4110
4111
4112# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4113#                                   IF_FALSE: [RUN-IF-FALSE])
4114# ------------------------------------------------------------
4115# Check that the linker support an argument
4116
4117
4118
4119
4120
4121
4122# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4123# Arguments:
4124# $1 - Optional prefix for each variable defined.
4125
4126
4127#
4128# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130#
4131# This code is free software; you can redistribute it and/or modify it
4132# under the terms of the GNU General Public License version 2 only, as
4133# published by the Free Software Foundation.  Oracle designates this
4134# particular file as subject to the "Classpath" exception as provided
4135# by Oracle in the LICENSE file that accompanied this code.
4136#
4137# This code is distributed in the hope that it will be useful, but WITHOUT
4138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4140# version 2 for more details (a copy is included in the LICENSE file that
4141# accompanied this code).
4142#
4143# You should have received a copy of the GNU General Public License version
4144# 2 along with this work; if not, write to the Free Software Foundation,
4145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4146#
4147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4148# or visit www.oracle.com if you need additional information or have any
4149# questions.
4150#
4151
4152
4153
4154
4155
4156cygwin_help() {
4157  case $1 in
4158    unzip)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    zip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    make)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    freetype)
4171      HELP_MSG="
4172The freetype library can now be build during the configure process.
4173Download the freetype sources and unpack them into an arbitrary directory:
4174
4175wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4176tar -xzf freetype-2.5.3.tar.gz
4177
4178Then run configure with '--with-freetype-src=<freetype_src>'. This will
4179automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4180builds or into '<freetype_src>/lib32' for 32-bit builds.
4181Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4182and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4183
4184Alternatively you can unpack the sources like this to use the default directory:
4185
4186tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4187      ;;
4188  esac
4189}
4190
4191msys_help() {
4192  PKGHANDLER_COMMAND=""
4193}
4194
4195apt_help() {
4196  case $1 in
4197    reduced)
4198      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4199    devkit)
4200      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4201    openjdk)
4202      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4203    alsa)
4204      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4205    cups)
4206      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4207    freetype)
4208      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4209    ffi)
4210      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4211    x11)
4212      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4213    ccache)
4214      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4215    dtrace)
4216      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4217    elf)
4218      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4219  esac
4220}
4221
4222yum_help() {
4223  case $1 in
4224    devkit)
4225      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4226    openjdk)
4227      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4228    alsa)
4229      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4230    cups)
4231      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4234    x11)
4235      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4236    ccache)
4237      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4238    elf)
4239      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4240  esac
4241}
4242
4243port_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgutil_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251pkgadd_help() {
4252  PKGHANDLER_COMMAND=""
4253}
4254
4255# This function will check if we're called from the "configure" wrapper while
4256# printing --help. If so, we will print out additional information that can
4257# only be extracted within the autoconf script, and then exit. This must be
4258# called at the very beginning in configure.ac.
4259
4260
4261
4262
4263
4264
4265#
4266# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290# All valid JVM features, regardless of platform
4291VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4292    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4293    static-build link-time-opt aot"
4294
4295# All valid JVM variants
4296VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4297
4298###############################################################################
4299# Check if the specified JVM variant should be built. To be used in shell if
4300# constructs, like this:
4301# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4302#
4303# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4304
4305# Definition kept in one line to allow inlining in if statements.
4306# Additional [] needed to keep m4 from mangling shell constructs.
4307
4308
4309###############################################################################
4310# Check if the specified JVM features are explicitly enabled. To be used in
4311# shell if constructs, like this:
4312# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check which variants of the JVM that we want to build. Available variants are:
4322#   server: normal interpreter, and a tiered C1/C2 compiler
4323#   client: normal interpreter, and C1 (no C2 compiler)
4324#   minimal: reduced form of client with optional features stripped out
4325#   core: normal interpreter only, no compiler
4326#   zero: C++ based interpreter only, no compiler
4327#   zeroshark: C++ based interpreter, and a llvm-based compiler
4328#   custom: baseline JVM with no default features
4329#
4330
4331
4332###############################################################################
4333# Check if dtrace should be enabled and has all prerequisites present.
4334#
4335
4336
4337################################################################################
4338# Check if AOT should be enabled
4339#
4340
4341
4342###############################################################################
4343# Set up all JVM features for each JVM variant.
4344#
4345
4346
4347###############################################################################
4348# Validate JVM features once all setup is complete, including custom setup.
4349#
4350
4351
4352################################################################################
4353#
4354# Specify which sources will be used to build the 64-bit ARM port
4355#
4356# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4357# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4358#
4359
4360
4361
4362################################################################################
4363# Check if gtest should be built
4364#
4365
4366
4367#
4368# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4370#
4371# This code is free software; you can redistribute it and/or modify it
4372# under the terms of the GNU General Public License version 2 only, as
4373# published by the Free Software Foundation.  Oracle designates this
4374# particular file as subject to the "Classpath" exception as provided
4375# by Oracle in the LICENSE file that accompanied this code.
4376#
4377# This code is distributed in the hope that it will be useful, but WITHOUT
4378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4380# version 2 for more details (a copy is included in the LICENSE file that
4381# accompanied this code).
4382#
4383# You should have received a copy of the GNU General Public License version
4384# 2 along with this work; if not, write to the Free Software Foundation,
4385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4386#
4387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4388# or visit www.oracle.com if you need additional information or have any
4389# questions.
4390#
4391
4392###############################################################################
4393# Check which variant of the JDK that we want to build.
4394# Currently we have:
4395#    normal:   standard edition
4396# but the custom make system may add other variants
4397#
4398# Effectively the JDK variant gives a name to a specific set of
4399# modules to compile into the JDK.
4400
4401
4402###############################################################################
4403# Set the debug level
4404#    release: no debug information, all optimizations, no asserts.
4405#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4406#    fastdebug: debug information (-g), all optimizations, all asserts
4407#    slowdebug: debug information (-g), no optimizations, all asserts
4408
4409
4410###############################################################################
4411#
4412# Should we build only OpenJDK even if closed sources are present?
4413#
4414
4415
4416
4417
4418###############################################################################
4419#
4420# Enable or disable the elliptic curve crypto implementation
4421#
4422
4423
4424
4425
4426################################################################################
4427#
4428# Gcov coverage data for hotspot
4429#
4430
4431
4432################################################################################
4433#
4434# Static build support.  When enabled will generate static
4435# libraries instead of shared libraries for all JDK libs.
4436#
4437
4438
4439################################################################################
4440#
4441# jlink options.
4442# We always keep packaged modules in JDK image.
4443#
4444
4445
4446################################################################################
4447#
4448# Check if building of the jtreg failure handler should be enabled.
4449#
4450
4451
4452################################################################################
4453#
4454# Enable or disable generation of the classlist at build time
4455#
4456
4457
4458#
4459# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483###############################################################################
4484#
4485# Setup version numbers
4486#
4487
4488# Verify that a given string represents a valid version number, and assign it
4489# to a variable.
4490
4491# Argument 1: the variable to assign to
4492# Argument 2: the value given by the user
4493
4494
4495
4496
4497#
4498# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4500#
4501# This code is free software; you can redistribute it and/or modify it
4502# under the terms of the GNU General Public License version 2 only, as
4503# published by the Free Software Foundation.  Oracle designates this
4504# particular file as subject to the "Classpath" exception as provided
4505# by Oracle in the LICENSE file that accompanied this code.
4506#
4507# This code is distributed in the hope that it will be useful, but WITHOUT
4508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4510# version 2 for more details (a copy is included in the LICENSE file that
4511# accompanied this code).
4512#
4513# You should have received a copy of the GNU General Public License version
4514# 2 along with this work; if not, write to the Free Software Foundation,
4515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4516#
4517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4518# or visit www.oracle.com if you need additional information or have any
4519# questions.
4520#
4521
4522# Major library component reside in separate files.
4523#
4524# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4525# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4526#
4527# This code is free software; you can redistribute it and/or modify it
4528# under the terms of the GNU General Public License version 2 only, as
4529# published by the Free Software Foundation.  Oracle designates this
4530# particular file as subject to the "Classpath" exception as provided
4531# by Oracle in the LICENSE file that accompanied this code.
4532#
4533# This code is distributed in the hope that it will be useful, but WITHOUT
4534# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4535# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4536# version 2 for more details (a copy is included in the LICENSE file that
4537# accompanied this code).
4538#
4539# You should have received a copy of the GNU General Public License version
4540# 2 along with this work; if not, write to the Free Software Foundation,
4541# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4542#
4543# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4544# or visit www.oracle.com if you need additional information or have any
4545# questions.
4546#
4547
4548################################################################################
4549# Setup alsa (Advanced Linux Sound Architecture)
4550################################################################################
4551
4552
4553#
4554# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4555# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4556#
4557# This code is free software; you can redistribute it and/or modify it
4558# under the terms of the GNU General Public License version 2 only, as
4559# published by the Free Software Foundation.  Oracle designates this
4560# particular file as subject to the "Classpath" exception as provided
4561# by Oracle in the LICENSE file that accompanied this code.
4562#
4563# This code is distributed in the hope that it will be useful, but WITHOUT
4564# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4565# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4566# version 2 for more details (a copy is included in the LICENSE file that
4567# accompanied this code).
4568#
4569# You should have received a copy of the GNU General Public License version
4570# 2 along with this work; if not, write to the Free Software Foundation,
4571# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4572#
4573# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4574# or visit www.oracle.com if you need additional information or have any
4575# questions.
4576#
4577
4578################################################################################
4579# Setup bundled libraries.
4580#
4581# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4582# OpenJDK repository. Default is to use these libraries as bundled, but they
4583# might be replaced by en external version by the user.
4584################################################################################
4585
4586
4587################################################################################
4588# Setup libjpeg
4589################################################################################
4590
4591
4592################################################################################
4593# Setup giflib
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libpng
4599################################################################################
4600
4601
4602################################################################################
4603# Setup zlib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup lcms (Little CMS)
4609################################################################################
4610
4611
4612#
4613# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4614# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4615#
4616# This code is free software; you can redistribute it and/or modify it
4617# under the terms of the GNU General Public License version 2 only, as
4618# published by the Free Software Foundation.  Oracle designates this
4619# particular file as subject to the "Classpath" exception as provided
4620# by Oracle in the LICENSE file that accompanied this code.
4621#
4622# This code is distributed in the hope that it will be useful, but WITHOUT
4623# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4624# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4625# version 2 for more details (a copy is included in the LICENSE file that
4626# accompanied this code).
4627#
4628# You should have received a copy of the GNU General Public License version
4629# 2 along with this work; if not, write to the Free Software Foundation,
4630# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4631#
4632# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4633# or visit www.oracle.com if you need additional information or have any
4634# questions.
4635#
4636
4637################################################################################
4638# Setup cups (Common Unix Printing System)
4639################################################################################
4640
4641
4642#
4643# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4645#
4646# This code is free software; you can redistribute it and/or modify it
4647# under the terms of the GNU General Public License version 2 only, as
4648# published by the Free Software Foundation.  Oracle designates this
4649# particular file as subject to the "Classpath" exception as provided
4650# by Oracle in the LICENSE file that accompanied this code.
4651#
4652# This code is distributed in the hope that it will be useful, but WITHOUT
4653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4655# version 2 for more details (a copy is included in the LICENSE file that
4656# accompanied this code).
4657#
4658# You should have received a copy of the GNU General Public License version
4659# 2 along with this work; if not, write to the Free Software Foundation,
4660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4661#
4662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4663# or visit www.oracle.com if you need additional information or have any
4664# questions.
4665#
4666
4667################################################################################
4668# Setup libffi (Foreign Function Interface)
4669################################################################################
4670
4671
4672#
4673# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4675#
4676# This code is free software; you can redistribute it and/or modify it
4677# under the terms of the GNU General Public License version 2 only, as
4678# published by the Free Software Foundation.  Oracle designates this
4679# particular file as subject to the "Classpath" exception as provided
4680# by Oracle in the LICENSE file that accompanied this code.
4681#
4682# This code is distributed in the hope that it will be useful, but WITHOUT
4683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4685# version 2 for more details (a copy is included in the LICENSE file that
4686# accompanied this code).
4687#
4688# You should have received a copy of the GNU General Public License version
4689# 2 along with this work; if not, write to the Free Software Foundation,
4690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4691#
4692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4693# or visit www.oracle.com if you need additional information or have any
4694# questions.
4695#
4696
4697################################################################################
4698# Build the freetype lib from source
4699################################################################################
4700
4701
4702################################################################################
4703# Check if a potential freeype library match is correct and usable
4704################################################################################
4705
4706
4707################################################################################
4708# Setup freetype (The FreeType2 font rendering library)
4709################################################################################
4710
4711
4712#
4713# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4715#
4716# This code is free software; you can redistribute it and/or modify it
4717# under the terms of the GNU General Public License version 2 only, as
4718# published by the Free Software Foundation.  Oracle designates this
4719# particular file as subject to the "Classpath" exception as provided
4720# by Oracle in the LICENSE file that accompanied this code.
4721#
4722# This code is distributed in the hope that it will be useful, but WITHOUT
4723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4725# version 2 for more details (a copy is included in the LICENSE file that
4726# accompanied this code).
4727#
4728# You should have received a copy of the GNU General Public License version
4729# 2 along with this work; if not, write to the Free Software Foundation,
4730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4731#
4732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4733# or visit www.oracle.com if you need additional information or have any
4734# questions.
4735#
4736
4737################################################################################
4738# Setup the standard C/C++ runtime libraries.
4739#
4740# Most importantly, determine if stdc++ should be linked statically or
4741# dynamically.
4742################################################################################
4743
4744
4745#
4746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770################################################################################
4771# Setup X11 Windows system
4772################################################################################
4773
4774
4775#
4776# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4778#
4779# This code is free software; you can redistribute it and/or modify it
4780# under the terms of the GNU General Public License version 2 only, as
4781# published by the Free Software Foundation.  Oracle designates this
4782# particular file as subject to the "Classpath" exception as provided
4783# by Oracle in the LICENSE file that accompanied this code.
4784#
4785# This code is distributed in the hope that it will be useful, but WITHOUT
4786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4788# version 2 for more details (a copy is included in the LICENSE file that
4789# accompanied this code).
4790#
4791# You should have received a copy of the GNU General Public License version
4792# 2 along with this work; if not, write to the Free Software Foundation,
4793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4794#
4795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4796# or visit www.oracle.com if you need additional information or have any
4797# questions.
4798#
4799
4800################################################################################
4801# Setup libelf (ELF library)
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Determine which libraries are needed for this configuration
4808################################################################################
4809
4810
4811################################################################################
4812# Parse library options, and setup needed libraries
4813################################################################################
4814
4815
4816################################################################################
4817# Setup llvm (Low-Level VM)
4818################################################################################
4819
4820
4821################################################################################
4822# Setup various libraries, typically small system libraries
4823################################################################################
4824
4825
4826################################################################################
4827# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4828# redistribute it in the test image.
4829################################################################################
4830
4831
4832
4833#
4834# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4835# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4836#
4837# This code is free software; you can redistribute it and/or modify it
4838# under the terms of the GNU General Public License version 2 only, as
4839# published by the Free Software Foundation.  Oracle designates this
4840# particular file as subject to the "Classpath" exception as provided
4841# by Oracle in the LICENSE file that accompanied this code.
4842#
4843# This code is distributed in the hope that it will be useful, but WITHOUT
4844# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4845# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4846# version 2 for more details (a copy is included in the LICENSE file that
4847# accompanied this code).
4848#
4849# You should have received a copy of the GNU General Public License version
4850# 2 along with this work; if not, write to the Free Software Foundation,
4851# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4852#
4853# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4854# or visit www.oracle.com if you need additional information or have any
4855# questions.
4856#
4857
4858# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4859# Converts autoconf style CPU name to OpenJDK style, into
4860# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4861
4862
4863# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4864# Converts autoconf style OS name to OpenJDK style, into
4865# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4866
4867
4868# Expects $host_os $host_cpu $build_os and $build_cpu
4869# and $with_target_bits to have been setup!
4870#
4871# Translate the standard triplet(quadruplet) definition
4872# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4873# OPENJDK_BUILD_OS, etc.
4874
4875
4876# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4877# accordingly. Must be done after setting up build and target system, but before
4878# doing anything else with these values.
4879
4880
4881# Setup the legacy variables, for controlling the old makefiles.
4882#
4883
4884
4885# $1 - Either TARGET or BUILD to setup the variables for.
4886
4887
4888
4889
4890#%%% Build and target systems %%%
4891
4892
4893
4894
4895# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4896# Add -mX to various FLAGS variables.
4897
4898
4899
4900
4901
4902
4903#
4904# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4905# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4906#
4907# This code is free software; you can redistribute it and/or modify it
4908# under the terms of the GNU General Public License version 2 only, as
4909# published by the Free Software Foundation.  Oracle designates this
4910# particular file as subject to the "Classpath" exception as provided
4911# by Oracle in the LICENSE file that accompanied this code.
4912#
4913# This code is distributed in the hope that it will be useful, but WITHOUT
4914# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4915# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4916# version 2 for more details (a copy is included in the LICENSE file that
4917# accompanied this code).
4918#
4919# You should have received a copy of the GNU General Public License version
4920# 2 along with this work; if not, write to the Free Software Foundation,
4921# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4922#
4923# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4924# or visit www.oracle.com if you need additional information or have any
4925# questions.
4926#
4927
4928
4929
4930
4931
4932
4933
4934################################################################################
4935# Define a mechanism for importing extra prebuilt modules
4936#
4937
4938
4939
4940#
4941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4943#
4944# This code is free software; you can redistribute it and/or modify it
4945# under the terms of the GNU General Public License version 2 only, as
4946# published by the Free Software Foundation.  Oracle designates this
4947# particular file as subject to the "Classpath" exception as provided
4948# by Oracle in the LICENSE file that accompanied this code.
4949#
4950# This code is distributed in the hope that it will be useful, but WITHOUT
4951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4953# version 2 for more details (a copy is included in the LICENSE file that
4954# accompanied this code).
4955#
4956# You should have received a copy of the GNU General Public License version
4957# 2 along with this work; if not, write to the Free Software Foundation,
4958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4959#
4960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4961# or visit www.oracle.com if you need additional information or have any
4962# questions.
4963#
4964
4965########################################################################
4966# This file is responsible for detecting, verifying and setting up the
4967# toolchain, i.e. the compiler, linker and related utilities. It will setup
4968# proper paths to the binaries, but it will not setup any flags.
4969#
4970# The binaries used is determined by the toolchain type, which is the family of
4971# compilers and related tools that are used.
4972########################################################################
4973
4974
4975# All valid toolchains, regardless of platform (used by help.m4)
4976VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4977
4978# These toolchains are valid on different platforms
4979VALID_TOOLCHAINS_linux="gcc clang"
4980VALID_TOOLCHAINS_solaris="solstudio"
4981VALID_TOOLCHAINS_macosx="gcc clang"
4982VALID_TOOLCHAINS_aix="xlc"
4983VALID_TOOLCHAINS_windows="microsoft"
4984
4985# Toolchain descriptions
4986TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4987TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4988TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4989TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4990TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4991
4992# Minimum supported versions, empty means unspecified
4993TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4994TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4995TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4996TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4997TOOLCHAIN_MINIMUM_VERSION_xlc=""
4998
4999# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5000# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5001# $1 - optional variable prefix for compiler and version variables (BUILD_)
5002# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5003
5004
5005# Check if the configured compiler (C and C++) is of a specific version or
5006# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5007#
5008# Arguments:
5009#   VERSION:   The version string to check against the found version
5010#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5011#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5012#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5013
5014
5015
5016
5017# Setup a number of variables describing how native output files are
5018# named on this platform/toolchain.
5019
5020
5021# Determine which toolchain type to use, and make sure it is valid for this
5022# platform. Setup various information about the selected toolchain.
5023
5024
5025# Before we start detecting the toolchain executables, we might need some
5026# special setup, e.g. additional paths etc.
5027
5028
5029# Restore path, etc
5030
5031
5032# Check if a compiler is of the toolchain type we expect, and save the version
5033# information from it. If the compiler does not match the expected type,
5034# this function will abort using AC_MSG_ERROR. If it matches, the version will
5035# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5036# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5037#
5038# $1 = compiler to test (CC or CXX)
5039# $2 = human readable name of compiler (C or C++)
5040
5041
5042# Try to locate the given C or C++ compiler in the path, or otherwise.
5043#
5044# $1 = compiler to test (CC or CXX)
5045# $2 = human readable name of compiler (C or C++)
5046# $3 = list of compiler names to search for
5047
5048
5049# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5050# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5051# archiver (AR). Verify that the compilers are correct according to the
5052# toolchain type.
5053
5054
5055# Setup additional tools that is considered a part of the toolchain, but not the
5056# core part. Many of these are highly platform-specific and do not exist,
5057# and/or are not needed on all platforms.
5058
5059
5060# Setup the build tools (i.e, the compiler and linker used to build programs
5061# that should be run on the build platform, not the target platform, as a build
5062# helper). Since the non-cross-compile case uses the normal, target compilers
5063# for this, we can only do this after these have been setup.
5064
5065
5066# Do some additional checks on the detected tools.
5067
5068
5069# Setup the JTReg Regression Test Harness.
5070
5071
5072#
5073# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5074# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5075#
5076# This code is free software; you can redistribute it and/or modify it
5077# under the terms of the GNU General Public License version 2 only, as
5078# published by the Free Software Foundation.  Oracle designates this
5079# particular file as subject to the "Classpath" exception as provided
5080# by Oracle in the LICENSE file that accompanied this code.
5081#
5082# This code is distributed in the hope that it will be useful, but WITHOUT
5083# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5084# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5085# version 2 for more details (a copy is included in the LICENSE file that
5086# accompanied this code).
5087#
5088# You should have received a copy of the GNU General Public License version
5089# 2 along with this work; if not, write to the Free Software Foundation,
5090# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5091#
5092# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5093# or visit www.oracle.com if you need additional information or have any
5094# questions.
5095#
5096
5097################################################################################
5098# The order of these defines the priority by which we try to find them.
5099VALID_VS_VERSIONS="2013 2012 2010"
5100
5101VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5102VS_VERSION_INTERNAL_2010=100
5103VS_MSVCR_2010=msvcr100.dll
5104# We don't use msvcp on Visual Studio 2010
5105#VS_MSVCP_2010=msvcp100.dll
5106VS_ENVVAR_2010="VS100COMNTOOLS"
5107VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5108VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5109VS_VS_PLATFORM_NAME_2010="v100"
5110VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5111
5112VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5113VS_VERSION_INTERNAL_2012=110
5114VS_MSVCR_2012=msvcr110.dll
5115VS_MSVCP_2012=msvcp110.dll
5116VS_ENVVAR_2012="VS110COMNTOOLS"
5117VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5118VS_SDK_INSTALLDIR_2012=
5119VS_VS_PLATFORM_NAME_2012="v110"
5120VS_SDK_PLATFORM_NAME_2012=
5121
5122VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5123VS_VERSION_INTERNAL_2013=120
5124VS_MSVCR_2013=msvcr120.dll
5125VS_MSVCP_2013=msvcp120.dll
5126VS_ENVVAR_2013="VS120COMNTOOLS"
5127VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5128VS_SDK_INSTALLDIR_2013=
5129VS_VS_PLATFORM_NAME_2013="v120"
5130VS_SDK_PLATFORM_NAME_2013=
5131
5132################################################################################
5133
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5142# build environment and assigns it to VS_ENV_CMD
5143
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150# Check if the VS env variables were setup prior to running configure.
5151# If not, then find vcvarsall.bat and run it automatically, and integrate
5152# the set env variables into the spec file.
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167# This line needs to be here, verbatim, after all includes and the dummy hook
5168# definitions. It is replaced with custom functionality when building
5169# custom sources.
5170#CUSTOM_AUTOCONF_INCLUDE
5171
5172# Do not change or remove the following line, it is needed for consistency checks:
5173DATE_WHEN_GENERATED=1482828098
5174
5175###############################################################################
5176#
5177# Initialization / Boot-strapping
5178#
5179# The bootstrapping process needs to solve the "chicken or the egg" problem,
5180# thus it jumps back and forth, each time gaining something needed later on.
5181#
5182###############################################################################
5183
5184# If we are requested to print additional help, do that and then exit.
5185# This must be the very first call.
5186
5187  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5188
5189    # Print available toolchains
5190    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5191    $PRINTF "Which are valid to use depends on the build platform.\n"
5192    for toolchain in $VALID_TOOLCHAINS_all; do
5193      # Use indirect variable referencing
5194      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5195      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5196      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5197    done
5198    $PRINTF "\n"
5199
5200    # Print available jvm features
5201    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5202    $PRINTF "Which are valid to use depends on the target platform.\n  "
5203    $PRINTF "%s " $VALID_JVM_FEATURES
5204    $PRINTF "\n"
5205
5206    # And now exit directly
5207    exit 0
5208  fi
5209
5210
5211# Basic initialization that must happen first of all in the normal process.
5212
5213  # Save the original command line. This is passed to us by the wrapper configure script.
5214
5215  # Save the path variable before it gets changed
5216  ORIGINAL_PATH="$PATH"
5217
5218  DATE_WHEN_CONFIGURED=`LANG=C date`
5219
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5221$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5223$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5224
5225
5226  # Start with tools that do not need have cross compilation support
5227  # and can be expected to be found in the default PATH. These tools are
5228  # used by configure.
5229
5230  # First are all the simple required tools.
5231
5232
5233
5234  # Publish this variable in the help.
5235
5236
5237  if [ -z "${BASENAME+x}" ]; then
5238    # The variable is not set by user, try to locate tool using the code snippet
5239    for ac_prog in basename
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if ${ac_cv_path_BASENAME+:} false; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  case $BASENAME in
5249  [\\/]* | ?:[\\/]*)
5250  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5251  ;;
5252  *)
5253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in $PATH
5255do
5256  IFS=$as_save_IFS
5257  test -z "$as_dir" && as_dir=.
5258    for ac_exec_ext in '' $ac_executable_extensions; do
5259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5260    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5262    break 2
5263  fi
5264done
5265  done
5266IFS=$as_save_IFS
5267
5268  ;;
5269esac
5270fi
5271BASENAME=$ac_cv_path_BASENAME
5272if test -n "$BASENAME"; then
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5274$as_echo "$BASENAME" >&6; }
5275else
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
5278fi
5279
5280
5281  test -n "$BASENAME" && break
5282done
5283
5284  else
5285    # The variable is set, but is it from the command line or the environment?
5286
5287    # Try to remove the string !BASENAME! from our list.
5288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5290      # If it failed, the variable was not from the command line. Ignore it,
5291      # but warn the user (except for BASH, which is always set by the calling BASH).
5292      if test "xBASENAME" != xBASH; then
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5294$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5295      fi
5296      # Try to locate tool using the code snippet
5297      for ac_prog in basename
5298do
5299  # Extract the first word of "$ac_prog", so it can be a program name with args.
5300set dummy $ac_prog; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if ${ac_cv_path_BASENAME+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $BASENAME in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5318    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329BASENAME=$ac_cv_path_BASENAME
5330if test -n "$BASENAME"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5332$as_echo "$BASENAME" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339  test -n "$BASENAME" && break
5340done
5341
5342    else
5343      # If it succeeded, then it was overridden by the user. We will use it
5344      # for the tool.
5345
5346      # First remove it from the list of overridden variables, so we can test
5347      # for unknown variables in the end.
5348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5349
5350      # Check if we try to supply an empty value
5351      if test "x$BASENAME" = x; then
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5353$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5355$as_echo_n "checking for BASENAME... " >&6; }
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5357$as_echo "disabled" >&6; }
5358      else
5359        # Check if the provided tool contains a complete path.
5360        tool_specified="$BASENAME"
5361        tool_basename="${tool_specified##*/}"
5362        if test "x$tool_basename" = "x$tool_specified"; then
5363          # A command without a complete path is provided, search $PATH.
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5365$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5366          # Extract the first word of "$tool_basename", so it can be a program name with args.
5367set dummy $tool_basename; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_BASENAME+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $BASENAME in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396BASENAME=$ac_cv_path_BASENAME
5397if test -n "$BASENAME"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5399$as_echo "$BASENAME" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406          if test "x$BASENAME" = x; then
5407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5408          fi
5409        else
5410          # Otherwise we believe it is a complete path. Use it as it is.
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5412$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5414$as_echo_n "checking for BASENAME... " >&6; }
5415          if test ! -x "$tool_specified"; then
5416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5417$as_echo "not found" >&6; }
5418            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5419          fi
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5421$as_echo "$tool_specified" >&6; }
5422        fi
5423      fi
5424    fi
5425
5426  fi
5427
5428
5429
5430  if test "x$BASENAME" = x; then
5431    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5432  fi
5433
5434
5435
5436
5437
5438  # Publish this variable in the help.
5439
5440
5441  if [ -z "${BASH+x}" ]; then
5442    # The variable is not set by user, try to locate tool using the code snippet
5443    for ac_prog in bash
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if ${ac_cv_path_BASH+:} false; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $BASH in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5464    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475BASH=$ac_cv_path_BASH
5476if test -n "$BASH"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5478$as_echo "$BASH" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$BASH" && break
5486done
5487
5488  else
5489    # The variable is set, but is it from the command line or the environment?
5490
5491    # Try to remove the string !BASH! from our list.
5492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5494      # If it failed, the variable was not from the command line. Ignore it,
5495      # but warn the user (except for BASH, which is always set by the calling BASH).
5496      if test "xBASH" != xBASH; then
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5498$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5499      fi
5500      # Try to locate tool using the code snippet
5501      for ac_prog in bash
5502do
5503  # Extract the first word of "$ac_prog", so it can be a program name with args.
5504set dummy $ac_prog; ac_word=$2
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_BASH+:} false; then :
5508  $as_echo_n "(cached) " >&6
5509else
5510  case $BASH in
5511  [\\/]* | ?:[\\/]*)
5512  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5513  ;;
5514  *)
5515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518  IFS=$as_save_IFS
5519  test -z "$as_dir" && as_dir=.
5520    for ac_exec_ext in '' $ac_executable_extensions; do
5521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5522    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5524    break 2
5525  fi
5526done
5527  done
5528IFS=$as_save_IFS
5529
5530  ;;
5531esac
5532fi
5533BASH=$ac_cv_path_BASH
5534if test -n "$BASH"; then
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5536$as_echo "$BASH" >&6; }
5537else
5538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
5540fi
5541
5542
5543  test -n "$BASH" && break
5544done
5545
5546    else
5547      # If it succeeded, then it was overridden by the user. We will use it
5548      # for the tool.
5549
5550      # First remove it from the list of overridden variables, so we can test
5551      # for unknown variables in the end.
5552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5553
5554      # Check if we try to supply an empty value
5555      if test "x$BASH" = x; then
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5557$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5559$as_echo_n "checking for BASH... " >&6; }
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5561$as_echo "disabled" >&6; }
5562      else
5563        # Check if the provided tool contains a complete path.
5564        tool_specified="$BASH"
5565        tool_basename="${tool_specified##*/}"
5566        if test "x$tool_basename" = "x$tool_specified"; then
5567          # A command without a complete path is provided, search $PATH.
5568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5569$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5570          # Extract the first word of "$tool_basename", so it can be a program name with args.
5571set dummy $tool_basename; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_BASH+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $BASH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600BASH=$ac_cv_path_BASH
5601if test -n "$BASH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5603$as_echo "$BASH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610          if test "x$BASH" = x; then
5611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5612          fi
5613        else
5614          # Otherwise we believe it is a complete path. Use it as it is.
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5616$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5618$as_echo_n "checking for BASH... " >&6; }
5619          if test ! -x "$tool_specified"; then
5620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5621$as_echo "not found" >&6; }
5622            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5623          fi
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5625$as_echo "$tool_specified" >&6; }
5626        fi
5627      fi
5628    fi
5629
5630  fi
5631
5632
5633
5634  if test "x$BASH" = x; then
5635    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5636  fi
5637
5638
5639
5640
5641
5642  # Publish this variable in the help.
5643
5644
5645  if [ -z "${CAT+x}" ]; then
5646    # The variable is not set by user, try to locate tool using the code snippet
5647    for ac_prog in cat
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_CAT+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $CAT in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679CAT=$ac_cv_path_CAT
5680if test -n "$CAT"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5682$as_echo "$CAT" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$CAT" && break
5690done
5691
5692  else
5693    # The variable is set, but is it from the command line or the environment?
5694
5695    # Try to remove the string !CAT! from our list.
5696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5698      # If it failed, the variable was not from the command line. Ignore it,
5699      # but warn the user (except for BASH, which is always set by the calling BASH).
5700      if test "xCAT" != xBASH; then
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5702$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5703      fi
5704      # Try to locate tool using the code snippet
5705      for ac_prog in cat
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CAT+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CAT in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CAT=$ac_cv_path_CAT
5738if test -n "$CAT"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5740$as_echo "$CAT" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$CAT" && break
5748done
5749
5750    else
5751      # If it succeeded, then it was overridden by the user. We will use it
5752      # for the tool.
5753
5754      # First remove it from the list of overridden variables, so we can test
5755      # for unknown variables in the end.
5756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5757
5758      # Check if we try to supply an empty value
5759      if test "x$CAT" = x; then
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5761$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5763$as_echo_n "checking for CAT... " >&6; }
5764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5765$as_echo "disabled" >&6; }
5766      else
5767        # Check if the provided tool contains a complete path.
5768        tool_specified="$CAT"
5769        tool_basename="${tool_specified##*/}"
5770        if test "x$tool_basename" = "x$tool_specified"; then
5771          # A command without a complete path is provided, search $PATH.
5772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5774          # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CAT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CAT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CAT=$ac_cv_path_CAT
5805if test -n "$CAT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5807$as_echo "$CAT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814          if test "x$CAT" = x; then
5815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816          fi
5817        else
5818          # Otherwise we believe it is a complete path. Use it as it is.
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5822$as_echo_n "checking for CAT... " >&6; }
5823          if test ! -x "$tool_specified"; then
5824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5827          fi
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830        fi
5831      fi
5832    fi
5833
5834  fi
5835
5836
5837
5838  if test "x$CAT" = x; then
5839    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if [ -z "${CHMOD+x}" ]; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in chmod
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CHMOD+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CHMOD in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CHMOD=$ac_cv_path_CHMOD
5884if test -n "$CHMOD"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5886$as_echo "$CHMOD" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CHMOD" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CHMOD! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCHMOD" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in chmod
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CHMOD+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CHMOD in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CHMOD=$ac_cv_path_CHMOD
5942if test -n "$CHMOD"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5944$as_echo "$CHMOD" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CHMOD" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if we try to supply an empty value
5963      if test "x$CHMOD" = x; then
5964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5965$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5967$as_echo_n "checking for CHMOD... " >&6; }
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5969$as_echo "disabled" >&6; }
5970      else
5971        # Check if the provided tool contains a complete path.
5972        tool_specified="$CHMOD"
5973        tool_basename="${tool_specified##*/}"
5974        if test "x$tool_basename" = "x$tool_specified"; then
5975          # A command without a complete path is provided, search $PATH.
5976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5977$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5978          # Extract the first word of "$tool_basename", so it can be a program name with args.
5979set dummy $tool_basename; ac_word=$2
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
5982if ${ac_cv_path_CHMOD+:} false; then :
5983  $as_echo_n "(cached) " >&6
5984else
5985  case $CHMOD in
5986  [\\/]* | ?:[\\/]*)
5987  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5988  ;;
5989  *)
5990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005  ;;
6006esac
6007fi
6008CHMOD=$ac_cv_path_CHMOD
6009if test -n "$CHMOD"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6011$as_echo "$CHMOD" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018          if test "x$CHMOD" = x; then
6019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6020          fi
6021        else
6022          # Otherwise we believe it is a complete path. Use it as it is.
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6024$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6026$as_echo_n "checking for CHMOD... " >&6; }
6027          if test ! -x "$tool_specified"; then
6028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6029$as_echo "not found" >&6; }
6030            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6031          fi
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6033$as_echo "$tool_specified" >&6; }
6034        fi
6035      fi
6036    fi
6037
6038  fi
6039
6040
6041
6042  if test "x$CHMOD" = x; then
6043    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6044  fi
6045
6046
6047
6048
6049
6050  # Publish this variable in the help.
6051
6052
6053  if [ -z "${CMP+x}" ]; then
6054    # The variable is not set by user, try to locate tool using the code snippet
6055    for ac_prog in cmp
6056do
6057  # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_path_CMP+:} false; then :
6062  $as_echo_n "(cached) " >&6
6063else
6064  case $CMP in
6065  [\\/]* | ?:[\\/]*)
6066  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6067  ;;
6068  *)
6069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072  IFS=$as_save_IFS
6073  test -z "$as_dir" && as_dir=.
6074    for ac_exec_ext in '' $ac_executable_extensions; do
6075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6076    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6078    break 2
6079  fi
6080done
6081  done
6082IFS=$as_save_IFS
6083
6084  ;;
6085esac
6086fi
6087CMP=$ac_cv_path_CMP
6088if test -n "$CMP"; then
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6090$as_echo "$CMP" >&6; }
6091else
6092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095
6096
6097  test -n "$CMP" && break
6098done
6099
6100  else
6101    # The variable is set, but is it from the command line or the environment?
6102
6103    # Try to remove the string !CMP! from our list.
6104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6106      # If it failed, the variable was not from the command line. Ignore it,
6107      # but warn the user (except for BASH, which is always set by the calling BASH).
6108      if test "xCMP" != xBASH; then
6109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6110$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6111      fi
6112      # Try to locate tool using the code snippet
6113      for ac_prog in cmp
6114do
6115  # Extract the first word of "$ac_prog", so it can be a program name with args.
6116set dummy $ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_path_CMP+:} false; then :
6120  $as_echo_n "(cached) " >&6
6121else
6122  case $CMP in
6123  [\\/]* | ?:[\\/]*)
6124  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6125  ;;
6126  *)
6127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130  IFS=$as_save_IFS
6131  test -z "$as_dir" && as_dir=.
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6134    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136    break 2
6137  fi
6138done
6139  done
6140IFS=$as_save_IFS
6141
6142  ;;
6143esac
6144fi
6145CMP=$ac_cv_path_CMP
6146if test -n "$CMP"; then
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6148$as_echo "$CMP" >&6; }
6149else
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155  test -n "$CMP" && break
6156done
6157
6158    else
6159      # If it succeeded, then it was overridden by the user. We will use it
6160      # for the tool.
6161
6162      # First remove it from the list of overridden variables, so we can test
6163      # for unknown variables in the end.
6164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6165
6166      # Check if we try to supply an empty value
6167      if test "x$CMP" = x; then
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6169$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6171$as_echo_n "checking for CMP... " >&6; }
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6173$as_echo "disabled" >&6; }
6174      else
6175        # Check if the provided tool contains a complete path.
6176        tool_specified="$CMP"
6177        tool_basename="${tool_specified##*/}"
6178        if test "x$tool_basename" = "x$tool_specified"; then
6179          # A command without a complete path is provided, search $PATH.
6180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6182          # Extract the first word of "$tool_basename", so it can be a program name with args.
6183set dummy $tool_basename; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_CMP+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $CMP in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212CMP=$ac_cv_path_CMP
6213if test -n "$CMP"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6215$as_echo "$CMP" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222          if test "x$CMP" = x; then
6223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6224          fi
6225        else
6226          # Otherwise we believe it is a complete path. Use it as it is.
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6230$as_echo_n "checking for CMP... " >&6; }
6231          if test ! -x "$tool_specified"; then
6232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6233$as_echo "not found" >&6; }
6234            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6235          fi
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6237$as_echo "$tool_specified" >&6; }
6238        fi
6239      fi
6240    fi
6241
6242  fi
6243
6244
6245
6246  if test "x$CMP" = x; then
6247    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6248  fi
6249
6250
6251
6252
6253
6254  # Publish this variable in the help.
6255
6256
6257  if [ -z "${COMM+x}" ]; then
6258    # The variable is not set by user, try to locate tool using the code snippet
6259    for ac_prog in comm
6260do
6261  # Extract the first word of "$ac_prog", so it can be a program name with args.
6262set dummy $ac_prog; ac_word=$2
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264$as_echo_n "checking for $ac_word... " >&6; }
6265if ${ac_cv_path_COMM+:} false; then :
6266  $as_echo_n "(cached) " >&6
6267else
6268  case $COMM in
6269  [\\/]* | ?:[\\/]*)
6270  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6271  ;;
6272  *)
6273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH
6275do
6276  IFS=$as_save_IFS
6277  test -z "$as_dir" && as_dir=.
6278    for ac_exec_ext in '' $ac_executable_extensions; do
6279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6282    break 2
6283  fi
6284done
6285  done
6286IFS=$as_save_IFS
6287
6288  ;;
6289esac
6290fi
6291COMM=$ac_cv_path_COMM
6292if test -n "$COMM"; then
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6294$as_echo "$COMM" >&6; }
6295else
6296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
6298fi
6299
6300
6301  test -n "$COMM" && break
6302done
6303
6304  else
6305    # The variable is set, but is it from the command line or the environment?
6306
6307    # Try to remove the string !COMM! from our list.
6308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6310      # If it failed, the variable was not from the command line. Ignore it,
6311      # but warn the user (except for BASH, which is always set by the calling BASH).
6312      if test "xCOMM" != xBASH; then
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6314$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6315      fi
6316      # Try to locate tool using the code snippet
6317      for ac_prog in comm
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_COMM+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $COMM in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349COMM=$ac_cv_path_COMM
6350if test -n "$COMM"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6352$as_echo "$COMM" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$COMM" && break
6360done
6361
6362    else
6363      # If it succeeded, then it was overridden by the user. We will use it
6364      # for the tool.
6365
6366      # First remove it from the list of overridden variables, so we can test
6367      # for unknown variables in the end.
6368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6369
6370      # Check if we try to supply an empty value
6371      if test "x$COMM" = x; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6373$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6375$as_echo_n "checking for COMM... " >&6; }
6376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6377$as_echo "disabled" >&6; }
6378      else
6379        # Check if the provided tool contains a complete path.
6380        tool_specified="$COMM"
6381        tool_basename="${tool_specified##*/}"
6382        if test "x$tool_basename" = "x$tool_specified"; then
6383          # A command without a complete path is provided, search $PATH.
6384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6385$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6386          # Extract the first word of "$tool_basename", so it can be a program name with args.
6387set dummy $tool_basename; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_COMM+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $COMM in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416COMM=$ac_cv_path_COMM
6417if test -n "$COMM"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6419$as_echo "$COMM" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426          if test "x$COMM" = x; then
6427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6428          fi
6429        else
6430          # Otherwise we believe it is a complete path. Use it as it is.
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6432$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6434$as_echo_n "checking for COMM... " >&6; }
6435          if test ! -x "$tool_specified"; then
6436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6437$as_echo "not found" >&6; }
6438            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6439          fi
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6441$as_echo "$tool_specified" >&6; }
6442        fi
6443      fi
6444    fi
6445
6446  fi
6447
6448
6449
6450  if test "x$COMM" = x; then
6451    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6452  fi
6453
6454
6455
6456
6457
6458  # Publish this variable in the help.
6459
6460
6461  if [ -z "${CP+x}" ]; then
6462    # The variable is not set by user, try to locate tool using the code snippet
6463    for ac_prog in cp
6464do
6465  # Extract the first word of "$ac_prog", so it can be a program name with args.
6466set dummy $ac_prog; ac_word=$2
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468$as_echo_n "checking for $ac_word... " >&6; }
6469if ${ac_cv_path_CP+:} false; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  case $CP in
6473  [\\/]* | ?:[\\/]*)
6474  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6475  ;;
6476  *)
6477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478for as_dir in $PATH
6479do
6480  IFS=$as_save_IFS
6481  test -z "$as_dir" && as_dir=.
6482    for ac_exec_ext in '' $ac_executable_extensions; do
6483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6484    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486    break 2
6487  fi
6488done
6489  done
6490IFS=$as_save_IFS
6491
6492  ;;
6493esac
6494fi
6495CP=$ac_cv_path_CP
6496if test -n "$CP"; then
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6498$as_echo "$CP" >&6; }
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }
6502fi
6503
6504
6505  test -n "$CP" && break
6506done
6507
6508  else
6509    # The variable is set, but is it from the command line or the environment?
6510
6511    # Try to remove the string !CP! from our list.
6512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6514      # If it failed, the variable was not from the command line. Ignore it,
6515      # but warn the user (except for BASH, which is always set by the calling BASH).
6516      if test "xCP" != xBASH; then
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6518$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6519      fi
6520      # Try to locate tool using the code snippet
6521      for ac_prog in cp
6522do
6523  # Extract the first word of "$ac_prog", so it can be a program name with args.
6524set dummy $ac_prog; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_CP+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $CP in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553CP=$ac_cv_path_CP
6554if test -n "$CP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6556$as_echo "$CP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563  test -n "$CP" && break
6564done
6565
6566    else
6567      # If it succeeded, then it was overridden by the user. We will use it
6568      # for the tool.
6569
6570      # First remove it from the list of overridden variables, so we can test
6571      # for unknown variables in the end.
6572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6573
6574      # Check if we try to supply an empty value
6575      if test "x$CP" = x; then
6576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6577$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6579$as_echo_n "checking for CP... " >&6; }
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6581$as_echo "disabled" >&6; }
6582      else
6583        # Check if the provided tool contains a complete path.
6584        tool_specified="$CP"
6585        tool_basename="${tool_specified##*/}"
6586        if test "x$tool_basename" = "x$tool_specified"; then
6587          # A command without a complete path is provided, search $PATH.
6588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6589$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6590          # Extract the first word of "$tool_basename", so it can be a program name with args.
6591set dummy $tool_basename; ac_word=$2
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_CP+:} false; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  case $CP in
6598  [\\/]* | ?:[\\/]*)
6599  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6600  ;;
6601  *)
6602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in $PATH
6604do
6605  IFS=$as_save_IFS
6606  test -z "$as_dir" && as_dir=.
6607    for ac_exec_ext in '' $ac_executable_extensions; do
6608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611    break 2
6612  fi
6613done
6614  done
6615IFS=$as_save_IFS
6616
6617  ;;
6618esac
6619fi
6620CP=$ac_cv_path_CP
6621if test -n "$CP"; then
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6623$as_echo "$CP" >&6; }
6624else
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
6630          if test "x$CP" = x; then
6631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6632          fi
6633        else
6634          # Otherwise we believe it is a complete path. Use it as it is.
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6636$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6638$as_echo_n "checking for CP... " >&6; }
6639          if test ! -x "$tool_specified"; then
6640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6641$as_echo "not found" >&6; }
6642            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6643          fi
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6645$as_echo "$tool_specified" >&6; }
6646        fi
6647      fi
6648    fi
6649
6650  fi
6651
6652
6653
6654  if test "x$CP" = x; then
6655    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6656  fi
6657
6658
6659
6660
6661
6662  # Publish this variable in the help.
6663
6664
6665  if [ -z "${CUT+x}" ]; then
6666    # The variable is not set by user, try to locate tool using the code snippet
6667    for ac_prog in cut
6668do
6669  # Extract the first word of "$ac_prog", so it can be a program name with args.
6670set dummy $ac_prog; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_CUT+:} false; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  case $CUT in
6677  [\\/]* | ?:[\\/]*)
6678  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6679  ;;
6680  *)
6681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in $PATH
6683do
6684  IFS=$as_save_IFS
6685  test -z "$as_dir" && as_dir=.
6686    for ac_exec_ext in '' $ac_executable_extensions; do
6687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690    break 2
6691  fi
6692done
6693  done
6694IFS=$as_save_IFS
6695
6696  ;;
6697esac
6698fi
6699CUT=$ac_cv_path_CUT
6700if test -n "$CUT"; then
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6702$as_echo "$CUT" >&6; }
6703else
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
6709  test -n "$CUT" && break
6710done
6711
6712  else
6713    # The variable is set, but is it from the command line or the environment?
6714
6715    # Try to remove the string !CUT! from our list.
6716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6718      # If it failed, the variable was not from the command line. Ignore it,
6719      # but warn the user (except for BASH, which is always set by the calling BASH).
6720      if test "xCUT" != xBASH; then
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6722$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6723      fi
6724      # Try to locate tool using the code snippet
6725      for ac_prog in cut
6726do
6727  # Extract the first word of "$ac_prog", so it can be a program name with args.
6728set dummy $ac_prog; ac_word=$2
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730$as_echo_n "checking for $ac_word... " >&6; }
6731if ${ac_cv_path_CUT+:} false; then :
6732  $as_echo_n "(cached) " >&6
6733else
6734  case $CUT in
6735  [\\/]* | ?:[\\/]*)
6736  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6737  ;;
6738  *)
6739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740for as_dir in $PATH
6741do
6742  IFS=$as_save_IFS
6743  test -z "$as_dir" && as_dir=.
6744    for ac_exec_ext in '' $ac_executable_extensions; do
6745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748    break 2
6749  fi
6750done
6751  done
6752IFS=$as_save_IFS
6753
6754  ;;
6755esac
6756fi
6757CUT=$ac_cv_path_CUT
6758if test -n "$CUT"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6760$as_echo "$CUT" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766
6767  test -n "$CUT" && break
6768done
6769
6770    else
6771      # If it succeeded, then it was overridden by the user. We will use it
6772      # for the tool.
6773
6774      # First remove it from the list of overridden variables, so we can test
6775      # for unknown variables in the end.
6776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6777
6778      # Check if we try to supply an empty value
6779      if test "x$CUT" = x; then
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6781$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6783$as_echo_n "checking for CUT... " >&6; }
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6785$as_echo "disabled" >&6; }
6786      else
6787        # Check if the provided tool contains a complete path.
6788        tool_specified="$CUT"
6789        tool_basename="${tool_specified##*/}"
6790        if test "x$tool_basename" = "x$tool_specified"; then
6791          # A command without a complete path is provided, search $PATH.
6792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6793$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6794          # Extract the first word of "$tool_basename", so it can be a program name with args.
6795set dummy $tool_basename; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_CUT+:} false; then :
6799  $as_echo_n "(cached) " >&6
6800else
6801  case $CUT in
6802  [\\/]* | ?:[\\/]*)
6803  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6804  ;;
6805  *)
6806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821  ;;
6822esac
6823fi
6824CUT=$ac_cv_path_CUT
6825if test -n "$CUT"; then
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6827$as_echo "$CUT" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
6833
6834          if test "x$CUT" = x; then
6835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6836          fi
6837        else
6838          # Otherwise we believe it is a complete path. Use it as it is.
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6840$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6842$as_echo_n "checking for CUT... " >&6; }
6843          if test ! -x "$tool_specified"; then
6844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6845$as_echo "not found" >&6; }
6846            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6847          fi
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6849$as_echo "$tool_specified" >&6; }
6850        fi
6851      fi
6852    fi
6853
6854  fi
6855
6856
6857
6858  if test "x$CUT" = x; then
6859    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6860  fi
6861
6862
6863
6864
6865
6866  # Publish this variable in the help.
6867
6868
6869  if [ -z "${DATE+x}" ]; then
6870    # The variable is not set by user, try to locate tool using the code snippet
6871    for ac_prog in date
6872do
6873  # Extract the first word of "$ac_prog", so it can be a program name with args.
6874set dummy $ac_prog; ac_word=$2
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876$as_echo_n "checking for $ac_word... " >&6; }
6877if ${ac_cv_path_DATE+:} false; then :
6878  $as_echo_n "(cached) " >&6
6879else
6880  case $DATE in
6881  [\\/]* | ?:[\\/]*)
6882  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6883  ;;
6884  *)
6885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886for as_dir in $PATH
6887do
6888  IFS=$as_save_IFS
6889  test -z "$as_dir" && as_dir=.
6890    for ac_exec_ext in '' $ac_executable_extensions; do
6891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894    break 2
6895  fi
6896done
6897  done
6898IFS=$as_save_IFS
6899
6900  ;;
6901esac
6902fi
6903DATE=$ac_cv_path_DATE
6904if test -n "$DATE"; then
6905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6906$as_echo "$DATE" >&6; }
6907else
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909$as_echo "no" >&6; }
6910fi
6911
6912
6913  test -n "$DATE" && break
6914done
6915
6916  else
6917    # The variable is set, but is it from the command line or the environment?
6918
6919    # Try to remove the string !DATE! from our list.
6920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6922      # If it failed, the variable was not from the command line. Ignore it,
6923      # but warn the user (except for BASH, which is always set by the calling BASH).
6924      if test "xDATE" != xBASH; then
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6926$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6927      fi
6928      # Try to locate tool using the code snippet
6929      for ac_prog in date
6930do
6931  # Extract the first word of "$ac_prog", so it can be a program name with args.
6932set dummy $ac_prog; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_DATE+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $DATE in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961DATE=$ac_cv_path_DATE
6962if test -n "$DATE"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6964$as_echo "$DATE" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970
6971  test -n "$DATE" && break
6972done
6973
6974    else
6975      # If it succeeded, then it was overridden by the user. We will use it
6976      # for the tool.
6977
6978      # First remove it from the list of overridden variables, so we can test
6979      # for unknown variables in the end.
6980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6981
6982      # Check if we try to supply an empty value
6983      if test "x$DATE" = x; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6985$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6987$as_echo_n "checking for DATE... " >&6; }
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6989$as_echo "disabled" >&6; }
6990      else
6991        # Check if the provided tool contains a complete path.
6992        tool_specified="$DATE"
6993        tool_basename="${tool_specified##*/}"
6994        if test "x$tool_basename" = "x$tool_specified"; then
6995          # A command without a complete path is provided, search $PATH.
6996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6997$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6998          # Extract the first word of "$tool_basename", so it can be a program name with args.
6999set dummy $tool_basename; ac_word=$2
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001$as_echo_n "checking for $ac_word... " >&6; }
7002if ${ac_cv_path_DATE+:} false; then :
7003  $as_echo_n "(cached) " >&6
7004else
7005  case $DATE in
7006  [\\/]* | ?:[\\/]*)
7007  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7008  ;;
7009  *)
7010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011for as_dir in $PATH
7012do
7013  IFS=$as_save_IFS
7014  test -z "$as_dir" && as_dir=.
7015    for ac_exec_ext in '' $ac_executable_extensions; do
7016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019    break 2
7020  fi
7021done
7022  done
7023IFS=$as_save_IFS
7024
7025  ;;
7026esac
7027fi
7028DATE=$ac_cv_path_DATE
7029if test -n "$DATE"; then
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7031$as_echo "$DATE" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036
7037
7038          if test "x$DATE" = x; then
7039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7040          fi
7041        else
7042          # Otherwise we believe it is a complete path. Use it as it is.
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7044$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7046$as_echo_n "checking for DATE... " >&6; }
7047          if test ! -x "$tool_specified"; then
7048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7049$as_echo "not found" >&6; }
7050            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7051          fi
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7053$as_echo "$tool_specified" >&6; }
7054        fi
7055      fi
7056    fi
7057
7058  fi
7059
7060
7061
7062  if test "x$DATE" = x; then
7063    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7064  fi
7065
7066
7067
7068
7069
7070  # Publish this variable in the help.
7071
7072
7073  if [ -z "${DIFF+x}" ]; then
7074    # The variable is not set by user, try to locate tool using the code snippet
7075    for ac_prog in gdiff diff
7076do
7077  # Extract the first word of "$ac_prog", so it can be a program name with args.
7078set dummy $ac_prog; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_DIFF+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $DIFF in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107DIFF=$ac_cv_path_DIFF
7108if test -n "$DIFF"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7110$as_echo "$DIFF" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117  test -n "$DIFF" && break
7118done
7119
7120  else
7121    # The variable is set, but is it from the command line or the environment?
7122
7123    # Try to remove the string !DIFF! from our list.
7124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7126      # If it failed, the variable was not from the command line. Ignore it,
7127      # but warn the user (except for BASH, which is always set by the calling BASH).
7128      if test "xDIFF" != xBASH; then
7129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7130$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7131      fi
7132      # Try to locate tool using the code snippet
7133      for ac_prog in gdiff diff
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_DIFF+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $DIFF in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165DIFF=$ac_cv_path_DIFF
7166if test -n "$DIFF"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7168$as_echo "$DIFF" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175  test -n "$DIFF" && break
7176done
7177
7178    else
7179      # If it succeeded, then it was overridden by the user. We will use it
7180      # for the tool.
7181
7182      # First remove it from the list of overridden variables, so we can test
7183      # for unknown variables in the end.
7184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7185
7186      # Check if we try to supply an empty value
7187      if test "x$DIFF" = x; then
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7189$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7191$as_echo_n "checking for DIFF... " >&6; }
7192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7193$as_echo "disabled" >&6; }
7194      else
7195        # Check if the provided tool contains a complete path.
7196        tool_specified="$DIFF"
7197        tool_basename="${tool_specified##*/}"
7198        if test "x$tool_basename" = "x$tool_specified"; then
7199          # A command without a complete path is provided, search $PATH.
7200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7201$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7202          # Extract the first word of "$tool_basename", so it can be a program name with args.
7203set dummy $tool_basename; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_DIFF+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $DIFF in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232DIFF=$ac_cv_path_DIFF
7233if test -n "$DIFF"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7235$as_echo "$DIFF" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242          if test "x$DIFF" = x; then
7243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7244          fi
7245        else
7246          # Otherwise we believe it is a complete path. Use it as it is.
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7248$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7250$as_echo_n "checking for DIFF... " >&6; }
7251          if test ! -x "$tool_specified"; then
7252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7253$as_echo "not found" >&6; }
7254            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7255          fi
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7257$as_echo "$tool_specified" >&6; }
7258        fi
7259      fi
7260    fi
7261
7262  fi
7263
7264
7265
7266  if test "x$DIFF" = x; then
7267    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7268  fi
7269
7270
7271
7272
7273
7274  # Publish this variable in the help.
7275
7276
7277  if [ -z "${DIRNAME+x}" ]; then
7278    # The variable is not set by user, try to locate tool using the code snippet
7279    for ac_prog in dirname
7280do
7281  # Extract the first word of "$ac_prog", so it can be a program name with args.
7282set dummy $ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_path_DIRNAME+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  case $DIRNAME in
7289  [\\/]* | ?:[\\/]*)
7290  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7291  ;;
7292  *)
7293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7294for as_dir in $PATH
7295do
7296  IFS=$as_save_IFS
7297  test -z "$as_dir" && as_dir=.
7298    for ac_exec_ext in '' $ac_executable_extensions; do
7299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7300    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7302    break 2
7303  fi
7304done
7305  done
7306IFS=$as_save_IFS
7307
7308  ;;
7309esac
7310fi
7311DIRNAME=$ac_cv_path_DIRNAME
7312if test -n "$DIRNAME"; then
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7314$as_echo "$DIRNAME" >&6; }
7315else
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
7318fi
7319
7320
7321  test -n "$DIRNAME" && break
7322done
7323
7324  else
7325    # The variable is set, but is it from the command line or the environment?
7326
7327    # Try to remove the string !DIRNAME! from our list.
7328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7330      # If it failed, the variable was not from the command line. Ignore it,
7331      # but warn the user (except for BASH, which is always set by the calling BASH).
7332      if test "xDIRNAME" != xBASH; then
7333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7334$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7335      fi
7336      # Try to locate tool using the code snippet
7337      for ac_prog in dirname
7338do
7339  # Extract the first word of "$ac_prog", so it can be a program name with args.
7340set dummy $ac_prog; ac_word=$2
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342$as_echo_n "checking for $ac_word... " >&6; }
7343if ${ac_cv_path_DIRNAME+:} false; then :
7344  $as_echo_n "(cached) " >&6
7345else
7346  case $DIRNAME in
7347  [\\/]* | ?:[\\/]*)
7348  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7349  ;;
7350  *)
7351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354  IFS=$as_save_IFS
7355  test -z "$as_dir" && as_dir=.
7356    for ac_exec_ext in '' $ac_executable_extensions; do
7357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360    break 2
7361  fi
7362done
7363  done
7364IFS=$as_save_IFS
7365
7366  ;;
7367esac
7368fi
7369DIRNAME=$ac_cv_path_DIRNAME
7370if test -n "$DIRNAME"; then
7371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7372$as_echo "$DIRNAME" >&6; }
7373else
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
7376fi
7377
7378
7379  test -n "$DIRNAME" && break
7380done
7381
7382    else
7383      # If it succeeded, then it was overridden by the user. We will use it
7384      # for the tool.
7385
7386      # First remove it from the list of overridden variables, so we can test
7387      # for unknown variables in the end.
7388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7389
7390      # Check if we try to supply an empty value
7391      if test "x$DIRNAME" = x; then
7392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7393$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7395$as_echo_n "checking for DIRNAME... " >&6; }
7396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7397$as_echo "disabled" >&6; }
7398      else
7399        # Check if the provided tool contains a complete path.
7400        tool_specified="$DIRNAME"
7401        tool_basename="${tool_specified##*/}"
7402        if test "x$tool_basename" = "x$tool_specified"; then
7403          # A command without a complete path is provided, search $PATH.
7404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7405$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7406          # Extract the first word of "$tool_basename", so it can be a program name with args.
7407set dummy $tool_basename; ac_word=$2
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409$as_echo_n "checking for $ac_word... " >&6; }
7410if ${ac_cv_path_DIRNAME+:} false; then :
7411  $as_echo_n "(cached) " >&6
7412else
7413  case $DIRNAME in
7414  [\\/]* | ?:[\\/]*)
7415  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7416  ;;
7417  *)
7418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421  IFS=$as_save_IFS
7422  test -z "$as_dir" && as_dir=.
7423    for ac_exec_ext in '' $ac_executable_extensions; do
7424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427    break 2
7428  fi
7429done
7430  done
7431IFS=$as_save_IFS
7432
7433  ;;
7434esac
7435fi
7436DIRNAME=$ac_cv_path_DIRNAME
7437if test -n "$DIRNAME"; then
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7439$as_echo "$DIRNAME" >&6; }
7440else
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443fi
7444
7445
7446          if test "x$DIRNAME" = x; then
7447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7448          fi
7449        else
7450          # Otherwise we believe it is a complete path. Use it as it is.
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7452$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7454$as_echo_n "checking for DIRNAME... " >&6; }
7455          if test ! -x "$tool_specified"; then
7456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7457$as_echo "not found" >&6; }
7458            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7459          fi
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7461$as_echo "$tool_specified" >&6; }
7462        fi
7463      fi
7464    fi
7465
7466  fi
7467
7468
7469
7470  if test "x$DIRNAME" = x; then
7471    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7472  fi
7473
7474
7475
7476
7477
7478  # Publish this variable in the help.
7479
7480
7481  if [ -z "${ECHO+x}" ]; then
7482    # The variable is not set by user, try to locate tool using the code snippet
7483    for ac_prog in echo
7484do
7485  # Extract the first word of "$ac_prog", so it can be a program name with args.
7486set dummy $ac_prog; ac_word=$2
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488$as_echo_n "checking for $ac_word... " >&6; }
7489if ${ac_cv_path_ECHO+:} false; then :
7490  $as_echo_n "(cached) " >&6
7491else
7492  case $ECHO in
7493  [\\/]* | ?:[\\/]*)
7494  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7495  ;;
7496  *)
7497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512  ;;
7513esac
7514fi
7515ECHO=$ac_cv_path_ECHO
7516if test -n "$ECHO"; then
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7518$as_echo "$ECHO" >&6; }
7519else
7520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
7522fi
7523
7524
7525  test -n "$ECHO" && break
7526done
7527
7528  else
7529    # The variable is set, but is it from the command line or the environment?
7530
7531    # Try to remove the string !ECHO! from our list.
7532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7534      # If it failed, the variable was not from the command line. Ignore it,
7535      # but warn the user (except for BASH, which is always set by the calling BASH).
7536      if test "xECHO" != xBASH; then
7537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7538$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7539      fi
7540      # Try to locate tool using the code snippet
7541      for ac_prog in echo
7542do
7543  # Extract the first word of "$ac_prog", so it can be a program name with args.
7544set dummy $ac_prog; ac_word=$2
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7546$as_echo_n "checking for $ac_word... " >&6; }
7547if ${ac_cv_path_ECHO+:} false; then :
7548  $as_echo_n "(cached) " >&6
7549else
7550  case $ECHO in
7551  [\\/]* | ?:[\\/]*)
7552  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7553  ;;
7554  *)
7555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7556for as_dir in $PATH
7557do
7558  IFS=$as_save_IFS
7559  test -z "$as_dir" && as_dir=.
7560    for ac_exec_ext in '' $ac_executable_extensions; do
7561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7562    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7564    break 2
7565  fi
7566done
7567  done
7568IFS=$as_save_IFS
7569
7570  ;;
7571esac
7572fi
7573ECHO=$ac_cv_path_ECHO
7574if test -n "$ECHO"; then
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7576$as_echo "$ECHO" >&6; }
7577else
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582
7583  test -n "$ECHO" && break
7584done
7585
7586    else
7587      # If it succeeded, then it was overridden by the user. We will use it
7588      # for the tool.
7589
7590      # First remove it from the list of overridden variables, so we can test
7591      # for unknown variables in the end.
7592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7593
7594      # Check if we try to supply an empty value
7595      if test "x$ECHO" = x; then
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7597$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7599$as_echo_n "checking for ECHO... " >&6; }
7600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7601$as_echo "disabled" >&6; }
7602      else
7603        # Check if the provided tool contains a complete path.
7604        tool_specified="$ECHO"
7605        tool_basename="${tool_specified##*/}"
7606        if test "x$tool_basename" = "x$tool_specified"; then
7607          # A command without a complete path is provided, search $PATH.
7608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7609$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7610          # Extract the first word of "$tool_basename", so it can be a program name with args.
7611set dummy $tool_basename; ac_word=$2
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
7614if ${ac_cv_path_ECHO+:} false; then :
7615  $as_echo_n "(cached) " >&6
7616else
7617  case $ECHO in
7618  [\\/]* | ?:[\\/]*)
7619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7620  ;;
7621  *)
7622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625  IFS=$as_save_IFS
7626  test -z "$as_dir" && as_dir=.
7627    for ac_exec_ext in '' $ac_executable_extensions; do
7628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631    break 2
7632  fi
7633done
7634  done
7635IFS=$as_save_IFS
7636
7637  ;;
7638esac
7639fi
7640ECHO=$ac_cv_path_ECHO
7641if test -n "$ECHO"; then
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7643$as_echo "$ECHO" >&6; }
7644else
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650          if test "x$ECHO" = x; then
7651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7652          fi
7653        else
7654          # Otherwise we believe it is a complete path. Use it as it is.
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7656$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7658$as_echo_n "checking for ECHO... " >&6; }
7659          if test ! -x "$tool_specified"; then
7660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7661$as_echo "not found" >&6; }
7662            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7663          fi
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7665$as_echo "$tool_specified" >&6; }
7666        fi
7667      fi
7668    fi
7669
7670  fi
7671
7672
7673
7674  if test "x$ECHO" = x; then
7675    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7676  fi
7677
7678
7679
7680
7681
7682  # Publish this variable in the help.
7683
7684
7685  if [ -z "${EXPR+x}" ]; then
7686    # The variable is not set by user, try to locate tool using the code snippet
7687    for ac_prog in expr
7688do
7689  # Extract the first word of "$ac_prog", so it can be a program name with args.
7690set dummy $ac_prog; ac_word=$2
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692$as_echo_n "checking for $ac_word... " >&6; }
7693if ${ac_cv_path_EXPR+:} false; then :
7694  $as_echo_n "(cached) " >&6
7695else
7696  case $EXPR in
7697  [\\/]* | ?:[\\/]*)
7698  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7699  ;;
7700  *)
7701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702for as_dir in $PATH
7703do
7704  IFS=$as_save_IFS
7705  test -z "$as_dir" && as_dir=.
7706    for ac_exec_ext in '' $ac_executable_extensions; do
7707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710    break 2
7711  fi
7712done
7713  done
7714IFS=$as_save_IFS
7715
7716  ;;
7717esac
7718fi
7719EXPR=$ac_cv_path_EXPR
7720if test -n "$EXPR"; then
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7722$as_echo "$EXPR" >&6; }
7723else
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725$as_echo "no" >&6; }
7726fi
7727
7728
7729  test -n "$EXPR" && break
7730done
7731
7732  else
7733    # The variable is set, but is it from the command line or the environment?
7734
7735    # Try to remove the string !EXPR! from our list.
7736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7738      # If it failed, the variable was not from the command line. Ignore it,
7739      # but warn the user (except for BASH, which is always set by the calling BASH).
7740      if test "xEXPR" != xBASH; then
7741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7742$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7743      fi
7744      # Try to locate tool using the code snippet
7745      for ac_prog in expr
7746do
7747  # Extract the first word of "$ac_prog", so it can be a program name with args.
7748set dummy $ac_prog; ac_word=$2
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
7751if ${ac_cv_path_EXPR+:} false; then :
7752  $as_echo_n "(cached) " >&6
7753else
7754  case $EXPR in
7755  [\\/]* | ?:[\\/]*)
7756  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7757  ;;
7758  *)
7759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762  IFS=$as_save_IFS
7763  test -z "$as_dir" && as_dir=.
7764    for ac_exec_ext in '' $ac_executable_extensions; do
7765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768    break 2
7769  fi
7770done
7771  done
7772IFS=$as_save_IFS
7773
7774  ;;
7775esac
7776fi
7777EXPR=$ac_cv_path_EXPR
7778if test -n "$EXPR"; then
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7780$as_echo "$EXPR" >&6; }
7781else
7782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
7784fi
7785
7786
7787  test -n "$EXPR" && break
7788done
7789
7790    else
7791      # If it succeeded, then it was overridden by the user. We will use it
7792      # for the tool.
7793
7794      # First remove it from the list of overridden variables, so we can test
7795      # for unknown variables in the end.
7796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7797
7798      # Check if we try to supply an empty value
7799      if test "x$EXPR" = x; then
7800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7801$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7803$as_echo_n "checking for EXPR... " >&6; }
7804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7805$as_echo "disabled" >&6; }
7806      else
7807        # Check if the provided tool contains a complete path.
7808        tool_specified="$EXPR"
7809        tool_basename="${tool_specified##*/}"
7810        if test "x$tool_basename" = "x$tool_specified"; then
7811          # A command without a complete path is provided, search $PATH.
7812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7814          # Extract the first word of "$tool_basename", so it can be a program name with args.
7815set dummy $tool_basename; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_EXPR+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $EXPR in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844EXPR=$ac_cv_path_EXPR
7845if test -n "$EXPR"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7847$as_echo "$EXPR" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854          if test "x$EXPR" = x; then
7855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7856          fi
7857        else
7858          # Otherwise we believe it is a complete path. Use it as it is.
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7862$as_echo_n "checking for EXPR... " >&6; }
7863          if test ! -x "$tool_specified"; then
7864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7865$as_echo "not found" >&6; }
7866            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7867          fi
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7869$as_echo "$tool_specified" >&6; }
7870        fi
7871      fi
7872    fi
7873
7874  fi
7875
7876
7877
7878  if test "x$EXPR" = x; then
7879    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7880  fi
7881
7882
7883
7884
7885
7886  # Publish this variable in the help.
7887
7888
7889  if [ -z "${FILE+x}" ]; then
7890    # The variable is not set by user, try to locate tool using the code snippet
7891    for ac_prog in file
7892do
7893  # Extract the first word of "$ac_prog", so it can be a program name with args.
7894set dummy $ac_prog; ac_word=$2
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7896$as_echo_n "checking for $ac_word... " >&6; }
7897if ${ac_cv_path_FILE+:} false; then :
7898  $as_echo_n "(cached) " >&6
7899else
7900  case $FILE in
7901  [\\/]* | ?:[\\/]*)
7902  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7903  ;;
7904  *)
7905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7906for as_dir in $PATH
7907do
7908  IFS=$as_save_IFS
7909  test -z "$as_dir" && as_dir=.
7910    for ac_exec_ext in '' $ac_executable_extensions; do
7911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7912    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7914    break 2
7915  fi
7916done
7917  done
7918IFS=$as_save_IFS
7919
7920  ;;
7921esac
7922fi
7923FILE=$ac_cv_path_FILE
7924if test -n "$FILE"; then
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7926$as_echo "$FILE" >&6; }
7927else
7928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
7930fi
7931
7932
7933  test -n "$FILE" && break
7934done
7935
7936  else
7937    # The variable is set, but is it from the command line or the environment?
7938
7939    # Try to remove the string !FILE! from our list.
7940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7942      # If it failed, the variable was not from the command line. Ignore it,
7943      # but warn the user (except for BASH, which is always set by the calling BASH).
7944      if test "xFILE" != xBASH; then
7945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7946$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7947      fi
7948      # Try to locate tool using the code snippet
7949      for ac_prog in file
7950do
7951  # Extract the first word of "$ac_prog", so it can be a program name with args.
7952set dummy $ac_prog; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_FILE+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $FILE in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981FILE=$ac_cv_path_FILE
7982if test -n "$FILE"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7984$as_echo "$FILE" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991  test -n "$FILE" && break
7992done
7993
7994    else
7995      # If it succeeded, then it was overridden by the user. We will use it
7996      # for the tool.
7997
7998      # First remove it from the list of overridden variables, so we can test
7999      # for unknown variables in the end.
8000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8001
8002      # Check if we try to supply an empty value
8003      if test "x$FILE" = x; then
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8005$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8007$as_echo_n "checking for FILE... " >&6; }
8008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8009$as_echo "disabled" >&6; }
8010      else
8011        # Check if the provided tool contains a complete path.
8012        tool_specified="$FILE"
8013        tool_basename="${tool_specified##*/}"
8014        if test "x$tool_basename" = "x$tool_specified"; then
8015          # A command without a complete path is provided, search $PATH.
8016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8018          # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_FILE+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $FILE in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048FILE=$ac_cv_path_FILE
8049if test -n "$FILE"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8051$as_echo "$FILE" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058          if test "x$FILE" = x; then
8059            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060          fi
8061        else
8062          # Otherwise we believe it is a complete path. Use it as it is.
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8066$as_echo_n "checking for FILE... " >&6; }
8067          if test ! -x "$tool_specified"; then
8068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8071          fi
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074        fi
8075      fi
8076    fi
8077
8078  fi
8079
8080
8081
8082  if test "x$FILE" = x; then
8083    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8084  fi
8085
8086
8087
8088
8089
8090  # Publish this variable in the help.
8091
8092
8093  if [ -z "${FIND+x}" ]; then
8094    # The variable is not set by user, try to locate tool using the code snippet
8095    for ac_prog in find
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_FIND+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $FIND in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127FIND=$ac_cv_path_FIND
8128if test -n "$FIND"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8130$as_echo "$FIND" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$FIND" && break
8138done
8139
8140  else
8141    # The variable is set, but is it from the command line or the environment?
8142
8143    # Try to remove the string !FIND! from our list.
8144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8146      # If it failed, the variable was not from the command line. Ignore it,
8147      # but warn the user (except for BASH, which is always set by the calling BASH).
8148      if test "xFIND" != xBASH; then
8149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8150$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8151      fi
8152      # Try to locate tool using the code snippet
8153      for ac_prog in find
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_FIND+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $FIND in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185FIND=$ac_cv_path_FIND
8186if test -n "$FIND"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8188$as_echo "$FIND" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$FIND" && break
8196done
8197
8198    else
8199      # If it succeeded, then it was overridden by the user. We will use it
8200      # for the tool.
8201
8202      # First remove it from the list of overridden variables, so we can test
8203      # for unknown variables in the end.
8204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8205
8206      # Check if we try to supply an empty value
8207      if test "x$FIND" = x; then
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8209$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8211$as_echo_n "checking for FIND... " >&6; }
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8213$as_echo "disabled" >&6; }
8214      else
8215        # Check if the provided tool contains a complete path.
8216        tool_specified="$FIND"
8217        tool_basename="${tool_specified##*/}"
8218        if test "x$tool_basename" = "x$tool_specified"; then
8219          # A command without a complete path is provided, search $PATH.
8220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8221$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8222          # Extract the first word of "$tool_basename", so it can be a program name with args.
8223set dummy $tool_basename; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_FIND+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $FIND in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252FIND=$ac_cv_path_FIND
8253if test -n "$FIND"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8255$as_echo "$FIND" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262          if test "x$FIND" = x; then
8263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8264          fi
8265        else
8266          # Otherwise we believe it is a complete path. Use it as it is.
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8268$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8270$as_echo_n "checking for FIND... " >&6; }
8271          if test ! -x "$tool_specified"; then
8272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8273$as_echo "not found" >&6; }
8274            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8275          fi
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8277$as_echo "$tool_specified" >&6; }
8278        fi
8279      fi
8280    fi
8281
8282  fi
8283
8284
8285
8286  if test "x$FIND" = x; then
8287    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8288  fi
8289
8290
8291
8292
8293
8294  # Publish this variable in the help.
8295
8296
8297  if [ -z "${HEAD+x}" ]; then
8298    # The variable is not set by user, try to locate tool using the code snippet
8299    for ac_prog in head
8300do
8301  # Extract the first word of "$ac_prog", so it can be a program name with args.
8302set dummy $ac_prog; ac_word=$2
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8304$as_echo_n "checking for $ac_word... " >&6; }
8305if ${ac_cv_path_HEAD+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308  case $HEAD in
8309  [\\/]* | ?:[\\/]*)
8310  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8311  ;;
8312  *)
8313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316  IFS=$as_save_IFS
8317  test -z "$as_dir" && as_dir=.
8318    for ac_exec_ext in '' $ac_executable_extensions; do
8319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8320    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8322    break 2
8323  fi
8324done
8325  done
8326IFS=$as_save_IFS
8327
8328  ;;
8329esac
8330fi
8331HEAD=$ac_cv_path_HEAD
8332if test -n "$HEAD"; then
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8334$as_echo "$HEAD" >&6; }
8335else
8336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8337$as_echo "no" >&6; }
8338fi
8339
8340
8341  test -n "$HEAD" && break
8342done
8343
8344  else
8345    # The variable is set, but is it from the command line or the environment?
8346
8347    # Try to remove the string !HEAD! from our list.
8348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8350      # If it failed, the variable was not from the command line. Ignore it,
8351      # but warn the user (except for BASH, which is always set by the calling BASH).
8352      if test "xHEAD" != xBASH; then
8353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8354$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8355      fi
8356      # Try to locate tool using the code snippet
8357      for ac_prog in head
8358do
8359  # Extract the first word of "$ac_prog", so it can be a program name with args.
8360set dummy $ac_prog; ac_word=$2
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8362$as_echo_n "checking for $ac_word... " >&6; }
8363if ${ac_cv_path_HEAD+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366  case $HEAD in
8367  [\\/]* | ?:[\\/]*)
8368  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8369  ;;
8370  *)
8371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386  ;;
8387esac
8388fi
8389HEAD=$ac_cv_path_HEAD
8390if test -n "$HEAD"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8392$as_echo "$HEAD" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399  test -n "$HEAD" && break
8400done
8401
8402    else
8403      # If it succeeded, then it was overridden by the user. We will use it
8404      # for the tool.
8405
8406      # First remove it from the list of overridden variables, so we can test
8407      # for unknown variables in the end.
8408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8409
8410      # Check if we try to supply an empty value
8411      if test "x$HEAD" = x; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8413$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8415$as_echo_n "checking for HEAD... " >&6; }
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8417$as_echo "disabled" >&6; }
8418      else
8419        # Check if the provided tool contains a complete path.
8420        tool_specified="$HEAD"
8421        tool_basename="${tool_specified##*/}"
8422        if test "x$tool_basename" = "x$tool_specified"; then
8423          # A command without a complete path is provided, search $PATH.
8424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8425$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8426          # Extract the first word of "$tool_basename", so it can be a program name with args.
8427set dummy $tool_basename; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if ${ac_cv_path_HEAD+:} false; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $HEAD in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456HEAD=$ac_cv_path_HEAD
8457if test -n "$HEAD"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8459$as_echo "$HEAD" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466          if test "x$HEAD" = x; then
8467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8468          fi
8469        else
8470          # Otherwise we believe it is a complete path. Use it as it is.
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8472$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8474$as_echo_n "checking for HEAD... " >&6; }
8475          if test ! -x "$tool_specified"; then
8476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8477$as_echo "not found" >&6; }
8478            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8479          fi
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8481$as_echo "$tool_specified" >&6; }
8482        fi
8483      fi
8484    fi
8485
8486  fi
8487
8488
8489
8490  if test "x$HEAD" = x; then
8491    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8492  fi
8493
8494
8495
8496
8497
8498  # Publish this variable in the help.
8499
8500
8501  if [ -z "${GUNZIP+x}" ]; then
8502    # The variable is not set by user, try to locate tool using the code snippet
8503    for ac_prog in gunzip
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_GUNZIP+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $GUNZIP in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535GUNZIP=$ac_cv_path_GUNZIP
8536if test -n "$GUNZIP"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8538$as_echo "$GUNZIP" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$GUNZIP" && break
8546done
8547
8548  else
8549    # The variable is set, but is it from the command line or the environment?
8550
8551    # Try to remove the string !GUNZIP! from our list.
8552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8554      # If it failed, the variable was not from the command line. Ignore it,
8555      # but warn the user (except for BASH, which is always set by the calling BASH).
8556      if test "xGUNZIP" != xBASH; then
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8558$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8559      fi
8560      # Try to locate tool using the code snippet
8561      for ac_prog in gunzip
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_GUNZIP+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $GUNZIP in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593GUNZIP=$ac_cv_path_GUNZIP
8594if test -n "$GUNZIP"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8596$as_echo "$GUNZIP" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$GUNZIP" && break
8604done
8605
8606    else
8607      # If it succeeded, then it was overridden by the user. We will use it
8608      # for the tool.
8609
8610      # First remove it from the list of overridden variables, so we can test
8611      # for unknown variables in the end.
8612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8613
8614      # Check if we try to supply an empty value
8615      if test "x$GUNZIP" = x; then
8616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8617$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8619$as_echo_n "checking for GUNZIP... " >&6; }
8620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8621$as_echo "disabled" >&6; }
8622      else
8623        # Check if the provided tool contains a complete path.
8624        tool_specified="$GUNZIP"
8625        tool_basename="${tool_specified##*/}"
8626        if test "x$tool_basename" = "x$tool_specified"; then
8627          # A command without a complete path is provided, search $PATH.
8628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8629$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8630          # Extract the first word of "$tool_basename", so it can be a program name with args.
8631set dummy $tool_basename; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_GUNZIP+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $GUNZIP in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660GUNZIP=$ac_cv_path_GUNZIP
8661if test -n "$GUNZIP"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8663$as_echo "$GUNZIP" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670          if test "x$GUNZIP" = x; then
8671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8672          fi
8673        else
8674          # Otherwise we believe it is a complete path. Use it as it is.
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8676$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8678$as_echo_n "checking for GUNZIP... " >&6; }
8679          if test ! -x "$tool_specified"; then
8680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8681$as_echo "not found" >&6; }
8682            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8683          fi
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8685$as_echo "$tool_specified" >&6; }
8686        fi
8687      fi
8688    fi
8689
8690  fi
8691
8692
8693
8694  if test "x$GUNZIP" = x; then
8695    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8696  fi
8697
8698
8699
8700
8701
8702  # Publish this variable in the help.
8703
8704
8705  if [ -z "${GZIP+x}" ]; then
8706    # The variable is not set by user, try to locate tool using the code snippet
8707    for ac_prog in pigz gzip
8708do
8709  # Extract the first word of "$ac_prog", so it can be a program name with args.
8710set dummy $ac_prog; ac_word=$2
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712$as_echo_n "checking for $ac_word... " >&6; }
8713if ${ac_cv_path_GZIP+:} false; then :
8714  $as_echo_n "(cached) " >&6
8715else
8716  case $GZIP in
8717  [\\/]* | ?:[\\/]*)
8718  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8719  ;;
8720  *)
8721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8722for as_dir in $PATH
8723do
8724  IFS=$as_save_IFS
8725  test -z "$as_dir" && as_dir=.
8726    for ac_exec_ext in '' $ac_executable_extensions; do
8727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8728    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8730    break 2
8731  fi
8732done
8733  done
8734IFS=$as_save_IFS
8735
8736  ;;
8737esac
8738fi
8739GZIP=$ac_cv_path_GZIP
8740if test -n "$GZIP"; then
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8742$as_echo "$GZIP" >&6; }
8743else
8744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
8746fi
8747
8748
8749  test -n "$GZIP" && break
8750done
8751
8752  else
8753    # The variable is set, but is it from the command line or the environment?
8754
8755    # Try to remove the string !GZIP! from our list.
8756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8758      # If it failed, the variable was not from the command line. Ignore it,
8759      # but warn the user (except for BASH, which is always set by the calling BASH).
8760      if test "xGZIP" != xBASH; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8762$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8763      fi
8764      # Try to locate tool using the code snippet
8765      for ac_prog in pigz gzip
8766do
8767  # Extract the first word of "$ac_prog", so it can be a program name with args.
8768set dummy $ac_prog; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_GZIP+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $GZIP in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797GZIP=$ac_cv_path_GZIP
8798if test -n "$GZIP"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8800$as_echo "$GZIP" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807  test -n "$GZIP" && break
8808done
8809
8810    else
8811      # If it succeeded, then it was overridden by the user. We will use it
8812      # for the tool.
8813
8814      # First remove it from the list of overridden variables, so we can test
8815      # for unknown variables in the end.
8816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8817
8818      # Check if we try to supply an empty value
8819      if test "x$GZIP" = x; then
8820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8821$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8823$as_echo_n "checking for GZIP... " >&6; }
8824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8825$as_echo "disabled" >&6; }
8826      else
8827        # Check if the provided tool contains a complete path.
8828        tool_specified="$GZIP"
8829        tool_basename="${tool_specified##*/}"
8830        if test "x$tool_basename" = "x$tool_specified"; then
8831          # A command without a complete path is provided, search $PATH.
8832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8833$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8834          # Extract the first word of "$tool_basename", so it can be a program name with args.
8835set dummy $tool_basename; ac_word=$2
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837$as_echo_n "checking for $ac_word... " >&6; }
8838if ${ac_cv_path_GZIP+:} false; then :
8839  $as_echo_n "(cached) " >&6
8840else
8841  case $GZIP in
8842  [\\/]* | ?:[\\/]*)
8843  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8844  ;;
8845  *)
8846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861  ;;
8862esac
8863fi
8864GZIP=$ac_cv_path_GZIP
8865if test -n "$GZIP"; then
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8867$as_echo "$GZIP" >&6; }
8868else
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
8871fi
8872
8873
8874          if test "x$GZIP" = x; then
8875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8876          fi
8877        else
8878          # Otherwise we believe it is a complete path. Use it as it is.
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8880$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8882$as_echo_n "checking for GZIP... " >&6; }
8883          if test ! -x "$tool_specified"; then
8884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8885$as_echo "not found" >&6; }
8886            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8887          fi
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8889$as_echo "$tool_specified" >&6; }
8890        fi
8891      fi
8892    fi
8893
8894  fi
8895
8896
8897
8898  if test "x$GZIP" = x; then
8899    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if [ -z "${LN+x}" ]; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in ln
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_LN+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $LN in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943LN=$ac_cv_path_LN
8944if test -n "$LN"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8946$as_echo "$LN" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$LN" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !LN! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xLN" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in ln
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_LN+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $LN in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001LN=$ac_cv_path_LN
9002if test -n "$LN"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9004$as_echo "$LN" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$LN" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if we try to supply an empty value
9023      if test "x$LN" = x; then
9024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9025$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9027$as_echo_n "checking for LN... " >&6; }
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9029$as_echo "disabled" >&6; }
9030      else
9031        # Check if the provided tool contains a complete path.
9032        tool_specified="$LN"
9033        tool_basename="${tool_specified##*/}"
9034        if test "x$tool_basename" = "x$tool_specified"; then
9035          # A command without a complete path is provided, search $PATH.
9036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9037$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9038          # Extract the first word of "$tool_basename", so it can be a program name with args.
9039set dummy $tool_basename; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_LN+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $LN in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068LN=$ac_cv_path_LN
9069if test -n "$LN"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9071$as_echo "$LN" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078          if test "x$LN" = x; then
9079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9080          fi
9081        else
9082          # Otherwise we believe it is a complete path. Use it as it is.
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9084$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9086$as_echo_n "checking for LN... " >&6; }
9087          if test ! -x "$tool_specified"; then
9088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9089$as_echo "not found" >&6; }
9090            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9091          fi
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9093$as_echo "$tool_specified" >&6; }
9094        fi
9095      fi
9096    fi
9097
9098  fi
9099
9100
9101
9102  if test "x$LN" = x; then
9103    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9104  fi
9105
9106
9107
9108
9109
9110  # Publish this variable in the help.
9111
9112
9113  if [ -z "${LS+x}" ]; then
9114    # The variable is not set by user, try to locate tool using the code snippet
9115    for ac_prog in ls
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_LS+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $LS in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147LS=$ac_cv_path_LS
9148if test -n "$LS"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9150$as_echo "$LS" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$LS" && break
9158done
9159
9160  else
9161    # The variable is set, but is it from the command line or the environment?
9162
9163    # Try to remove the string !LS! from our list.
9164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9166      # If it failed, the variable was not from the command line. Ignore it,
9167      # but warn the user (except for BASH, which is always set by the calling BASH).
9168      if test "xLS" != xBASH; then
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9170$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9171      fi
9172      # Try to locate tool using the code snippet
9173      for ac_prog in ls
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_LS+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $LS in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205LS=$ac_cv_path_LS
9206if test -n "$LS"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9208$as_echo "$LS" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$LS" && break
9216done
9217
9218    else
9219      # If it succeeded, then it was overridden by the user. We will use it
9220      # for the tool.
9221
9222      # First remove it from the list of overridden variables, so we can test
9223      # for unknown variables in the end.
9224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9225
9226      # Check if we try to supply an empty value
9227      if test "x$LS" = x; then
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9229$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9231$as_echo_n "checking for LS... " >&6; }
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9233$as_echo "disabled" >&6; }
9234      else
9235        # Check if the provided tool contains a complete path.
9236        tool_specified="$LS"
9237        tool_basename="${tool_specified##*/}"
9238        if test "x$tool_basename" = "x$tool_specified"; then
9239          # A command without a complete path is provided, search $PATH.
9240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9241$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9242          # Extract the first word of "$tool_basename", so it can be a program name with args.
9243set dummy $tool_basename; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_path_LS+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $LS in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259    for ac_exec_ext in '' $ac_executable_extensions; do
9260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266  done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272LS=$ac_cv_path_LS
9273if test -n "$LS"; then
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9275$as_echo "$LS" >&6; }
9276else
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282          if test "x$LS" = x; then
9283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9284          fi
9285        else
9286          # Otherwise we believe it is a complete path. Use it as it is.
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9288$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9290$as_echo_n "checking for LS... " >&6; }
9291          if test ! -x "$tool_specified"; then
9292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9293$as_echo "not found" >&6; }
9294            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9295          fi
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9297$as_echo "$tool_specified" >&6; }
9298        fi
9299      fi
9300    fi
9301
9302  fi
9303
9304
9305
9306  if test "x$LS" = x; then
9307    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9308  fi
9309
9310
9311
9312
9313
9314  # Publish this variable in the help.
9315
9316
9317  if [ -z "${MKDIR+x}" ]; then
9318    # The variable is not set by user, try to locate tool using the code snippet
9319    for ac_prog in mkdir
9320do
9321  # Extract the first word of "$ac_prog", so it can be a program name with args.
9322set dummy $ac_prog; ac_word=$2
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9324$as_echo_n "checking for $ac_word... " >&6; }
9325if ${ac_cv_path_MKDIR+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328  case $MKDIR in
9329  [\\/]* | ?:[\\/]*)
9330  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9331  ;;
9332  *)
9333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334for as_dir in $PATH
9335do
9336  IFS=$as_save_IFS
9337  test -z "$as_dir" && as_dir=.
9338    for ac_exec_ext in '' $ac_executable_extensions; do
9339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342    break 2
9343  fi
9344done
9345  done
9346IFS=$as_save_IFS
9347
9348  ;;
9349esac
9350fi
9351MKDIR=$ac_cv_path_MKDIR
9352if test -n "$MKDIR"; then
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9354$as_echo "$MKDIR" >&6; }
9355else
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360
9361  test -n "$MKDIR" && break
9362done
9363
9364  else
9365    # The variable is set, but is it from the command line or the environment?
9366
9367    # Try to remove the string !MKDIR! from our list.
9368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9370      # If it failed, the variable was not from the command line. Ignore it,
9371      # but warn the user (except for BASH, which is always set by the calling BASH).
9372      if test "xMKDIR" != xBASH; then
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9374$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9375      fi
9376      # Try to locate tool using the code snippet
9377      for ac_prog in mkdir
9378do
9379  # Extract the first word of "$ac_prog", so it can be a program name with args.
9380set dummy $ac_prog; ac_word=$2
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9382$as_echo_n "checking for $ac_word... " >&6; }
9383if ${ac_cv_path_MKDIR+:} false; then :
9384  $as_echo_n "(cached) " >&6
9385else
9386  case $MKDIR in
9387  [\\/]* | ?:[\\/]*)
9388  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9389  ;;
9390  *)
9391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9392for as_dir in $PATH
9393do
9394  IFS=$as_save_IFS
9395  test -z "$as_dir" && as_dir=.
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9398    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406  ;;
9407esac
9408fi
9409MKDIR=$ac_cv_path_MKDIR
9410if test -n "$MKDIR"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9412$as_echo "$MKDIR" >&6; }
9413else
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
9416fi
9417
9418
9419  test -n "$MKDIR" && break
9420done
9421
9422    else
9423      # If it succeeded, then it was overridden by the user. We will use it
9424      # for the tool.
9425
9426      # First remove it from the list of overridden variables, so we can test
9427      # for unknown variables in the end.
9428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9429
9430      # Check if we try to supply an empty value
9431      if test "x$MKDIR" = x; then
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9433$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9435$as_echo_n "checking for MKDIR... " >&6; }
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9437$as_echo "disabled" >&6; }
9438      else
9439        # Check if the provided tool contains a complete path.
9440        tool_specified="$MKDIR"
9441        tool_basename="${tool_specified##*/}"
9442        if test "x$tool_basename" = "x$tool_specified"; then
9443          # A command without a complete path is provided, search $PATH.
9444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9445$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9446          # Extract the first word of "$tool_basename", so it can be a program name with args.
9447set dummy $tool_basename; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_MKDIR+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $MKDIR in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476MKDIR=$ac_cv_path_MKDIR
9477if test -n "$MKDIR"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9479$as_echo "$MKDIR" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486          if test "x$MKDIR" = x; then
9487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9488          fi
9489        else
9490          # Otherwise we believe it is a complete path. Use it as it is.
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9492$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9494$as_echo_n "checking for MKDIR... " >&6; }
9495          if test ! -x "$tool_specified"; then
9496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9497$as_echo "not found" >&6; }
9498            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9499          fi
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9501$as_echo "$tool_specified" >&6; }
9502        fi
9503      fi
9504    fi
9505
9506  fi
9507
9508
9509
9510  if test "x$MKDIR" = x; then
9511    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9512  fi
9513
9514
9515
9516
9517
9518  # Publish this variable in the help.
9519
9520
9521  if [ -z "${MKTEMP+x}" ]; then
9522    # The variable is not set by user, try to locate tool using the code snippet
9523    for ac_prog in mktemp
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if ${ac_cv_path_MKTEMP+:} false; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $MKTEMP in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555MKTEMP=$ac_cv_path_MKTEMP
9556if test -n "$MKTEMP"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9558$as_echo "$MKTEMP" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$MKTEMP" && break
9566done
9567
9568  else
9569    # The variable is set, but is it from the command line or the environment?
9570
9571    # Try to remove the string !MKTEMP! from our list.
9572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9574      # If it failed, the variable was not from the command line. Ignore it,
9575      # but warn the user (except for BASH, which is always set by the calling BASH).
9576      if test "xMKTEMP" != xBASH; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9578$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9579      fi
9580      # Try to locate tool using the code snippet
9581      for ac_prog in mktemp
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_MKTEMP+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $MKTEMP in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613MKTEMP=$ac_cv_path_MKTEMP
9614if test -n "$MKTEMP"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9616$as_echo "$MKTEMP" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$MKTEMP" && break
9624done
9625
9626    else
9627      # If it succeeded, then it was overridden by the user. We will use it
9628      # for the tool.
9629
9630      # First remove it from the list of overridden variables, so we can test
9631      # for unknown variables in the end.
9632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9633
9634      # Check if we try to supply an empty value
9635      if test "x$MKTEMP" = x; then
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9637$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9639$as_echo_n "checking for MKTEMP... " >&6; }
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9641$as_echo "disabled" >&6; }
9642      else
9643        # Check if the provided tool contains a complete path.
9644        tool_specified="$MKTEMP"
9645        tool_basename="${tool_specified##*/}"
9646        if test "x$tool_basename" = "x$tool_specified"; then
9647          # A command without a complete path is provided, search $PATH.
9648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9649$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9650          # Extract the first word of "$tool_basename", so it can be a program name with args.
9651set dummy $tool_basename; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_MKTEMP+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $MKTEMP in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680MKTEMP=$ac_cv_path_MKTEMP
9681if test -n "$MKTEMP"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9683$as_echo "$MKTEMP" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690          if test "x$MKTEMP" = x; then
9691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9692          fi
9693        else
9694          # Otherwise we believe it is a complete path. Use it as it is.
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9696$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9698$as_echo_n "checking for MKTEMP... " >&6; }
9699          if test ! -x "$tool_specified"; then
9700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9701$as_echo "not found" >&6; }
9702            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9703          fi
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9705$as_echo "$tool_specified" >&6; }
9706        fi
9707      fi
9708    fi
9709
9710  fi
9711
9712
9713
9714  if test "x$MKTEMP" = x; then
9715    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9716  fi
9717
9718
9719
9720
9721
9722  # Publish this variable in the help.
9723
9724
9725  if [ -z "${MV+x}" ]; then
9726    # The variable is not set by user, try to locate tool using the code snippet
9727    for ac_prog in mv
9728do
9729  # Extract the first word of "$ac_prog", so it can be a program name with args.
9730set dummy $ac_prog; ac_word=$2
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732$as_echo_n "checking for $ac_word... " >&6; }
9733if ${ac_cv_path_MV+:} false; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  case $MV in
9737  [\\/]* | ?:[\\/]*)
9738  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9739  ;;
9740  *)
9741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9742for as_dir in $PATH
9743do
9744  IFS=$as_save_IFS
9745  test -z "$as_dir" && as_dir=.
9746    for ac_exec_ext in '' $ac_executable_extensions; do
9747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9748    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750    break 2
9751  fi
9752done
9753  done
9754IFS=$as_save_IFS
9755
9756  ;;
9757esac
9758fi
9759MV=$ac_cv_path_MV
9760if test -n "$MV"; then
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9762$as_echo "$MV" >&6; }
9763else
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766fi
9767
9768
9769  test -n "$MV" && break
9770done
9771
9772  else
9773    # The variable is set, but is it from the command line or the environment?
9774
9775    # Try to remove the string !MV! from our list.
9776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9778      # If it failed, the variable was not from the command line. Ignore it,
9779      # but warn the user (except for BASH, which is always set by the calling BASH).
9780      if test "xMV" != xBASH; then
9781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9782$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9783      fi
9784      # Try to locate tool using the code snippet
9785      for ac_prog in mv
9786do
9787  # Extract the first word of "$ac_prog", so it can be a program name with args.
9788set dummy $ac_prog; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if ${ac_cv_path_MV+:} false; then :
9792  $as_echo_n "(cached) " >&6
9793else
9794  case $MV in
9795  [\\/]* | ?:[\\/]*)
9796  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9797  ;;
9798  *)
9799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802  IFS=$as_save_IFS
9803  test -z "$as_dir" && as_dir=.
9804    for ac_exec_ext in '' $ac_executable_extensions; do
9805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9806    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9808    break 2
9809  fi
9810done
9811  done
9812IFS=$as_save_IFS
9813
9814  ;;
9815esac
9816fi
9817MV=$ac_cv_path_MV
9818if test -n "$MV"; then
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9820$as_echo "$MV" >&6; }
9821else
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
9827  test -n "$MV" && break
9828done
9829
9830    else
9831      # If it succeeded, then it was overridden by the user. We will use it
9832      # for the tool.
9833
9834      # First remove it from the list of overridden variables, so we can test
9835      # for unknown variables in the end.
9836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9837
9838      # Check if we try to supply an empty value
9839      if test "x$MV" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9841$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9843$as_echo_n "checking for MV... " >&6; }
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9845$as_echo "disabled" >&6; }
9846      else
9847        # Check if the provided tool contains a complete path.
9848        tool_specified="$MV"
9849        tool_basename="${tool_specified##*/}"
9850        if test "x$tool_basename" = "x$tool_specified"; then
9851          # A command without a complete path is provided, search $PATH.
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9853$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9854          # Extract the first word of "$tool_basename", so it can be a program name with args.
9855set dummy $tool_basename; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_MV+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $MV in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884MV=$ac_cv_path_MV
9885if test -n "$MV"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9887$as_echo "$MV" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894          if test "x$MV" = x; then
9895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9896          fi
9897        else
9898          # Otherwise we believe it is a complete path. Use it as it is.
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9900$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9902$as_echo_n "checking for MV... " >&6; }
9903          if test ! -x "$tool_specified"; then
9904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9905$as_echo "not found" >&6; }
9906            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9907          fi
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9909$as_echo "$tool_specified" >&6; }
9910        fi
9911      fi
9912    fi
9913
9914  fi
9915
9916
9917
9918  if test "x$MV" = x; then
9919    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9920  fi
9921
9922
9923
9924
9925
9926  # Publish this variable in the help.
9927
9928
9929  if [ -z "${NAWK+x}" ]; then
9930    # The variable is not set by user, try to locate tool using the code snippet
9931    for ac_prog in nawk gawk awk
9932do
9933  # Extract the first word of "$ac_prog", so it can be a program name with args.
9934set dummy $ac_prog; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_NAWK+:} false; then :
9938  $as_echo_n "(cached) " >&6
9939else
9940  case $NAWK in
9941  [\\/]* | ?:[\\/]*)
9942  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9943  ;;
9944  *)
9945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948  IFS=$as_save_IFS
9949  test -z "$as_dir" && as_dir=.
9950    for ac_exec_ext in '' $ac_executable_extensions; do
9951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954    break 2
9955  fi
9956done
9957  done
9958IFS=$as_save_IFS
9959
9960  ;;
9961esac
9962fi
9963NAWK=$ac_cv_path_NAWK
9964if test -n "$NAWK"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9966$as_echo "$NAWK" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973  test -n "$NAWK" && break
9974done
9975
9976  else
9977    # The variable is set, but is it from the command line or the environment?
9978
9979    # Try to remove the string !NAWK! from our list.
9980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9982      # If it failed, the variable was not from the command line. Ignore it,
9983      # but warn the user (except for BASH, which is always set by the calling BASH).
9984      if test "xNAWK" != xBASH; then
9985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9986$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9987      fi
9988      # Try to locate tool using the code snippet
9989      for ac_prog in nawk gawk awk
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_NAWK+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $NAWK in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021NAWK=$ac_cv_path_NAWK
10022if test -n "$NAWK"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10024$as_echo "$NAWK" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$NAWK" && break
10032done
10033
10034    else
10035      # If it succeeded, then it was overridden by the user. We will use it
10036      # for the tool.
10037
10038      # First remove it from the list of overridden variables, so we can test
10039      # for unknown variables in the end.
10040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10041
10042      # Check if we try to supply an empty value
10043      if test "x$NAWK" = x; then
10044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10045$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10047$as_echo_n "checking for NAWK... " >&6; }
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10049$as_echo "disabled" >&6; }
10050      else
10051        # Check if the provided tool contains a complete path.
10052        tool_specified="$NAWK"
10053        tool_basename="${tool_specified##*/}"
10054        if test "x$tool_basename" = "x$tool_specified"; then
10055          # A command without a complete path is provided, search $PATH.
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10057$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10058          # Extract the first word of "$tool_basename", so it can be a program name with args.
10059set dummy $tool_basename; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_NAWK+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $NAWK in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088NAWK=$ac_cv_path_NAWK
10089if test -n "$NAWK"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10091$as_echo "$NAWK" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098          if test "x$NAWK" = x; then
10099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10100          fi
10101        else
10102          # Otherwise we believe it is a complete path. Use it as it is.
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10104$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10106$as_echo_n "checking for NAWK... " >&6; }
10107          if test ! -x "$tool_specified"; then
10108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10109$as_echo "not found" >&6; }
10110            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10111          fi
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10113$as_echo "$tool_specified" >&6; }
10114        fi
10115      fi
10116    fi
10117
10118  fi
10119
10120
10121
10122  if test "x$NAWK" = x; then
10123    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10124  fi
10125
10126
10127
10128
10129
10130  # Publish this variable in the help.
10131
10132
10133  if [ -z "${PRINTF+x}" ]; then
10134    # The variable is not set by user, try to locate tool using the code snippet
10135    for ac_prog in printf
10136do
10137  # Extract the first word of "$ac_prog", so it can be a program name with args.
10138set dummy $ac_prog; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_PRINTF+:} false; then :
10142  $as_echo_n "(cached) " >&6
10143else
10144  case $PRINTF in
10145  [\\/]* | ?:[\\/]*)
10146  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10147  ;;
10148  *)
10149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152  IFS=$as_save_IFS
10153  test -z "$as_dir" && as_dir=.
10154    for ac_exec_ext in '' $ac_executable_extensions; do
10155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158    break 2
10159  fi
10160done
10161  done
10162IFS=$as_save_IFS
10163
10164  ;;
10165esac
10166fi
10167PRINTF=$ac_cv_path_PRINTF
10168if test -n "$PRINTF"; then
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10170$as_echo "$PRINTF" >&6; }
10171else
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176
10177  test -n "$PRINTF" && break
10178done
10179
10180  else
10181    # The variable is set, but is it from the command line or the environment?
10182
10183    # Try to remove the string !PRINTF! from our list.
10184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10186      # If it failed, the variable was not from the command line. Ignore it,
10187      # but warn the user (except for BASH, which is always set by the calling BASH).
10188      if test "xPRINTF" != xBASH; then
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10190$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10191      fi
10192      # Try to locate tool using the code snippet
10193      for ac_prog in printf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_PRINTF+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $PRINTF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225PRINTF=$ac_cv_path_PRINTF
10226if test -n "$PRINTF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10228$as_echo "$PRINTF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$PRINTF" && break
10236done
10237
10238    else
10239      # If it succeeded, then it was overridden by the user. We will use it
10240      # for the tool.
10241
10242      # First remove it from the list of overridden variables, so we can test
10243      # for unknown variables in the end.
10244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10245
10246      # Check if we try to supply an empty value
10247      if test "x$PRINTF" = x; then
10248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10249$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10251$as_echo_n "checking for PRINTF... " >&6; }
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10253$as_echo "disabled" >&6; }
10254      else
10255        # Check if the provided tool contains a complete path.
10256        tool_specified="$PRINTF"
10257        tool_basename="${tool_specified##*/}"
10258        if test "x$tool_basename" = "x$tool_specified"; then
10259          # A command without a complete path is provided, search $PATH.
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10261$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10262          # Extract the first word of "$tool_basename", so it can be a program name with args.
10263set dummy $tool_basename; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_PRINTF+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $PRINTF in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292PRINTF=$ac_cv_path_PRINTF
10293if test -n "$PRINTF"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10295$as_echo "$PRINTF" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302          if test "x$PRINTF" = x; then
10303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10304          fi
10305        else
10306          # Otherwise we believe it is a complete path. Use it as it is.
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10308$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10310$as_echo_n "checking for PRINTF... " >&6; }
10311          if test ! -x "$tool_specified"; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10313$as_echo "not found" >&6; }
10314            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10315          fi
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10317$as_echo "$tool_specified" >&6; }
10318        fi
10319      fi
10320    fi
10321
10322  fi
10323
10324
10325
10326  if test "x$PRINTF" = x; then
10327    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10328  fi
10329
10330
10331
10332
10333
10334  # Publish this variable in the help.
10335
10336
10337  if [ -z "${RM+x}" ]; then
10338    # The variable is not set by user, try to locate tool using the code snippet
10339    for ac_prog in rm
10340do
10341  # Extract the first word of "$ac_prog", so it can be a program name with args.
10342set dummy $ac_prog; ac_word=$2
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344$as_echo_n "checking for $ac_word... " >&6; }
10345if ${ac_cv_path_RM+:} false; then :
10346  $as_echo_n "(cached) " >&6
10347else
10348  case $RM in
10349  [\\/]* | ?:[\\/]*)
10350  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10351  ;;
10352  *)
10353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10360    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368  ;;
10369esac
10370fi
10371RM=$ac_cv_path_RM
10372if test -n "$RM"; then
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10374$as_echo "$RM" >&6; }
10375else
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378fi
10379
10380
10381  test -n "$RM" && break
10382done
10383
10384  else
10385    # The variable is set, but is it from the command line or the environment?
10386
10387    # Try to remove the string !RM! from our list.
10388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10390      # If it failed, the variable was not from the command line. Ignore it,
10391      # but warn the user (except for BASH, which is always set by the calling BASH).
10392      if test "xRM" != xBASH; then
10393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10394$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10395      fi
10396      # Try to locate tool using the code snippet
10397      for ac_prog in rm
10398do
10399  # Extract the first word of "$ac_prog", so it can be a program name with args.
10400set dummy $ac_prog; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_RM+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $RM in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429RM=$ac_cv_path_RM
10430if test -n "$RM"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10432$as_echo "$RM" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439  test -n "$RM" && break
10440done
10441
10442    else
10443      # If it succeeded, then it was overridden by the user. We will use it
10444      # for the tool.
10445
10446      # First remove it from the list of overridden variables, so we can test
10447      # for unknown variables in the end.
10448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10449
10450      # Check if we try to supply an empty value
10451      if test "x$RM" = x; then
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10453$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10455$as_echo_n "checking for RM... " >&6; }
10456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10457$as_echo "disabled" >&6; }
10458      else
10459        # Check if the provided tool contains a complete path.
10460        tool_specified="$RM"
10461        tool_basename="${tool_specified##*/}"
10462        if test "x$tool_basename" = "x$tool_specified"; then
10463          # A command without a complete path is provided, search $PATH.
10464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10465$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10466          # Extract the first word of "$tool_basename", so it can be a program name with args.
10467set dummy $tool_basename; ac_word=$2
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469$as_echo_n "checking for $ac_word... " >&6; }
10470if ${ac_cv_path_RM+:} false; then :
10471  $as_echo_n "(cached) " >&6
10472else
10473  case $RM in
10474  [\\/]* | ?:[\\/]*)
10475  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10476  ;;
10477  *)
10478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479for as_dir in $PATH
10480do
10481  IFS=$as_save_IFS
10482  test -z "$as_dir" && as_dir=.
10483    for ac_exec_ext in '' $ac_executable_extensions; do
10484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487    break 2
10488  fi
10489done
10490  done
10491IFS=$as_save_IFS
10492
10493  ;;
10494esac
10495fi
10496RM=$ac_cv_path_RM
10497if test -n "$RM"; then
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10499$as_echo "$RM" >&6; }
10500else
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
10503fi
10504
10505
10506          if test "x$RM" = x; then
10507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10508          fi
10509        else
10510          # Otherwise we believe it is a complete path. Use it as it is.
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10512$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10514$as_echo_n "checking for RM... " >&6; }
10515          if test ! -x "$tool_specified"; then
10516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10517$as_echo "not found" >&6; }
10518            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10519          fi
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10521$as_echo "$tool_specified" >&6; }
10522        fi
10523      fi
10524    fi
10525
10526  fi
10527
10528
10529
10530  if test "x$RM" = x; then
10531    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if [ -z "${RMDIR+x}" ]; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in rmdir
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_RMDIR+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $RMDIR in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575RMDIR=$ac_cv_path_RMDIR
10576if test -n "$RMDIR"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10578$as_echo "$RMDIR" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$RMDIR" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !RMDIR! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xRMDIR" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in rmdir
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_RMDIR+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $RMDIR in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633RMDIR=$ac_cv_path_RMDIR
10634if test -n "$RMDIR"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10636$as_echo "$RMDIR" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$RMDIR" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if we try to supply an empty value
10655      if test "x$RMDIR" = x; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10657$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10659$as_echo_n "checking for RMDIR... " >&6; }
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10661$as_echo "disabled" >&6; }
10662      else
10663        # Check if the provided tool contains a complete path.
10664        tool_specified="$RMDIR"
10665        tool_basename="${tool_specified##*/}"
10666        if test "x$tool_basename" = "x$tool_specified"; then
10667          # A command without a complete path is provided, search $PATH.
10668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10669$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10670          # Extract the first word of "$tool_basename", so it can be a program name with args.
10671set dummy $tool_basename; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if ${ac_cv_path_RMDIR+:} false; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  case $RMDIR in
10678  [\\/]* | ?:[\\/]*)
10679  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10680  ;;
10681  *)
10682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683for as_dir in $PATH
10684do
10685  IFS=$as_save_IFS
10686  test -z "$as_dir" && as_dir=.
10687    for ac_exec_ext in '' $ac_executable_extensions; do
10688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691    break 2
10692  fi
10693done
10694  done
10695IFS=$as_save_IFS
10696
10697  ;;
10698esac
10699fi
10700RMDIR=$ac_cv_path_RMDIR
10701if test -n "$RMDIR"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10703$as_echo "$RMDIR" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710          if test "x$RMDIR" = x; then
10711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10712          fi
10713        else
10714          # Otherwise we believe it is a complete path. Use it as it is.
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10716$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10718$as_echo_n "checking for RMDIR... " >&6; }
10719          if test ! -x "$tool_specified"; then
10720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10721$as_echo "not found" >&6; }
10722            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10723          fi
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10725$as_echo "$tool_specified" >&6; }
10726        fi
10727      fi
10728    fi
10729
10730  fi
10731
10732
10733
10734  if test "x$RMDIR" = x; then
10735    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10736  fi
10737
10738
10739
10740
10741
10742  # Publish this variable in the help.
10743
10744
10745  if [ -z "${SH+x}" ]; then
10746    # The variable is not set by user, try to locate tool using the code snippet
10747    for ac_prog in sh
10748do
10749  # Extract the first word of "$ac_prog", so it can be a program name with args.
10750set dummy $ac_prog; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_SH+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $SH in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779SH=$ac_cv_path_SH
10780if test -n "$SH"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10782$as_echo "$SH" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789  test -n "$SH" && break
10790done
10791
10792  else
10793    # The variable is set, but is it from the command line or the environment?
10794
10795    # Try to remove the string !SH! from our list.
10796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10798      # If it failed, the variable was not from the command line. Ignore it,
10799      # but warn the user (except for BASH, which is always set by the calling BASH).
10800      if test "xSH" != xBASH; then
10801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10802$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10803      fi
10804      # Try to locate tool using the code snippet
10805      for ac_prog in sh
10806do
10807  # Extract the first word of "$ac_prog", so it can be a program name with args.
10808set dummy $ac_prog; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_SH+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $SH in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837SH=$ac_cv_path_SH
10838if test -n "$SH"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10840$as_echo "$SH" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847  test -n "$SH" && break
10848done
10849
10850    else
10851      # If it succeeded, then it was overridden by the user. We will use it
10852      # for the tool.
10853
10854      # First remove it from the list of overridden variables, so we can test
10855      # for unknown variables in the end.
10856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10857
10858      # Check if we try to supply an empty value
10859      if test "x$SH" = x; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10861$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10863$as_echo_n "checking for SH... " >&6; }
10864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10865$as_echo "disabled" >&6; }
10866      else
10867        # Check if the provided tool contains a complete path.
10868        tool_specified="$SH"
10869        tool_basename="${tool_specified##*/}"
10870        if test "x$tool_basename" = "x$tool_specified"; then
10871          # A command without a complete path is provided, search $PATH.
10872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10873$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10874          # Extract the first word of "$tool_basename", so it can be a program name with args.
10875set dummy $tool_basename; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_SH+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $SH in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904SH=$ac_cv_path_SH
10905if test -n "$SH"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10907$as_echo "$SH" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914          if test "x$SH" = x; then
10915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10916          fi
10917        else
10918          # Otherwise we believe it is a complete path. Use it as it is.
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10920$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10922$as_echo_n "checking for SH... " >&6; }
10923          if test ! -x "$tool_specified"; then
10924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10925$as_echo "not found" >&6; }
10926            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10927          fi
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10929$as_echo "$tool_specified" >&6; }
10930        fi
10931      fi
10932    fi
10933
10934  fi
10935
10936
10937
10938  if test "x$SH" = x; then
10939    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10940  fi
10941
10942
10943
10944
10945
10946  # Publish this variable in the help.
10947
10948
10949  if [ -z "${SORT+x}" ]; then
10950    # The variable is not set by user, try to locate tool using the code snippet
10951    for ac_prog in sort
10952do
10953  # Extract the first word of "$ac_prog", so it can be a program name with args.
10954set dummy $ac_prog; ac_word=$2
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956$as_echo_n "checking for $ac_word... " >&6; }
10957if ${ac_cv_path_SORT+:} false; then :
10958  $as_echo_n "(cached) " >&6
10959else
10960  case $SORT in
10961  [\\/]* | ?:[\\/]*)
10962  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10963  ;;
10964  *)
10965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966for as_dir in $PATH
10967do
10968  IFS=$as_save_IFS
10969  test -z "$as_dir" && as_dir=.
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980  ;;
10981esac
10982fi
10983SORT=$ac_cv_path_SORT
10984if test -n "$SORT"; then
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10986$as_echo "$SORT" >&6; }
10987else
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990fi
10991
10992
10993  test -n "$SORT" && break
10994done
10995
10996  else
10997    # The variable is set, but is it from the command line or the environment?
10998
10999    # Try to remove the string !SORT! from our list.
11000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11002      # If it failed, the variable was not from the command line. Ignore it,
11003      # but warn the user (except for BASH, which is always set by the calling BASH).
11004      if test "xSORT" != xBASH; then
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11006$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11007      fi
11008      # Try to locate tool using the code snippet
11009      for ac_prog in sort
11010do
11011  # Extract the first word of "$ac_prog", so it can be a program name with args.
11012set dummy $ac_prog; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
11015if ${ac_cv_path_SORT+:} false; then :
11016  $as_echo_n "(cached) " >&6
11017else
11018  case $SORT in
11019  [\\/]* | ?:[\\/]*)
11020  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11021  ;;
11022  *)
11023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026  IFS=$as_save_IFS
11027  test -z "$as_dir" && as_dir=.
11028    for ac_exec_ext in '' $ac_executable_extensions; do
11029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032    break 2
11033  fi
11034done
11035  done
11036IFS=$as_save_IFS
11037
11038  ;;
11039esac
11040fi
11041SORT=$ac_cv_path_SORT
11042if test -n "$SORT"; then
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11044$as_echo "$SORT" >&6; }
11045else
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
11048fi
11049
11050
11051  test -n "$SORT" && break
11052done
11053
11054    else
11055      # If it succeeded, then it was overridden by the user. We will use it
11056      # for the tool.
11057
11058      # First remove it from the list of overridden variables, so we can test
11059      # for unknown variables in the end.
11060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11061
11062      # Check if we try to supply an empty value
11063      if test "x$SORT" = x; then
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11065$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11067$as_echo_n "checking for SORT... " >&6; }
11068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11069$as_echo "disabled" >&6; }
11070      else
11071        # Check if the provided tool contains a complete path.
11072        tool_specified="$SORT"
11073        tool_basename="${tool_specified##*/}"
11074        if test "x$tool_basename" = "x$tool_specified"; then
11075          # A command without a complete path is provided, search $PATH.
11076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11077$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11078          # Extract the first word of "$tool_basename", so it can be a program name with args.
11079set dummy $tool_basename; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_SORT+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $SORT in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108SORT=$ac_cv_path_SORT
11109if test -n "$SORT"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11111$as_echo "$SORT" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118          if test "x$SORT" = x; then
11119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11120          fi
11121        else
11122          # Otherwise we believe it is a complete path. Use it as it is.
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11124$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11126$as_echo_n "checking for SORT... " >&6; }
11127          if test ! -x "$tool_specified"; then
11128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11129$as_echo "not found" >&6; }
11130            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11131          fi
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11133$as_echo "$tool_specified" >&6; }
11134        fi
11135      fi
11136    fi
11137
11138  fi
11139
11140
11141
11142  if test "x$SORT" = x; then
11143    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11144  fi
11145
11146
11147
11148
11149
11150  # Publish this variable in the help.
11151
11152
11153  if [ -z "${TAIL+x}" ]; then
11154    # The variable is not set by user, try to locate tool using the code snippet
11155    for ac_prog in tail
11156do
11157  # Extract the first word of "$ac_prog", so it can be a program name with args.
11158set dummy $ac_prog; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_TAIL+:} false; then :
11162  $as_echo_n "(cached) " >&6
11163else
11164  case $TAIL in
11165  [\\/]* | ?:[\\/]*)
11166  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11167  ;;
11168  *)
11169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172  IFS=$as_save_IFS
11173  test -z "$as_dir" && as_dir=.
11174    for ac_exec_ext in '' $ac_executable_extensions; do
11175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178    break 2
11179  fi
11180done
11181  done
11182IFS=$as_save_IFS
11183
11184  ;;
11185esac
11186fi
11187TAIL=$ac_cv_path_TAIL
11188if test -n "$TAIL"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11190$as_echo "$TAIL" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$TAIL" && break
11198done
11199
11200  else
11201    # The variable is set, but is it from the command line or the environment?
11202
11203    # Try to remove the string !TAIL! from our list.
11204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11206      # If it failed, the variable was not from the command line. Ignore it,
11207      # but warn the user (except for BASH, which is always set by the calling BASH).
11208      if test "xTAIL" != xBASH; then
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11210$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11211      fi
11212      # Try to locate tool using the code snippet
11213      for ac_prog in tail
11214do
11215  # Extract the first word of "$ac_prog", so it can be a program name with args.
11216set dummy $ac_prog; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_TAIL+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $TAIL in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245TAIL=$ac_cv_path_TAIL
11246if test -n "$TAIL"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11248$as_echo "$TAIL" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255  test -n "$TAIL" && break
11256done
11257
11258    else
11259      # If it succeeded, then it was overridden by the user. We will use it
11260      # for the tool.
11261
11262      # First remove it from the list of overridden variables, so we can test
11263      # for unknown variables in the end.
11264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11265
11266      # Check if we try to supply an empty value
11267      if test "x$TAIL" = x; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11269$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11271$as_echo_n "checking for TAIL... " >&6; }
11272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11273$as_echo "disabled" >&6; }
11274      else
11275        # Check if the provided tool contains a complete path.
11276        tool_specified="$TAIL"
11277        tool_basename="${tool_specified##*/}"
11278        if test "x$tool_basename" = "x$tool_specified"; then
11279          # A command without a complete path is provided, search $PATH.
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11281$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11282          # Extract the first word of "$tool_basename", so it can be a program name with args.
11283set dummy $tool_basename; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_TAIL+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $TAIL in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312TAIL=$ac_cv_path_TAIL
11313if test -n "$TAIL"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11315$as_echo "$TAIL" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322          if test "x$TAIL" = x; then
11323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11324          fi
11325        else
11326          # Otherwise we believe it is a complete path. Use it as it is.
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11328$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11330$as_echo_n "checking for TAIL... " >&6; }
11331          if test ! -x "$tool_specified"; then
11332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11333$as_echo "not found" >&6; }
11334            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11335          fi
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11337$as_echo "$tool_specified" >&6; }
11338        fi
11339      fi
11340    fi
11341
11342  fi
11343
11344
11345
11346  if test "x$TAIL" = x; then
11347    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11348  fi
11349
11350
11351
11352
11353
11354  # Publish this variable in the help.
11355
11356
11357  if [ -z "${TAR+x}" ]; then
11358    # The variable is not set by user, try to locate tool using the code snippet
11359    for ac_prog in gtar tar
11360do
11361  # Extract the first word of "$ac_prog", so it can be a program name with args.
11362set dummy $ac_prog; ac_word=$2
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11364$as_echo_n "checking for $ac_word... " >&6; }
11365if ${ac_cv_path_TAR+:} false; then :
11366  $as_echo_n "(cached) " >&6
11367else
11368  case $TAR in
11369  [\\/]* | ?:[\\/]*)
11370  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11371  ;;
11372  *)
11373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11374for as_dir in $PATH
11375do
11376  IFS=$as_save_IFS
11377  test -z "$as_dir" && as_dir=.
11378    for ac_exec_ext in '' $ac_executable_extensions; do
11379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11380    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11382    break 2
11383  fi
11384done
11385  done
11386IFS=$as_save_IFS
11387
11388  ;;
11389esac
11390fi
11391TAR=$ac_cv_path_TAR
11392if test -n "$TAR"; then
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11394$as_echo "$TAR" >&6; }
11395else
11396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
11398fi
11399
11400
11401  test -n "$TAR" && break
11402done
11403
11404  else
11405    # The variable is set, but is it from the command line or the environment?
11406
11407    # Try to remove the string !TAR! from our list.
11408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11410      # If it failed, the variable was not from the command line. Ignore it,
11411      # but warn the user (except for BASH, which is always set by the calling BASH).
11412      if test "xTAR" != xBASH; then
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11414$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11415      fi
11416      # Try to locate tool using the code snippet
11417      for ac_prog in gtar tar
11418do
11419  # Extract the first word of "$ac_prog", so it can be a program name with args.
11420set dummy $ac_prog; ac_word=$2
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11422$as_echo_n "checking for $ac_word... " >&6; }
11423if ${ac_cv_path_TAR+:} false; then :
11424  $as_echo_n "(cached) " >&6
11425else
11426  case $TAR in
11427  [\\/]* | ?:[\\/]*)
11428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11429  ;;
11430  *)
11431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11432for as_dir in $PATH
11433do
11434  IFS=$as_save_IFS
11435  test -z "$as_dir" && as_dir=.
11436    for ac_exec_ext in '' $ac_executable_extensions; do
11437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11440    break 2
11441  fi
11442done
11443  done
11444IFS=$as_save_IFS
11445
11446  ;;
11447esac
11448fi
11449TAR=$ac_cv_path_TAR
11450if test -n "$TAR"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11452$as_echo "$TAR" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459  test -n "$TAR" && break
11460done
11461
11462    else
11463      # If it succeeded, then it was overridden by the user. We will use it
11464      # for the tool.
11465
11466      # First remove it from the list of overridden variables, so we can test
11467      # for unknown variables in the end.
11468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11469
11470      # Check if we try to supply an empty value
11471      if test "x$TAR" = x; then
11472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11473$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11475$as_echo_n "checking for TAR... " >&6; }
11476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11477$as_echo "disabled" >&6; }
11478      else
11479        # Check if the provided tool contains a complete path.
11480        tool_specified="$TAR"
11481        tool_basename="${tool_specified##*/}"
11482        if test "x$tool_basename" = "x$tool_specified"; then
11483          # A command without a complete path is provided, search $PATH.
11484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11486          # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_TAR+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $TAR in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516TAR=$ac_cv_path_TAR
11517if test -n "$TAR"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11519$as_echo "$TAR" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526          if test "x$TAR" = x; then
11527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528          fi
11529        else
11530          # Otherwise we believe it is a complete path. Use it as it is.
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11534$as_echo_n "checking for TAR... " >&6; }
11535          if test ! -x "$tool_specified"; then
11536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11539          fi
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542        fi
11543      fi
11544    fi
11545
11546  fi
11547
11548
11549
11550  if test "x$TAR" = x; then
11551    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11552  fi
11553
11554
11555
11556
11557
11558  # Publish this variable in the help.
11559
11560
11561  if [ -z "${TEE+x}" ]; then
11562    # The variable is not set by user, try to locate tool using the code snippet
11563    for ac_prog in tee
11564do
11565  # Extract the first word of "$ac_prog", so it can be a program name with args.
11566set dummy $ac_prog; ac_word=$2
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11568$as_echo_n "checking for $ac_word... " >&6; }
11569if ${ac_cv_path_TEE+:} false; then :
11570  $as_echo_n "(cached) " >&6
11571else
11572  case $TEE in
11573  [\\/]* | ?:[\\/]*)
11574  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11575  ;;
11576  *)
11577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11578for as_dir in $PATH
11579do
11580  IFS=$as_save_IFS
11581  test -z "$as_dir" && as_dir=.
11582    for ac_exec_ext in '' $ac_executable_extensions; do
11583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11584    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11586    break 2
11587  fi
11588done
11589  done
11590IFS=$as_save_IFS
11591
11592  ;;
11593esac
11594fi
11595TEE=$ac_cv_path_TEE
11596if test -n "$TEE"; then
11597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11598$as_echo "$TEE" >&6; }
11599else
11600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
11602fi
11603
11604
11605  test -n "$TEE" && break
11606done
11607
11608  else
11609    # The variable is set, but is it from the command line or the environment?
11610
11611    # Try to remove the string !TEE! from our list.
11612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11614      # If it failed, the variable was not from the command line. Ignore it,
11615      # but warn the user (except for BASH, which is always set by the calling BASH).
11616      if test "xTEE" != xBASH; then
11617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11618$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11619      fi
11620      # Try to locate tool using the code snippet
11621      for ac_prog in tee
11622do
11623  # Extract the first word of "$ac_prog", so it can be a program name with args.
11624set dummy $ac_prog; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if ${ac_cv_path_TEE+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $TEE in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653TEE=$ac_cv_path_TEE
11654if test -n "$TEE"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11656$as_echo "$TEE" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663  test -n "$TEE" && break
11664done
11665
11666    else
11667      # If it succeeded, then it was overridden by the user. We will use it
11668      # for the tool.
11669
11670      # First remove it from the list of overridden variables, so we can test
11671      # for unknown variables in the end.
11672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11673
11674      # Check if we try to supply an empty value
11675      if test "x$TEE" = x; then
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11677$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11679$as_echo_n "checking for TEE... " >&6; }
11680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11681$as_echo "disabled" >&6; }
11682      else
11683        # Check if the provided tool contains a complete path.
11684        tool_specified="$TEE"
11685        tool_basename="${tool_specified##*/}"
11686        if test "x$tool_basename" = "x$tool_specified"; then
11687          # A command without a complete path is provided, search $PATH.
11688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11689$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11690          # Extract the first word of "$tool_basename", so it can be a program name with args.
11691set dummy $tool_basename; ac_word=$2
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693$as_echo_n "checking for $ac_word... " >&6; }
11694if ${ac_cv_path_TEE+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  case $TEE in
11698  [\\/]* | ?:[\\/]*)
11699  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11700  ;;
11701  *)
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711    break 2
11712  fi
11713done
11714  done
11715IFS=$as_save_IFS
11716
11717  ;;
11718esac
11719fi
11720TEE=$ac_cv_path_TEE
11721if test -n "$TEE"; then
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11723$as_echo "$TEE" >&6; }
11724else
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727fi
11728
11729
11730          if test "x$TEE" = x; then
11731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11732          fi
11733        else
11734          # Otherwise we believe it is a complete path. Use it as it is.
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11736$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11738$as_echo_n "checking for TEE... " >&6; }
11739          if test ! -x "$tool_specified"; then
11740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11741$as_echo "not found" >&6; }
11742            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11743          fi
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11745$as_echo "$tool_specified" >&6; }
11746        fi
11747      fi
11748    fi
11749
11750  fi
11751
11752
11753
11754  if test "x$TEE" = x; then
11755    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11756  fi
11757
11758
11759
11760
11761
11762  # Publish this variable in the help.
11763
11764
11765  if [ -z "${TOUCH+x}" ]; then
11766    # The variable is not set by user, try to locate tool using the code snippet
11767    for ac_prog in touch
11768do
11769  # Extract the first word of "$ac_prog", so it can be a program name with args.
11770set dummy $ac_prog; ac_word=$2
11771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11772$as_echo_n "checking for $ac_word... " >&6; }
11773if ${ac_cv_path_TOUCH+:} false; then :
11774  $as_echo_n "(cached) " >&6
11775else
11776  case $TOUCH in
11777  [\\/]* | ?:[\\/]*)
11778  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11779  ;;
11780  *)
11781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782for as_dir in $PATH
11783do
11784  IFS=$as_save_IFS
11785  test -z "$as_dir" && as_dir=.
11786    for ac_exec_ext in '' $ac_executable_extensions; do
11787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11788    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11790    break 2
11791  fi
11792done
11793  done
11794IFS=$as_save_IFS
11795
11796  ;;
11797esac
11798fi
11799TOUCH=$ac_cv_path_TOUCH
11800if test -n "$TOUCH"; then
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11802$as_echo "$TOUCH" >&6; }
11803else
11804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806fi
11807
11808
11809  test -n "$TOUCH" && break
11810done
11811
11812  else
11813    # The variable is set, but is it from the command line or the environment?
11814
11815    # Try to remove the string !TOUCH! from our list.
11816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11818      # If it failed, the variable was not from the command line. Ignore it,
11819      # but warn the user (except for BASH, which is always set by the calling BASH).
11820      if test "xTOUCH" != xBASH; then
11821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11822$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11823      fi
11824      # Try to locate tool using the code snippet
11825      for ac_prog in touch
11826do
11827  # Extract the first word of "$ac_prog", so it can be a program name with args.
11828set dummy $ac_prog; ac_word=$2
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11830$as_echo_n "checking for $ac_word... " >&6; }
11831if ${ac_cv_path_TOUCH+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  case $TOUCH in
11835  [\\/]* | ?:[\\/]*)
11836  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11837  ;;
11838  *)
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11846    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11848    break 2
11849  fi
11850done
11851  done
11852IFS=$as_save_IFS
11853
11854  ;;
11855esac
11856fi
11857TOUCH=$ac_cv_path_TOUCH
11858if test -n "$TOUCH"; then
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11860$as_echo "$TOUCH" >&6; }
11861else
11862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
11864fi
11865
11866
11867  test -n "$TOUCH" && break
11868done
11869
11870    else
11871      # If it succeeded, then it was overridden by the user. We will use it
11872      # for the tool.
11873
11874      # First remove it from the list of overridden variables, so we can test
11875      # for unknown variables in the end.
11876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11877
11878      # Check if we try to supply an empty value
11879      if test "x$TOUCH" = x; then
11880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11881$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11883$as_echo_n "checking for TOUCH... " >&6; }
11884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11885$as_echo "disabled" >&6; }
11886      else
11887        # Check if the provided tool contains a complete path.
11888        tool_specified="$TOUCH"
11889        tool_basename="${tool_specified##*/}"
11890        if test "x$tool_basename" = "x$tool_specified"; then
11891          # A command without a complete path is provided, search $PATH.
11892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11893$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11894          # Extract the first word of "$tool_basename", so it can be a program name with args.
11895set dummy $tool_basename; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_TOUCH+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $TOUCH in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924TOUCH=$ac_cv_path_TOUCH
11925if test -n "$TOUCH"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11927$as_echo "$TOUCH" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934          if test "x$TOUCH" = x; then
11935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11936          fi
11937        else
11938          # Otherwise we believe it is a complete path. Use it as it is.
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11940$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11942$as_echo_n "checking for TOUCH... " >&6; }
11943          if test ! -x "$tool_specified"; then
11944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11945$as_echo "not found" >&6; }
11946            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11947          fi
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11949$as_echo "$tool_specified" >&6; }
11950        fi
11951      fi
11952    fi
11953
11954  fi
11955
11956
11957
11958  if test "x$TOUCH" = x; then
11959    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11960  fi
11961
11962
11963
11964
11965
11966  # Publish this variable in the help.
11967
11968
11969  if [ -z "${TR+x}" ]; then
11970    # The variable is not set by user, try to locate tool using the code snippet
11971    for ac_prog in tr
11972do
11973  # Extract the first word of "$ac_prog", so it can be a program name with args.
11974set dummy $ac_prog; ac_word=$2
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11976$as_echo_n "checking for $ac_word... " >&6; }
11977if ${ac_cv_path_TR+:} false; then :
11978  $as_echo_n "(cached) " >&6
11979else
11980  case $TR in
11981  [\\/]* | ?:[\\/]*)
11982  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11983  ;;
11984  *)
11985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986for as_dir in $PATH
11987do
11988  IFS=$as_save_IFS
11989  test -z "$as_dir" && as_dir=.
11990    for ac_exec_ext in '' $ac_executable_extensions; do
11991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11994    break 2
11995  fi
11996done
11997  done
11998IFS=$as_save_IFS
11999
12000  ;;
12001esac
12002fi
12003TR=$ac_cv_path_TR
12004if test -n "$TR"; then
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12006$as_echo "$TR" >&6; }
12007else
12008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010fi
12011
12012
12013  test -n "$TR" && break
12014done
12015
12016  else
12017    # The variable is set, but is it from the command line or the environment?
12018
12019    # Try to remove the string !TR! from our list.
12020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12022      # If it failed, the variable was not from the command line. Ignore it,
12023      # but warn the user (except for BASH, which is always set by the calling BASH).
12024      if test "xTR" != xBASH; then
12025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12026$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12027      fi
12028      # Try to locate tool using the code snippet
12029      for ac_prog in tr
12030do
12031  # Extract the first word of "$ac_prog", so it can be a program name with args.
12032set dummy $ac_prog; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_TR+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $TR in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061TR=$ac_cv_path_TR
12062if test -n "$TR"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12064$as_echo "$TR" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071  test -n "$TR" && break
12072done
12073
12074    else
12075      # If it succeeded, then it was overridden by the user. We will use it
12076      # for the tool.
12077
12078      # First remove it from the list of overridden variables, so we can test
12079      # for unknown variables in the end.
12080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12081
12082      # Check if we try to supply an empty value
12083      if test "x$TR" = x; then
12084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12085$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12087$as_echo_n "checking for TR... " >&6; }
12088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12089$as_echo "disabled" >&6; }
12090      else
12091        # Check if the provided tool contains a complete path.
12092        tool_specified="$TR"
12093        tool_basename="${tool_specified##*/}"
12094        if test "x$tool_basename" = "x$tool_specified"; then
12095          # A command without a complete path is provided, search $PATH.
12096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12097$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12098          # Extract the first word of "$tool_basename", so it can be a program name with args.
12099set dummy $tool_basename; ac_word=$2
12100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101$as_echo_n "checking for $ac_word... " >&6; }
12102if ${ac_cv_path_TR+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  case $TR in
12106  [\\/]* | ?:[\\/]*)
12107  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12108  ;;
12109  *)
12110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111for as_dir in $PATH
12112do
12113  IFS=$as_save_IFS
12114  test -z "$as_dir" && as_dir=.
12115    for ac_exec_ext in '' $ac_executable_extensions; do
12116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119    break 2
12120  fi
12121done
12122  done
12123IFS=$as_save_IFS
12124
12125  ;;
12126esac
12127fi
12128TR=$ac_cv_path_TR
12129if test -n "$TR"; then
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12131$as_echo "$TR" >&6; }
12132else
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135fi
12136
12137
12138          if test "x$TR" = x; then
12139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12140          fi
12141        else
12142          # Otherwise we believe it is a complete path. Use it as it is.
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12144$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12146$as_echo_n "checking for TR... " >&6; }
12147          if test ! -x "$tool_specified"; then
12148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12149$as_echo "not found" >&6; }
12150            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12151          fi
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12153$as_echo "$tool_specified" >&6; }
12154        fi
12155      fi
12156    fi
12157
12158  fi
12159
12160
12161
12162  if test "x$TR" = x; then
12163    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12164  fi
12165
12166
12167
12168
12169
12170  # Publish this variable in the help.
12171
12172
12173  if [ -z "${UNAME+x}" ]; then
12174    # The variable is not set by user, try to locate tool using the code snippet
12175    for ac_prog in uname
12176do
12177  # Extract the first word of "$ac_prog", so it can be a program name with args.
12178set dummy $ac_prog; ac_word=$2
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180$as_echo_n "checking for $ac_word... " >&6; }
12181if ${ac_cv_path_UNAME+:} false; then :
12182  $as_echo_n "(cached) " >&6
12183else
12184  case $UNAME in
12185  [\\/]* | ?:[\\/]*)
12186  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12187  ;;
12188  *)
12189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12190for as_dir in $PATH
12191do
12192  IFS=$as_save_IFS
12193  test -z "$as_dir" && as_dir=.
12194    for ac_exec_ext in '' $ac_executable_extensions; do
12195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12196    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12198    break 2
12199  fi
12200done
12201  done
12202IFS=$as_save_IFS
12203
12204  ;;
12205esac
12206fi
12207UNAME=$ac_cv_path_UNAME
12208if test -n "$UNAME"; then
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12210$as_echo "$UNAME" >&6; }
12211else
12212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213$as_echo "no" >&6; }
12214fi
12215
12216
12217  test -n "$UNAME" && break
12218done
12219
12220  else
12221    # The variable is set, but is it from the command line or the environment?
12222
12223    # Try to remove the string !UNAME! from our list.
12224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12226      # If it failed, the variable was not from the command line. Ignore it,
12227      # but warn the user (except for BASH, which is always set by the calling BASH).
12228      if test "xUNAME" != xBASH; then
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12230$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12231      fi
12232      # Try to locate tool using the code snippet
12233      for ac_prog in uname
12234do
12235  # Extract the first word of "$ac_prog", so it can be a program name with args.
12236set dummy $ac_prog; ac_word=$2
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12238$as_echo_n "checking for $ac_word... " >&6; }
12239if ${ac_cv_path_UNAME+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242  case $UNAME in
12243  [\\/]* | ?:[\\/]*)
12244  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12245  ;;
12246  *)
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_exec_ext in '' $ac_executable_extensions; do
12253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12254    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12256    break 2
12257  fi
12258done
12259  done
12260IFS=$as_save_IFS
12261
12262  ;;
12263esac
12264fi
12265UNAME=$ac_cv_path_UNAME
12266if test -n "$UNAME"; then
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12268$as_echo "$UNAME" >&6; }
12269else
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
12272fi
12273
12274
12275  test -n "$UNAME" && break
12276done
12277
12278    else
12279      # If it succeeded, then it was overridden by the user. We will use it
12280      # for the tool.
12281
12282      # First remove it from the list of overridden variables, so we can test
12283      # for unknown variables in the end.
12284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12285
12286      # Check if we try to supply an empty value
12287      if test "x$UNAME" = x; then
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12289$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12291$as_echo_n "checking for UNAME... " >&6; }
12292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12293$as_echo "disabled" >&6; }
12294      else
12295        # Check if the provided tool contains a complete path.
12296        tool_specified="$UNAME"
12297        tool_basename="${tool_specified##*/}"
12298        if test "x$tool_basename" = "x$tool_specified"; then
12299          # A command without a complete path is provided, search $PATH.
12300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12301$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12302          # Extract the first word of "$tool_basename", so it can be a program name with args.
12303set dummy $tool_basename; ac_word=$2
12304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305$as_echo_n "checking for $ac_word... " >&6; }
12306if ${ac_cv_path_UNAME+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309  case $UNAME in
12310  [\\/]* | ?:[\\/]*)
12311  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12312  ;;
12313  *)
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323    break 2
12324  fi
12325done
12326  done
12327IFS=$as_save_IFS
12328
12329  ;;
12330esac
12331fi
12332UNAME=$ac_cv_path_UNAME
12333if test -n "$UNAME"; then
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12335$as_echo "$UNAME" >&6; }
12336else
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338$as_echo "no" >&6; }
12339fi
12340
12341
12342          if test "x$UNAME" = x; then
12343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12344          fi
12345        else
12346          # Otherwise we believe it is a complete path. Use it as it is.
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12348$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12350$as_echo_n "checking for UNAME... " >&6; }
12351          if test ! -x "$tool_specified"; then
12352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12353$as_echo "not found" >&6; }
12354            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12355          fi
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12357$as_echo "$tool_specified" >&6; }
12358        fi
12359      fi
12360    fi
12361
12362  fi
12363
12364
12365
12366  if test "x$UNAME" = x; then
12367    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12368  fi
12369
12370
12371
12372
12373
12374  # Publish this variable in the help.
12375
12376
12377  if [ -z "${UNIQ+x}" ]; then
12378    # The variable is not set by user, try to locate tool using the code snippet
12379    for ac_prog in uniq
12380do
12381  # Extract the first word of "$ac_prog", so it can be a program name with args.
12382set dummy $ac_prog; ac_word=$2
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12384$as_echo_n "checking for $ac_word... " >&6; }
12385if ${ac_cv_path_UNIQ+:} false; then :
12386  $as_echo_n "(cached) " >&6
12387else
12388  case $UNIQ in
12389  [\\/]* | ?:[\\/]*)
12390  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12391  ;;
12392  *)
12393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394for as_dir in $PATH
12395do
12396  IFS=$as_save_IFS
12397  test -z "$as_dir" && as_dir=.
12398    for ac_exec_ext in '' $ac_executable_extensions; do
12399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12400    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12402    break 2
12403  fi
12404done
12405  done
12406IFS=$as_save_IFS
12407
12408  ;;
12409esac
12410fi
12411UNIQ=$ac_cv_path_UNIQ
12412if test -n "$UNIQ"; then
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12414$as_echo "$UNIQ" >&6; }
12415else
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
12418fi
12419
12420
12421  test -n "$UNIQ" && break
12422done
12423
12424  else
12425    # The variable is set, but is it from the command line or the environment?
12426
12427    # Try to remove the string !UNIQ! from our list.
12428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12430      # If it failed, the variable was not from the command line. Ignore it,
12431      # but warn the user (except for BASH, which is always set by the calling BASH).
12432      if test "xUNIQ" != xBASH; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12434$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12435      fi
12436      # Try to locate tool using the code snippet
12437      for ac_prog in uniq
12438do
12439  # Extract the first word of "$ac_prog", so it can be a program name with args.
12440set dummy $ac_prog; ac_word=$2
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442$as_echo_n "checking for $ac_word... " >&6; }
12443if ${ac_cv_path_UNIQ+:} false; then :
12444  $as_echo_n "(cached) " >&6
12445else
12446  case $UNIQ in
12447  [\\/]* | ?:[\\/]*)
12448  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12449  ;;
12450  *)
12451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452for as_dir in $PATH
12453do
12454  IFS=$as_save_IFS
12455  test -z "$as_dir" && as_dir=.
12456    for ac_exec_ext in '' $ac_executable_extensions; do
12457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460    break 2
12461  fi
12462done
12463  done
12464IFS=$as_save_IFS
12465
12466  ;;
12467esac
12468fi
12469UNIQ=$ac_cv_path_UNIQ
12470if test -n "$UNIQ"; then
12471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12472$as_echo "$UNIQ" >&6; }
12473else
12474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
12476fi
12477
12478
12479  test -n "$UNIQ" && break
12480done
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if we try to supply an empty value
12491      if test "x$UNIQ" = x; then
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12493$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12495$as_echo_n "checking for UNIQ... " >&6; }
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12497$as_echo "disabled" >&6; }
12498      else
12499        # Check if the provided tool contains a complete path.
12500        tool_specified="$UNIQ"
12501        tool_basename="${tool_specified##*/}"
12502        if test "x$tool_basename" = "x$tool_specified"; then
12503          # A command without a complete path is provided, search $PATH.
12504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12505$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12506          # Extract the first word of "$tool_basename", so it can be a program name with args.
12507set dummy $tool_basename; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_UNIQ+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $UNIQ in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536UNIQ=$ac_cv_path_UNIQ
12537if test -n "$UNIQ"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12539$as_echo "$UNIQ" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546          if test "x$UNIQ" = x; then
12547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12548          fi
12549        else
12550          # Otherwise we believe it is a complete path. Use it as it is.
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12552$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12554$as_echo_n "checking for UNIQ... " >&6; }
12555          if test ! -x "$tool_specified"; then
12556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12557$as_echo "not found" >&6; }
12558            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12559          fi
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12561$as_echo "$tool_specified" >&6; }
12562        fi
12563      fi
12564    fi
12565
12566  fi
12567
12568
12569
12570  if test "x$UNIQ" = x; then
12571    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12572  fi
12573
12574
12575
12576
12577
12578  # Publish this variable in the help.
12579
12580
12581  if [ -z "${WC+x}" ]; then
12582    # The variable is not set by user, try to locate tool using the code snippet
12583    for ac_prog in wc
12584do
12585  # Extract the first word of "$ac_prog", so it can be a program name with args.
12586set dummy $ac_prog; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_WC+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $WC in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615WC=$ac_cv_path_WC
12616if test -n "$WC"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12618$as_echo "$WC" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625  test -n "$WC" && break
12626done
12627
12628  else
12629    # The variable is set, but is it from the command line or the environment?
12630
12631    # Try to remove the string !WC! from our list.
12632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12634      # If it failed, the variable was not from the command line. Ignore it,
12635      # but warn the user (except for BASH, which is always set by the calling BASH).
12636      if test "xWC" != xBASH; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12638$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12639      fi
12640      # Try to locate tool using the code snippet
12641      for ac_prog in wc
12642do
12643  # Extract the first word of "$ac_prog", so it can be a program name with args.
12644set dummy $ac_prog; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_WC+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $WC in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673WC=$ac_cv_path_WC
12674if test -n "$WC"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12676$as_echo "$WC" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683  test -n "$WC" && break
12684done
12685
12686    else
12687      # If it succeeded, then it was overridden by the user. We will use it
12688      # for the tool.
12689
12690      # First remove it from the list of overridden variables, so we can test
12691      # for unknown variables in the end.
12692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12693
12694      # Check if we try to supply an empty value
12695      if test "x$WC" = x; then
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12697$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12699$as_echo_n "checking for WC... " >&6; }
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12701$as_echo "disabled" >&6; }
12702      else
12703        # Check if the provided tool contains a complete path.
12704        tool_specified="$WC"
12705        tool_basename="${tool_specified##*/}"
12706        if test "x$tool_basename" = "x$tool_specified"; then
12707          # A command without a complete path is provided, search $PATH.
12708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12709$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12710          # Extract the first word of "$tool_basename", so it can be a program name with args.
12711set dummy $tool_basename; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_WC+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $WC in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740WC=$ac_cv_path_WC
12741if test -n "$WC"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12743$as_echo "$WC" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750          if test "x$WC" = x; then
12751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12752          fi
12753        else
12754          # Otherwise we believe it is a complete path. Use it as it is.
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12756$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12758$as_echo_n "checking for WC... " >&6; }
12759          if test ! -x "$tool_specified"; then
12760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12761$as_echo "not found" >&6; }
12762            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12763          fi
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12765$as_echo "$tool_specified" >&6; }
12766        fi
12767      fi
12768    fi
12769
12770  fi
12771
12772
12773
12774  if test "x$WC" = x; then
12775    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12776  fi
12777
12778
12779
12780
12781
12782  # Publish this variable in the help.
12783
12784
12785  if [ -z "${WHICH+x}" ]; then
12786    # The variable is not set by user, try to locate tool using the code snippet
12787    for ac_prog in which
12788do
12789  # Extract the first word of "$ac_prog", so it can be a program name with args.
12790set dummy $ac_prog; ac_word=$2
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12792$as_echo_n "checking for $ac_word... " >&6; }
12793if ${ac_cv_path_WHICH+:} false; then :
12794  $as_echo_n "(cached) " >&6
12795else
12796  case $WHICH in
12797  [\\/]* | ?:[\\/]*)
12798  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12799  ;;
12800  *)
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12808    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12810    break 2
12811  fi
12812done
12813  done
12814IFS=$as_save_IFS
12815
12816  ;;
12817esac
12818fi
12819WHICH=$ac_cv_path_WHICH
12820if test -n "$WHICH"; then
12821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12822$as_echo "$WHICH" >&6; }
12823else
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
12826fi
12827
12828
12829  test -n "$WHICH" && break
12830done
12831
12832  else
12833    # The variable is set, but is it from the command line or the environment?
12834
12835    # Try to remove the string !WHICH! from our list.
12836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12838      # If it failed, the variable was not from the command line. Ignore it,
12839      # but warn the user (except for BASH, which is always set by the calling BASH).
12840      if test "xWHICH" != xBASH; then
12841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12842$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12843      fi
12844      # Try to locate tool using the code snippet
12845      for ac_prog in which
12846do
12847  # Extract the first word of "$ac_prog", so it can be a program name with args.
12848set dummy $ac_prog; ac_word=$2
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12850$as_echo_n "checking for $ac_word... " >&6; }
12851if ${ac_cv_path_WHICH+:} false; then :
12852  $as_echo_n "(cached) " >&6
12853else
12854  case $WHICH in
12855  [\\/]* | ?:[\\/]*)
12856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12857  ;;
12858  *)
12859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862  IFS=$as_save_IFS
12863  test -z "$as_dir" && as_dir=.
12864    for ac_exec_ext in '' $ac_executable_extensions; do
12865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12868    break 2
12869  fi
12870done
12871  done
12872IFS=$as_save_IFS
12873
12874  ;;
12875esac
12876fi
12877WHICH=$ac_cv_path_WHICH
12878if test -n "$WHICH"; then
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12880$as_echo "$WHICH" >&6; }
12881else
12882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12883$as_echo "no" >&6; }
12884fi
12885
12886
12887  test -n "$WHICH" && break
12888done
12889
12890    else
12891      # If it succeeded, then it was overridden by the user. We will use it
12892      # for the tool.
12893
12894      # First remove it from the list of overridden variables, so we can test
12895      # for unknown variables in the end.
12896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12897
12898      # Check if we try to supply an empty value
12899      if test "x$WHICH" = x; then
12900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12901$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12903$as_echo_n "checking for WHICH... " >&6; }
12904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12905$as_echo "disabled" >&6; }
12906      else
12907        # Check if the provided tool contains a complete path.
12908        tool_specified="$WHICH"
12909        tool_basename="${tool_specified##*/}"
12910        if test "x$tool_basename" = "x$tool_specified"; then
12911          # A command without a complete path is provided, search $PATH.
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12913$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12914          # Extract the first word of "$tool_basename", so it can be a program name with args.
12915set dummy $tool_basename; ac_word=$2
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917$as_echo_n "checking for $ac_word... " >&6; }
12918if ${ac_cv_path_WHICH+:} false; then :
12919  $as_echo_n "(cached) " >&6
12920else
12921  case $WHICH in
12922  [\\/]* | ?:[\\/]*)
12923  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12924  ;;
12925  *)
12926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927for as_dir in $PATH
12928do
12929  IFS=$as_save_IFS
12930  test -z "$as_dir" && as_dir=.
12931    for ac_exec_ext in '' $ac_executable_extensions; do
12932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935    break 2
12936  fi
12937done
12938  done
12939IFS=$as_save_IFS
12940
12941  ;;
12942esac
12943fi
12944WHICH=$ac_cv_path_WHICH
12945if test -n "$WHICH"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12947$as_echo "$WHICH" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954          if test "x$WHICH" = x; then
12955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12956          fi
12957        else
12958          # Otherwise we believe it is a complete path. Use it as it is.
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12960$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12962$as_echo_n "checking for WHICH... " >&6; }
12963          if test ! -x "$tool_specified"; then
12964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12965$as_echo "not found" >&6; }
12966            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12967          fi
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12969$as_echo "$tool_specified" >&6; }
12970        fi
12971      fi
12972    fi
12973
12974  fi
12975
12976
12977
12978  if test "x$WHICH" = x; then
12979    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12980  fi
12981
12982
12983
12984
12985
12986  # Publish this variable in the help.
12987
12988
12989  if [ -z "${XARGS+x}" ]; then
12990    # The variable is not set by user, try to locate tool using the code snippet
12991    for ac_prog in xargs
12992do
12993  # Extract the first word of "$ac_prog", so it can be a program name with args.
12994set dummy $ac_prog; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_XARGS+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $XARGS in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023XARGS=$ac_cv_path_XARGS
13024if test -n "$XARGS"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13026$as_echo "$XARGS" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033  test -n "$XARGS" && break
13034done
13035
13036  else
13037    # The variable is set, but is it from the command line or the environment?
13038
13039    # Try to remove the string !XARGS! from our list.
13040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13042      # If it failed, the variable was not from the command line. Ignore it,
13043      # but warn the user (except for BASH, which is always set by the calling BASH).
13044      if test "xXARGS" != xBASH; then
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13046$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13047      fi
13048      # Try to locate tool using the code snippet
13049      for ac_prog in xargs
13050do
13051  # Extract the first word of "$ac_prog", so it can be a program name with args.
13052set dummy $ac_prog; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_XARGS+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $XARGS in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081XARGS=$ac_cv_path_XARGS
13082if test -n "$XARGS"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13084$as_echo "$XARGS" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091  test -n "$XARGS" && break
13092done
13093
13094    else
13095      # If it succeeded, then it was overridden by the user. We will use it
13096      # for the tool.
13097
13098      # First remove it from the list of overridden variables, so we can test
13099      # for unknown variables in the end.
13100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13101
13102      # Check if we try to supply an empty value
13103      if test "x$XARGS" = x; then
13104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13105$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13107$as_echo_n "checking for XARGS... " >&6; }
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13109$as_echo "disabled" >&6; }
13110      else
13111        # Check if the provided tool contains a complete path.
13112        tool_specified="$XARGS"
13113        tool_basename="${tool_specified##*/}"
13114        if test "x$tool_basename" = "x$tool_specified"; then
13115          # A command without a complete path is provided, search $PATH.
13116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13117$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13118          # Extract the first word of "$tool_basename", so it can be a program name with args.
13119set dummy $tool_basename; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_XARGS+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $XARGS in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148XARGS=$ac_cv_path_XARGS
13149if test -n "$XARGS"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13151$as_echo "$XARGS" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158          if test "x$XARGS" = x; then
13159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13160          fi
13161        else
13162          # Otherwise we believe it is a complete path. Use it as it is.
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13164$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13166$as_echo_n "checking for XARGS... " >&6; }
13167          if test ! -x "$tool_specified"; then
13168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13169$as_echo "not found" >&6; }
13170            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13171          fi
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13173$as_echo "$tool_specified" >&6; }
13174        fi
13175      fi
13176    fi
13177
13178  fi
13179
13180
13181
13182  if test "x$XARGS" = x; then
13183    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13184  fi
13185
13186
13187
13188  # Then required tools that require some special treatment.
13189
13190
13191  # Publish this variable in the help.
13192
13193
13194  if [ -z "${AWK+x}" ]; then
13195    # The variable is not set by user, try to locate tool using the code snippet
13196    for ac_prog in gawk mawk nawk awk
13197do
13198  # Extract the first word of "$ac_prog", so it can be a program name with args.
13199set dummy $ac_prog; ac_word=$2
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13201$as_echo_n "checking for $ac_word... " >&6; }
13202if ${ac_cv_prog_AWK+:} false; then :
13203  $as_echo_n "(cached) " >&6
13204else
13205  if test -n "$AWK"; then
13206  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13207else
13208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13209for as_dir in $PATH
13210do
13211  IFS=$as_save_IFS
13212  test -z "$as_dir" && as_dir=.
13213    for ac_exec_ext in '' $ac_executable_extensions; do
13214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13215    ac_cv_prog_AWK="$ac_prog"
13216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13217    break 2
13218  fi
13219done
13220  done
13221IFS=$as_save_IFS
13222
13223fi
13224fi
13225AWK=$ac_cv_prog_AWK
13226if test -n "$AWK"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13228$as_echo "$AWK" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$AWK" && break
13236done
13237
13238  else
13239    # The variable is set, but is it from the command line or the environment?
13240
13241    # Try to remove the string !AWK! from our list.
13242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13244      # If it failed, the variable was not from the command line. Ignore it,
13245      # but warn the user (except for BASH, which is always set by the calling BASH).
13246      if test "xAWK" != xBASH; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13248$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13249      fi
13250      # Try to locate tool using the code snippet
13251      for ac_prog in gawk mawk nawk awk
13252do
13253  # Extract the first word of "$ac_prog", so it can be a program name with args.
13254set dummy $ac_prog; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_prog_AWK+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  if test -n "$AWK"; then
13261  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13262else
13263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264for as_dir in $PATH
13265do
13266  IFS=$as_save_IFS
13267  test -z "$as_dir" && as_dir=.
13268    for ac_exec_ext in '' $ac_executable_extensions; do
13269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13270    ac_cv_prog_AWK="$ac_prog"
13271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13272    break 2
13273  fi
13274done
13275  done
13276IFS=$as_save_IFS
13277
13278fi
13279fi
13280AWK=$ac_cv_prog_AWK
13281if test -n "$AWK"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13283$as_echo "$AWK" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$AWK" && break
13291done
13292
13293    else
13294      # If it succeeded, then it was overridden by the user. We will use it
13295      # for the tool.
13296
13297      # First remove it from the list of overridden variables, so we can test
13298      # for unknown variables in the end.
13299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13300
13301      # Check if we try to supply an empty value
13302      if test "x$AWK" = x; then
13303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13304$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13306$as_echo_n "checking for AWK... " >&6; }
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13308$as_echo "disabled" >&6; }
13309      else
13310        # Check if the provided tool contains a complete path.
13311        tool_specified="$AWK"
13312        tool_basename="${tool_specified##*/}"
13313        if test "x$tool_basename" = "x$tool_specified"; then
13314          # A command without a complete path is provided, search $PATH.
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13316$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13317          # Extract the first word of "$tool_basename", so it can be a program name with args.
13318set dummy $tool_basename; ac_word=$2
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13320$as_echo_n "checking for $ac_word... " >&6; }
13321if ${ac_cv_path_AWK+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  case $AWK in
13325  [\\/]* | ?:[\\/]*)
13326  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13327  ;;
13328  *)
13329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13330for as_dir in $PATH
13331do
13332  IFS=$as_save_IFS
13333  test -z "$as_dir" && as_dir=.
13334    for ac_exec_ext in '' $ac_executable_extensions; do
13335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13336    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13338    break 2
13339  fi
13340done
13341  done
13342IFS=$as_save_IFS
13343
13344  ;;
13345esac
13346fi
13347AWK=$ac_cv_path_AWK
13348if test -n "$AWK"; then
13349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13350$as_echo "$AWK" >&6; }
13351else
13352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
13354fi
13355
13356
13357          if test "x$AWK" = x; then
13358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13359          fi
13360        else
13361          # Otherwise we believe it is a complete path. Use it as it is.
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13363$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13365$as_echo_n "checking for AWK... " >&6; }
13366          if test ! -x "$tool_specified"; then
13367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13368$as_echo "not found" >&6; }
13369            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13370          fi
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13372$as_echo "$tool_specified" >&6; }
13373        fi
13374      fi
13375    fi
13376
13377  fi
13378
13379
13380  if test "x$AWK" = x; then
13381    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13382  fi
13383
13384
13385
13386
13387  # Publish this variable in the help.
13388
13389
13390  if [ -z "${GREP+x}" ]; then
13391    # The variable is not set by user, try to locate tool using the code snippet
13392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455  else
13456    # The variable is set, but is it from the command line or the environment?
13457
13458    # Try to remove the string !GREP! from our list.
13459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13461      # If it failed, the variable was not from the command line. Ignore it,
13462      # but warn the user (except for BASH, which is always set by the calling BASH).
13463      if test "xGREP" != xBASH; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13465$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13466      fi
13467      # Try to locate tool using the code snippet
13468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13469$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13470if ${ac_cv_path_GREP+:} false; then :
13471  $as_echo_n "(cached) " >&6
13472else
13473  if test -z "$GREP"; then
13474  ac_path_GREP_found=false
13475  # Loop through the user's path and test for each of PROGNAME-LIST
13476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13477for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13478do
13479  IFS=$as_save_IFS
13480  test -z "$as_dir" && as_dir=.
13481    for ac_prog in grep ggrep; do
13482    for ac_exec_ext in '' $ac_executable_extensions; do
13483      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13484      as_fn_executable_p "$ac_path_GREP" || continue
13485# Check for GNU ac_path_GREP and select it if it is found.
13486  # Check for GNU $ac_path_GREP
13487case `"$ac_path_GREP" --version 2>&1` in
13488*GNU*)
13489  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13490*)
13491  ac_count=0
13492  $as_echo_n 0123456789 >"conftest.in"
13493  while :
13494  do
13495    cat "conftest.in" "conftest.in" >"conftest.tmp"
13496    mv "conftest.tmp" "conftest.in"
13497    cp "conftest.in" "conftest.nl"
13498    $as_echo 'GREP' >> "conftest.nl"
13499    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13500    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13501    as_fn_arith $ac_count + 1 && ac_count=$as_val
13502    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13503      # Best one so far, save it but keep looking for a better one
13504      ac_cv_path_GREP="$ac_path_GREP"
13505      ac_path_GREP_max=$ac_count
13506    fi
13507    # 10*(2^10) chars as input seems more than enough
13508    test $ac_count -gt 10 && break
13509  done
13510  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13511esac
13512
13513      $ac_path_GREP_found && break 3
13514    done
13515  done
13516  done
13517IFS=$as_save_IFS
13518  if test -z "$ac_cv_path_GREP"; then
13519    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13520  fi
13521else
13522  ac_cv_path_GREP=$GREP
13523fi
13524
13525fi
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13527$as_echo "$ac_cv_path_GREP" >&6; }
13528 GREP="$ac_cv_path_GREP"
13529
13530
13531    else
13532      # If it succeeded, then it was overridden by the user. We will use it
13533      # for the tool.
13534
13535      # First remove it from the list of overridden variables, so we can test
13536      # for unknown variables in the end.
13537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13538
13539      # Check if we try to supply an empty value
13540      if test "x$GREP" = x; then
13541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13542$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13544$as_echo_n "checking for GREP... " >&6; }
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13546$as_echo "disabled" >&6; }
13547      else
13548        # Check if the provided tool contains a complete path.
13549        tool_specified="$GREP"
13550        tool_basename="${tool_specified##*/}"
13551        if test "x$tool_basename" = "x$tool_specified"; then
13552          # A command without a complete path is provided, search $PATH.
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13554$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13555          # Extract the first word of "$tool_basename", so it can be a program name with args.
13556set dummy $tool_basename; ac_word=$2
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13558$as_echo_n "checking for $ac_word... " >&6; }
13559if ${ac_cv_path_GREP+:} false; then :
13560  $as_echo_n "(cached) " >&6
13561else
13562  case $GREP in
13563  [\\/]* | ?:[\\/]*)
13564  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13565  ;;
13566  *)
13567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13568for as_dir in $PATH
13569do
13570  IFS=$as_save_IFS
13571  test -z "$as_dir" && as_dir=.
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13574    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13576    break 2
13577  fi
13578done
13579  done
13580IFS=$as_save_IFS
13581
13582  ;;
13583esac
13584fi
13585GREP=$ac_cv_path_GREP
13586if test -n "$GREP"; then
13587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13588$as_echo "$GREP" >&6; }
13589else
13590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
13592fi
13593
13594
13595          if test "x$GREP" = x; then
13596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13597          fi
13598        else
13599          # Otherwise we believe it is a complete path. Use it as it is.
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13601$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13603$as_echo_n "checking for GREP... " >&6; }
13604          if test ! -x "$tool_specified"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13606$as_echo "not found" >&6; }
13607            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13608          fi
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13610$as_echo "$tool_specified" >&6; }
13611        fi
13612      fi
13613    fi
13614
13615  fi
13616
13617
13618  if test "x$GREP" = x; then
13619    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13620  fi
13621
13622
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${EGREP+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13631$as_echo_n "checking for egrep... " >&6; }
13632if ${ac_cv_path_EGREP+:} false; then :
13633  $as_echo_n "(cached) " >&6
13634else
13635  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13636   then ac_cv_path_EGREP="$GREP -E"
13637   else
13638     if test -z "$EGREP"; then
13639  ac_path_EGREP_found=false
13640  # Loop through the user's path and test for each of PROGNAME-LIST
13641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13643do
13644  IFS=$as_save_IFS
13645  test -z "$as_dir" && as_dir=.
13646    for ac_prog in egrep; do
13647    for ac_exec_ext in '' $ac_executable_extensions; do
13648      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13649      as_fn_executable_p "$ac_path_EGREP" || continue
13650# Check for GNU ac_path_EGREP and select it if it is found.
13651  # Check for GNU $ac_path_EGREP
13652case `"$ac_path_EGREP" --version 2>&1` in
13653*GNU*)
13654  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13655*)
13656  ac_count=0
13657  $as_echo_n 0123456789 >"conftest.in"
13658  while :
13659  do
13660    cat "conftest.in" "conftest.in" >"conftest.tmp"
13661    mv "conftest.tmp" "conftest.in"
13662    cp "conftest.in" "conftest.nl"
13663    $as_echo 'EGREP' >> "conftest.nl"
13664    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13665    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13666    as_fn_arith $ac_count + 1 && ac_count=$as_val
13667    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13668      # Best one so far, save it but keep looking for a better one
13669      ac_cv_path_EGREP="$ac_path_EGREP"
13670      ac_path_EGREP_max=$ac_count
13671    fi
13672    # 10*(2^10) chars as input seems more than enough
13673    test $ac_count -gt 10 && break
13674  done
13675  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13676esac
13677
13678      $ac_path_EGREP_found && break 3
13679    done
13680  done
13681  done
13682IFS=$as_save_IFS
13683  if test -z "$ac_cv_path_EGREP"; then
13684    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13685  fi
13686else
13687  ac_cv_path_EGREP=$EGREP
13688fi
13689
13690   fi
13691fi
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13693$as_echo "$ac_cv_path_EGREP" >&6; }
13694 EGREP="$ac_cv_path_EGREP"
13695
13696
13697  else
13698    # The variable is set, but is it from the command line or the environment?
13699
13700    # Try to remove the string !EGREP! from our list.
13701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13703      # If it failed, the variable was not from the command line. Ignore it,
13704      # but warn the user (except for BASH, which is always set by the calling BASH).
13705      if test "xEGREP" != xBASH; then
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13707$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13708      fi
13709      # Try to locate tool using the code snippet
13710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13711$as_echo_n "checking for egrep... " >&6; }
13712if ${ac_cv_path_EGREP+:} false; then :
13713  $as_echo_n "(cached) " >&6
13714else
13715  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13716   then ac_cv_path_EGREP="$GREP -E"
13717   else
13718     if test -z "$EGREP"; then
13719  ac_path_EGREP_found=false
13720  # Loop through the user's path and test for each of PROGNAME-LIST
13721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13722for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13723do
13724  IFS=$as_save_IFS
13725  test -z "$as_dir" && as_dir=.
13726    for ac_prog in egrep; do
13727    for ac_exec_ext in '' $ac_executable_extensions; do
13728      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13729      as_fn_executable_p "$ac_path_EGREP" || continue
13730# Check for GNU ac_path_EGREP and select it if it is found.
13731  # Check for GNU $ac_path_EGREP
13732case `"$ac_path_EGREP" --version 2>&1` in
13733*GNU*)
13734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13735*)
13736  ac_count=0
13737  $as_echo_n 0123456789 >"conftest.in"
13738  while :
13739  do
13740    cat "conftest.in" "conftest.in" >"conftest.tmp"
13741    mv "conftest.tmp" "conftest.in"
13742    cp "conftest.in" "conftest.nl"
13743    $as_echo 'EGREP' >> "conftest.nl"
13744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13746    as_fn_arith $ac_count + 1 && ac_count=$as_val
13747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13748      # Best one so far, save it but keep looking for a better one
13749      ac_cv_path_EGREP="$ac_path_EGREP"
13750      ac_path_EGREP_max=$ac_count
13751    fi
13752    # 10*(2^10) chars as input seems more than enough
13753    test $ac_count -gt 10 && break
13754  done
13755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13756esac
13757
13758      $ac_path_EGREP_found && break 3
13759    done
13760  done
13761  done
13762IFS=$as_save_IFS
13763  if test -z "$ac_cv_path_EGREP"; then
13764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13765  fi
13766else
13767  ac_cv_path_EGREP=$EGREP
13768fi
13769
13770   fi
13771fi
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13773$as_echo "$ac_cv_path_EGREP" >&6; }
13774 EGREP="$ac_cv_path_EGREP"
13775
13776
13777    else
13778      # If it succeeded, then it was overridden by the user. We will use it
13779      # for the tool.
13780
13781      # First remove it from the list of overridden variables, so we can test
13782      # for unknown variables in the end.
13783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13784
13785      # Check if we try to supply an empty value
13786      if test "x$EGREP" = x; then
13787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13788$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13790$as_echo_n "checking for EGREP... " >&6; }
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13792$as_echo "disabled" >&6; }
13793      else
13794        # Check if the provided tool contains a complete path.
13795        tool_specified="$EGREP"
13796        tool_basename="${tool_specified##*/}"
13797        if test "x$tool_basename" = "x$tool_specified"; then
13798          # A command without a complete path is provided, search $PATH.
13799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13800$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13801          # Extract the first word of "$tool_basename", so it can be a program name with args.
13802set dummy $tool_basename; ac_word=$2
13803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13804$as_echo_n "checking for $ac_word... " >&6; }
13805if ${ac_cv_path_EGREP+:} false; then :
13806  $as_echo_n "(cached) " >&6
13807else
13808  case $EGREP in
13809  [\\/]* | ?:[\\/]*)
13810  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13811  ;;
13812  *)
13813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13814for as_dir in $PATH
13815do
13816  IFS=$as_save_IFS
13817  test -z "$as_dir" && as_dir=.
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13820    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13822    break 2
13823  fi
13824done
13825  done
13826IFS=$as_save_IFS
13827
13828  ;;
13829esac
13830fi
13831EGREP=$ac_cv_path_EGREP
13832if test -n "$EGREP"; then
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13834$as_echo "$EGREP" >&6; }
13835else
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13837$as_echo "no" >&6; }
13838fi
13839
13840
13841          if test "x$EGREP" = x; then
13842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13843          fi
13844        else
13845          # Otherwise we believe it is a complete path. Use it as it is.
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13847$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13849$as_echo_n "checking for EGREP... " >&6; }
13850          if test ! -x "$tool_specified"; then
13851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13852$as_echo "not found" >&6; }
13853            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13854          fi
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13856$as_echo "$tool_specified" >&6; }
13857        fi
13858      fi
13859    fi
13860
13861  fi
13862
13863
13864  if test "x$EGREP" = x; then
13865    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13866  fi
13867
13868
13869
13870
13871  # Publish this variable in the help.
13872
13873
13874  if [ -z "${FGREP+x}" ]; then
13875    # The variable is not set by user, try to locate tool using the code snippet
13876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13877$as_echo_n "checking for fgrep... " >&6; }
13878if ${ac_cv_path_FGREP+:} false; then :
13879  $as_echo_n "(cached) " >&6
13880else
13881  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13882   then ac_cv_path_FGREP="$GREP -F"
13883   else
13884     if test -z "$FGREP"; then
13885  ac_path_FGREP_found=false
13886  # Loop through the user's path and test for each of PROGNAME-LIST
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_prog in fgrep; do
13893    for ac_exec_ext in '' $ac_executable_extensions; do
13894      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13895      as_fn_executable_p "$ac_path_FGREP" || continue
13896# Check for GNU ac_path_FGREP and select it if it is found.
13897  # Check for GNU $ac_path_FGREP
13898case `"$ac_path_FGREP" --version 2>&1` in
13899*GNU*)
13900  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13901*)
13902  ac_count=0
13903  $as_echo_n 0123456789 >"conftest.in"
13904  while :
13905  do
13906    cat "conftest.in" "conftest.in" >"conftest.tmp"
13907    mv "conftest.tmp" "conftest.in"
13908    cp "conftest.in" "conftest.nl"
13909    $as_echo 'FGREP' >> "conftest.nl"
13910    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13911    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13912    as_fn_arith $ac_count + 1 && ac_count=$as_val
13913    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13914      # Best one so far, save it but keep looking for a better one
13915      ac_cv_path_FGREP="$ac_path_FGREP"
13916      ac_path_FGREP_max=$ac_count
13917    fi
13918    # 10*(2^10) chars as input seems more than enough
13919    test $ac_count -gt 10 && break
13920  done
13921  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13922esac
13923
13924      $ac_path_FGREP_found && break 3
13925    done
13926  done
13927  done
13928IFS=$as_save_IFS
13929  if test -z "$ac_cv_path_FGREP"; then
13930    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13931  fi
13932else
13933  ac_cv_path_FGREP=$FGREP
13934fi
13935
13936   fi
13937fi
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13939$as_echo "$ac_cv_path_FGREP" >&6; }
13940 FGREP="$ac_cv_path_FGREP"
13941
13942
13943  else
13944    # The variable is set, but is it from the command line or the environment?
13945
13946    # Try to remove the string !FGREP! from our list.
13947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13949      # If it failed, the variable was not from the command line. Ignore it,
13950      # but warn the user (except for BASH, which is always set by the calling BASH).
13951      if test "xFGREP" != xBASH; then
13952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13953$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13954      fi
13955      # Try to locate tool using the code snippet
13956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13957$as_echo_n "checking for fgrep... " >&6; }
13958if ${ac_cv_path_FGREP+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13962   then ac_cv_path_FGREP="$GREP -F"
13963   else
13964     if test -z "$FGREP"; then
13965  ac_path_FGREP_found=false
13966  # Loop through the user's path and test for each of PROGNAME-LIST
13967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13969do
13970  IFS=$as_save_IFS
13971  test -z "$as_dir" && as_dir=.
13972    for ac_prog in fgrep; do
13973    for ac_exec_ext in '' $ac_executable_extensions; do
13974      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13975      as_fn_executable_p "$ac_path_FGREP" || continue
13976# Check for GNU ac_path_FGREP and select it if it is found.
13977  # Check for GNU $ac_path_FGREP
13978case `"$ac_path_FGREP" --version 2>&1` in
13979*GNU*)
13980  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13981*)
13982  ac_count=0
13983  $as_echo_n 0123456789 >"conftest.in"
13984  while :
13985  do
13986    cat "conftest.in" "conftest.in" >"conftest.tmp"
13987    mv "conftest.tmp" "conftest.in"
13988    cp "conftest.in" "conftest.nl"
13989    $as_echo 'FGREP' >> "conftest.nl"
13990    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13992    as_fn_arith $ac_count + 1 && ac_count=$as_val
13993    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13994      # Best one so far, save it but keep looking for a better one
13995      ac_cv_path_FGREP="$ac_path_FGREP"
13996      ac_path_FGREP_max=$ac_count
13997    fi
13998    # 10*(2^10) chars as input seems more than enough
13999    test $ac_count -gt 10 && break
14000  done
14001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14002esac
14003
14004      $ac_path_FGREP_found && break 3
14005    done
14006  done
14007  done
14008IFS=$as_save_IFS
14009  if test -z "$ac_cv_path_FGREP"; then
14010    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14011  fi
14012else
14013  ac_cv_path_FGREP=$FGREP
14014fi
14015
14016   fi
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14019$as_echo "$ac_cv_path_FGREP" >&6; }
14020 FGREP="$ac_cv_path_FGREP"
14021
14022
14023    else
14024      # If it succeeded, then it was overridden by the user. We will use it
14025      # for the tool.
14026
14027      # First remove it from the list of overridden variables, so we can test
14028      # for unknown variables in the end.
14029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14030
14031      # Check if we try to supply an empty value
14032      if test "x$FGREP" = x; then
14033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14034$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14036$as_echo_n "checking for FGREP... " >&6; }
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14038$as_echo "disabled" >&6; }
14039      else
14040        # Check if the provided tool contains a complete path.
14041        tool_specified="$FGREP"
14042        tool_basename="${tool_specified##*/}"
14043        if test "x$tool_basename" = "x$tool_specified"; then
14044          # A command without a complete path is provided, search $PATH.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14046$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14047          # Extract the first word of "$tool_basename", so it can be a program name with args.
14048set dummy $tool_basename; ac_word=$2
14049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14050$as_echo_n "checking for $ac_word... " >&6; }
14051if ${ac_cv_path_FGREP+:} false; then :
14052  $as_echo_n "(cached) " >&6
14053else
14054  case $FGREP in
14055  [\\/]* | ?:[\\/]*)
14056  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14057  ;;
14058  *)
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_exec_ext in '' $ac_executable_extensions; do
14065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14066    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14068    break 2
14069  fi
14070done
14071  done
14072IFS=$as_save_IFS
14073
14074  ;;
14075esac
14076fi
14077FGREP=$ac_cv_path_FGREP
14078if test -n "$FGREP"; then
14079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14080$as_echo "$FGREP" >&6; }
14081else
14082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
14084fi
14085
14086
14087          if test "x$FGREP" = x; then
14088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14089          fi
14090        else
14091          # Otherwise we believe it is a complete path. Use it as it is.
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14093$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14095$as_echo_n "checking for FGREP... " >&6; }
14096          if test ! -x "$tool_specified"; then
14097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14098$as_echo "not found" >&6; }
14099            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14100          fi
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14102$as_echo "$tool_specified" >&6; }
14103        fi
14104      fi
14105    fi
14106
14107  fi
14108
14109
14110  if test "x$FGREP" = x; then
14111    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14112  fi
14113
14114
14115
14116
14117  # Publish this variable in the help.
14118
14119
14120  if [ -z "${SED+x}" ]; then
14121    # The variable is not set by user, try to locate tool using the code snippet
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14123$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14124if ${ac_cv_path_SED+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14128     for ac_i in 1 2 3 4 5 6 7; do
14129       ac_script="$ac_script$as_nl$ac_script"
14130     done
14131     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14132     { ac_script=; unset ac_script;}
14133     if test -z "$SED"; then
14134  ac_path_SED_found=false
14135  # Loop through the user's path and test for each of PROGNAME-LIST
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_prog in sed gsed; do
14142    for ac_exec_ext in '' $ac_executable_extensions; do
14143      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14144      as_fn_executable_p "$ac_path_SED" || continue
14145# Check for GNU ac_path_SED and select it if it is found.
14146  # Check for GNU $ac_path_SED
14147case `"$ac_path_SED" --version 2>&1` in
14148*GNU*)
14149  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14150*)
14151  ac_count=0
14152  $as_echo_n 0123456789 >"conftest.in"
14153  while :
14154  do
14155    cat "conftest.in" "conftest.in" >"conftest.tmp"
14156    mv "conftest.tmp" "conftest.in"
14157    cp "conftest.in" "conftest.nl"
14158    $as_echo '' >> "conftest.nl"
14159    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14161    as_fn_arith $ac_count + 1 && ac_count=$as_val
14162    if test $ac_count -gt ${ac_path_SED_max-0}; then
14163      # Best one so far, save it but keep looking for a better one
14164      ac_cv_path_SED="$ac_path_SED"
14165      ac_path_SED_max=$ac_count
14166    fi
14167    # 10*(2^10) chars as input seems more than enough
14168    test $ac_count -gt 10 && break
14169  done
14170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14171esac
14172
14173      $ac_path_SED_found && break 3
14174    done
14175  done
14176  done
14177IFS=$as_save_IFS
14178  if test -z "$ac_cv_path_SED"; then
14179    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14180  fi
14181else
14182  ac_cv_path_SED=$SED
14183fi
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14187$as_echo "$ac_cv_path_SED" >&6; }
14188 SED="$ac_cv_path_SED"
14189  rm -f conftest.sed
14190
14191  else
14192    # The variable is set, but is it from the command line or the environment?
14193
14194    # Try to remove the string !SED! from our list.
14195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14197      # If it failed, the variable was not from the command line. Ignore it,
14198      # but warn the user (except for BASH, which is always set by the calling BASH).
14199      if test "xSED" != xBASH; then
14200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14201$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14202      fi
14203      # Try to locate tool using the code snippet
14204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14206if ${ac_cv_path_SED+:} false; then :
14207  $as_echo_n "(cached) " >&6
14208else
14209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14210     for ac_i in 1 2 3 4 5 6 7; do
14211       ac_script="$ac_script$as_nl$ac_script"
14212     done
14213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14214     { ac_script=; unset ac_script;}
14215     if test -z "$SED"; then
14216  ac_path_SED_found=false
14217  # Loop through the user's path and test for each of PROGNAME-LIST
14218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14219for as_dir in $PATH
14220do
14221  IFS=$as_save_IFS
14222  test -z "$as_dir" && as_dir=.
14223    for ac_prog in sed gsed; do
14224    for ac_exec_ext in '' $ac_executable_extensions; do
14225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14226      as_fn_executable_p "$ac_path_SED" || continue
14227# Check for GNU ac_path_SED and select it if it is found.
14228  # Check for GNU $ac_path_SED
14229case `"$ac_path_SED" --version 2>&1` in
14230*GNU*)
14231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14232*)
14233  ac_count=0
14234  $as_echo_n 0123456789 >"conftest.in"
14235  while :
14236  do
14237    cat "conftest.in" "conftest.in" >"conftest.tmp"
14238    mv "conftest.tmp" "conftest.in"
14239    cp "conftest.in" "conftest.nl"
14240    $as_echo '' >> "conftest.nl"
14241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14243    as_fn_arith $ac_count + 1 && ac_count=$as_val
14244    if test $ac_count -gt ${ac_path_SED_max-0}; then
14245      # Best one so far, save it but keep looking for a better one
14246      ac_cv_path_SED="$ac_path_SED"
14247      ac_path_SED_max=$ac_count
14248    fi
14249    # 10*(2^10) chars as input seems more than enough
14250    test $ac_count -gt 10 && break
14251  done
14252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14253esac
14254
14255      $ac_path_SED_found && break 3
14256    done
14257  done
14258  done
14259IFS=$as_save_IFS
14260  if test -z "$ac_cv_path_SED"; then
14261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14262  fi
14263else
14264  ac_cv_path_SED=$SED
14265fi
14266
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14269$as_echo "$ac_cv_path_SED" >&6; }
14270 SED="$ac_cv_path_SED"
14271  rm -f conftest.sed
14272
14273    else
14274      # If it succeeded, then it was overridden by the user. We will use it
14275      # for the tool.
14276
14277      # First remove it from the list of overridden variables, so we can test
14278      # for unknown variables in the end.
14279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14280
14281      # Check if we try to supply an empty value
14282      if test "x$SED" = x; then
14283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14284$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14286$as_echo_n "checking for SED... " >&6; }
14287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14288$as_echo "disabled" >&6; }
14289      else
14290        # Check if the provided tool contains a complete path.
14291        tool_specified="$SED"
14292        tool_basename="${tool_specified##*/}"
14293        if test "x$tool_basename" = "x$tool_specified"; then
14294          # A command without a complete path is provided, search $PATH.
14295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14296$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14297          # Extract the first word of "$tool_basename", so it can be a program name with args.
14298set dummy $tool_basename; ac_word=$2
14299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14300$as_echo_n "checking for $ac_word... " >&6; }
14301if ${ac_cv_path_SED+:} false; then :
14302  $as_echo_n "(cached) " >&6
14303else
14304  case $SED in
14305  [\\/]* | ?:[\\/]*)
14306  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14307  ;;
14308  *)
14309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14310for as_dir in $PATH
14311do
14312  IFS=$as_save_IFS
14313  test -z "$as_dir" && as_dir=.
14314    for ac_exec_ext in '' $ac_executable_extensions; do
14315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14316    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14318    break 2
14319  fi
14320done
14321  done
14322IFS=$as_save_IFS
14323
14324  ;;
14325esac
14326fi
14327SED=$ac_cv_path_SED
14328if test -n "$SED"; then
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14330$as_echo "$SED" >&6; }
14331else
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14333$as_echo "no" >&6; }
14334fi
14335
14336
14337          if test "x$SED" = x; then
14338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14339          fi
14340        else
14341          # Otherwise we believe it is a complete path. Use it as it is.
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14343$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14345$as_echo_n "checking for SED... " >&6; }
14346          if test ! -x "$tool_specified"; then
14347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14348$as_echo "not found" >&6; }
14349            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14350          fi
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14352$as_echo "$tool_specified" >&6; }
14353        fi
14354      fi
14355    fi
14356
14357  fi
14358
14359
14360  if test "x$SED" = x; then
14361    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14362  fi
14363
14364
14365
14366  # Always force rm.
14367  RM="$RM -f"
14368
14369  # pwd behaves differently on various platforms and some don't support the -L flag.
14370  # Always use the bash builtin pwd to get uniform behavior.
14371  THEPWDCMD=pwd
14372
14373  # These are not required on all platforms
14374
14375
14376  # Publish this variable in the help.
14377
14378
14379  if [ -z "${CYGPATH+x}" ]; then
14380    # The variable is not set by user, try to locate tool using the code snippet
14381    for ac_prog in cygpath
14382do
14383  # Extract the first word of "$ac_prog", so it can be a program name with args.
14384set dummy $ac_prog; ac_word=$2
14385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14386$as_echo_n "checking for $ac_word... " >&6; }
14387if ${ac_cv_path_CYGPATH+:} false; then :
14388  $as_echo_n "(cached) " >&6
14389else
14390  case $CYGPATH in
14391  [\\/]* | ?:[\\/]*)
14392  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14393  ;;
14394  *)
14395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396for as_dir in $PATH
14397do
14398  IFS=$as_save_IFS
14399  test -z "$as_dir" && as_dir=.
14400    for ac_exec_ext in '' $ac_executable_extensions; do
14401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14402    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14404    break 2
14405  fi
14406done
14407  done
14408IFS=$as_save_IFS
14409
14410  ;;
14411esac
14412fi
14413CYGPATH=$ac_cv_path_CYGPATH
14414if test -n "$CYGPATH"; then
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14416$as_echo "$CYGPATH" >&6; }
14417else
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14419$as_echo "no" >&6; }
14420fi
14421
14422
14423  test -n "$CYGPATH" && break
14424done
14425
14426  else
14427    # The variable is set, but is it from the command line or the environment?
14428
14429    # Try to remove the string !CYGPATH! from our list.
14430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14432      # If it failed, the variable was not from the command line. Ignore it,
14433      # but warn the user (except for BASH, which is always set by the calling BASH).
14434      if test "xCYGPATH" != xBASH; then
14435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14436$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14437      fi
14438      # Try to locate tool using the code snippet
14439      for ac_prog in cygpath
14440do
14441  # Extract the first word of "$ac_prog", so it can be a program name with args.
14442set dummy $ac_prog; ac_word=$2
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14444$as_echo_n "checking for $ac_word... " >&6; }
14445if ${ac_cv_path_CYGPATH+:} false; then :
14446  $as_echo_n "(cached) " >&6
14447else
14448  case $CYGPATH in
14449  [\\/]* | ?:[\\/]*)
14450  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14451  ;;
14452  *)
14453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14454for as_dir in $PATH
14455do
14456  IFS=$as_save_IFS
14457  test -z "$as_dir" && as_dir=.
14458    for ac_exec_ext in '' $ac_executable_extensions; do
14459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14460    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14462    break 2
14463  fi
14464done
14465  done
14466IFS=$as_save_IFS
14467
14468  ;;
14469esac
14470fi
14471CYGPATH=$ac_cv_path_CYGPATH
14472if test -n "$CYGPATH"; then
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14474$as_echo "$CYGPATH" >&6; }
14475else
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
14478fi
14479
14480
14481  test -n "$CYGPATH" && break
14482done
14483
14484    else
14485      # If it succeeded, then it was overridden by the user. We will use it
14486      # for the tool.
14487
14488      # First remove it from the list of overridden variables, so we can test
14489      # for unknown variables in the end.
14490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14491
14492      # Check if we try to supply an empty value
14493      if test "x$CYGPATH" = x; then
14494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14495$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14497$as_echo_n "checking for CYGPATH... " >&6; }
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14499$as_echo "disabled" >&6; }
14500      else
14501        # Check if the provided tool contains a complete path.
14502        tool_specified="$CYGPATH"
14503        tool_basename="${tool_specified##*/}"
14504        if test "x$tool_basename" = "x$tool_specified"; then
14505          # A command without a complete path is provided, search $PATH.
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14507$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14508          # Extract the first word of "$tool_basename", so it can be a program name with args.
14509set dummy $tool_basename; ac_word=$2
14510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14511$as_echo_n "checking for $ac_word... " >&6; }
14512if ${ac_cv_path_CYGPATH+:} false; then :
14513  $as_echo_n "(cached) " >&6
14514else
14515  case $CYGPATH in
14516  [\\/]* | ?:[\\/]*)
14517  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14518  ;;
14519  *)
14520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14521for as_dir in $PATH
14522do
14523  IFS=$as_save_IFS
14524  test -z "$as_dir" && as_dir=.
14525    for ac_exec_ext in '' $ac_executable_extensions; do
14526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14527    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14529    break 2
14530  fi
14531done
14532  done
14533IFS=$as_save_IFS
14534
14535  ;;
14536esac
14537fi
14538CYGPATH=$ac_cv_path_CYGPATH
14539if test -n "$CYGPATH"; then
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14541$as_echo "$CYGPATH" >&6; }
14542else
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544$as_echo "no" >&6; }
14545fi
14546
14547
14548          if test "x$CYGPATH" = x; then
14549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14550          fi
14551        else
14552          # Otherwise we believe it is a complete path. Use it as it is.
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14554$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14556$as_echo_n "checking for CYGPATH... " >&6; }
14557          if test ! -x "$tool_specified"; then
14558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14559$as_echo "not found" >&6; }
14560            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14561          fi
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14563$as_echo "$tool_specified" >&6; }
14564        fi
14565      fi
14566    fi
14567
14568  fi
14569
14570
14571
14572
14573  # Publish this variable in the help.
14574
14575
14576  if [ -z "${READLINK+x}" ]; then
14577    # The variable is not set by user, try to locate tool using the code snippet
14578    for ac_prog in greadlink readlink
14579do
14580  # Extract the first word of "$ac_prog", so it can be a program name with args.
14581set dummy $ac_prog; ac_word=$2
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14583$as_echo_n "checking for $ac_word... " >&6; }
14584if ${ac_cv_path_READLINK+:} false; then :
14585  $as_echo_n "(cached) " >&6
14586else
14587  case $READLINK in
14588  [\\/]* | ?:[\\/]*)
14589  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14590  ;;
14591  *)
14592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14593for as_dir in $PATH
14594do
14595  IFS=$as_save_IFS
14596  test -z "$as_dir" && as_dir=.
14597    for ac_exec_ext in '' $ac_executable_extensions; do
14598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14599    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14601    break 2
14602  fi
14603done
14604  done
14605IFS=$as_save_IFS
14606
14607  ;;
14608esac
14609fi
14610READLINK=$ac_cv_path_READLINK
14611if test -n "$READLINK"; then
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14613$as_echo "$READLINK" >&6; }
14614else
14615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616$as_echo "no" >&6; }
14617fi
14618
14619
14620  test -n "$READLINK" && break
14621done
14622
14623  else
14624    # The variable is set, but is it from the command line or the environment?
14625
14626    # Try to remove the string !READLINK! from our list.
14627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14629      # If it failed, the variable was not from the command line. Ignore it,
14630      # but warn the user (except for BASH, which is always set by the calling BASH).
14631      if test "xREADLINK" != xBASH; then
14632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14633$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14634      fi
14635      # Try to locate tool using the code snippet
14636      for ac_prog in greadlink readlink
14637do
14638  # Extract the first word of "$ac_prog", so it can be a program name with args.
14639set dummy $ac_prog; ac_word=$2
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14641$as_echo_n "checking for $ac_word... " >&6; }
14642if ${ac_cv_path_READLINK+:} false; then :
14643  $as_echo_n "(cached) " >&6
14644else
14645  case $READLINK in
14646  [\\/]* | ?:[\\/]*)
14647  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14648  ;;
14649  *)
14650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14651for as_dir in $PATH
14652do
14653  IFS=$as_save_IFS
14654  test -z "$as_dir" && as_dir=.
14655    for ac_exec_ext in '' $ac_executable_extensions; do
14656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14657    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14659    break 2
14660  fi
14661done
14662  done
14663IFS=$as_save_IFS
14664
14665  ;;
14666esac
14667fi
14668READLINK=$ac_cv_path_READLINK
14669if test -n "$READLINK"; then
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14671$as_echo "$READLINK" >&6; }
14672else
14673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
14675fi
14676
14677
14678  test -n "$READLINK" && break
14679done
14680
14681    else
14682      # If it succeeded, then it was overridden by the user. We will use it
14683      # for the tool.
14684
14685      # First remove it from the list of overridden variables, so we can test
14686      # for unknown variables in the end.
14687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14688
14689      # Check if we try to supply an empty value
14690      if test "x$READLINK" = x; then
14691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14692$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14694$as_echo_n "checking for READLINK... " >&6; }
14695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14696$as_echo "disabled" >&6; }
14697      else
14698        # Check if the provided tool contains a complete path.
14699        tool_specified="$READLINK"
14700        tool_basename="${tool_specified##*/}"
14701        if test "x$tool_basename" = "x$tool_specified"; then
14702          # A command without a complete path is provided, search $PATH.
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14704$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14705          # Extract the first word of "$tool_basename", so it can be a program name with args.
14706set dummy $tool_basename; ac_word=$2
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14708$as_echo_n "checking for $ac_word... " >&6; }
14709if ${ac_cv_path_READLINK+:} false; then :
14710  $as_echo_n "(cached) " >&6
14711else
14712  case $READLINK in
14713  [\\/]* | ?:[\\/]*)
14714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14715  ;;
14716  *)
14717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14718for as_dir in $PATH
14719do
14720  IFS=$as_save_IFS
14721  test -z "$as_dir" && as_dir=.
14722    for ac_exec_ext in '' $ac_executable_extensions; do
14723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14726    break 2
14727  fi
14728done
14729  done
14730IFS=$as_save_IFS
14731
14732  ;;
14733esac
14734fi
14735READLINK=$ac_cv_path_READLINK
14736if test -n "$READLINK"; then
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14738$as_echo "$READLINK" >&6; }
14739else
14740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14741$as_echo "no" >&6; }
14742fi
14743
14744
14745          if test "x$READLINK" = x; then
14746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14747          fi
14748        else
14749          # Otherwise we believe it is a complete path. Use it as it is.
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14751$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14753$as_echo_n "checking for READLINK... " >&6; }
14754          if test ! -x "$tool_specified"; then
14755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14756$as_echo "not found" >&6; }
14757            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14758          fi
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14760$as_echo "$tool_specified" >&6; }
14761        fi
14762      fi
14763    fi
14764
14765  fi
14766
14767
14768
14769
14770  # Publish this variable in the help.
14771
14772
14773  if [ -z "${DF+x}" ]; then
14774    # The variable is not set by user, try to locate tool using the code snippet
14775    for ac_prog in df
14776do
14777  # Extract the first word of "$ac_prog", so it can be a program name with args.
14778set dummy $ac_prog; ac_word=$2
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14780$as_echo_n "checking for $ac_word... " >&6; }
14781if ${ac_cv_path_DF+:} false; then :
14782  $as_echo_n "(cached) " >&6
14783else
14784  case $DF in
14785  [\\/]* | ?:[\\/]*)
14786  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14787  ;;
14788  *)
14789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14790for as_dir in $PATH
14791do
14792  IFS=$as_save_IFS
14793  test -z "$as_dir" && as_dir=.
14794    for ac_exec_ext in '' $ac_executable_extensions; do
14795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14796    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14798    break 2
14799  fi
14800done
14801  done
14802IFS=$as_save_IFS
14803
14804  ;;
14805esac
14806fi
14807DF=$ac_cv_path_DF
14808if test -n "$DF"; then
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14810$as_echo "$DF" >&6; }
14811else
14812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14813$as_echo "no" >&6; }
14814fi
14815
14816
14817  test -n "$DF" && break
14818done
14819
14820  else
14821    # The variable is set, but is it from the command line or the environment?
14822
14823    # Try to remove the string !DF! from our list.
14824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14826      # If it failed, the variable was not from the command line. Ignore it,
14827      # but warn the user (except for BASH, which is always set by the calling BASH).
14828      if test "xDF" != xBASH; then
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14830$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14831      fi
14832      # Try to locate tool using the code snippet
14833      for ac_prog in df
14834do
14835  # Extract the first word of "$ac_prog", so it can be a program name with args.
14836set dummy $ac_prog; ac_word=$2
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14838$as_echo_n "checking for $ac_word... " >&6; }
14839if ${ac_cv_path_DF+:} false; then :
14840  $as_echo_n "(cached) " >&6
14841else
14842  case $DF in
14843  [\\/]* | ?:[\\/]*)
14844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14845  ;;
14846  *)
14847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14848for as_dir in $PATH
14849do
14850  IFS=$as_save_IFS
14851  test -z "$as_dir" && as_dir=.
14852    for ac_exec_ext in '' $ac_executable_extensions; do
14853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14856    break 2
14857  fi
14858done
14859  done
14860IFS=$as_save_IFS
14861
14862  ;;
14863esac
14864fi
14865DF=$ac_cv_path_DF
14866if test -n "$DF"; then
14867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14868$as_echo "$DF" >&6; }
14869else
14870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
14872fi
14873
14874
14875  test -n "$DF" && break
14876done
14877
14878    else
14879      # If it succeeded, then it was overridden by the user. We will use it
14880      # for the tool.
14881
14882      # First remove it from the list of overridden variables, so we can test
14883      # for unknown variables in the end.
14884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14885
14886      # Check if we try to supply an empty value
14887      if test "x$DF" = x; then
14888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14889$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14891$as_echo_n "checking for DF... " >&6; }
14892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14893$as_echo "disabled" >&6; }
14894      else
14895        # Check if the provided tool contains a complete path.
14896        tool_specified="$DF"
14897        tool_basename="${tool_specified##*/}"
14898        if test "x$tool_basename" = "x$tool_specified"; then
14899          # A command without a complete path is provided, search $PATH.
14900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14901$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14902          # Extract the first word of "$tool_basename", so it can be a program name with args.
14903set dummy $tool_basename; ac_word=$2
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14905$as_echo_n "checking for $ac_word... " >&6; }
14906if ${ac_cv_path_DF+:} false; then :
14907  $as_echo_n "(cached) " >&6
14908else
14909  case $DF in
14910  [\\/]* | ?:[\\/]*)
14911  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14912  ;;
14913  *)
14914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14915for as_dir in $PATH
14916do
14917  IFS=$as_save_IFS
14918  test -z "$as_dir" && as_dir=.
14919    for ac_exec_ext in '' $ac_executable_extensions; do
14920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14921    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14923    break 2
14924  fi
14925done
14926  done
14927IFS=$as_save_IFS
14928
14929  ;;
14930esac
14931fi
14932DF=$ac_cv_path_DF
14933if test -n "$DF"; then
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14935$as_echo "$DF" >&6; }
14936else
14937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14938$as_echo "no" >&6; }
14939fi
14940
14941
14942          if test "x$DF" = x; then
14943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14944          fi
14945        else
14946          # Otherwise we believe it is a complete path. Use it as it is.
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14948$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14950$as_echo_n "checking for DF... " >&6; }
14951          if test ! -x "$tool_specified"; then
14952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14953$as_echo "not found" >&6; }
14954            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14955          fi
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14957$as_echo "$tool_specified" >&6; }
14958        fi
14959      fi
14960    fi
14961
14962  fi
14963
14964
14965
14966
14967  # Publish this variable in the help.
14968
14969
14970  if [ -z "${CPIO+x}" ]; then
14971    # The variable is not set by user, try to locate tool using the code snippet
14972    for ac_prog in cpio bsdcpio
14973do
14974  # Extract the first word of "$ac_prog", so it can be a program name with args.
14975set dummy $ac_prog; ac_word=$2
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14977$as_echo_n "checking for $ac_word... " >&6; }
14978if ${ac_cv_path_CPIO+:} false; then :
14979  $as_echo_n "(cached) " >&6
14980else
14981  case $CPIO in
14982  [\\/]* | ?:[\\/]*)
14983  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14984  ;;
14985  *)
14986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987for as_dir in $PATH
14988do
14989  IFS=$as_save_IFS
14990  test -z "$as_dir" && as_dir=.
14991    for ac_exec_ext in '' $ac_executable_extensions; do
14992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995    break 2
14996  fi
14997done
14998  done
14999IFS=$as_save_IFS
15000
15001  ;;
15002esac
15003fi
15004CPIO=$ac_cv_path_CPIO
15005if test -n "$CPIO"; then
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15007$as_echo "$CPIO" >&6; }
15008else
15009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15010$as_echo "no" >&6; }
15011fi
15012
15013
15014  test -n "$CPIO" && break
15015done
15016
15017  else
15018    # The variable is set, but is it from the command line or the environment?
15019
15020    # Try to remove the string !CPIO! from our list.
15021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15023      # If it failed, the variable was not from the command line. Ignore it,
15024      # but warn the user (except for BASH, which is always set by the calling BASH).
15025      if test "xCPIO" != xBASH; then
15026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15027$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15028      fi
15029      # Try to locate tool using the code snippet
15030      for ac_prog in cpio bsdcpio
15031do
15032  # Extract the first word of "$ac_prog", so it can be a program name with args.
15033set dummy $ac_prog; ac_word=$2
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15035$as_echo_n "checking for $ac_word... " >&6; }
15036if ${ac_cv_path_CPIO+:} false; then :
15037  $as_echo_n "(cached) " >&6
15038else
15039  case $CPIO in
15040  [\\/]* | ?:[\\/]*)
15041  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15042  ;;
15043  *)
15044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045for as_dir in $PATH
15046do
15047  IFS=$as_save_IFS
15048  test -z "$as_dir" && as_dir=.
15049    for ac_exec_ext in '' $ac_executable_extensions; do
15050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15051    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053    break 2
15054  fi
15055done
15056  done
15057IFS=$as_save_IFS
15058
15059  ;;
15060esac
15061fi
15062CPIO=$ac_cv_path_CPIO
15063if test -n "$CPIO"; then
15064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15065$as_echo "$CPIO" >&6; }
15066else
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15068$as_echo "no" >&6; }
15069fi
15070
15071
15072  test -n "$CPIO" && break
15073done
15074
15075    else
15076      # If it succeeded, then it was overridden by the user. We will use it
15077      # for the tool.
15078
15079      # First remove it from the list of overridden variables, so we can test
15080      # for unknown variables in the end.
15081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15082
15083      # Check if we try to supply an empty value
15084      if test "x$CPIO" = x; then
15085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15086$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15088$as_echo_n "checking for CPIO... " >&6; }
15089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15090$as_echo "disabled" >&6; }
15091      else
15092        # Check if the provided tool contains a complete path.
15093        tool_specified="$CPIO"
15094        tool_basename="${tool_specified##*/}"
15095        if test "x$tool_basename" = "x$tool_specified"; then
15096          # A command without a complete path is provided, search $PATH.
15097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15098$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15099          # Extract the first word of "$tool_basename", so it can be a program name with args.
15100set dummy $tool_basename; ac_word=$2
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15102$as_echo_n "checking for $ac_word... " >&6; }
15103if ${ac_cv_path_CPIO+:} false; then :
15104  $as_echo_n "(cached) " >&6
15105else
15106  case $CPIO in
15107  [\\/]* | ?:[\\/]*)
15108  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15109  ;;
15110  *)
15111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15112for as_dir in $PATH
15113do
15114  IFS=$as_save_IFS
15115  test -z "$as_dir" && as_dir=.
15116    for ac_exec_ext in '' $ac_executable_extensions; do
15117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15118    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15120    break 2
15121  fi
15122done
15123  done
15124IFS=$as_save_IFS
15125
15126  ;;
15127esac
15128fi
15129CPIO=$ac_cv_path_CPIO
15130if test -n "$CPIO"; then
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15132$as_echo "$CPIO" >&6; }
15133else
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15135$as_echo "no" >&6; }
15136fi
15137
15138
15139          if test "x$CPIO" = x; then
15140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15141          fi
15142        else
15143          # Otherwise we believe it is a complete path. Use it as it is.
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15145$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15147$as_echo_n "checking for CPIO... " >&6; }
15148          if test ! -x "$tool_specified"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15150$as_echo "not found" >&6; }
15151            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15152          fi
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15154$as_echo "$tool_specified" >&6; }
15155        fi
15156      fi
15157    fi
15158
15159  fi
15160
15161
15162
15163
15164  # Publish this variable in the help.
15165
15166
15167  if [ -z "${NICE+x}" ]; then
15168    # The variable is not set by user, try to locate tool using the code snippet
15169    for ac_prog in nice
15170do
15171  # Extract the first word of "$ac_prog", so it can be a program name with args.
15172set dummy $ac_prog; ac_word=$2
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15174$as_echo_n "checking for $ac_word... " >&6; }
15175if ${ac_cv_path_NICE+:} false; then :
15176  $as_echo_n "(cached) " >&6
15177else
15178  case $NICE in
15179  [\\/]* | ?:[\\/]*)
15180  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15181  ;;
15182  *)
15183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15184for as_dir in $PATH
15185do
15186  IFS=$as_save_IFS
15187  test -z "$as_dir" && as_dir=.
15188    for ac_exec_ext in '' $ac_executable_extensions; do
15189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15190    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15192    break 2
15193  fi
15194done
15195  done
15196IFS=$as_save_IFS
15197
15198  ;;
15199esac
15200fi
15201NICE=$ac_cv_path_NICE
15202if test -n "$NICE"; then
15203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15204$as_echo "$NICE" >&6; }
15205else
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207$as_echo "no" >&6; }
15208fi
15209
15210
15211  test -n "$NICE" && break
15212done
15213
15214  else
15215    # The variable is set, but is it from the command line or the environment?
15216
15217    # Try to remove the string !NICE! from our list.
15218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15220      # If it failed, the variable was not from the command line. Ignore it,
15221      # but warn the user (except for BASH, which is always set by the calling BASH).
15222      if test "xNICE" != xBASH; then
15223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15224$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15225      fi
15226      # Try to locate tool using the code snippet
15227      for ac_prog in nice
15228do
15229  # Extract the first word of "$ac_prog", so it can be a program name with args.
15230set dummy $ac_prog; ac_word=$2
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15232$as_echo_n "checking for $ac_word... " >&6; }
15233if ${ac_cv_path_NICE+:} false; then :
15234  $as_echo_n "(cached) " >&6
15235else
15236  case $NICE in
15237  [\\/]* | ?:[\\/]*)
15238  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15239  ;;
15240  *)
15241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242for as_dir in $PATH
15243do
15244  IFS=$as_save_IFS
15245  test -z "$as_dir" && as_dir=.
15246    for ac_exec_ext in '' $ac_executable_extensions; do
15247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15248    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15250    break 2
15251  fi
15252done
15253  done
15254IFS=$as_save_IFS
15255
15256  ;;
15257esac
15258fi
15259NICE=$ac_cv_path_NICE
15260if test -n "$NICE"; then
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15262$as_echo "$NICE" >&6; }
15263else
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15265$as_echo "no" >&6; }
15266fi
15267
15268
15269  test -n "$NICE" && break
15270done
15271
15272    else
15273      # If it succeeded, then it was overridden by the user. We will use it
15274      # for the tool.
15275
15276      # First remove it from the list of overridden variables, so we can test
15277      # for unknown variables in the end.
15278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15279
15280      # Check if we try to supply an empty value
15281      if test "x$NICE" = x; then
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15283$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15285$as_echo_n "checking for NICE... " >&6; }
15286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15287$as_echo "disabled" >&6; }
15288      else
15289        # Check if the provided tool contains a complete path.
15290        tool_specified="$NICE"
15291        tool_basename="${tool_specified##*/}"
15292        if test "x$tool_basename" = "x$tool_specified"; then
15293          # A command without a complete path is provided, search $PATH.
15294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15295$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15296          # Extract the first word of "$tool_basename", so it can be a program name with args.
15297set dummy $tool_basename; ac_word=$2
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15299$as_echo_n "checking for $ac_word... " >&6; }
15300if ${ac_cv_path_NICE+:} false; then :
15301  $as_echo_n "(cached) " >&6
15302else
15303  case $NICE in
15304  [\\/]* | ?:[\\/]*)
15305  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15306  ;;
15307  *)
15308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311  IFS=$as_save_IFS
15312  test -z "$as_dir" && as_dir=.
15313    for ac_exec_ext in '' $ac_executable_extensions; do
15314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15317    break 2
15318  fi
15319done
15320  done
15321IFS=$as_save_IFS
15322
15323  ;;
15324esac
15325fi
15326NICE=$ac_cv_path_NICE
15327if test -n "$NICE"; then
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15329$as_echo "$NICE" >&6; }
15330else
15331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15332$as_echo "no" >&6; }
15333fi
15334
15335
15336          if test "x$NICE" = x; then
15337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15338          fi
15339        else
15340          # Otherwise we believe it is a complete path. Use it as it is.
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15342$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15344$as_echo_n "checking for NICE... " >&6; }
15345          if test ! -x "$tool_specified"; then
15346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15347$as_echo "not found" >&6; }
15348            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15349          fi
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15351$as_echo "$tool_specified" >&6; }
15352        fi
15353      fi
15354    fi
15355
15356  fi
15357
15358
15359
15360
15361# Now we can determine OpenJDK build and target platforms. This is required to
15362# have early on.
15363# Make sure we can run config.sub.
15364$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15365  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15368$as_echo_n "checking build system type... " >&6; }
15369if ${ac_cv_build+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  ac_build_alias=$build_alias
15373test "x$ac_build_alias" = x &&
15374  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15375test "x$ac_build_alias" = x &&
15376  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15377ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15378  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15379
15380fi
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15382$as_echo "$ac_cv_build" >&6; }
15383case $ac_cv_build in
15384*-*-*) ;;
15385*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15386esac
15387build=$ac_cv_build
15388ac_save_IFS=$IFS; IFS='-'
15389set x $ac_cv_build
15390shift
15391build_cpu=$1
15392build_vendor=$2
15393shift; shift
15394# Remember, the first character of IFS is used to create $*,
15395# except with old shells:
15396build_os=$*
15397IFS=$ac_save_IFS
15398case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15399
15400
15401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15402$as_echo_n "checking host system type... " >&6; }
15403if ${ac_cv_host+:} false; then :
15404  $as_echo_n "(cached) " >&6
15405else
15406  if test "x$host_alias" = x; then
15407  ac_cv_host=$ac_cv_build
15408else
15409  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15410    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15411fi
15412
15413fi
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15415$as_echo "$ac_cv_host" >&6; }
15416case $ac_cv_host in
15417*-*-*) ;;
15418*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15419esac
15420host=$ac_cv_host
15421ac_save_IFS=$IFS; IFS='-'
15422set x $ac_cv_host
15423shift
15424host_cpu=$1
15425host_vendor=$2
15426shift; shift
15427# Remember, the first character of IFS is used to create $*,
15428# except with old shells:
15429host_os=$*
15430IFS=$ac_save_IFS
15431case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15432
15433
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15435$as_echo_n "checking target system type... " >&6; }
15436if ${ac_cv_target+:} false; then :
15437  $as_echo_n "(cached) " >&6
15438else
15439  if test "x$target_alias" = x; then
15440  ac_cv_target=$ac_cv_host
15441else
15442  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15443    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15444fi
15445
15446fi
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15448$as_echo "$ac_cv_target" >&6; }
15449case $ac_cv_target in
15450*-*-*) ;;
15451*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15452esac
15453target=$ac_cv_target
15454ac_save_IFS=$IFS; IFS='-'
15455set x $ac_cv_target
15456shift
15457target_cpu=$1
15458target_vendor=$2
15459shift; shift
15460# Remember, the first character of IFS is used to create $*,
15461# except with old shells:
15462target_os=$*
15463IFS=$ac_save_IFS
15464case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15465
15466
15467# The aliases save the names the user supplied, while $host etc.
15468# will get canonicalized.
15469test -n "$target_alias" &&
15470  test "$program_prefix$program_suffix$program_transform_name" = \
15471    NONENONEs,x,x, &&
15472  program_prefix=${target_alias}-
15473
15474  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15475  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15476  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15477  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15478  # to use the configure naming style.
15479
15480
15481
15482
15483
15484  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15485  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15486  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15487  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15488  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15489  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15490
15491
15492
15493  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15494
15495  case "$build_os" in
15496    *linux*)
15497      VAR_OS=linux
15498      VAR_OS_TYPE=unix
15499      ;;
15500    *solaris*)
15501      VAR_OS=solaris
15502      VAR_OS_TYPE=unix
15503      ;;
15504    *darwin*)
15505      VAR_OS=macosx
15506      VAR_OS_TYPE=unix
15507      ;;
15508    *bsd*)
15509      VAR_OS=bsd
15510      VAR_OS_TYPE=unix
15511      ;;
15512    *cygwin*)
15513      VAR_OS=windows
15514      VAR_OS_ENV=windows.cygwin
15515      ;;
15516    *mingw*)
15517      VAR_OS=windows
15518      VAR_OS_ENV=windows.msys
15519      ;;
15520    *aix*)
15521      VAR_OS=aix
15522      VAR_OS_TYPE=unix
15523      ;;
15524    *)
15525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15526      ;;
15527  esac
15528
15529
15530  # First argument is the cpu name from the trip/quad
15531  case "$build_cpu" in
15532    x86_64)
15533      VAR_CPU=x86_64
15534      VAR_CPU_ARCH=x86
15535      VAR_CPU_BITS=64
15536      VAR_CPU_ENDIAN=little
15537      ;;
15538    i?86)
15539      VAR_CPU=x86
15540      VAR_CPU_ARCH=x86
15541      VAR_CPU_BITS=32
15542      VAR_CPU_ENDIAN=little
15543      ;;
15544    arm*)
15545      VAR_CPU=arm
15546      VAR_CPU_ARCH=arm
15547      VAR_CPU_BITS=32
15548      VAR_CPU_ENDIAN=little
15549      ;;
15550    aarch64)
15551      VAR_CPU=aarch64
15552      VAR_CPU_ARCH=aarch64
15553      VAR_CPU_BITS=64
15554      VAR_CPU_ENDIAN=little
15555      ;;
15556    powerpc)
15557      VAR_CPU=ppc
15558      VAR_CPU_ARCH=ppc
15559      VAR_CPU_BITS=32
15560      VAR_CPU_ENDIAN=big
15561      ;;
15562    powerpc64)
15563      VAR_CPU=ppc64
15564      VAR_CPU_ARCH=ppc
15565      VAR_CPU_BITS=64
15566      VAR_CPU_ENDIAN=big
15567      ;;
15568    powerpc64le)
15569      VAR_CPU=ppc64le
15570      VAR_CPU_ARCH=ppc
15571      VAR_CPU_BITS=64
15572      VAR_CPU_ENDIAN=little
15573      ;;
15574    s390)
15575      VAR_CPU=s390
15576      VAR_CPU_ARCH=s390
15577      VAR_CPU_BITS=32
15578      VAR_CPU_ENDIAN=big
15579      ;;
15580    s390x)
15581      VAR_CPU=s390x
15582      VAR_CPU_ARCH=s390
15583      VAR_CPU_BITS=64
15584      VAR_CPU_ENDIAN=big
15585      ;;
15586    sparc)
15587      VAR_CPU=sparc
15588      VAR_CPU_ARCH=sparc
15589      VAR_CPU_BITS=32
15590      VAR_CPU_ENDIAN=big
15591      ;;
15592    sparcv9|sparc64)
15593      VAR_CPU=sparcv9
15594      VAR_CPU_ARCH=sparc
15595      VAR_CPU_BITS=64
15596      VAR_CPU_ENDIAN=big
15597      ;;
15598    *)
15599      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15600      ;;
15601  esac
15602
15603  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15604  OPENJDK_BUILD_OS="$VAR_OS"
15605  if test "x$VAR_OS_TYPE" != x; then
15606    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15607  else
15608    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15609  fi
15610  if test "x$VAR_OS_ENV" != x; then
15611    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15612  else
15613    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15614  fi
15615  OPENJDK_BUILD_CPU="$VAR_CPU"
15616  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15617  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15618  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15619
15620
15621
15622
15623
15624
15625
15626
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15628$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15630$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15631
15632  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15633
15634  case "$host_os" in
15635    *linux*)
15636      VAR_OS=linux
15637      VAR_OS_TYPE=unix
15638      ;;
15639    *solaris*)
15640      VAR_OS=solaris
15641      VAR_OS_TYPE=unix
15642      ;;
15643    *darwin*)
15644      VAR_OS=macosx
15645      VAR_OS_TYPE=unix
15646      ;;
15647    *bsd*)
15648      VAR_OS=bsd
15649      VAR_OS_TYPE=unix
15650      ;;
15651    *cygwin*)
15652      VAR_OS=windows
15653      VAR_OS_ENV=windows.cygwin
15654      ;;
15655    *mingw*)
15656      VAR_OS=windows
15657      VAR_OS_ENV=windows.msys
15658      ;;
15659    *aix*)
15660      VAR_OS=aix
15661      VAR_OS_TYPE=unix
15662      ;;
15663    *)
15664      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15665      ;;
15666  esac
15667
15668
15669  # First argument is the cpu name from the trip/quad
15670  case "$host_cpu" in
15671    x86_64)
15672      VAR_CPU=x86_64
15673      VAR_CPU_ARCH=x86
15674      VAR_CPU_BITS=64
15675      VAR_CPU_ENDIAN=little
15676      ;;
15677    i?86)
15678      VAR_CPU=x86
15679      VAR_CPU_ARCH=x86
15680      VAR_CPU_BITS=32
15681      VAR_CPU_ENDIAN=little
15682      ;;
15683    arm*)
15684      VAR_CPU=arm
15685      VAR_CPU_ARCH=arm
15686      VAR_CPU_BITS=32
15687      VAR_CPU_ENDIAN=little
15688      ;;
15689    aarch64)
15690      VAR_CPU=aarch64
15691      VAR_CPU_ARCH=aarch64
15692      VAR_CPU_BITS=64
15693      VAR_CPU_ENDIAN=little
15694      ;;
15695    powerpc)
15696      VAR_CPU=ppc
15697      VAR_CPU_ARCH=ppc
15698      VAR_CPU_BITS=32
15699      VAR_CPU_ENDIAN=big
15700      ;;
15701    powerpc64)
15702      VAR_CPU=ppc64
15703      VAR_CPU_ARCH=ppc
15704      VAR_CPU_BITS=64
15705      VAR_CPU_ENDIAN=big
15706      ;;
15707    powerpc64le)
15708      VAR_CPU=ppc64le
15709      VAR_CPU_ARCH=ppc
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    s390)
15714      VAR_CPU=s390
15715      VAR_CPU_ARCH=s390
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=big
15718      ;;
15719    s390x)
15720      VAR_CPU=s390x
15721      VAR_CPU_ARCH=s390
15722      VAR_CPU_BITS=64
15723      VAR_CPU_ENDIAN=big
15724      ;;
15725    sparc)
15726      VAR_CPU=sparc
15727      VAR_CPU_ARCH=sparc
15728      VAR_CPU_BITS=32
15729      VAR_CPU_ENDIAN=big
15730      ;;
15731    sparcv9|sparc64)
15732      VAR_CPU=sparcv9
15733      VAR_CPU_ARCH=sparc
15734      VAR_CPU_BITS=64
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15739      ;;
15740  esac
15741
15742  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15743  OPENJDK_TARGET_OS="$VAR_OS"
15744  if test "x$VAR_OS_TYPE" != x; then
15745    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15746  else
15747    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15748  fi
15749  if test "x$VAR_OS_ENV" != x; then
15750    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15751  else
15752    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15753  fi
15754  OPENJDK_TARGET_CPU="$VAR_CPU"
15755  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15756  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15757  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15758
15759
15760
15761
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15767$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15769$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15770
15771
15772
15773# Check whether --with-target-bits was given.
15774if test "${with_target_bits+set}" = set; then :
15775  withval=$with_target_bits;
15776fi
15777
15778
15779  # We have three types of compiles:
15780  # native  == normal compilation, target system == build system
15781  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15782  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15783  #
15784  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15785    # We're doing a proper cross-compilation
15786    COMPILE_TYPE="cross"
15787  else
15788    COMPILE_TYPE="native"
15789  fi
15790
15791  if test "x$with_target_bits" != x; then
15792    if test "x$COMPILE_TYPE" = "xcross"; then
15793      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15794    fi
15795
15796    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      # A reduced build is requested
15798      COMPILE_TYPE="reduced"
15799      OPENJDK_TARGET_CPU_BITS=32
15800      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15801        OPENJDK_TARGET_CPU=x86
15802      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15803        OPENJDK_TARGET_CPU=sparc
15804      else
15805        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15806      fi
15807    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15808      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
15809    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15811$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15812    else
15813      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15814    fi
15815  fi
15816
15817
15818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15819$as_echo_n "checking compilation type... " >&6; }
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15821$as_echo "$COMPILE_TYPE" >&6; }
15822
15823
15824  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15825    REQUIRED_OS_NAME=SunOS
15826    REQUIRED_OS_VERSION=5.10
15827  fi
15828  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15829    REQUIRED_OS_NAME=Linux
15830    REQUIRED_OS_VERSION=2.6
15831  fi
15832  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15833    REQUIRED_OS_NAME=Windows
15834    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15835      REQUIRED_OS_VERSION=5.2
15836    else
15837      REQUIRED_OS_VERSION=5.1
15838    fi
15839  fi
15840  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15841    REQUIRED_OS_NAME=Darwin
15842    REQUIRED_OS_VERSION=11.2
15843  fi
15844  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15845    REQUIRED_OS_NAME=AIX
15846    REQUIRED_OS_VERSION=7.1
15847  fi
15848
15849
15850
15851
15852
15853
15854  # Also store the legacy naming of the cpu.
15855  # Ie i586 and amd64 instead of x86 and x86_64
15856  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15857  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15858    OPENJDK_TARGET_CPU_LEGACY="i586"
15859  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15860    # On all platforms except MacOSX replace x86_64 with amd64.
15861    OPENJDK_TARGET_CPU_LEGACY="amd64"
15862  fi
15863
15864
15865  # And the second legacy naming of the cpu.
15866  # Ie i386 and amd64 instead of x86 and x86_64.
15867  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15868  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15869    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15870  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15871    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15872  fi
15873
15874
15875  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15876  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15877  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15878  OPENJDK_TARGET_CPU_ISADIR=""
15879  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15880    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15882    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15883      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15884    fi
15885  fi
15886
15887
15888  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15889  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15890  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15891    # On linux only, we replace x86 with i386.
15892    OPENJDK_TARGET_CPU_OSARCH="i386"
15893  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15894    # On all platforms except macosx, we replace x86_64 with amd64.
15895    OPENJDK_TARGET_CPU_OSARCH="amd64"
15896  fi
15897
15898
15899  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    OPENJDK_TARGET_CPU_JLI="i386"
15902  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15903    # On all platforms except macosx, we replace x86_64 with amd64.
15904    OPENJDK_TARGET_CPU_JLI="amd64"
15905  fi
15906
15907  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15908      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15909  else
15910      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15911  fi
15912
15913
15914  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15915  # Macosx is osx and x86_64 is x64
15916  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15917    OPENJDK_TARGET_OS_BUNDLE="osx"
15918  else
15919    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15920  fi
15921  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15922    OPENJDK_TARGET_CPU_BUNDLE="x64"
15923  else
15924    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15925  fi
15926  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15927
15928
15929
15930
15931  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15932    A_LP64="LP64:="
15933    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15934    # unpack200.exe
15935    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15936      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15937    fi
15938  fi
15939  LP64=$A_LP64
15940
15941
15942  if test "x$COMPILE_TYPE" = "xcross"; then
15943    # FIXME: ... or should this include reduced builds..?
15944    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15945  else
15946    DEFINE_CROSS_COMPILE_ARCH=""
15947  fi
15948
15949
15950  # Convert openjdk platform names to hotspot names
15951
15952  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15953  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15954    HOTSPOT_TARGET_OS=bsd
15955  fi
15956
15957
15958  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15959  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15960    HOTSPOT_TARGET_OS_TYPE=posix
15961  fi
15962
15963
15964  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15965  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15966    HOTSPOT_TARGET_CPU=x86_32
15967  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15968    HOTSPOT_TARGET_CPU=sparc
15969  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15970    HOTSPOT_TARGET_CPU=ppc_64
15971  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15972    HOTSPOT_TARGET_CPU=ppc_64
15973  fi
15974
15975
15976  # This is identical with OPENJDK_*, but define anyway for consistency.
15977  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15978
15979
15980  # Setup HOTSPOT_TARGET_CPU_DEFINE
15981  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15982    HOTSPOT_TARGET_CPU_DEFINE=IA32
15983  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15984    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15985  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15986    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15987  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15988    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15989  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15990    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15991  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15992    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15993
15994  # The cpu defines below are for zero, we don't support them directly.
15995  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15996    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15997  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15998    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15999  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16000    HOTSPOT_TARGET_CPU_DEFINE=S390
16001  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16002    HOTSPOT_TARGET_CPU_DEFINE=S390
16003  elif test "x$OPENJDK_TARGET_CPU" != x; then
16004    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16005  fi
16006
16007
16008
16009
16010  # Also store the legacy naming of the cpu.
16011  # Ie i586 and amd64 instead of x86 and x86_64
16012  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16013  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16014    OPENJDK_BUILD_CPU_LEGACY="i586"
16015  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16016    # On all platforms except MacOSX replace x86_64 with amd64.
16017    OPENJDK_BUILD_CPU_LEGACY="amd64"
16018  fi
16019
16020
16021  # And the second legacy naming of the cpu.
16022  # Ie i386 and amd64 instead of x86 and x86_64.
16023  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16024  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16025    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16026  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16027    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16028  fi
16029
16030
16031  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16032  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16033  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16034  OPENJDK_BUILD_CPU_ISADIR=""
16035  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16036    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16038    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16039      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16040    fi
16041  fi
16042
16043
16044  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16045  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16046  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16047    # On linux only, we replace x86 with i386.
16048    OPENJDK_BUILD_CPU_OSARCH="i386"
16049  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16050    # On all platforms except macosx, we replace x86_64 with amd64.
16051    OPENJDK_BUILD_CPU_OSARCH="amd64"
16052  fi
16053
16054
16055  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16056  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16057    OPENJDK_BUILD_CPU_JLI="i386"
16058  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16059    # On all platforms except macosx, we replace x86_64 with amd64.
16060    OPENJDK_BUILD_CPU_JLI="amd64"
16061  fi
16062
16063  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16065  else
16066      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16067  fi
16068
16069
16070  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16071  # Macosx is osx and x86_64 is x64
16072  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16073    OPENJDK_BUILD_OS_BUNDLE="osx"
16074  else
16075    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16076  fi
16077  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16078    OPENJDK_BUILD_CPU_BUNDLE="x64"
16079  else
16080    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16081  fi
16082  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16083
16084
16085
16086
16087  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16088    A_LP64="LP64:="
16089    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16090    # unpack200.exe
16091    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16092      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16093    fi
16094  fi
16095  LP64=$A_LP64
16096
16097
16098  if test "x$COMPILE_TYPE" = "xcross"; then
16099    # FIXME: ... or should this include reduced builds..?
16100    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16101  else
16102    DEFINE_CROSS_COMPILE_ARCH=""
16103  fi
16104
16105
16106  # Convert openjdk platform names to hotspot names
16107
16108  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16109  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16110    HOTSPOT_BUILD_OS=bsd
16111  fi
16112
16113
16114  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16115  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16116    HOTSPOT_BUILD_OS_TYPE=posix
16117  fi
16118
16119
16120  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16121  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16122    HOTSPOT_BUILD_CPU=x86_32
16123  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16124    HOTSPOT_BUILD_CPU=sparc
16125  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16126    HOTSPOT_BUILD_CPU=ppc_64
16127  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16128    HOTSPOT_BUILD_CPU=ppc_64
16129  fi
16130
16131
16132  # This is identical with OPENJDK_*, but define anyway for consistency.
16133  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16134
16135
16136  # Setup HOTSPOT_BUILD_CPU_DEFINE
16137  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16138    HOTSPOT_BUILD_CPU_DEFINE=IA32
16139  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16140    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16141  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16142    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16143  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16144    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16145  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16146    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16147  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16148    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16149
16150  # The cpu defines below are for zero, we don't support them directly.
16151  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16152    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16153  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16154    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16155  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16156    HOTSPOT_BUILD_CPU_DEFINE=S390
16157  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16158    HOTSPOT_BUILD_CPU_DEFINE=S390
16159  elif test "x$OPENJDK_BUILD_CPU" != x; then
16160    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16161  fi
16162
16163
16164
16165
16166  # ZERO_ARCHDEF is used to enable architecture-specific code.
16167  # This is used in legacy hotspot build.
16168  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16169
16170
16171
16172
16173
16174# Continue setting up basic stuff. Most remaining code require fundamental tools.
16175
16176  # Save the current directory this script was started from
16177  CURDIR="$PWD"
16178
16179  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16180  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16181  # was not available at that time.
16182  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16183  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16184    ORIGINAL_PATH="$REWRITTEN_PATH"
16185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16186$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16187  fi
16188
16189  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16190    PATH_SEP=";"
16191
16192  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16193  if test $SRC_ROOT_LENGTH -gt 100; then
16194    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16195  fi
16196
16197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16199$as_echo_n "checking cygwin release... " >&6; }
16200    CYGWIN_VERSION=`$UNAME -r`
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16202$as_echo "$CYGWIN_VERSION" >&6; }
16203    WINDOWS_ENV_VENDOR='cygwin'
16204    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16205
16206    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16207    if test "x$CYGWIN_VERSION_OLD" != x; then
16208      { $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
16209$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;}
16210      as_fn_error $? "Cannot continue" "$LINENO" 5
16211    fi
16212    if test "x$CYGPATH" = x; then
16213      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16214    fi
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16216$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16217    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16218    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16219    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16220    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16222$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16223    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16224    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16225    if test "x$test_cygdrive_prefix" = x; then
16226      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16227    fi
16228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16230$as_echo_n "checking msys release... " >&6; }
16231    MSYS_VERSION=`$UNAME -r`
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16233$as_echo "$MSYS_VERSION" >&6; }
16234
16235    WINDOWS_ENV_VENDOR='msys'
16236    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16237
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16239$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16240    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16241    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16242
16243  windows_path="$MSYS_ROOT_PATH"
16244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16245    unix_path=`$CYGPATH -u "$windows_path"`
16246    MSYS_ROOT_PATH="$unix_path"
16247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16249    MSYS_ROOT_PATH="$unix_path"
16250  fi
16251
16252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16253$as_echo "$MSYS_ROOT_PATH" >&6; }
16254    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16255  else
16256    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16257  fi
16258
16259  # Test if windows or unix (cygwin/msys) find is first in path.
16260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16261$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16262  FIND_BINARY_OUTPUT=`find --version 2>&1`
16263  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16265$as_echo "unix style" >&6; }
16266  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16268$as_echo "Windows" >&6; }
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16270$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16271    { $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
16272$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16273    as_fn_error $? "Cannot continue" "$LINENO" 5
16274  else
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16276$as_echo "unknown" >&6; }
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16278$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16279  fi
16280
16281  else
16282    PATH_SEP=":"
16283  fi
16284
16285
16286  # We get the top-level directory from the supporting wrappers.
16287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16288$as_echo_n "checking for top-level directory... " >&6; }
16289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16290$as_echo "$TOPDIR" >&6; }
16291
16292
16293  # Save the original version of TOPDIR for string comparisons
16294  ORIGINAL_TOPDIR="$TOPDIR"
16295
16296
16297  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16298
16299  # Only process if variable expands to non-empty
16300
16301  if test "x$CURDIR" != x; then
16302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16303
16304  # Input might be given as Windows format, start by converting to
16305  # unix format.
16306  path="$CURDIR"
16307  new_path=`$CYGPATH -u "$path"`
16308
16309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16312  # "foo.exe" is OK but "foo" is an error.
16313  #
16314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16315  # It is also a way to make sure we got the proper file name for the real test later on.
16316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16317  if test "x$test_shortpath" = x; then
16318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16319$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16320    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16321  fi
16322
16323  # Call helper function which possibly converts this using DOS-style short mode.
16324  # If so, the updated path is stored in $new_path.
16325
16326  input_path="$new_path"
16327  # Check if we need to convert this using DOS-style short mode. If the path
16328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16329  # take no chances and rewrite it.
16330  # Note: m4 eats our [], so we need to use [ and ] instead.
16331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16332  if test "x$has_forbidden_chars" != x; then
16333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16337      # Going to short mode and back again did indeed matter. Since short mode is
16338      # case insensitive, let's make it lowercase to improve readability.
16339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16340      # Now convert it back to Unix-style (cygpath)
16341      input_path=`$CYGPATH -u "$shortmode_path"`
16342      new_path="$input_path"
16343    fi
16344  fi
16345
16346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16347  if test "x$test_cygdrive_prefix" = x; then
16348    # As a simple fix, exclude /usr/bin since it's not a real path.
16349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16351      # a path prefixed by /cygdrive for fixpath to work.
16352      new_path="$CYGWIN_ROOT_PATH$input_path"
16353    fi
16354  fi
16355
16356
16357  if test "x$path" != "x$new_path"; then
16358    CURDIR="$new_path"
16359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16360$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16361  fi
16362
16363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16364
16365  path="$CURDIR"
16366  has_colon=`$ECHO $path | $GREP ^.:`
16367  new_path="$path"
16368  if test "x$has_colon" = x; then
16369    # Not in mixed or Windows style, start by that.
16370    new_path=`cmd //c echo $path`
16371  fi
16372
16373
16374  input_path="$new_path"
16375  # Check if we need to convert this using DOS-style short mode. If the path
16376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16377  # take no chances and rewrite it.
16378  # Note: m4 eats our [], so we need to use [ and ] instead.
16379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16380  if test "x$has_forbidden_chars" != x; then
16381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16383  fi
16384
16385
16386  windows_path="$new_path"
16387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16388    unix_path=`$CYGPATH -u "$windows_path"`
16389    new_path="$unix_path"
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16392    new_path="$unix_path"
16393  fi
16394
16395  if test "x$path" != "x$new_path"; then
16396    CURDIR="$new_path"
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16398$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16399  fi
16400
16401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16403
16404    else
16405      # We're on a unix platform. Hooray! :)
16406      path="$CURDIR"
16407      has_space=`$ECHO "$path" | $GREP " "`
16408      if test "x$has_space" != x; then
16409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16410$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16412      fi
16413
16414      # Use eval to expand a potential ~
16415      eval path="$path"
16416      if test ! -f "$path" && test ! -d "$path"; then
16417        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16418      fi
16419
16420      if test -d "$path"; then
16421        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16422      else
16423        dir="`$DIRNAME "$path"`"
16424        base="`$BASENAME "$path"`"
16425        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16426      fi
16427    fi
16428  fi
16429
16430
16431  # Only process if variable expands to non-empty
16432
16433  if test "x$TOPDIR" != x; then
16434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16435
16436  # Input might be given as Windows format, start by converting to
16437  # unix format.
16438  path="$TOPDIR"
16439  new_path=`$CYGPATH -u "$path"`
16440
16441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16444  # "foo.exe" is OK but "foo" is an error.
16445  #
16446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16447  # It is also a way to make sure we got the proper file name for the real test later on.
16448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16449  if test "x$test_shortpath" = x; then
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16451$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16452    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16453  fi
16454
16455  # Call helper function which possibly converts this using DOS-style short mode.
16456  # If so, the updated path is stored in $new_path.
16457
16458  input_path="$new_path"
16459  # Check if we need to convert this using DOS-style short mode. If the path
16460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16461  # take no chances and rewrite it.
16462  # Note: m4 eats our [], so we need to use [ and ] instead.
16463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16464  if test "x$has_forbidden_chars" != x; then
16465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16469      # Going to short mode and back again did indeed matter. Since short mode is
16470      # case insensitive, let's make it lowercase to improve readability.
16471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16472      # Now convert it back to Unix-style (cygpath)
16473      input_path=`$CYGPATH -u "$shortmode_path"`
16474      new_path="$input_path"
16475    fi
16476  fi
16477
16478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16479  if test "x$test_cygdrive_prefix" = x; then
16480    # As a simple fix, exclude /usr/bin since it's not a real path.
16481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16483      # a path prefixed by /cygdrive for fixpath to work.
16484      new_path="$CYGWIN_ROOT_PATH$input_path"
16485    fi
16486  fi
16487
16488
16489  if test "x$path" != "x$new_path"; then
16490    TOPDIR="$new_path"
16491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16492$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16493  fi
16494
16495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16496
16497  path="$TOPDIR"
16498  has_colon=`$ECHO $path | $GREP ^.:`
16499  new_path="$path"
16500  if test "x$has_colon" = x; then
16501    # Not in mixed or Windows style, start by that.
16502    new_path=`cmd //c echo $path`
16503  fi
16504
16505
16506  input_path="$new_path"
16507  # Check if we need to convert this using DOS-style short mode. If the path
16508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16509  # take no chances and rewrite it.
16510  # Note: m4 eats our [], so we need to use [ and ] instead.
16511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16512  if test "x$has_forbidden_chars" != x; then
16513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16515  fi
16516
16517
16518  windows_path="$new_path"
16519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16520    unix_path=`$CYGPATH -u "$windows_path"`
16521    new_path="$unix_path"
16522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16524    new_path="$unix_path"
16525  fi
16526
16527  if test "x$path" != "x$new_path"; then
16528    TOPDIR="$new_path"
16529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16530$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16531  fi
16532
16533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16535
16536    else
16537      # We're on a unix platform. Hooray! :)
16538      path="$TOPDIR"
16539      has_space=`$ECHO "$path" | $GREP " "`
16540      if test "x$has_space" != x; then
16541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16542$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16544      fi
16545
16546      # Use eval to expand a potential ~
16547      eval path="$path"
16548      if test ! -f "$path" && test ! -d "$path"; then
16549        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16550      fi
16551
16552      if test -d "$path"; then
16553        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16554      else
16555        dir="`$DIRNAME "$path"`"
16556        base="`$BASENAME "$path"`"
16557        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16558      fi
16559    fi
16560  fi
16561
16562  # SRC_ROOT is a traditional alias for TOPDIR.
16563  SRC_ROOT=$TOPDIR
16564
16565  # Calculate a canonical version of TOPDIR for string comparisons
16566  CANONICAL_TOPDIR=$TOPDIR
16567
16568  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16569    # Follow a chain of symbolic links. Use readlink
16570    # where it exists, else fall back to horribly
16571    # complicated shell code.
16572    if test "x$READLINK_TESTED" != yes; then
16573      # On MacOSX there is a readlink tool with a different
16574      # purpose than the GNU readlink tool. Check the found readlink.
16575      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16576      if test "x$ISGNU" = x; then
16577        # A readlink that we do not know how to use.
16578        # Are there other non-GNU readlinks out there?
16579        READLINK_TESTED=yes
16580        READLINK=
16581      fi
16582    fi
16583
16584    if test "x$READLINK" != x; then
16585      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16586    else
16587      # Save the current directory for restoring afterwards
16588      STARTDIR=$PWD
16589      COUNTER=0
16590      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16591      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16592      cd $sym_link_dir
16593      # Use -P flag to resolve symlinks in directories.
16594      cd `$THEPWDCMD -P`
16595      sym_link_dir=`$THEPWDCMD -P`
16596      # Resolve file symlinks
16597      while test $COUNTER -lt 20; do
16598        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16599        if test "x$ISLINK" == x; then
16600          # This is not a symbolic link! We are done!
16601          break
16602        fi
16603        # Again resolve directory symlinks since the target of the just found
16604        # link could be in a different directory
16605        cd `$DIRNAME $ISLINK`
16606        sym_link_dir=`$THEPWDCMD -P`
16607        sym_link_file=`$BASENAME $ISLINK`
16608        let COUNTER=COUNTER+1
16609      done
16610      cd $STARTDIR
16611      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16612    fi
16613  fi
16614
16615
16616
16617  # Locate the directory of this script.
16618  AUTOCONF_DIR=$TOPDIR/common/autoconf
16619
16620  # Setup username (for use in adhoc version strings etc)
16621  # Outer [ ] to quote m4.
16622   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16623
16624
16625
16626# Check if it's a pure open build or if custom sources are to be used.
16627
16628  # Check whether --enable-openjdk-only was given.
16629if test "${enable_openjdk_only+set}" = set; then :
16630  enableval=$enable_openjdk_only;
16631else
16632  enable_openjdk_only="no"
16633fi
16634
16635
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16637$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16639$as_echo "$enable_openjdk_only" >&6; }
16640  if test "x$enable_openjdk_only" = "xyes"; then
16641    SUPPRESS_CUSTOM_EXTENSIONS="true"
16642  elif test "x$enable_openjdk_only" = "xno"; then
16643    SUPPRESS_CUSTOM_EXTENSIONS="false"
16644  else
16645    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16646  fi
16647
16648  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16649  # the IncludeCustomExtension macro.
16650
16651
16652# Check whether --with-custom-make-dir was given.
16653if test "${with_custom_make_dir+set}" = set; then :
16654  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
16655$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16656fi
16657
16658
16659
16660
16661# These are needed to be able to create a configuration name (and thus the output directory)
16662
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16664$as_echo_n "checking which variant of the JDK to build... " >&6; }
16665
16666# Check whether --with-jdk-variant was given.
16667if test "${with_jdk_variant+set}" = set; then :
16668  withval=$with_jdk_variant;
16669fi
16670
16671
16672  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16673    JDK_VARIANT="normal"
16674  else
16675    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16676  fi
16677
16678
16679
16680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16681$as_echo "$JDK_VARIANT" >&6; }
16682
16683
16684  DEBUG_LEVEL="release"
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16686$as_echo_n "checking which debug level to use... " >&6; }
16687  # Check whether --enable-debug was given.
16688if test "${enable_debug+set}" = set; then :
16689  enableval=$enable_debug;
16690        ENABLE_DEBUG="${enableval}"
16691        DEBUG_LEVEL="fastdebug"
16692
16693else
16694  ENABLE_DEBUG="no"
16695fi
16696
16697
16698
16699# Check whether --with-debug-level was given.
16700if test "${with_debug_level+set}" = set; then :
16701  withval=$with_debug_level;
16702        DEBUG_LEVEL="${withval}"
16703        if test "x$ENABLE_DEBUG" = xyes; then
16704          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16705        fi
16706
16707fi
16708
16709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16710$as_echo "$DEBUG_LEVEL" >&6; }
16711
16712  if test "x$DEBUG_LEVEL" != xrelease && \
16713      test "x$DEBUG_LEVEL" != xoptimized && \
16714      test "x$DEBUG_LEVEL" != xfastdebug && \
16715      test "x$DEBUG_LEVEL" != xslowdebug; then
16716    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16717  fi
16718
16719  # Translate DEBUG_LEVEL to debug level used by Hotspot
16720  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16721  if test "x$DEBUG_LEVEL" = xrelease; then
16722    HOTSPOT_DEBUG_LEVEL="product"
16723  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16724    HOTSPOT_DEBUG_LEVEL="debug"
16725  fi
16726
16727  if test "x$DEBUG_LEVEL" = xoptimized; then
16728    # The debug level 'optimized' is a little special because it is currently only
16729    # applicable to the HotSpot build where it means to build a completely
16730    # optimized version of the VM without any debugging code (like for the
16731    # 'release' debug level which is called 'product' in the HotSpot build) but
16732    # with the exception that it can contain additional code which is otherwise
16733    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16734    # test new and/or experimental features which are not intended for customer
16735    # shipment. Because these new features need to be tested and benchmarked in
16736    # real world scenarios, we want to build the containing JDK at the 'release'
16737    # debug level.
16738    DEBUG_LEVEL="release"
16739  fi
16740
16741
16742
16743
16744
16745
16746# Check whether --with-jvm-variants was given.
16747if test "${with_jvm_variants+set}" = set; then :
16748  withval=$with_jvm_variants;
16749fi
16750
16751
16752
16753
16754# Check whether --with-cpu-port was given.
16755if test "${with_cpu_port+set}" = set; then :
16756  withval=$with_cpu_port;
16757fi
16758
16759
16760  if test "x$with_cpu_port" != x; then
16761    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16762      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16763    fi
16764    if test "x$with_cpu_port" != xarm64 && \
16765        test "x$with_cpu_port" != xaarch64; then
16766      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16767    fi
16768    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16769  fi
16770
16771
16772  if test "x$with_jvm_variants" = x; then
16773    with_jvm_variants="server"
16774  fi
16775  JVM_VARIANTS_OPT="$with_jvm_variants"
16776
16777  # Has the user listed more than one variant?
16778  # Additional [] needed to keep m4 from mangling shell constructs.
16779  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16780    BUILDING_MULTIPLE_JVM_VARIANTS=true
16781  else
16782    BUILDING_MULTIPLE_JVM_VARIANTS=false
16783  fi
16784  # Replace the commas with AND for use in the build directory name.
16785  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16786
16787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16788$as_echo_n "checking which variants of the JVM to build... " >&6; }
16789  # JVM_VARIANTS is a space-separated list.
16790  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16791  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16793$as_echo "$JVM_VARIANTS" >&6; }
16794
16795  # Check that the selected variants are valid
16796
16797  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16798  # Notice that the original variant failes on SLES 10 and 11
16799  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16800  STACK=${JVM_VARIANTS// /$'\n'}
16801  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16802  if test "x$INVALID_VARIANTS" != x; then
16803    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16804$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16805    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16806  fi
16807
16808  # All "special" variants share the same output directory ("server")
16809  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16810  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16811  STACK=${JVM_VARIANTS// /$'\n'}
16812  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16813  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16814    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16815  fi
16816
16817  # The "main" variant is the one used by other libs to link against during the
16818  # build.
16819  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16820    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16821    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16822      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16823        JVM_VARIANT_MAIN="$variant"
16824        break
16825      fi
16826    done
16827  else
16828    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16829  fi
16830
16831
16832
16833
16834
16835  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16836    # zero behaves as a platform and rewrites these values. This is really weird. :(
16837    # We are guaranteed that we do not build any other variants when building zero.
16838    HOTSPOT_TARGET_CPU=zero
16839    HOTSPOT_TARGET_CPU_ARCH=zero
16840  fi
16841
16842
16843# With basic setup done, call the custom early hook.
16844
16845
16846# Check if we have devkits, extra paths or sysroot set.
16847
16848
16849# Check whether --with-devkit was given.
16850if test "${with_devkit+set}" = set; then :
16851  withval=$with_devkit;
16852
16853  # Only process if variable expands to non-empty
16854
16855  if test "x$with_devkit" != x; then
16856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857
16858  # Input might be given as Windows format, start by converting to
16859  # unix format.
16860  path="$with_devkit"
16861  new_path=`$CYGPATH -u "$path"`
16862
16863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16866  # "foo.exe" is OK but "foo" is an error.
16867  #
16868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16869  # It is also a way to make sure we got the proper file name for the real test later on.
16870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16871  if test "x$test_shortpath" = x; then
16872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16873$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16874    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16875  fi
16876
16877  # Call helper function which possibly converts this using DOS-style short mode.
16878  # If so, the updated path is stored in $new_path.
16879
16880  input_path="$new_path"
16881  # Check if we need to convert this using DOS-style short mode. If the path
16882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16883  # take no chances and rewrite it.
16884  # Note: m4 eats our [], so we need to use [ and ] instead.
16885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16886  if test "x$has_forbidden_chars" != x; then
16887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16891      # Going to short mode and back again did indeed matter. Since short mode is
16892      # case insensitive, let's make it lowercase to improve readability.
16893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16894      # Now convert it back to Unix-style (cygpath)
16895      input_path=`$CYGPATH -u "$shortmode_path"`
16896      new_path="$input_path"
16897    fi
16898  fi
16899
16900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16901  if test "x$test_cygdrive_prefix" = x; then
16902    # As a simple fix, exclude /usr/bin since it's not a real path.
16903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16905      # a path prefixed by /cygdrive for fixpath to work.
16906      new_path="$CYGWIN_ROOT_PATH$input_path"
16907    fi
16908  fi
16909
16910
16911  if test "x$path" != "x$new_path"; then
16912    with_devkit="$new_path"
16913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16914$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16915  fi
16916
16917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918
16919  path="$with_devkit"
16920  has_colon=`$ECHO $path | $GREP ^.:`
16921  new_path="$path"
16922  if test "x$has_colon" = x; then
16923    # Not in mixed or Windows style, start by that.
16924    new_path=`cmd //c echo $path`
16925  fi
16926
16927
16928  input_path="$new_path"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16937  fi
16938
16939
16940  windows_path="$new_path"
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    unix_path=`$CYGPATH -u "$windows_path"`
16943    new_path="$unix_path"
16944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946    new_path="$unix_path"
16947  fi
16948
16949  if test "x$path" != "x$new_path"; then
16950    with_devkit="$new_path"
16951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16952$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16953  fi
16954
16955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16957
16958    else
16959      # We're on a unix platform. Hooray! :)
16960      path="$with_devkit"
16961      has_space=`$ECHO "$path" | $GREP " "`
16962      if test "x$has_space" != x; then
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16964$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16966      fi
16967
16968      # Use eval to expand a potential ~
16969      eval path="$path"
16970      if test ! -f "$path" && test ! -d "$path"; then
16971        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16972      fi
16973
16974      if test -d "$path"; then
16975        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16976      else
16977        dir="`$DIRNAME "$path"`"
16978        base="`$BASENAME "$path"`"
16979        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16980      fi
16981    fi
16982  fi
16983
16984        DEVKIT_ROOT="$with_devkit"
16985        # Check for a meta data info file in the root of the devkit
16986        if test -f "$DEVKIT_ROOT/devkit.info"; then
16987          . $DEVKIT_ROOT/devkit.info
16988          # This potentially sets the following:
16989          # A descriptive name of the devkit
16990
16991  if test "x$DEVKIT_NAME" = x; then
16992    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16993  fi
16994
16995          # Corresponds to --with-extra-path
16996
16997  if test "x$DEVKIT_EXTRA_PATH" = x; then
16998    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16999  fi
17000
17001          # Corresponds to --with-toolchain-path
17002
17003  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17004    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17005  fi
17006
17007          # Corresponds to --with-sysroot
17008
17009  if test "x$DEVKIT_SYSROOT" = x; then
17010    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17011  fi
17012
17013
17014          # Identifies the Visual Studio version in the devkit
17015
17016  if test "x$DEVKIT_VS_VERSION" = x; then
17017    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17018  fi
17019
17020          # The Visual Studio include environment variable
17021
17022  if test "x$DEVKIT_VS_INCLUDE" = x; then
17023    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17024  fi
17025
17026          # The Visual Studio lib environment variable
17027
17028  if test "x$DEVKIT_VS_LIB" = x; then
17029    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17030  fi
17031
17032          # Corresponds to --with-msvcr-dll
17033
17034  if test "x$DEVKIT_MSVCR_DLL" = x; then
17035    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17036  fi
17037
17038          # Corresponds to --with-msvcp-dll
17039
17040  if test "x$DEVKIT_MSVCP_DLL" = x; then
17041    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17042  fi
17043
17044        fi
17045
17046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17047$as_echo_n "checking for devkit... " >&6; }
17048        if test "x$DEVKIT_NAME" != x; then
17049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17050$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17051        else
17052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17053$as_echo "$DEVKIT_ROOT" >&6; }
17054        fi
17055
17056
17057  if test "x$DEVKIT_EXTRA_PATH" != x; then
17058    if test "x$EXTRA_PATH" = x; then
17059      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17060    else
17061      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17062    fi
17063  fi
17064
17065
17066        # Fallback default of just /bin if DEVKIT_PATH is not defined
17067        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17068          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17069        fi
17070
17071  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17072    if test "x$TOOLCHAIN_PATH" = x; then
17073      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17074    else
17075      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17076    fi
17077  fi
17078
17079
17080        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17081        # places for backwards compatiblity.
17082        if test "x$DEVKIT_SYSROOT" != x; then
17083          SYSROOT="$DEVKIT_SYSROOT"
17084        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17085          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17086        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17087          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17088        fi
17089
17090
17091fi
17092
17093
17094  # You can force the sysroot if the sysroot encoded into the compiler tools
17095  # is not correct.
17096
17097# Check whether --with-sys-root was given.
17098if test "${with_sys_root+set}" = set; then :
17099  withval=$with_sys_root; SYSROOT=$with_sys_root
17100
17101fi
17102
17103
17104
17105# Check whether --with-sysroot was given.
17106if test "${with_sysroot+set}" = set; then :
17107  withval=$with_sysroot; SYSROOT=$with_sysroot
17108
17109fi
17110
17111
17112
17113# Check whether --with-tools-dir was given.
17114if test "${with_tools_dir+set}" = set; then :
17115  withval=$with_tools_dir;
17116  if test "x$with_tools_dir" != x; then
17117    if test "x$TOOLCHAIN_PATH" = x; then
17118      TOOLCHAIN_PATH="$with_tools_dir"
17119    else
17120      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17121    fi
17122  fi
17123
17124
17125fi
17126
17127
17128
17129# Check whether --with-toolchain-path was given.
17130if test "${with_toolchain_path+set}" = set; then :
17131  withval=$with_toolchain_path;
17132  if test "x$with_toolchain_path" != x; then
17133    if test "x$TOOLCHAIN_PATH" = x; then
17134      TOOLCHAIN_PATH="$with_toolchain_path"
17135    else
17136      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17137    fi
17138  fi
17139
17140
17141fi
17142
17143
17144
17145# Check whether --with-extra-path was given.
17146if test "${with_extra_path+set}" = set; then :
17147  withval=$with_extra_path;
17148  if test "x$with_extra_path" != x; then
17149    if test "x$EXTRA_PATH" = x; then
17150      EXTRA_PATH="$with_extra_path"
17151    else
17152      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17153    fi
17154  fi
17155
17156
17157fi
17158
17159
17160  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17161    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17162    # If not, detect if Xcode is installed by running xcodebuild -version
17163    # if no Xcode installed, xcodebuild exits with 1
17164    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17165    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17166      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17167      # fall back on the stub binary in /usr/bin/xcodebuild
17168      # Extract the first word of "xcodebuild", so it can be a program name with args.
17169set dummy xcodebuild; ac_word=$2
17170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17171$as_echo_n "checking for $ac_word... " >&6; }
17172if ${ac_cv_path_XCODEBUILD+:} false; then :
17173  $as_echo_n "(cached) " >&6
17174else
17175  case $XCODEBUILD in
17176  [\\/]* | ?:[\\/]*)
17177  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17178  ;;
17179  *)
17180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17181for as_dir in $TOOLCHAIN_PATH
17182do
17183  IFS=$as_save_IFS
17184  test -z "$as_dir" && as_dir=.
17185    for ac_exec_ext in '' $ac_executable_extensions; do
17186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17187    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17189    break 2
17190  fi
17191done
17192  done
17193IFS=$as_save_IFS
17194
17195  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17196  ;;
17197esac
17198fi
17199XCODEBUILD=$ac_cv_path_XCODEBUILD
17200if test -n "$XCODEBUILD"; then
17201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17202$as_echo "$XCODEBUILD" >&6; }
17203else
17204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17205$as_echo "no" >&6; }
17206fi
17207
17208
17209    else
17210      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17211      # when only the command line tools are installed there are no SDKs, so headers
17212      # are copied into the system frameworks
17213      XCODEBUILD=
17214
17215    fi
17216
17217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17218$as_echo_n "checking for sdk name... " >&6; }
17219
17220# Check whether --with-sdk-name was given.
17221if test "${with_sdk_name+set}" = set; then :
17222  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17223
17224fi
17225
17226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17227$as_echo "$SDKNAME" >&6; }
17228
17229    # if toolchain path is specified then don't rely on system headers, they may not compile
17230    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17231    test -z "$TOOLCHAIN_PATH" && \
17232      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17233
17234    if test -z "$SYSROOT"; then
17235      if test -n "$XCODEBUILD"; then
17236        # if we don't have system headers, use default SDK name (last resort)
17237        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17238          SDKNAME=${SDKNAME:-macosx}
17239        fi
17240
17241        if test -n "$SDKNAME"; then
17242          # Call xcodebuild to determine SYSROOT
17243          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17244        fi
17245      else
17246        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17247          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
17248        fi
17249      fi
17250    else
17251      # warn user if --with-sdk-name was also set
17252      if test -n "$with_sdk_name"; then
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17254$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17255      fi
17256    fi
17257
17258    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17259      # If no system framework headers, then SYSROOT must be set, or we won't build
17260      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
17261    fi
17262
17263    # Perform a basic sanity test
17264    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17265      if test -z "$SYSROOT"; then
17266        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
17267      else
17268        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17269      fi
17270    fi
17271
17272    # set SDKROOT too, Xcode tools will pick it up
17273    SDKROOT=$SYSROOT
17274
17275  fi
17276
17277  # Prepend the extra path to the global path
17278
17279  if test "x$EXTRA_PATH" != x; then
17280    if test "x$PATH" = x; then
17281      PATH="$EXTRA_PATH"
17282    else
17283      PATH="$EXTRA_PATH:$PATH"
17284    fi
17285  fi
17286
17287
17288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17289$as_echo_n "checking for sysroot... " >&6; }
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17291$as_echo "$SYSROOT" >&6; }
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17293$as_echo_n "checking for toolchain path... " >&6; }
17294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17295$as_echo "$TOOLCHAIN_PATH" >&6; }
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17297$as_echo_n "checking for extra path... " >&6; }
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17299$as_echo "$EXTRA_PATH" >&6; }
17300
17301
17302# To properly create a configuration name, we need to have the OpenJDK target
17303# and options (variants and debug level) parsed.
17304
17305
17306
17307# Check whether --with-conf-name was given.
17308if test "${with_conf_name+set}" = set; then :
17309  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17310fi
17311
17312
17313  # Test from where we are running configure, in or outside of src root.
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17315$as_echo_n "checking where to store configuration... " >&6; }
17316  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17317      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17318      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17319    # We are running configure from the src root.
17320    # Create a default ./build/target-variant-debuglevel output root.
17321    if test "x${CONF_NAME}" = x; then
17322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17323$as_echo "in default location" >&6; }
17324      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17325    else
17326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17327$as_echo "in build directory with custom name" >&6; }
17328    fi
17329    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17330    $MKDIR -p "$OUTPUT_ROOT"
17331    if test ! -d "$OUTPUT_ROOT"; then
17332      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17333    fi
17334  else
17335    # We are running configure from outside of the src dir.
17336    # Then use the current directory as output dir!
17337    # If configuration is situated in normal build directory, just use the build
17338    # directory name as configuration name, otherwise use the complete path.
17339    if test "x${CONF_NAME}" = x; then
17340      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17341    fi
17342    OUTPUT_ROOT="$CURDIR"
17343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17344$as_echo "in current directory" >&6; }
17345
17346    # WARNING: This might be a bad thing to do. You need to be sure you want to
17347    # have a configuration in this directory. Do some sanity checks!
17348
17349    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17350      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17351      # other files
17352      files_present=`$LS $OUTPUT_ROOT`
17353      # Configure has already touched config.log and confdefs.h in the current dir when this check
17354      # is performed.
17355      filtered_files=`$ECHO "$files_present" \
17356          | $SED -e 's/config.log//g' \
17357              -e 's/configure.log//g' \
17358              -e 's/confdefs.h//g' \
17359              -e 's/ //g' \
17360          | $TR -d '\n'`
17361      if test "x$filtered_files" != x; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17363$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17364        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17365$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17366        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17367$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17368        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17369$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17371$as_echo "$as_me: seriously mess up just about everything." >&6;}
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17373$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17375$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17376        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17377      fi
17378    fi
17379  fi
17380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17381$as_echo_n "checking what configuration name to use... " >&6; }
17382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17383$as_echo "$CONF_NAME" >&6; }
17384
17385
17386  # Only process if variable expands to non-empty
17387
17388  if test "x$OUTPUT_ROOT" != x; then
17389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390
17391  # Input might be given as Windows format, start by converting to
17392  # unix format.
17393  path="$OUTPUT_ROOT"
17394  new_path=`$CYGPATH -u "$path"`
17395
17396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17399  # "foo.exe" is OK but "foo" is an error.
17400  #
17401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17402  # It is also a way to make sure we got the proper file name for the real test later on.
17403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17404  if test "x$test_shortpath" = x; then
17405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17406$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17407    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17408  fi
17409
17410  # Call helper function which possibly converts this using DOS-style short mode.
17411  # If so, the updated path is stored in $new_path.
17412
17413  input_path="$new_path"
17414  # Check if we need to convert this using DOS-style short mode. If the path
17415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17416  # take no chances and rewrite it.
17417  # Note: m4 eats our [], so we need to use [ and ] instead.
17418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17419  if test "x$has_forbidden_chars" != x; then
17420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17424      # Going to short mode and back again did indeed matter. Since short mode is
17425      # case insensitive, let's make it lowercase to improve readability.
17426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17427      # Now convert it back to Unix-style (cygpath)
17428      input_path=`$CYGPATH -u "$shortmode_path"`
17429      new_path="$input_path"
17430    fi
17431  fi
17432
17433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17434  if test "x$test_cygdrive_prefix" = x; then
17435    # As a simple fix, exclude /usr/bin since it's not a real path.
17436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17438      # a path prefixed by /cygdrive for fixpath to work.
17439      new_path="$CYGWIN_ROOT_PATH$input_path"
17440    fi
17441  fi
17442
17443
17444  if test "x$path" != "x$new_path"; then
17445    OUTPUT_ROOT="$new_path"
17446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17447$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17448  fi
17449
17450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17451
17452  path="$OUTPUT_ROOT"
17453  has_colon=`$ECHO $path | $GREP ^.:`
17454  new_path="$path"
17455  if test "x$has_colon" = x; then
17456    # Not in mixed or Windows style, start by that.
17457    new_path=`cmd //c echo $path`
17458  fi
17459
17460
17461  input_path="$new_path"
17462  # Check if we need to convert this using DOS-style short mode. If the path
17463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17464  # take no chances and rewrite it.
17465  # Note: m4 eats our [], so we need to use [ and ] instead.
17466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17467  if test "x$has_forbidden_chars" != x; then
17468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17470  fi
17471
17472
17473  windows_path="$new_path"
17474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17475    unix_path=`$CYGPATH -u "$windows_path"`
17476    new_path="$unix_path"
17477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17479    new_path="$unix_path"
17480  fi
17481
17482  if test "x$path" != "x$new_path"; then
17483    OUTPUT_ROOT="$new_path"
17484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17485$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17486  fi
17487
17488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17490
17491    else
17492      # We're on a unix platform. Hooray! :)
17493      path="$OUTPUT_ROOT"
17494      has_space=`$ECHO "$path" | $GREP " "`
17495      if test "x$has_space" != x; then
17496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17497$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17499      fi
17500
17501      # Use eval to expand a potential ~
17502      eval path="$path"
17503      if test ! -f "$path" && test ! -d "$path"; then
17504        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17505      fi
17506
17507      if test -d "$path"; then
17508        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17509      else
17510        dir="`$DIRNAME "$path"`"
17511        base="`$BASENAME "$path"`"
17512        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17513      fi
17514    fi
17515  fi
17516
17517
17518  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17519  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17520
17521  SPEC=$OUTPUT_ROOT/spec.gmk
17522
17523  CONF_NAME=$CONF_NAME
17524
17525  OUTPUT_ROOT=$OUTPUT_ROOT
17526
17527
17528
17529  # The spec.gmk file contains all variables for the make system.
17530  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17531
17532  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17533  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17534
17535  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17536  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17537
17538  # The compare.sh is used to compare the build output to other builds.
17539  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17540
17541  # The generated Makefile knows where the spec.gmk is and where the source is.
17542  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17543  # which will look for generated configurations
17544  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17545
17546
17547
17548# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17549
17550  for ac_prog in apt-get yum port pkgutil pkgadd
17551do
17552  # Extract the first word of "$ac_prog", so it can be a program name with args.
17553set dummy $ac_prog; ac_word=$2
17554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555$as_echo_n "checking for $ac_word... " >&6; }
17556if ${ac_cv_prog_PKGHANDLER+:} false; then :
17557  $as_echo_n "(cached) " >&6
17558else
17559  if test -n "$PKGHANDLER"; then
17560  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17561else
17562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17563for as_dir in $PATH
17564do
17565  IFS=$as_save_IFS
17566  test -z "$as_dir" && as_dir=.
17567    for ac_exec_ext in '' $ac_executable_extensions; do
17568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17569    ac_cv_prog_PKGHANDLER="$ac_prog"
17570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17571    break 2
17572  fi
17573done
17574  done
17575IFS=$as_save_IFS
17576
17577fi
17578fi
17579PKGHANDLER=$ac_cv_prog_PKGHANDLER
17580if test -n "$PKGHANDLER"; then
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17582$as_echo "$PKGHANDLER" >&6; }
17583else
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17585$as_echo "no" >&6; }
17586fi
17587
17588
17589  test -n "$PKGHANDLER" && break
17590done
17591
17592
17593
17594# Setup tools that requires more complex handling, or that is not needed by the configure script.
17595
17596
17597
17598  # Publish this variable in the help.
17599
17600
17601  if [ -z "${MAKE+x}" ]; then
17602    # The variable is not set by user, try to locate tool using the code snippet
17603
17604    # Try our hardest to locate a correct version of GNU make
17605    for ac_prog in gmake
17606do
17607  # Extract the first word of "$ac_prog", so it can be a program name with args.
17608set dummy $ac_prog; ac_word=$2
17609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17610$as_echo_n "checking for $ac_word... " >&6; }
17611if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17612  $as_echo_n "(cached) " >&6
17613else
17614  case $CHECK_GMAKE in
17615  [\\/]* | ?:[\\/]*)
17616  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17617  ;;
17618  *)
17619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17620for as_dir in $PATH
17621do
17622  IFS=$as_save_IFS
17623  test -z "$as_dir" && as_dir=.
17624    for ac_exec_ext in '' $ac_executable_extensions; do
17625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17626    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17628    break 2
17629  fi
17630done
17631  done
17632IFS=$as_save_IFS
17633
17634  ;;
17635esac
17636fi
17637CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17638if test -n "$CHECK_GMAKE"; then
17639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17640$as_echo "$CHECK_GMAKE" >&6; }
17641else
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17643$as_echo "no" >&6; }
17644fi
17645
17646
17647  test -n "$CHECK_GMAKE" && break
17648done
17649
17650
17651  MAKE_CANDIDATE=""$CHECK_GMAKE""
17652  DESCRIPTION="gmake in PATH"
17653
17654  # On Cygwin, we require a newer version of make than on other platforms
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656    MAKE_VERSION_EXPR="-e 4\."
17657    MAKE_REQUIRED_VERSION="4.0"
17658   else
17659    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17660    MAKE_REQUIRED_VERSION="3.81"
17661  fi
17662
17663  if test "x$MAKE_CANDIDATE" != x; then
17664    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17665$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17666    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17667    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17668    if test "x$IS_GNU_MAKE" = x; then
17669      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17670$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17671    else
17672      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17673      if test "x$IS_MODERN_MAKE" = x; then
17674        { $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
17675$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;}
17676      else
17677        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17678          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679            MAKE_EXPECTED_ENV='cygwin'
17680          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17681            MAKE_EXPECTED_ENV='msys'
17682          else
17683            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17684          fi
17685          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17686          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17687        else
17688          # Not relevant for non-Windows
17689          IS_MAKE_CORRECT_ENV=true
17690        fi
17691        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17692          { $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
17693$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;}
17694        else
17695          FOUND_MAKE=$MAKE_CANDIDATE
17696
17697  # Only process if variable expands to non-empty
17698
17699  if test "x$FOUND_MAKE" != x; then
17700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17701
17702  # First separate the path from the arguments. This will split at the first
17703  # space.
17704  complete="$FOUND_MAKE"
17705  path="${complete%% *}"
17706  tmp="$complete EOL"
17707  arguments="${tmp#* }"
17708
17709  # Input might be given as Windows format, start by converting to
17710  # unix format.
17711  new_path=`$CYGPATH -u "$path"`
17712
17713  # Now try to locate executable using which
17714  new_path=`$WHICH "$new_path" 2> /dev/null`
17715  # bat and cmd files are not always considered executable in cygwin causing which
17716  # to not find them
17717  if test "x$new_path" = x \
17718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17720    new_path=`$CYGPATH -u "$path"`
17721  fi
17722  if test "x$new_path" = x; then
17723    # Oops. Which didn't find the executable.
17724    # The splitting of arguments from the executable at a space might have been incorrect,
17725    # since paths with space are more likely in Windows. Give it another try with the whole
17726    # argument.
17727    path="$complete"
17728    arguments="EOL"
17729    new_path=`$CYGPATH -u "$path"`
17730    new_path=`$WHICH "$new_path" 2> /dev/null`
17731    # bat and cmd files are not always considered executable in cygwin causing which
17732    # to not find them
17733    if test "x$new_path" = x \
17734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17736      new_path=`$CYGPATH -u "$path"`
17737    fi
17738    if test "x$new_path" = x; then
17739      # It's still not found. Now this is an unrecoverable error.
17740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17742      has_space=`$ECHO "$complete" | $GREP " "`
17743      if test "x$has_space" != x; then
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17746      fi
17747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17748    fi
17749  fi
17750
17751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17754  # "foo.exe" is OK but "foo" is an error.
17755  #
17756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17757  # It is also a way to make sure we got the proper file name for the real test later on.
17758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17759  if test "x$test_shortpath" = x; then
17760    # Short path failed, file does not exist as specified.
17761    # Try adding .exe or .cmd
17762    if test -f "${new_path}.exe"; then
17763      input_to_shortpath="${new_path}.exe"
17764    elif test -f "${new_path}.cmd"; then
17765      input_to_shortpath="${new_path}.cmd"
17766    else
17767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17772    fi
17773  else
17774    input_to_shortpath="$new_path"
17775  fi
17776
17777  # Call helper function which possibly converts this using DOS-style short mode.
17778  # If so, the updated path is stored in $new_path.
17779  new_path="$input_to_shortpath"
17780
17781  input_path="$input_to_shortpath"
17782  # Check if we need to convert this using DOS-style short mode. If the path
17783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17784  # take no chances and rewrite it.
17785  # Note: m4 eats our [], so we need to use [ and ] instead.
17786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17787  if test "x$has_forbidden_chars" != x; then
17788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17792      # Going to short mode and back again did indeed matter. Since short mode is
17793      # case insensitive, let's make it lowercase to improve readability.
17794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17795      # Now convert it back to Unix-style (cygpath)
17796      input_path=`$CYGPATH -u "$shortmode_path"`
17797      new_path="$input_path"
17798    fi
17799  fi
17800
17801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17802  if test "x$test_cygdrive_prefix" = x; then
17803    # As a simple fix, exclude /usr/bin since it's not a real path.
17804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17806      # a path prefixed by /cygdrive for fixpath to work.
17807      new_path="$CYGWIN_ROOT_PATH$input_path"
17808    fi
17809  fi
17810
17811  # remove trailing .exe if any
17812  new_path="${new_path/%.exe/}"
17813
17814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17815
17816  # First separate the path from the arguments. This will split at the first
17817  # space.
17818  complete="$FOUND_MAKE"
17819  path="${complete%% *}"
17820  tmp="$complete EOL"
17821  arguments="${tmp#* }"
17822
17823  # Input might be given as Windows format, start by converting to
17824  # unix format.
17825  new_path="$path"
17826
17827  windows_path="$new_path"
17828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17829    unix_path=`$CYGPATH -u "$windows_path"`
17830    new_path="$unix_path"
17831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17833    new_path="$unix_path"
17834  fi
17835
17836
17837  # Now try to locate executable using which
17838  new_path=`$WHICH "$new_path" 2> /dev/null`
17839
17840  if test "x$new_path" = x; then
17841    # Oops. Which didn't find the executable.
17842    # The splitting of arguments from the executable at a space might have been incorrect,
17843    # since paths with space are more likely in Windows. Give it another try with the whole
17844    # argument.
17845    path="$complete"
17846    arguments="EOL"
17847    new_path="$path"
17848
17849  windows_path="$new_path"
17850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17851    unix_path=`$CYGPATH -u "$windows_path"`
17852    new_path="$unix_path"
17853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17855    new_path="$unix_path"
17856  fi
17857
17858
17859    new_path=`$WHICH "$new_path" 2> /dev/null`
17860    # bat and cmd files are not always considered executable in MSYS causing which
17861    # to not find them
17862    if test "x$new_path" = x \
17863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17865      new_path="$path"
17866
17867  windows_path="$new_path"
17868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869    unix_path=`$CYGPATH -u "$windows_path"`
17870    new_path="$unix_path"
17871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17873    new_path="$unix_path"
17874  fi
17875
17876    fi
17877
17878    if test "x$new_path" = x; then
17879      # It's still not found. Now this is an unrecoverable error.
17880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17882      has_space=`$ECHO "$complete" | $GREP " "`
17883      if test "x$has_space" != x; then
17884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17886      fi
17887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17888    fi
17889  fi
17890
17891  # Now new_path has a complete unix path to the binary
17892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17893    # Keep paths in /bin as-is, but remove trailing .exe if any
17894    new_path="${new_path/%.exe/}"
17895    # Do not save /bin paths to all_fixpath_prefixes!
17896  else
17897    # Not in mixed or Windows style, start by that.
17898    new_path=`cmd //c echo $new_path`
17899
17900  input_path="$new_path"
17901  # Check if we need to convert this using DOS-style short mode. If the path
17902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17903  # take no chances and rewrite it.
17904  # Note: m4 eats our [], so we need to use [ and ] instead.
17905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17906  if test "x$has_forbidden_chars" != x; then
17907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17909  fi
17910
17911    # Output is in $new_path
17912
17913  windows_path="$new_path"
17914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17915    unix_path=`$CYGPATH -u "$windows_path"`
17916    new_path="$unix_path"
17917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17919    new_path="$unix_path"
17920  fi
17921
17922    # remove trailing .exe if any
17923    new_path="${new_path/%.exe/}"
17924
17925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17927  fi
17928
17929    else
17930      # We're on a unix platform. Hooray! :)
17931      # First separate the path from the arguments. This will split at the first
17932      # space.
17933      complete="$FOUND_MAKE"
17934      path="${complete%% *}"
17935      tmp="$complete EOL"
17936      arguments="${tmp#* }"
17937
17938      # Cannot rely on the command "which" here since it doesn't always work.
17939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17940      if test -z "$is_absolute_path"; then
17941        # Path to executable is not absolute. Find it.
17942        IFS_save="$IFS"
17943        IFS=:
17944        for p in $PATH; do
17945          if test -f "$p/$path" && test -x "$p/$path"; then
17946            new_path="$p/$path"
17947            break
17948          fi
17949        done
17950        IFS="$IFS_save"
17951      else
17952        # This is an absolute path, we can use it without further modifications.
17953        new_path="$path"
17954      fi
17955
17956      if test "x$new_path" = x; then
17957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17959        has_space=`$ECHO "$complete" | $GREP " "`
17960        if test "x$has_space" != x; then
17961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17963        fi
17964        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17965      fi
17966    fi
17967
17968    # Now join together the path and the arguments once again
17969    if test "x$arguments" != xEOL; then
17970      new_complete="$new_path ${arguments% *}"
17971    else
17972      new_complete="$new_path"
17973    fi
17974
17975    if test "x$complete" != "x$new_complete"; then
17976      FOUND_MAKE="$new_complete"
17977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17978$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17979    fi
17980  fi
17981
17982        fi
17983      fi
17984    fi
17985  fi
17986
17987
17988    if test "x$FOUND_MAKE" = x; then
17989      for ac_prog in make
17990do
17991  # Extract the first word of "$ac_prog", so it can be a program name with args.
17992set dummy $ac_prog; ac_word=$2
17993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17994$as_echo_n "checking for $ac_word... " >&6; }
17995if ${ac_cv_path_CHECK_MAKE+:} false; then :
17996  $as_echo_n "(cached) " >&6
17997else
17998  case $CHECK_MAKE in
17999  [\\/]* | ?:[\\/]*)
18000  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18001  ;;
18002  *)
18003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18004for as_dir in $PATH
18005do
18006  IFS=$as_save_IFS
18007  test -z "$as_dir" && as_dir=.
18008    for ac_exec_ext in '' $ac_executable_extensions; do
18009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18010    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18012    break 2
18013  fi
18014done
18015  done
18016IFS=$as_save_IFS
18017
18018  ;;
18019esac
18020fi
18021CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18022if test -n "$CHECK_MAKE"; then
18023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18024$as_echo "$CHECK_MAKE" >&6; }
18025else
18026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18027$as_echo "no" >&6; }
18028fi
18029
18030
18031  test -n "$CHECK_MAKE" && break
18032done
18033
18034
18035  MAKE_CANDIDATE=""$CHECK_MAKE""
18036  DESCRIPTION="make in PATH"
18037
18038  # On Cygwin, we require a newer version of make than on other platforms
18039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18040    MAKE_VERSION_EXPR="-e 4\."
18041    MAKE_REQUIRED_VERSION="4.0"
18042   else
18043    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18044    MAKE_REQUIRED_VERSION="3.81"
18045  fi
18046
18047  if test "x$MAKE_CANDIDATE" != x; then
18048    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18049$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18050    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18051    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18052    if test "x$IS_GNU_MAKE" = x; then
18053      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18054$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18055    else
18056      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18057      if test "x$IS_MODERN_MAKE" = x; then
18058        { $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
18059$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;}
18060      else
18061        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18062          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063            MAKE_EXPECTED_ENV='cygwin'
18064          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18065            MAKE_EXPECTED_ENV='msys'
18066          else
18067            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18068          fi
18069          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18070          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18071        else
18072          # Not relevant for non-Windows
18073          IS_MAKE_CORRECT_ENV=true
18074        fi
18075        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18076          { $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
18077$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;}
18078        else
18079          FOUND_MAKE=$MAKE_CANDIDATE
18080
18081  # Only process if variable expands to non-empty
18082
18083  if test "x$FOUND_MAKE" != x; then
18084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085
18086  # First separate the path from the arguments. This will split at the first
18087  # space.
18088  complete="$FOUND_MAKE"
18089  path="${complete%% *}"
18090  tmp="$complete EOL"
18091  arguments="${tmp#* }"
18092
18093  # Input might be given as Windows format, start by converting to
18094  # unix format.
18095  new_path=`$CYGPATH -u "$path"`
18096
18097  # Now try to locate executable using which
18098  new_path=`$WHICH "$new_path" 2> /dev/null`
18099  # bat and cmd files are not always considered executable in cygwin causing which
18100  # to not find them
18101  if test "x$new_path" = x \
18102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18104    new_path=`$CYGPATH -u "$path"`
18105  fi
18106  if test "x$new_path" = x; then
18107    # Oops. Which didn't find the executable.
18108    # The splitting of arguments from the executable at a space might have been incorrect,
18109    # since paths with space are more likely in Windows. Give it another try with the whole
18110    # argument.
18111    path="$complete"
18112    arguments="EOL"
18113    new_path=`$CYGPATH -u "$path"`
18114    new_path=`$WHICH "$new_path" 2> /dev/null`
18115    # bat and cmd files are not always considered executable in cygwin causing which
18116    # to not find them
18117    if test "x$new_path" = x \
18118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18120      new_path=`$CYGPATH -u "$path"`
18121    fi
18122    if test "x$new_path" = x; then
18123      # It's still not found. Now this is an unrecoverable error.
18124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18126      has_space=`$ECHO "$complete" | $GREP " "`
18127      if test "x$has_space" != x; then
18128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18130      fi
18131      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18132    fi
18133  fi
18134
18135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18138  # "foo.exe" is OK but "foo" is an error.
18139  #
18140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18141  # It is also a way to make sure we got the proper file name for the real test later on.
18142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18143  if test "x$test_shortpath" = x; then
18144    # Short path failed, file does not exist as specified.
18145    # Try adding .exe or .cmd
18146    if test -f "${new_path}.exe"; then
18147      input_to_shortpath="${new_path}.exe"
18148    elif test -f "${new_path}.cmd"; then
18149      input_to_shortpath="${new_path}.cmd"
18150    else
18151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18152$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18156    fi
18157  else
18158    input_to_shortpath="$new_path"
18159  fi
18160
18161  # Call helper function which possibly converts this using DOS-style short mode.
18162  # If so, the updated path is stored in $new_path.
18163  new_path="$input_to_shortpath"
18164
18165  input_path="$input_to_shortpath"
18166  # Check if we need to convert this using DOS-style short mode. If the path
18167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18168  # take no chances and rewrite it.
18169  # Note: m4 eats our [], so we need to use [ and ] instead.
18170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18171  if test "x$has_forbidden_chars" != x; then
18172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18176      # Going to short mode and back again did indeed matter. Since short mode is
18177      # case insensitive, let's make it lowercase to improve readability.
18178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18179      # Now convert it back to Unix-style (cygpath)
18180      input_path=`$CYGPATH -u "$shortmode_path"`
18181      new_path="$input_path"
18182    fi
18183  fi
18184
18185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18186  if test "x$test_cygdrive_prefix" = x; then
18187    # As a simple fix, exclude /usr/bin since it's not a real path.
18188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18190      # a path prefixed by /cygdrive for fixpath to work.
18191      new_path="$CYGWIN_ROOT_PATH$input_path"
18192    fi
18193  fi
18194
18195  # remove trailing .exe if any
18196  new_path="${new_path/%.exe/}"
18197
18198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18199
18200  # First separate the path from the arguments. This will split at the first
18201  # space.
18202  complete="$FOUND_MAKE"
18203  path="${complete%% *}"
18204  tmp="$complete EOL"
18205  arguments="${tmp#* }"
18206
18207  # Input might be given as Windows format, start by converting to
18208  # unix format.
18209  new_path="$path"
18210
18211  windows_path="$new_path"
18212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18213    unix_path=`$CYGPATH -u "$windows_path"`
18214    new_path="$unix_path"
18215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18217    new_path="$unix_path"
18218  fi
18219
18220
18221  # Now try to locate executable using which
18222  new_path=`$WHICH "$new_path" 2> /dev/null`
18223
18224  if test "x$new_path" = x; then
18225    # Oops. Which didn't find the executable.
18226    # The splitting of arguments from the executable at a space might have been incorrect,
18227    # since paths with space are more likely in Windows. Give it another try with the whole
18228    # argument.
18229    path="$complete"
18230    arguments="EOL"
18231    new_path="$path"
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242
18243    new_path=`$WHICH "$new_path" 2> /dev/null`
18244    # bat and cmd files are not always considered executable in MSYS causing which
18245    # to not find them
18246    if test "x$new_path" = x \
18247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18249      new_path="$path"
18250
18251  windows_path="$new_path"
18252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253    unix_path=`$CYGPATH -u "$windows_path"`
18254    new_path="$unix_path"
18255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18257    new_path="$unix_path"
18258  fi
18259
18260    fi
18261
18262    if test "x$new_path" = x; then
18263      # It's still not found. Now this is an unrecoverable error.
18264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18265$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18266      has_space=`$ECHO "$complete" | $GREP " "`
18267      if test "x$has_space" != x; then
18268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18270      fi
18271      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18272    fi
18273  fi
18274
18275  # Now new_path has a complete unix path to the binary
18276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18277    # Keep paths in /bin as-is, but remove trailing .exe if any
18278    new_path="${new_path/%.exe/}"
18279    # Do not save /bin paths to all_fixpath_prefixes!
18280  else
18281    # Not in mixed or Windows style, start by that.
18282    new_path=`cmd //c echo $new_path`
18283
18284  input_path="$new_path"
18285  # Check if we need to convert this using DOS-style short mode. If the path
18286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18287  # take no chances and rewrite it.
18288  # Note: m4 eats our [], so we need to use [ and ] instead.
18289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18290  if test "x$has_forbidden_chars" != x; then
18291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18293  fi
18294
18295    # Output is in $new_path
18296
18297  windows_path="$new_path"
18298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18299    unix_path=`$CYGPATH -u "$windows_path"`
18300    new_path="$unix_path"
18301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18303    new_path="$unix_path"
18304  fi
18305
18306    # remove trailing .exe if any
18307    new_path="${new_path/%.exe/}"
18308
18309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18311  fi
18312
18313    else
18314      # We're on a unix platform. Hooray! :)
18315      # First separate the path from the arguments. This will split at the first
18316      # space.
18317      complete="$FOUND_MAKE"
18318      path="${complete%% *}"
18319      tmp="$complete EOL"
18320      arguments="${tmp#* }"
18321
18322      # Cannot rely on the command "which" here since it doesn't always work.
18323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18324      if test -z "$is_absolute_path"; then
18325        # Path to executable is not absolute. Find it.
18326        IFS_save="$IFS"
18327        IFS=:
18328        for p in $PATH; do
18329          if test -f "$p/$path" && test -x "$p/$path"; then
18330            new_path="$p/$path"
18331            break
18332          fi
18333        done
18334        IFS="$IFS_save"
18335      else
18336        # This is an absolute path, we can use it without further modifications.
18337        new_path="$path"
18338      fi
18339
18340      if test "x$new_path" = x; then
18341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18343        has_space=`$ECHO "$complete" | $GREP " "`
18344        if test "x$has_space" != x; then
18345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18347        fi
18348        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18349      fi
18350    fi
18351
18352    # Now join together the path and the arguments once again
18353    if test "x$arguments" != xEOL; then
18354      new_complete="$new_path ${arguments% *}"
18355    else
18356      new_complete="$new_path"
18357    fi
18358
18359    if test "x$complete" != "x$new_complete"; then
18360      FOUND_MAKE="$new_complete"
18361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18362$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18363    fi
18364  fi
18365
18366        fi
18367      fi
18368    fi
18369  fi
18370
18371    fi
18372
18373    if test "x$FOUND_MAKE" = x; then
18374      if test "x$TOOLCHAIN_PATH" != x; then
18375        # We have a toolchain path, check that as well before giving up.
18376        OLD_PATH=$PATH
18377        PATH=$TOOLCHAIN_PATH:$PATH
18378        for ac_prog in gmake
18379do
18380  # Extract the first word of "$ac_prog", so it can be a program name with args.
18381set dummy $ac_prog; ac_word=$2
18382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18383$as_echo_n "checking for $ac_word... " >&6; }
18384if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18385  $as_echo_n "(cached) " >&6
18386else
18387  case $CHECK_TOOLSDIR_GMAKE in
18388  [\\/]* | ?:[\\/]*)
18389  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18390  ;;
18391  *)
18392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18393for as_dir in $PATH
18394do
18395  IFS=$as_save_IFS
18396  test -z "$as_dir" && as_dir=.
18397    for ac_exec_ext in '' $ac_executable_extensions; do
18398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18399    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18401    break 2
18402  fi
18403done
18404  done
18405IFS=$as_save_IFS
18406
18407  ;;
18408esac
18409fi
18410CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18411if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18413$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18421done
18422
18423
18424  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18425  DESCRIPTION="gmake in tools-dir"
18426
18427  # On Cygwin, we require a newer version of make than on other platforms
18428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18429    MAKE_VERSION_EXPR="-e 4\."
18430    MAKE_REQUIRED_VERSION="4.0"
18431   else
18432    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18433    MAKE_REQUIRED_VERSION="3.81"
18434  fi
18435
18436  if test "x$MAKE_CANDIDATE" != x; then
18437    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18438$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18439    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18440    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18441    if test "x$IS_GNU_MAKE" = x; then
18442      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18443$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18444    else
18445      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18446      if test "x$IS_MODERN_MAKE" = x; then
18447        { $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
18448$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;}
18449      else
18450        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18451          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18452            MAKE_EXPECTED_ENV='cygwin'
18453          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18454            MAKE_EXPECTED_ENV='msys'
18455          else
18456            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18457          fi
18458          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18459          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18460        else
18461          # Not relevant for non-Windows
18462          IS_MAKE_CORRECT_ENV=true
18463        fi
18464        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18465          { $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
18466$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;}
18467        else
18468          FOUND_MAKE=$MAKE_CANDIDATE
18469
18470  # Only process if variable expands to non-empty
18471
18472  if test "x$FOUND_MAKE" != x; then
18473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18474
18475  # First separate the path from the arguments. This will split at the first
18476  # space.
18477  complete="$FOUND_MAKE"
18478  path="${complete%% *}"
18479  tmp="$complete EOL"
18480  arguments="${tmp#* }"
18481
18482  # Input might be given as Windows format, start by converting to
18483  # unix format.
18484  new_path=`$CYGPATH -u "$path"`
18485
18486  # Now try to locate executable using which
18487  new_path=`$WHICH "$new_path" 2> /dev/null`
18488  # bat and cmd files are not always considered executable in cygwin causing which
18489  # to not find them
18490  if test "x$new_path" = x \
18491      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18492      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18493    new_path=`$CYGPATH -u "$path"`
18494  fi
18495  if test "x$new_path" = x; then
18496    # Oops. Which didn't find the executable.
18497    # The splitting of arguments from the executable at a space might have been incorrect,
18498    # since paths with space are more likely in Windows. Give it another try with the whole
18499    # argument.
18500    path="$complete"
18501    arguments="EOL"
18502    new_path=`$CYGPATH -u "$path"`
18503    new_path=`$WHICH "$new_path" 2> /dev/null`
18504    # bat and cmd files are not always considered executable in cygwin causing which
18505    # to not find them
18506    if test "x$new_path" = x \
18507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18509      new_path=`$CYGPATH -u "$path"`
18510    fi
18511    if test "x$new_path" = x; then
18512      # It's still not found. Now this is an unrecoverable error.
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18515      has_space=`$ECHO "$complete" | $GREP " "`
18516      if test "x$has_space" != x; then
18517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18519      fi
18520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18521    fi
18522  fi
18523
18524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18527  # "foo.exe" is OK but "foo" is an error.
18528  #
18529  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18530  # It is also a way to make sure we got the proper file name for the real test later on.
18531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18532  if test "x$test_shortpath" = x; then
18533    # Short path failed, file does not exist as specified.
18534    # Try adding .exe or .cmd
18535    if test -f "${new_path}.exe"; then
18536      input_to_shortpath="${new_path}.exe"
18537    elif test -f "${new_path}.cmd"; then
18538      input_to_shortpath="${new_path}.cmd"
18539    else
18540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18544      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18545    fi
18546  else
18547    input_to_shortpath="$new_path"
18548  fi
18549
18550  # Call helper function which possibly converts this using DOS-style short mode.
18551  # If so, the updated path is stored in $new_path.
18552  new_path="$input_to_shortpath"
18553
18554  input_path="$input_to_shortpath"
18555  # Check if we need to convert this using DOS-style short mode. If the path
18556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18557  # take no chances and rewrite it.
18558  # Note: m4 eats our [], so we need to use [ and ] instead.
18559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18560  if test "x$has_forbidden_chars" != x; then
18561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18565      # Going to short mode and back again did indeed matter. Since short mode is
18566      # case insensitive, let's make it lowercase to improve readability.
18567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18568      # Now convert it back to Unix-style (cygpath)
18569      input_path=`$CYGPATH -u "$shortmode_path"`
18570      new_path="$input_path"
18571    fi
18572  fi
18573
18574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18575  if test "x$test_cygdrive_prefix" = x; then
18576    # As a simple fix, exclude /usr/bin since it's not a real path.
18577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18579      # a path prefixed by /cygdrive for fixpath to work.
18580      new_path="$CYGWIN_ROOT_PATH$input_path"
18581    fi
18582  fi
18583
18584  # remove trailing .exe if any
18585  new_path="${new_path/%.exe/}"
18586
18587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18588
18589  # First separate the path from the arguments. This will split at the first
18590  # space.
18591  complete="$FOUND_MAKE"
18592  path="${complete%% *}"
18593  tmp="$complete EOL"
18594  arguments="${tmp#* }"
18595
18596  # Input might be given as Windows format, start by converting to
18597  # unix format.
18598  new_path="$path"
18599
18600  windows_path="$new_path"
18601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18602    unix_path=`$CYGPATH -u "$windows_path"`
18603    new_path="$unix_path"
18604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18606    new_path="$unix_path"
18607  fi
18608
18609
18610  # Now try to locate executable using which
18611  new_path=`$WHICH "$new_path" 2> /dev/null`
18612
18613  if test "x$new_path" = x; then
18614    # Oops. Which didn't find the executable.
18615    # The splitting of arguments from the executable at a space might have been incorrect,
18616    # since paths with space are more likely in Windows. Give it another try with the whole
18617    # argument.
18618    path="$complete"
18619    arguments="EOL"
18620    new_path="$path"
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631
18632    new_path=`$WHICH "$new_path" 2> /dev/null`
18633    # bat and cmd files are not always considered executable in MSYS causing which
18634    # to not find them
18635    if test "x$new_path" = x \
18636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18638      new_path="$path"
18639
18640  windows_path="$new_path"
18641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18642    unix_path=`$CYGPATH -u "$windows_path"`
18643    new_path="$unix_path"
18644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18646    new_path="$unix_path"
18647  fi
18648
18649    fi
18650
18651    if test "x$new_path" = x; then
18652      # It's still not found. Now this is an unrecoverable error.
18653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18654$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18655      has_space=`$ECHO "$complete" | $GREP " "`
18656      if test "x$has_space" != x; then
18657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18659      fi
18660      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18661    fi
18662  fi
18663
18664  # Now new_path has a complete unix path to the binary
18665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18666    # Keep paths in /bin as-is, but remove trailing .exe if any
18667    new_path="${new_path/%.exe/}"
18668    # Do not save /bin paths to all_fixpath_prefixes!
18669  else
18670    # Not in mixed or Windows style, start by that.
18671    new_path=`cmd //c echo $new_path`
18672
18673  input_path="$new_path"
18674  # Check if we need to convert this using DOS-style short mode. If the path
18675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18676  # take no chances and rewrite it.
18677  # Note: m4 eats our [], so we need to use [ and ] instead.
18678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18679  if test "x$has_forbidden_chars" != x; then
18680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18682  fi
18683
18684    # Output is in $new_path
18685
18686  windows_path="$new_path"
18687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18688    unix_path=`$CYGPATH -u "$windows_path"`
18689    new_path="$unix_path"
18690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18692    new_path="$unix_path"
18693  fi
18694
18695    # remove trailing .exe if any
18696    new_path="${new_path/%.exe/}"
18697
18698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18700  fi
18701
18702    else
18703      # We're on a unix platform. Hooray! :)
18704      # First separate the path from the arguments. This will split at the first
18705      # space.
18706      complete="$FOUND_MAKE"
18707      path="${complete%% *}"
18708      tmp="$complete EOL"
18709      arguments="${tmp#* }"
18710
18711      # Cannot rely on the command "which" here since it doesn't always work.
18712      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18713      if test -z "$is_absolute_path"; then
18714        # Path to executable is not absolute. Find it.
18715        IFS_save="$IFS"
18716        IFS=:
18717        for p in $PATH; do
18718          if test -f "$p/$path" && test -x "$p/$path"; then
18719            new_path="$p/$path"
18720            break
18721          fi
18722        done
18723        IFS="$IFS_save"
18724      else
18725        # This is an absolute path, we can use it without further modifications.
18726        new_path="$path"
18727      fi
18728
18729      if test "x$new_path" = x; then
18730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18732        has_space=`$ECHO "$complete" | $GREP " "`
18733        if test "x$has_space" != x; then
18734          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18736        fi
18737        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18738      fi
18739    fi
18740
18741    # Now join together the path and the arguments once again
18742    if test "x$arguments" != xEOL; then
18743      new_complete="$new_path ${arguments% *}"
18744    else
18745      new_complete="$new_path"
18746    fi
18747
18748    if test "x$complete" != "x$new_complete"; then
18749      FOUND_MAKE="$new_complete"
18750      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18751$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18752    fi
18753  fi
18754
18755        fi
18756      fi
18757    fi
18758  fi
18759
18760        if test "x$FOUND_MAKE" = x; then
18761          for ac_prog in make
18762do
18763  # Extract the first word of "$ac_prog", so it can be a program name with args.
18764set dummy $ac_prog; ac_word=$2
18765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18766$as_echo_n "checking for $ac_word... " >&6; }
18767if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18768  $as_echo_n "(cached) " >&6
18769else
18770  case $CHECK_TOOLSDIR_MAKE in
18771  [\\/]* | ?:[\\/]*)
18772  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18773  ;;
18774  *)
18775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18776for as_dir in $PATH
18777do
18778  IFS=$as_save_IFS
18779  test -z "$as_dir" && as_dir=.
18780    for ac_exec_ext in '' $ac_executable_extensions; do
18781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18782    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18784    break 2
18785  fi
18786done
18787  done
18788IFS=$as_save_IFS
18789
18790  ;;
18791esac
18792fi
18793CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18794if test -n "$CHECK_TOOLSDIR_MAKE"; then
18795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18796$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18797else
18798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18799$as_echo "no" >&6; }
18800fi
18801
18802
18803  test -n "$CHECK_TOOLSDIR_MAKE" && break
18804done
18805
18806
18807  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18808  DESCRIPTION="make in tools-dir"
18809
18810  # On Cygwin, we require a newer version of make than on other platforms
18811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812    MAKE_VERSION_EXPR="-e 4\."
18813    MAKE_REQUIRED_VERSION="4.0"
18814   else
18815    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18816    MAKE_REQUIRED_VERSION="3.81"
18817  fi
18818
18819  if test "x$MAKE_CANDIDATE" != x; then
18820    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18821$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18822    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18823    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18824    if test "x$IS_GNU_MAKE" = x; then
18825      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18826$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18827    else
18828      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18829      if test "x$IS_MODERN_MAKE" = x; then
18830        { $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
18831$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;}
18832      else
18833        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18834          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835            MAKE_EXPECTED_ENV='cygwin'
18836          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18837            MAKE_EXPECTED_ENV='msys'
18838          else
18839            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18840          fi
18841          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18842          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18843        else
18844          # Not relevant for non-Windows
18845          IS_MAKE_CORRECT_ENV=true
18846        fi
18847        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18848          { $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
18849$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;}
18850        else
18851          FOUND_MAKE=$MAKE_CANDIDATE
18852
18853  # Only process if variable expands to non-empty
18854
18855  if test "x$FOUND_MAKE" != x; then
18856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18857
18858  # First separate the path from the arguments. This will split at the first
18859  # space.
18860  complete="$FOUND_MAKE"
18861  path="${complete%% *}"
18862  tmp="$complete EOL"
18863  arguments="${tmp#* }"
18864
18865  # Input might be given as Windows format, start by converting to
18866  # unix format.
18867  new_path=`$CYGPATH -u "$path"`
18868
18869  # Now try to locate executable using which
18870  new_path=`$WHICH "$new_path" 2> /dev/null`
18871  # bat and cmd files are not always considered executable in cygwin causing which
18872  # to not find them
18873  if test "x$new_path" = x \
18874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18876    new_path=`$CYGPATH -u "$path"`
18877  fi
18878  if test "x$new_path" = x; then
18879    # Oops. Which didn't find the executable.
18880    # The splitting of arguments from the executable at a space might have been incorrect,
18881    # since paths with space are more likely in Windows. Give it another try with the whole
18882    # argument.
18883    path="$complete"
18884    arguments="EOL"
18885    new_path=`$CYGPATH -u "$path"`
18886    new_path=`$WHICH "$new_path" 2> /dev/null`
18887    # bat and cmd files are not always considered executable in cygwin causing which
18888    # to not find them
18889    if test "x$new_path" = x \
18890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18892      new_path=`$CYGPATH -u "$path"`
18893    fi
18894    if test "x$new_path" = x; then
18895      # It's still not found. Now this is an unrecoverable error.
18896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18897$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18898      has_space=`$ECHO "$complete" | $GREP " "`
18899      if test "x$has_space" != x; then
18900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18902      fi
18903      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18904    fi
18905  fi
18906
18907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18910  # "foo.exe" is OK but "foo" is an error.
18911  #
18912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18913  # It is also a way to make sure we got the proper file name for the real test later on.
18914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18915  if test "x$test_shortpath" = x; then
18916    # Short path failed, file does not exist as specified.
18917    # Try adding .exe or .cmd
18918    if test -f "${new_path}.exe"; then
18919      input_to_shortpath="${new_path}.exe"
18920    elif test -f "${new_path}.cmd"; then
18921      input_to_shortpath="${new_path}.cmd"
18922    else
18923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18927      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18928    fi
18929  else
18930    input_to_shortpath="$new_path"
18931  fi
18932
18933  # Call helper function which possibly converts this using DOS-style short mode.
18934  # If so, the updated path is stored in $new_path.
18935  new_path="$input_to_shortpath"
18936
18937  input_path="$input_to_shortpath"
18938  # Check if we need to convert this using DOS-style short mode. If the path
18939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18940  # take no chances and rewrite it.
18941  # Note: m4 eats our [], so we need to use [ and ] instead.
18942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18943  if test "x$has_forbidden_chars" != x; then
18944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18948      # Going to short mode and back again did indeed matter. Since short mode is
18949      # case insensitive, let's make it lowercase to improve readability.
18950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18951      # Now convert it back to Unix-style (cygpath)
18952      input_path=`$CYGPATH -u "$shortmode_path"`
18953      new_path="$input_path"
18954    fi
18955  fi
18956
18957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18958  if test "x$test_cygdrive_prefix" = x; then
18959    # As a simple fix, exclude /usr/bin since it's not a real path.
18960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18962      # a path prefixed by /cygdrive for fixpath to work.
18963      new_path="$CYGWIN_ROOT_PATH$input_path"
18964    fi
18965  fi
18966
18967  # remove trailing .exe if any
18968  new_path="${new_path/%.exe/}"
18969
18970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18971
18972  # First separate the path from the arguments. This will split at the first
18973  # space.
18974  complete="$FOUND_MAKE"
18975  path="${complete%% *}"
18976  tmp="$complete EOL"
18977  arguments="${tmp#* }"
18978
18979  # Input might be given as Windows format, start by converting to
18980  # unix format.
18981  new_path="$path"
18982
18983  windows_path="$new_path"
18984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18985    unix_path=`$CYGPATH -u "$windows_path"`
18986    new_path="$unix_path"
18987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18989    new_path="$unix_path"
18990  fi
18991
18992
18993  # Now try to locate executable using which
18994  new_path=`$WHICH "$new_path" 2> /dev/null`
18995
18996  if test "x$new_path" = x; then
18997    # Oops. Which didn't find the executable.
18998    # The splitting of arguments from the executable at a space might have been incorrect,
18999    # since paths with space are more likely in Windows. Give it another try with the whole
19000    # argument.
19001    path="$complete"
19002    arguments="EOL"
19003    new_path="$path"
19004
19005  windows_path="$new_path"
19006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19007    unix_path=`$CYGPATH -u "$windows_path"`
19008    new_path="$unix_path"
19009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19011    new_path="$unix_path"
19012  fi
19013
19014
19015    new_path=`$WHICH "$new_path" 2> /dev/null`
19016    # bat and cmd files are not always considered executable in MSYS causing which
19017    # to not find them
19018    if test "x$new_path" = x \
19019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19021      new_path="$path"
19022
19023  windows_path="$new_path"
19024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19025    unix_path=`$CYGPATH -u "$windows_path"`
19026    new_path="$unix_path"
19027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19029    new_path="$unix_path"
19030  fi
19031
19032    fi
19033
19034    if test "x$new_path" = x; then
19035      # It's still not found. Now this is an unrecoverable error.
19036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19038      has_space=`$ECHO "$complete" | $GREP " "`
19039      if test "x$has_space" != x; then
19040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19042      fi
19043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19044    fi
19045  fi
19046
19047  # Now new_path has a complete unix path to the binary
19048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19049    # Keep paths in /bin as-is, but remove trailing .exe if any
19050    new_path="${new_path/%.exe/}"
19051    # Do not save /bin paths to all_fixpath_prefixes!
19052  else
19053    # Not in mixed or Windows style, start by that.
19054    new_path=`cmd //c echo $new_path`
19055
19056  input_path="$new_path"
19057  # Check if we need to convert this using DOS-style short mode. If the path
19058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19059  # take no chances and rewrite it.
19060  # Note: m4 eats our [], so we need to use [ and ] instead.
19061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19062  if test "x$has_forbidden_chars" != x; then
19063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19065  fi
19066
19067    # Output is in $new_path
19068
19069  windows_path="$new_path"
19070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19071    unix_path=`$CYGPATH -u "$windows_path"`
19072    new_path="$unix_path"
19073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19075    new_path="$unix_path"
19076  fi
19077
19078    # remove trailing .exe if any
19079    new_path="${new_path/%.exe/}"
19080
19081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19083  fi
19084
19085    else
19086      # We're on a unix platform. Hooray! :)
19087      # First separate the path from the arguments. This will split at the first
19088      # space.
19089      complete="$FOUND_MAKE"
19090      path="${complete%% *}"
19091      tmp="$complete EOL"
19092      arguments="${tmp#* }"
19093
19094      # Cannot rely on the command "which" here since it doesn't always work.
19095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19096      if test -z "$is_absolute_path"; then
19097        # Path to executable is not absolute. Find it.
19098        IFS_save="$IFS"
19099        IFS=:
19100        for p in $PATH; do
19101          if test -f "$p/$path" && test -x "$p/$path"; then
19102            new_path="$p/$path"
19103            break
19104          fi
19105        done
19106        IFS="$IFS_save"
19107      else
19108        # This is an absolute path, we can use it without further modifications.
19109        new_path="$path"
19110      fi
19111
19112      if test "x$new_path" = x; then
19113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19115        has_space=`$ECHO "$complete" | $GREP " "`
19116        if test "x$has_space" != x; then
19117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19119        fi
19120        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19121      fi
19122    fi
19123
19124    # Now join together the path and the arguments once again
19125    if test "x$arguments" != xEOL; then
19126      new_complete="$new_path ${arguments% *}"
19127    else
19128      new_complete="$new_path"
19129    fi
19130
19131    if test "x$complete" != "x$new_complete"; then
19132      FOUND_MAKE="$new_complete"
19133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19134$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19135    fi
19136  fi
19137
19138        fi
19139      fi
19140    fi
19141  fi
19142
19143        fi
19144        PATH=$OLD_PATH
19145      fi
19146    fi
19147
19148    if test "x$FOUND_MAKE" = x; then
19149      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
19150    fi
19151
19152  else
19153    # The variable is set, but is it from the command line or the environment?
19154
19155    # Try to remove the string !MAKE! from our list.
19156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19158      # If it failed, the variable was not from the command line. Ignore it,
19159      # but warn the user (except for BASH, which is always set by the calling BASH).
19160      if test "xMAKE" != xBASH; then
19161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19162$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19163      fi
19164      # Try to locate tool using the code snippet
19165
19166    # Try our hardest to locate a correct version of GNU make
19167    for ac_prog in gmake
19168do
19169  # Extract the first word of "$ac_prog", so it can be a program name with args.
19170set dummy $ac_prog; ac_word=$2
19171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19172$as_echo_n "checking for $ac_word... " >&6; }
19173if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19174  $as_echo_n "(cached) " >&6
19175else
19176  case $CHECK_GMAKE in
19177  [\\/]* | ?:[\\/]*)
19178  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19179  ;;
19180  *)
19181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19182for as_dir in $PATH
19183do
19184  IFS=$as_save_IFS
19185  test -z "$as_dir" && as_dir=.
19186    for ac_exec_ext in '' $ac_executable_extensions; do
19187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19188    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19190    break 2
19191  fi
19192done
19193  done
19194IFS=$as_save_IFS
19195
19196  ;;
19197esac
19198fi
19199CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19200if test -n "$CHECK_GMAKE"; then
19201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19202$as_echo "$CHECK_GMAKE" >&6; }
19203else
19204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19205$as_echo "no" >&6; }
19206fi
19207
19208
19209  test -n "$CHECK_GMAKE" && break
19210done
19211
19212
19213  MAKE_CANDIDATE=""$CHECK_GMAKE""
19214  DESCRIPTION="gmake in PATH"
19215
19216  # On Cygwin, we require a newer version of make than on other platforms
19217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19218    MAKE_VERSION_EXPR="-e 4\."
19219    MAKE_REQUIRED_VERSION="4.0"
19220   else
19221    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19222    MAKE_REQUIRED_VERSION="3.81"
19223  fi
19224
19225  if test "x$MAKE_CANDIDATE" != x; then
19226    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19227$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19228    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19229    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19230    if test "x$IS_GNU_MAKE" = x; then
19231      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19232$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19233    else
19234      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19235      if test "x$IS_MODERN_MAKE" = x; then
19236        { $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
19237$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;}
19238      else
19239        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19240          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241            MAKE_EXPECTED_ENV='cygwin'
19242          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243            MAKE_EXPECTED_ENV='msys'
19244          else
19245            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19246          fi
19247          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19248          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19249        else
19250          # Not relevant for non-Windows
19251          IS_MAKE_CORRECT_ENV=true
19252        fi
19253        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19254          { $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
19255$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;}
19256        else
19257          FOUND_MAKE=$MAKE_CANDIDATE
19258
19259  # Only process if variable expands to non-empty
19260
19261  if test "x$FOUND_MAKE" != x; then
19262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19263
19264  # First separate the path from the arguments. This will split at the first
19265  # space.
19266  complete="$FOUND_MAKE"
19267  path="${complete%% *}"
19268  tmp="$complete EOL"
19269  arguments="${tmp#* }"
19270
19271  # Input might be given as Windows format, start by converting to
19272  # unix format.
19273  new_path=`$CYGPATH -u "$path"`
19274
19275  # Now try to locate executable using which
19276  new_path=`$WHICH "$new_path" 2> /dev/null`
19277  # bat and cmd files are not always considered executable in cygwin causing which
19278  # to not find them
19279  if test "x$new_path" = x \
19280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19282    new_path=`$CYGPATH -u "$path"`
19283  fi
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path=`$CYGPATH -u "$path"`
19292    new_path=`$WHICH "$new_path" 2> /dev/null`
19293    # bat and cmd files are not always considered executable in cygwin causing which
19294    # to not find them
19295    if test "x$new_path" = x \
19296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19298      new_path=`$CYGPATH -u "$path"`
19299    fi
19300    if test "x$new_path" = x; then
19301      # It's still not found. Now this is an unrecoverable error.
19302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19304      has_space=`$ECHO "$complete" | $GREP " "`
19305      if test "x$has_space" != x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19308      fi
19309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19310    fi
19311  fi
19312
19313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19316  # "foo.exe" is OK but "foo" is an error.
19317  #
19318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19319  # It is also a way to make sure we got the proper file name for the real test later on.
19320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19321  if test "x$test_shortpath" = x; then
19322    # Short path failed, file does not exist as specified.
19323    # Try adding .exe or .cmd
19324    if test -f "${new_path}.exe"; then
19325      input_to_shortpath="${new_path}.exe"
19326    elif test -f "${new_path}.cmd"; then
19327      input_to_shortpath="${new_path}.cmd"
19328    else
19329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19334    fi
19335  else
19336    input_to_shortpath="$new_path"
19337  fi
19338
19339  # Call helper function which possibly converts this using DOS-style short mode.
19340  # If so, the updated path is stored in $new_path.
19341  new_path="$input_to_shortpath"
19342
19343  input_path="$input_to_shortpath"
19344  # Check if we need to convert this using DOS-style short mode. If the path
19345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19346  # take no chances and rewrite it.
19347  # Note: m4 eats our [], so we need to use [ and ] instead.
19348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19349  if test "x$has_forbidden_chars" != x; then
19350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19354      # Going to short mode and back again did indeed matter. Since short mode is
19355      # case insensitive, let's make it lowercase to improve readability.
19356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19357      # Now convert it back to Unix-style (cygpath)
19358      input_path=`$CYGPATH -u "$shortmode_path"`
19359      new_path="$input_path"
19360    fi
19361  fi
19362
19363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19364  if test "x$test_cygdrive_prefix" = x; then
19365    # As a simple fix, exclude /usr/bin since it's not a real path.
19366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19368      # a path prefixed by /cygdrive for fixpath to work.
19369      new_path="$CYGWIN_ROOT_PATH$input_path"
19370    fi
19371  fi
19372
19373  # remove trailing .exe if any
19374  new_path="${new_path/%.exe/}"
19375
19376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19377
19378  # First separate the path from the arguments. This will split at the first
19379  # space.
19380  complete="$FOUND_MAKE"
19381  path="${complete%% *}"
19382  tmp="$complete EOL"
19383  arguments="${tmp#* }"
19384
19385  # Input might be given as Windows format, start by converting to
19386  # unix format.
19387  new_path="$path"
19388
19389  windows_path="$new_path"
19390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19391    unix_path=`$CYGPATH -u "$windows_path"`
19392    new_path="$unix_path"
19393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19395    new_path="$unix_path"
19396  fi
19397
19398
19399  # Now try to locate executable using which
19400  new_path=`$WHICH "$new_path" 2> /dev/null`
19401
19402  if test "x$new_path" = x; then
19403    # Oops. Which didn't find the executable.
19404    # The splitting of arguments from the executable at a space might have been incorrect,
19405    # since paths with space are more likely in Windows. Give it another try with the whole
19406    # argument.
19407    path="$complete"
19408    arguments="EOL"
19409    new_path="$path"
19410
19411  windows_path="$new_path"
19412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413    unix_path=`$CYGPATH -u "$windows_path"`
19414    new_path="$unix_path"
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417    new_path="$unix_path"
19418  fi
19419
19420
19421    new_path=`$WHICH "$new_path" 2> /dev/null`
19422    # bat and cmd files are not always considered executable in MSYS causing which
19423    # to not find them
19424    if test "x$new_path" = x \
19425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19427      new_path="$path"
19428
19429  windows_path="$new_path"
19430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19431    unix_path=`$CYGPATH -u "$windows_path"`
19432    new_path="$unix_path"
19433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19435    new_path="$unix_path"
19436  fi
19437
19438    fi
19439
19440    if test "x$new_path" = x; then
19441      # It's still not found. Now this is an unrecoverable error.
19442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19444      has_space=`$ECHO "$complete" | $GREP " "`
19445      if test "x$has_space" != x; then
19446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19448      fi
19449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19450    fi
19451  fi
19452
19453  # Now new_path has a complete unix path to the binary
19454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19455    # Keep paths in /bin as-is, but remove trailing .exe if any
19456    new_path="${new_path/%.exe/}"
19457    # Do not save /bin paths to all_fixpath_prefixes!
19458  else
19459    # Not in mixed or Windows style, start by that.
19460    new_path=`cmd //c echo $new_path`
19461
19462  input_path="$new_path"
19463  # Check if we need to convert this using DOS-style short mode. If the path
19464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19465  # take no chances and rewrite it.
19466  # Note: m4 eats our [], so we need to use [ and ] instead.
19467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19468  if test "x$has_forbidden_chars" != x; then
19469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19471  fi
19472
19473    # Output is in $new_path
19474
19475  windows_path="$new_path"
19476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19477    unix_path=`$CYGPATH -u "$windows_path"`
19478    new_path="$unix_path"
19479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19481    new_path="$unix_path"
19482  fi
19483
19484    # remove trailing .exe if any
19485    new_path="${new_path/%.exe/}"
19486
19487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19489  fi
19490
19491    else
19492      # We're on a unix platform. Hooray! :)
19493      # First separate the path from the arguments. This will split at the first
19494      # space.
19495      complete="$FOUND_MAKE"
19496      path="${complete%% *}"
19497      tmp="$complete EOL"
19498      arguments="${tmp#* }"
19499
19500      # Cannot rely on the command "which" here since it doesn't always work.
19501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19502      if test -z "$is_absolute_path"; then
19503        # Path to executable is not absolute. Find it.
19504        IFS_save="$IFS"
19505        IFS=:
19506        for p in $PATH; do
19507          if test -f "$p/$path" && test -x "$p/$path"; then
19508            new_path="$p/$path"
19509            break
19510          fi
19511        done
19512        IFS="$IFS_save"
19513      else
19514        # This is an absolute path, we can use it without further modifications.
19515        new_path="$path"
19516      fi
19517
19518      if test "x$new_path" = x; then
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19521        has_space=`$ECHO "$complete" | $GREP " "`
19522        if test "x$has_space" != x; then
19523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19525        fi
19526        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19527      fi
19528    fi
19529
19530    # Now join together the path and the arguments once again
19531    if test "x$arguments" != xEOL; then
19532      new_complete="$new_path ${arguments% *}"
19533    else
19534      new_complete="$new_path"
19535    fi
19536
19537    if test "x$complete" != "x$new_complete"; then
19538      FOUND_MAKE="$new_complete"
19539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19540$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19541    fi
19542  fi
19543
19544        fi
19545      fi
19546    fi
19547  fi
19548
19549
19550    if test "x$FOUND_MAKE" = x; then
19551      for ac_prog in make
19552do
19553  # Extract the first word of "$ac_prog", so it can be a program name with args.
19554set dummy $ac_prog; ac_word=$2
19555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19556$as_echo_n "checking for $ac_word... " >&6; }
19557if ${ac_cv_path_CHECK_MAKE+:} false; then :
19558  $as_echo_n "(cached) " >&6
19559else
19560  case $CHECK_MAKE in
19561  [\\/]* | ?:[\\/]*)
19562  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19563  ;;
19564  *)
19565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19566for as_dir in $PATH
19567do
19568  IFS=$as_save_IFS
19569  test -z "$as_dir" && as_dir=.
19570    for ac_exec_ext in '' $ac_executable_extensions; do
19571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19572    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19574    break 2
19575  fi
19576done
19577  done
19578IFS=$as_save_IFS
19579
19580  ;;
19581esac
19582fi
19583CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19584if test -n "$CHECK_MAKE"; then
19585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19586$as_echo "$CHECK_MAKE" >&6; }
19587else
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19589$as_echo "no" >&6; }
19590fi
19591
19592
19593  test -n "$CHECK_MAKE" && break
19594done
19595
19596
19597  MAKE_CANDIDATE=""$CHECK_MAKE""
19598  DESCRIPTION="make in PATH"
19599
19600  # On Cygwin, we require a newer version of make than on other platforms
19601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19602    MAKE_VERSION_EXPR="-e 4\."
19603    MAKE_REQUIRED_VERSION="4.0"
19604   else
19605    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19606    MAKE_REQUIRED_VERSION="3.81"
19607  fi
19608
19609  if test "x$MAKE_CANDIDATE" != x; then
19610    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19611$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19612    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19613    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19614    if test "x$IS_GNU_MAKE" = x; then
19615      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19616$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19617    else
19618      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19619      if test "x$IS_MODERN_MAKE" = x; then
19620        { $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
19621$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;}
19622      else
19623        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19624          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19625            MAKE_EXPECTED_ENV='cygwin'
19626          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19627            MAKE_EXPECTED_ENV='msys'
19628          else
19629            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19630          fi
19631          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19632          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19633        else
19634          # Not relevant for non-Windows
19635          IS_MAKE_CORRECT_ENV=true
19636        fi
19637        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19638          { $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
19639$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;}
19640        else
19641          FOUND_MAKE=$MAKE_CANDIDATE
19642
19643  # Only process if variable expands to non-empty
19644
19645  if test "x$FOUND_MAKE" != x; then
19646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647
19648  # First separate the path from the arguments. This will split at the first
19649  # space.
19650  complete="$FOUND_MAKE"
19651  path="${complete%% *}"
19652  tmp="$complete EOL"
19653  arguments="${tmp#* }"
19654
19655  # Input might be given as Windows format, start by converting to
19656  # unix format.
19657  new_path=`$CYGPATH -u "$path"`
19658
19659  # Now try to locate executable using which
19660  new_path=`$WHICH "$new_path" 2> /dev/null`
19661  # bat and cmd files are not always considered executable in cygwin causing which
19662  # to not find them
19663  if test "x$new_path" = x \
19664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19666    new_path=`$CYGPATH -u "$path"`
19667  fi
19668  if test "x$new_path" = x; then
19669    # Oops. Which didn't find the executable.
19670    # The splitting of arguments from the executable at a space might have been incorrect,
19671    # since paths with space are more likely in Windows. Give it another try with the whole
19672    # argument.
19673    path="$complete"
19674    arguments="EOL"
19675    new_path=`$CYGPATH -u "$path"`
19676    new_path=`$WHICH "$new_path" 2> /dev/null`
19677    # bat and cmd files are not always considered executable in cygwin causing which
19678    # to not find them
19679    if test "x$new_path" = x \
19680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19682      new_path=`$CYGPATH -u "$path"`
19683    fi
19684    if test "x$new_path" = x; then
19685      # It's still not found. Now this is an unrecoverable error.
19686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19688      has_space=`$ECHO "$complete" | $GREP " "`
19689      if test "x$has_space" != x; then
19690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19692      fi
19693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19694    fi
19695  fi
19696
19697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19700  # "foo.exe" is OK but "foo" is an error.
19701  #
19702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19703  # It is also a way to make sure we got the proper file name for the real test later on.
19704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19705  if test "x$test_shortpath" = x; then
19706    # Short path failed, file does not exist as specified.
19707    # Try adding .exe or .cmd
19708    if test -f "${new_path}.exe"; then
19709      input_to_shortpath="${new_path}.exe"
19710    elif test -f "${new_path}.cmd"; then
19711      input_to_shortpath="${new_path}.cmd"
19712    else
19713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19718    fi
19719  else
19720    input_to_shortpath="$new_path"
19721  fi
19722
19723  # Call helper function which possibly converts this using DOS-style short mode.
19724  # If so, the updated path is stored in $new_path.
19725  new_path="$input_to_shortpath"
19726
19727  input_path="$input_to_shortpath"
19728  # Check if we need to convert this using DOS-style short mode. If the path
19729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19730  # take no chances and rewrite it.
19731  # Note: m4 eats our [], so we need to use [ and ] instead.
19732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19733  if test "x$has_forbidden_chars" != x; then
19734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19738      # Going to short mode and back again did indeed matter. Since short mode is
19739      # case insensitive, let's make it lowercase to improve readability.
19740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19741      # Now convert it back to Unix-style (cygpath)
19742      input_path=`$CYGPATH -u "$shortmode_path"`
19743      new_path="$input_path"
19744    fi
19745  fi
19746
19747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19748  if test "x$test_cygdrive_prefix" = x; then
19749    # As a simple fix, exclude /usr/bin since it's not a real path.
19750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19752      # a path prefixed by /cygdrive for fixpath to work.
19753      new_path="$CYGWIN_ROOT_PATH$input_path"
19754    fi
19755  fi
19756
19757  # remove trailing .exe if any
19758  new_path="${new_path/%.exe/}"
19759
19760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19761
19762  # First separate the path from the arguments. This will split at the first
19763  # space.
19764  complete="$FOUND_MAKE"
19765  path="${complete%% *}"
19766  tmp="$complete EOL"
19767  arguments="${tmp#* }"
19768
19769  # Input might be given as Windows format, start by converting to
19770  # unix format.
19771  new_path="$path"
19772
19773  windows_path="$new_path"
19774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19775    unix_path=`$CYGPATH -u "$windows_path"`
19776    new_path="$unix_path"
19777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19779    new_path="$unix_path"
19780  fi
19781
19782
19783  # Now try to locate executable using which
19784  new_path=`$WHICH "$new_path" 2> /dev/null`
19785
19786  if test "x$new_path" = x; then
19787    # Oops. Which didn't find the executable.
19788    # The splitting of arguments from the executable at a space might have been incorrect,
19789    # since paths with space are more likely in Windows. Give it another try with the whole
19790    # argument.
19791    path="$complete"
19792    arguments="EOL"
19793    new_path="$path"
19794
19795  windows_path="$new_path"
19796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19797    unix_path=`$CYGPATH -u "$windows_path"`
19798    new_path="$unix_path"
19799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19801    new_path="$unix_path"
19802  fi
19803
19804
19805    new_path=`$WHICH "$new_path" 2> /dev/null`
19806    # bat and cmd files are not always considered executable in MSYS causing which
19807    # to not find them
19808    if test "x$new_path" = x \
19809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19811      new_path="$path"
19812
19813  windows_path="$new_path"
19814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19815    unix_path=`$CYGPATH -u "$windows_path"`
19816    new_path="$unix_path"
19817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19819    new_path="$unix_path"
19820  fi
19821
19822    fi
19823
19824    if test "x$new_path" = x; then
19825      # It's still not found. Now this is an unrecoverable error.
19826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19828      has_space=`$ECHO "$complete" | $GREP " "`
19829      if test "x$has_space" != x; then
19830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19832      fi
19833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19834    fi
19835  fi
19836
19837  # Now new_path has a complete unix path to the binary
19838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19839    # Keep paths in /bin as-is, but remove trailing .exe if any
19840    new_path="${new_path/%.exe/}"
19841    # Do not save /bin paths to all_fixpath_prefixes!
19842  else
19843    # Not in mixed or Windows style, start by that.
19844    new_path=`cmd //c echo $new_path`
19845
19846  input_path="$new_path"
19847  # Check if we need to convert this using DOS-style short mode. If the path
19848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19849  # take no chances and rewrite it.
19850  # Note: m4 eats our [], so we need to use [ and ] instead.
19851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19852  if test "x$has_forbidden_chars" != x; then
19853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19855  fi
19856
19857    # Output is in $new_path
19858
19859  windows_path="$new_path"
19860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19861    unix_path=`$CYGPATH -u "$windows_path"`
19862    new_path="$unix_path"
19863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19865    new_path="$unix_path"
19866  fi
19867
19868    # remove trailing .exe if any
19869    new_path="${new_path/%.exe/}"
19870
19871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19873  fi
19874
19875    else
19876      # We're on a unix platform. Hooray! :)
19877      # First separate the path from the arguments. This will split at the first
19878      # space.
19879      complete="$FOUND_MAKE"
19880      path="${complete%% *}"
19881      tmp="$complete EOL"
19882      arguments="${tmp#* }"
19883
19884      # Cannot rely on the command "which" here since it doesn't always work.
19885      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19886      if test -z "$is_absolute_path"; then
19887        # Path to executable is not absolute. Find it.
19888        IFS_save="$IFS"
19889        IFS=:
19890        for p in $PATH; do
19891          if test -f "$p/$path" && test -x "$p/$path"; then
19892            new_path="$p/$path"
19893            break
19894          fi
19895        done
19896        IFS="$IFS_save"
19897      else
19898        # This is an absolute path, we can use it without further modifications.
19899        new_path="$path"
19900      fi
19901
19902      if test "x$new_path" = x; then
19903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19905        has_space=`$ECHO "$complete" | $GREP " "`
19906        if test "x$has_space" != x; then
19907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19909        fi
19910        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19911      fi
19912    fi
19913
19914    # Now join together the path and the arguments once again
19915    if test "x$arguments" != xEOL; then
19916      new_complete="$new_path ${arguments% *}"
19917    else
19918      new_complete="$new_path"
19919    fi
19920
19921    if test "x$complete" != "x$new_complete"; then
19922      FOUND_MAKE="$new_complete"
19923      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19924$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19925    fi
19926  fi
19927
19928        fi
19929      fi
19930    fi
19931  fi
19932
19933    fi
19934
19935    if test "x$FOUND_MAKE" = x; then
19936      if test "x$TOOLCHAIN_PATH" != x; then
19937        # We have a toolchain path, check that as well before giving up.
19938        OLD_PATH=$PATH
19939        PATH=$TOOLCHAIN_PATH:$PATH
19940        for ac_prog in gmake
19941do
19942  # Extract the first word of "$ac_prog", so it can be a program name with args.
19943set dummy $ac_prog; ac_word=$2
19944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19945$as_echo_n "checking for $ac_word... " >&6; }
19946if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19947  $as_echo_n "(cached) " >&6
19948else
19949  case $CHECK_TOOLSDIR_GMAKE in
19950  [\\/]* | ?:[\\/]*)
19951  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19952  ;;
19953  *)
19954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19955for as_dir in $PATH
19956do
19957  IFS=$as_save_IFS
19958  test -z "$as_dir" && as_dir=.
19959    for ac_exec_ext in '' $ac_executable_extensions; do
19960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19961    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19963    break 2
19964  fi
19965done
19966  done
19967IFS=$as_save_IFS
19968
19969  ;;
19970esac
19971fi
19972CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19973if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19975$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19976else
19977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19978$as_echo "no" >&6; }
19979fi
19980
19981
19982  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19983done
19984
19985
19986  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19987  DESCRIPTION="gmake in tools-dir"
19988
19989  # On Cygwin, we require a newer version of make than on other platforms
19990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19991    MAKE_VERSION_EXPR="-e 4\."
19992    MAKE_REQUIRED_VERSION="4.0"
19993   else
19994    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19995    MAKE_REQUIRED_VERSION="3.81"
19996  fi
19997
19998  if test "x$MAKE_CANDIDATE" != x; then
19999    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20000$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20001    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20002    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20003    if test "x$IS_GNU_MAKE" = x; then
20004      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20005$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20006    else
20007      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20008      if test "x$IS_MODERN_MAKE" = x; then
20009        { $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
20010$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;}
20011      else
20012        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20013          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20014            MAKE_EXPECTED_ENV='cygwin'
20015          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016            MAKE_EXPECTED_ENV='msys'
20017          else
20018            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20019          fi
20020          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20021          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20022        else
20023          # Not relevant for non-Windows
20024          IS_MAKE_CORRECT_ENV=true
20025        fi
20026        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20027          { $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
20028$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;}
20029        else
20030          FOUND_MAKE=$MAKE_CANDIDATE
20031
20032  # Only process if variable expands to non-empty
20033
20034  if test "x$FOUND_MAKE" != x; then
20035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20036
20037  # First separate the path from the arguments. This will split at the first
20038  # space.
20039  complete="$FOUND_MAKE"
20040  path="${complete%% *}"
20041  tmp="$complete EOL"
20042  arguments="${tmp#* }"
20043
20044  # Input might be given as Windows format, start by converting to
20045  # unix format.
20046  new_path=`$CYGPATH -u "$path"`
20047
20048  # Now try to locate executable using which
20049  new_path=`$WHICH "$new_path" 2> /dev/null`
20050  # bat and cmd files are not always considered executable in cygwin causing which
20051  # to not find them
20052  if test "x$new_path" = x \
20053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20055    new_path=`$CYGPATH -u "$path"`
20056  fi
20057  if test "x$new_path" = x; then
20058    # Oops. Which didn't find the executable.
20059    # The splitting of arguments from the executable at a space might have been incorrect,
20060    # since paths with space are more likely in Windows. Give it another try with the whole
20061    # argument.
20062    path="$complete"
20063    arguments="EOL"
20064    new_path=`$CYGPATH -u "$path"`
20065    new_path=`$WHICH "$new_path" 2> /dev/null`
20066    # bat and cmd files are not always considered executable in cygwin causing which
20067    # to not find them
20068    if test "x$new_path" = x \
20069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20071      new_path=`$CYGPATH -u "$path"`
20072    fi
20073    if test "x$new_path" = x; then
20074      # It's still not found. Now this is an unrecoverable error.
20075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20077      has_space=`$ECHO "$complete" | $GREP " "`
20078      if test "x$has_space" != x; then
20079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20081      fi
20082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20083    fi
20084  fi
20085
20086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20089  # "foo.exe" is OK but "foo" is an error.
20090  #
20091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20092  # It is also a way to make sure we got the proper file name for the real test later on.
20093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20094  if test "x$test_shortpath" = x; then
20095    # Short path failed, file does not exist as specified.
20096    # Try adding .exe or .cmd
20097    if test -f "${new_path}.exe"; then
20098      input_to_shortpath="${new_path}.exe"
20099    elif test -f "${new_path}.cmd"; then
20100      input_to_shortpath="${new_path}.cmd"
20101    else
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20106      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20107    fi
20108  else
20109    input_to_shortpath="$new_path"
20110  fi
20111
20112  # Call helper function which possibly converts this using DOS-style short mode.
20113  # If so, the updated path is stored in $new_path.
20114  new_path="$input_to_shortpath"
20115
20116  input_path="$input_to_shortpath"
20117  # Check if we need to convert this using DOS-style short mode. If the path
20118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20119  # take no chances and rewrite it.
20120  # Note: m4 eats our [], so we need to use [ and ] instead.
20121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20122  if test "x$has_forbidden_chars" != x; then
20123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20127      # Going to short mode and back again did indeed matter. Since short mode is
20128      # case insensitive, let's make it lowercase to improve readability.
20129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20130      # Now convert it back to Unix-style (cygpath)
20131      input_path=`$CYGPATH -u "$shortmode_path"`
20132      new_path="$input_path"
20133    fi
20134  fi
20135
20136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20137  if test "x$test_cygdrive_prefix" = x; then
20138    # As a simple fix, exclude /usr/bin since it's not a real path.
20139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20141      # a path prefixed by /cygdrive for fixpath to work.
20142      new_path="$CYGWIN_ROOT_PATH$input_path"
20143    fi
20144  fi
20145
20146  # remove trailing .exe if any
20147  new_path="${new_path/%.exe/}"
20148
20149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20150
20151  # First separate the path from the arguments. This will split at the first
20152  # space.
20153  complete="$FOUND_MAKE"
20154  path="${complete%% *}"
20155  tmp="$complete EOL"
20156  arguments="${tmp#* }"
20157
20158  # Input might be given as Windows format, start by converting to
20159  # unix format.
20160  new_path="$path"
20161
20162  windows_path="$new_path"
20163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20164    unix_path=`$CYGPATH -u "$windows_path"`
20165    new_path="$unix_path"
20166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20168    new_path="$unix_path"
20169  fi
20170
20171
20172  # Now try to locate executable using which
20173  new_path=`$WHICH "$new_path" 2> /dev/null`
20174
20175  if test "x$new_path" = x; then
20176    # Oops. Which didn't find the executable.
20177    # The splitting of arguments from the executable at a space might have been incorrect,
20178    # since paths with space are more likely in Windows. Give it another try with the whole
20179    # argument.
20180    path="$complete"
20181    arguments="EOL"
20182    new_path="$path"
20183
20184  windows_path="$new_path"
20185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20186    unix_path=`$CYGPATH -u "$windows_path"`
20187    new_path="$unix_path"
20188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20190    new_path="$unix_path"
20191  fi
20192
20193
20194    new_path=`$WHICH "$new_path" 2> /dev/null`
20195    # bat and cmd files are not always considered executable in MSYS causing which
20196    # to not find them
20197    if test "x$new_path" = x \
20198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20200      new_path="$path"
20201
20202  windows_path="$new_path"
20203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20204    unix_path=`$CYGPATH -u "$windows_path"`
20205    new_path="$unix_path"
20206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20208    new_path="$unix_path"
20209  fi
20210
20211    fi
20212
20213    if test "x$new_path" = x; then
20214      # It's still not found. Now this is an unrecoverable error.
20215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20217      has_space=`$ECHO "$complete" | $GREP " "`
20218      if test "x$has_space" != x; then
20219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20221      fi
20222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20223    fi
20224  fi
20225
20226  # Now new_path has a complete unix path to the binary
20227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20228    # Keep paths in /bin as-is, but remove trailing .exe if any
20229    new_path="${new_path/%.exe/}"
20230    # Do not save /bin paths to all_fixpath_prefixes!
20231  else
20232    # Not in mixed or Windows style, start by that.
20233    new_path=`cmd //c echo $new_path`
20234
20235  input_path="$new_path"
20236  # Check if we need to convert this using DOS-style short mode. If the path
20237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20238  # take no chances and rewrite it.
20239  # Note: m4 eats our [], so we need to use [ and ] instead.
20240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20241  if test "x$has_forbidden_chars" != x; then
20242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20244  fi
20245
20246    # Output is in $new_path
20247
20248  windows_path="$new_path"
20249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20250    unix_path=`$CYGPATH -u "$windows_path"`
20251    new_path="$unix_path"
20252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20254    new_path="$unix_path"
20255  fi
20256
20257    # remove trailing .exe if any
20258    new_path="${new_path/%.exe/}"
20259
20260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20262  fi
20263
20264    else
20265      # We're on a unix platform. Hooray! :)
20266      # First separate the path from the arguments. This will split at the first
20267      # space.
20268      complete="$FOUND_MAKE"
20269      path="${complete%% *}"
20270      tmp="$complete EOL"
20271      arguments="${tmp#* }"
20272
20273      # Cannot rely on the command "which" here since it doesn't always work.
20274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20275      if test -z "$is_absolute_path"; then
20276        # Path to executable is not absolute. Find it.
20277        IFS_save="$IFS"
20278        IFS=:
20279        for p in $PATH; do
20280          if test -f "$p/$path" && test -x "$p/$path"; then
20281            new_path="$p/$path"
20282            break
20283          fi
20284        done
20285        IFS="$IFS_save"
20286      else
20287        # This is an absolute path, we can use it without further modifications.
20288        new_path="$path"
20289      fi
20290
20291      if test "x$new_path" = x; then
20292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20294        has_space=`$ECHO "$complete" | $GREP " "`
20295        if test "x$has_space" != x; then
20296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20298        fi
20299        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20300      fi
20301    fi
20302
20303    # Now join together the path and the arguments once again
20304    if test "x$arguments" != xEOL; then
20305      new_complete="$new_path ${arguments% *}"
20306    else
20307      new_complete="$new_path"
20308    fi
20309
20310    if test "x$complete" != "x$new_complete"; then
20311      FOUND_MAKE="$new_complete"
20312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20313$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20314    fi
20315  fi
20316
20317        fi
20318      fi
20319    fi
20320  fi
20321
20322        if test "x$FOUND_MAKE" = x; then
20323          for ac_prog in make
20324do
20325  # Extract the first word of "$ac_prog", so it can be a program name with args.
20326set dummy $ac_prog; ac_word=$2
20327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20328$as_echo_n "checking for $ac_word... " >&6; }
20329if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20330  $as_echo_n "(cached) " >&6
20331else
20332  case $CHECK_TOOLSDIR_MAKE in
20333  [\\/]* | ?:[\\/]*)
20334  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20335  ;;
20336  *)
20337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20338for as_dir in $PATH
20339do
20340  IFS=$as_save_IFS
20341  test -z "$as_dir" && as_dir=.
20342    for ac_exec_ext in '' $ac_executable_extensions; do
20343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20344    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20346    break 2
20347  fi
20348done
20349  done
20350IFS=$as_save_IFS
20351
20352  ;;
20353esac
20354fi
20355CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20356if test -n "$CHECK_TOOLSDIR_MAKE"; then
20357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20358$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20359else
20360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20361$as_echo "no" >&6; }
20362fi
20363
20364
20365  test -n "$CHECK_TOOLSDIR_MAKE" && break
20366done
20367
20368
20369  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20370  DESCRIPTION="make in tools-dir"
20371
20372  # On Cygwin, we require a newer version of make than on other platforms
20373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20374    MAKE_VERSION_EXPR="-e 4\."
20375    MAKE_REQUIRED_VERSION="4.0"
20376   else
20377    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20378    MAKE_REQUIRED_VERSION="3.81"
20379  fi
20380
20381  if test "x$MAKE_CANDIDATE" != x; then
20382    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20383$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20384    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20385    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20386    if test "x$IS_GNU_MAKE" = x; then
20387      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20388$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20389    else
20390      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20391      if test "x$IS_MODERN_MAKE" = x; then
20392        { $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
20393$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;}
20394      else
20395        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20396          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20397            MAKE_EXPECTED_ENV='cygwin'
20398          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399            MAKE_EXPECTED_ENV='msys'
20400          else
20401            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20402          fi
20403          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20404          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20405        else
20406          # Not relevant for non-Windows
20407          IS_MAKE_CORRECT_ENV=true
20408        fi
20409        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20410          { $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
20411$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;}
20412        else
20413          FOUND_MAKE=$MAKE_CANDIDATE
20414
20415  # Only process if variable expands to non-empty
20416
20417  if test "x$FOUND_MAKE" != x; then
20418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20419
20420  # First separate the path from the arguments. This will split at the first
20421  # space.
20422  complete="$FOUND_MAKE"
20423  path="${complete%% *}"
20424  tmp="$complete EOL"
20425  arguments="${tmp#* }"
20426
20427  # Input might be given as Windows format, start by converting to
20428  # unix format.
20429  new_path=`$CYGPATH -u "$path"`
20430
20431  # Now try to locate executable using which
20432  new_path=`$WHICH "$new_path" 2> /dev/null`
20433  # bat and cmd files are not always considered executable in cygwin causing which
20434  # to not find them
20435  if test "x$new_path" = x \
20436      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20437      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20438    new_path=`$CYGPATH -u "$path"`
20439  fi
20440  if test "x$new_path" = x; then
20441    # Oops. Which didn't find the executable.
20442    # The splitting of arguments from the executable at a space might have been incorrect,
20443    # since paths with space are more likely in Windows. Give it another try with the whole
20444    # argument.
20445    path="$complete"
20446    arguments="EOL"
20447    new_path=`$CYGPATH -u "$path"`
20448    new_path=`$WHICH "$new_path" 2> /dev/null`
20449    # bat and cmd files are not always considered executable in cygwin causing which
20450    # to not find them
20451    if test "x$new_path" = x \
20452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20454      new_path=`$CYGPATH -u "$path"`
20455    fi
20456    if test "x$new_path" = x; then
20457      # It's still not found. Now this is an unrecoverable error.
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20459$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20460      has_space=`$ECHO "$complete" | $GREP " "`
20461      if test "x$has_space" != x; then
20462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20464      fi
20465      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20466    fi
20467  fi
20468
20469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20472  # "foo.exe" is OK but "foo" is an error.
20473  #
20474  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20475  # It is also a way to make sure we got the proper file name for the real test later on.
20476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20477  if test "x$test_shortpath" = x; then
20478    # Short path failed, file does not exist as specified.
20479    # Try adding .exe or .cmd
20480    if test -f "${new_path}.exe"; then
20481      input_to_shortpath="${new_path}.exe"
20482    elif test -f "${new_path}.cmd"; then
20483      input_to_shortpath="${new_path}.cmd"
20484    else
20485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20487      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20488$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20489      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20490    fi
20491  else
20492    input_to_shortpath="$new_path"
20493  fi
20494
20495  # Call helper function which possibly converts this using DOS-style short mode.
20496  # If so, the updated path is stored in $new_path.
20497  new_path="$input_to_shortpath"
20498
20499  input_path="$input_to_shortpath"
20500  # Check if we need to convert this using DOS-style short mode. If the path
20501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20502  # take no chances and rewrite it.
20503  # Note: m4 eats our [], so we need to use [ and ] instead.
20504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20505  if test "x$has_forbidden_chars" != x; then
20506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20510      # Going to short mode and back again did indeed matter. Since short mode is
20511      # case insensitive, let's make it lowercase to improve readability.
20512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20513      # Now convert it back to Unix-style (cygpath)
20514      input_path=`$CYGPATH -u "$shortmode_path"`
20515      new_path="$input_path"
20516    fi
20517  fi
20518
20519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20520  if test "x$test_cygdrive_prefix" = x; then
20521    # As a simple fix, exclude /usr/bin since it's not a real path.
20522    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20524      # a path prefixed by /cygdrive for fixpath to work.
20525      new_path="$CYGWIN_ROOT_PATH$input_path"
20526    fi
20527  fi
20528
20529  # remove trailing .exe if any
20530  new_path="${new_path/%.exe/}"
20531
20532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20533
20534  # First separate the path from the arguments. This will split at the first
20535  # space.
20536  complete="$FOUND_MAKE"
20537  path="${complete%% *}"
20538  tmp="$complete EOL"
20539  arguments="${tmp#* }"
20540
20541  # Input might be given as Windows format, start by converting to
20542  # unix format.
20543  new_path="$path"
20544
20545  windows_path="$new_path"
20546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20547    unix_path=`$CYGPATH -u "$windows_path"`
20548    new_path="$unix_path"
20549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20551    new_path="$unix_path"
20552  fi
20553
20554
20555  # Now try to locate executable using which
20556  new_path=`$WHICH "$new_path" 2> /dev/null`
20557
20558  if test "x$new_path" = x; then
20559    # Oops. Which didn't find the executable.
20560    # The splitting of arguments from the executable at a space might have been incorrect,
20561    # since paths with space are more likely in Windows. Give it another try with the whole
20562    # argument.
20563    path="$complete"
20564    arguments="EOL"
20565    new_path="$path"
20566
20567  windows_path="$new_path"
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569    unix_path=`$CYGPATH -u "$windows_path"`
20570    new_path="$unix_path"
20571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20573    new_path="$unix_path"
20574  fi
20575
20576
20577    new_path=`$WHICH "$new_path" 2> /dev/null`
20578    # bat and cmd files are not always considered executable in MSYS causing which
20579    # to not find them
20580    if test "x$new_path" = x \
20581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20583      new_path="$path"
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594    fi
20595
20596    if test "x$new_path" = x; then
20597      # It's still not found. Now this is an unrecoverable error.
20598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20600      has_space=`$ECHO "$complete" | $GREP " "`
20601      if test "x$has_space" != x; then
20602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20604      fi
20605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20606    fi
20607  fi
20608
20609  # Now new_path has a complete unix path to the binary
20610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20611    # Keep paths in /bin as-is, but remove trailing .exe if any
20612    new_path="${new_path/%.exe/}"
20613    # Do not save /bin paths to all_fixpath_prefixes!
20614  else
20615    # Not in mixed or Windows style, start by that.
20616    new_path=`cmd //c echo $new_path`
20617
20618  input_path="$new_path"
20619  # Check if we need to convert this using DOS-style short mode. If the path
20620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20621  # take no chances and rewrite it.
20622  # Note: m4 eats our [], so we need to use [ and ] instead.
20623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20624  if test "x$has_forbidden_chars" != x; then
20625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20627  fi
20628
20629    # Output is in $new_path
20630
20631  windows_path="$new_path"
20632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20633    unix_path=`$CYGPATH -u "$windows_path"`
20634    new_path="$unix_path"
20635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20637    new_path="$unix_path"
20638  fi
20639
20640    # remove trailing .exe if any
20641    new_path="${new_path/%.exe/}"
20642
20643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20645  fi
20646
20647    else
20648      # We're on a unix platform. Hooray! :)
20649      # First separate the path from the arguments. This will split at the first
20650      # space.
20651      complete="$FOUND_MAKE"
20652      path="${complete%% *}"
20653      tmp="$complete EOL"
20654      arguments="${tmp#* }"
20655
20656      # Cannot rely on the command "which" here since it doesn't always work.
20657      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20658      if test -z "$is_absolute_path"; then
20659        # Path to executable is not absolute. Find it.
20660        IFS_save="$IFS"
20661        IFS=:
20662        for p in $PATH; do
20663          if test -f "$p/$path" && test -x "$p/$path"; then
20664            new_path="$p/$path"
20665            break
20666          fi
20667        done
20668        IFS="$IFS_save"
20669      else
20670        # This is an absolute path, we can use it without further modifications.
20671        new_path="$path"
20672      fi
20673
20674      if test "x$new_path" = x; then
20675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20677        has_space=`$ECHO "$complete" | $GREP " "`
20678        if test "x$has_space" != x; then
20679          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20680$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20681        fi
20682        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20683      fi
20684    fi
20685
20686    # Now join together the path and the arguments once again
20687    if test "x$arguments" != xEOL; then
20688      new_complete="$new_path ${arguments% *}"
20689    else
20690      new_complete="$new_path"
20691    fi
20692
20693    if test "x$complete" != "x$new_complete"; then
20694      FOUND_MAKE="$new_complete"
20695      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20696$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20697    fi
20698  fi
20699
20700        fi
20701      fi
20702    fi
20703  fi
20704
20705        fi
20706        PATH=$OLD_PATH
20707      fi
20708    fi
20709
20710    if test "x$FOUND_MAKE" = x; then
20711      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
20712    fi
20713
20714    else
20715      # If it succeeded, then it was overridden by the user. We will use it
20716      # for the tool.
20717
20718      # First remove it from the list of overridden variables, so we can test
20719      # for unknown variables in the end.
20720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20721
20722      # Check if we try to supply an empty value
20723      if test "x$MAKE" = x; then
20724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20725$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20727$as_echo_n "checking for MAKE... " >&6; }
20728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20729$as_echo "disabled" >&6; }
20730      else
20731        # Check if the provided tool contains a complete path.
20732        tool_specified="$MAKE"
20733        tool_basename="${tool_specified##*/}"
20734        if test "x$tool_basename" = "x$tool_specified"; then
20735          # A command without a complete path is provided, search $PATH.
20736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20737$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20738          # Extract the first word of "$tool_basename", so it can be a program name with args.
20739set dummy $tool_basename; ac_word=$2
20740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20741$as_echo_n "checking for $ac_word... " >&6; }
20742if ${ac_cv_path_MAKE+:} false; then :
20743  $as_echo_n "(cached) " >&6
20744else
20745  case $MAKE in
20746  [\\/]* | ?:[\\/]*)
20747  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20748  ;;
20749  *)
20750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20751for as_dir in $PATH
20752do
20753  IFS=$as_save_IFS
20754  test -z "$as_dir" && as_dir=.
20755    for ac_exec_ext in '' $ac_executable_extensions; do
20756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20757    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20759    break 2
20760  fi
20761done
20762  done
20763IFS=$as_save_IFS
20764
20765  ;;
20766esac
20767fi
20768MAKE=$ac_cv_path_MAKE
20769if test -n "$MAKE"; then
20770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20771$as_echo "$MAKE" >&6; }
20772else
20773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20774$as_echo "no" >&6; }
20775fi
20776
20777
20778          if test "x$MAKE" = x; then
20779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20780          fi
20781        else
20782          # Otherwise we believe it is a complete path. Use it as it is.
20783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20784$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20786$as_echo_n "checking for MAKE... " >&6; }
20787          if test ! -x "$tool_specified"; then
20788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20789$as_echo "not found" >&6; }
20790            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20791          fi
20792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20793$as_echo "$tool_specified" >&6; }
20794        fi
20795      fi
20796    fi
20797
20798    # If MAKE was set by user, verify the version
20799
20800  MAKE_CANDIDATE=""$MAKE""
20801  DESCRIPTION="user supplied MAKE=$MAKE"
20802
20803  # On Cygwin, we require a newer version of make than on other platforms
20804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20805    MAKE_VERSION_EXPR="-e 4\."
20806    MAKE_REQUIRED_VERSION="4.0"
20807   else
20808    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20809    MAKE_REQUIRED_VERSION="3.81"
20810  fi
20811
20812  if test "x$MAKE_CANDIDATE" != x; then
20813    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20814$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20815    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20816    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20817    if test "x$IS_GNU_MAKE" = x; then
20818      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20819$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20820    else
20821      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20822      if test "x$IS_MODERN_MAKE" = x; then
20823        { $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
20824$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;}
20825      else
20826        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20827          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20828            MAKE_EXPECTED_ENV='cygwin'
20829          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20830            MAKE_EXPECTED_ENV='msys'
20831          else
20832            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20833          fi
20834          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20835          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20836        else
20837          # Not relevant for non-Windows
20838          IS_MAKE_CORRECT_ENV=true
20839        fi
20840        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20841          { $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
20842$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;}
20843        else
20844          FOUND_MAKE=$MAKE_CANDIDATE
20845
20846  # Only process if variable expands to non-empty
20847
20848  if test "x$FOUND_MAKE" != x; then
20849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850
20851  # First separate the path from the arguments. This will split at the first
20852  # space.
20853  complete="$FOUND_MAKE"
20854  path="${complete%% *}"
20855  tmp="$complete EOL"
20856  arguments="${tmp#* }"
20857
20858  # Input might be given as Windows format, start by converting to
20859  # unix format.
20860  new_path=`$CYGPATH -u "$path"`
20861
20862  # Now try to locate executable using which
20863  new_path=`$WHICH "$new_path" 2> /dev/null`
20864  # bat and cmd files are not always considered executable in cygwin causing which
20865  # to not find them
20866  if test "x$new_path" = x \
20867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20869    new_path=`$CYGPATH -u "$path"`
20870  fi
20871  if test "x$new_path" = x; then
20872    # Oops. Which didn't find the executable.
20873    # The splitting of arguments from the executable at a space might have been incorrect,
20874    # since paths with space are more likely in Windows. Give it another try with the whole
20875    # argument.
20876    path="$complete"
20877    arguments="EOL"
20878    new_path=`$CYGPATH -u "$path"`
20879    new_path=`$WHICH "$new_path" 2> /dev/null`
20880    # bat and cmd files are not always considered executable in cygwin causing which
20881    # to not find them
20882    if test "x$new_path" = x \
20883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20885      new_path=`$CYGPATH -u "$path"`
20886    fi
20887    if test "x$new_path" = x; then
20888      # It's still not found. Now this is an unrecoverable error.
20889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20891      has_space=`$ECHO "$complete" | $GREP " "`
20892      if test "x$has_space" != x; then
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20895      fi
20896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20897    fi
20898  fi
20899
20900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20903  # "foo.exe" is OK but "foo" is an error.
20904  #
20905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20906  # It is also a way to make sure we got the proper file name for the real test later on.
20907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20908  if test "x$test_shortpath" = x; then
20909    # Short path failed, file does not exist as specified.
20910    # Try adding .exe or .cmd
20911    if test -f "${new_path}.exe"; then
20912      input_to_shortpath="${new_path}.exe"
20913    elif test -f "${new_path}.cmd"; then
20914      input_to_shortpath="${new_path}.cmd"
20915    else
20916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20917$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20921    fi
20922  else
20923    input_to_shortpath="$new_path"
20924  fi
20925
20926  # Call helper function which possibly converts this using DOS-style short mode.
20927  # If so, the updated path is stored in $new_path.
20928  new_path="$input_to_shortpath"
20929
20930  input_path="$input_to_shortpath"
20931  # Check if we need to convert this using DOS-style short mode. If the path
20932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20933  # take no chances and rewrite it.
20934  # Note: m4 eats our [], so we need to use [ and ] instead.
20935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20936  if test "x$has_forbidden_chars" != x; then
20937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20941      # Going to short mode and back again did indeed matter. Since short mode is
20942      # case insensitive, let's make it lowercase to improve readability.
20943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20944      # Now convert it back to Unix-style (cygpath)
20945      input_path=`$CYGPATH -u "$shortmode_path"`
20946      new_path="$input_path"
20947    fi
20948  fi
20949
20950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20951  if test "x$test_cygdrive_prefix" = x; then
20952    # As a simple fix, exclude /usr/bin since it's not a real path.
20953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20955      # a path prefixed by /cygdrive for fixpath to work.
20956      new_path="$CYGWIN_ROOT_PATH$input_path"
20957    fi
20958  fi
20959
20960  # remove trailing .exe if any
20961  new_path="${new_path/%.exe/}"
20962
20963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20964
20965  # First separate the path from the arguments. This will split at the first
20966  # space.
20967  complete="$FOUND_MAKE"
20968  path="${complete%% *}"
20969  tmp="$complete EOL"
20970  arguments="${tmp#* }"
20971
20972  # Input might be given as Windows format, start by converting to
20973  # unix format.
20974  new_path="$path"
20975
20976  windows_path="$new_path"
20977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20978    unix_path=`$CYGPATH -u "$windows_path"`
20979    new_path="$unix_path"
20980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20982    new_path="$unix_path"
20983  fi
20984
20985
20986  # Now try to locate executable using which
20987  new_path=`$WHICH "$new_path" 2> /dev/null`
20988
20989  if test "x$new_path" = x; then
20990    # Oops. Which didn't find the executable.
20991    # The splitting of arguments from the executable at a space might have been incorrect,
20992    # since paths with space are more likely in Windows. Give it another try with the whole
20993    # argument.
20994    path="$complete"
20995    arguments="EOL"
20996    new_path="$path"
20997
20998  windows_path="$new_path"
20999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000    unix_path=`$CYGPATH -u "$windows_path"`
21001    new_path="$unix_path"
21002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004    new_path="$unix_path"
21005  fi
21006
21007
21008    new_path=`$WHICH "$new_path" 2> /dev/null`
21009    # bat and cmd files are not always considered executable in MSYS causing which
21010    # to not find them
21011    if test "x$new_path" = x \
21012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21014      new_path="$path"
21015
21016  windows_path="$new_path"
21017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21018    unix_path=`$CYGPATH -u "$windows_path"`
21019    new_path="$unix_path"
21020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21022    new_path="$unix_path"
21023  fi
21024
21025    fi
21026
21027    if test "x$new_path" = x; then
21028      # It's still not found. Now this is an unrecoverable error.
21029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21031      has_space=`$ECHO "$complete" | $GREP " "`
21032      if test "x$has_space" != x; then
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21035      fi
21036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21037    fi
21038  fi
21039
21040  # Now new_path has a complete unix path to the binary
21041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21042    # Keep paths in /bin as-is, but remove trailing .exe if any
21043    new_path="${new_path/%.exe/}"
21044    # Do not save /bin paths to all_fixpath_prefixes!
21045  else
21046    # Not in mixed or Windows style, start by that.
21047    new_path=`cmd //c echo $new_path`
21048
21049  input_path="$new_path"
21050  # Check if we need to convert this using DOS-style short mode. If the path
21051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21052  # take no chances and rewrite it.
21053  # Note: m4 eats our [], so we need to use [ and ] instead.
21054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21055  if test "x$has_forbidden_chars" != x; then
21056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21058  fi
21059
21060    # Output is in $new_path
21061
21062  windows_path="$new_path"
21063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21064    unix_path=`$CYGPATH -u "$windows_path"`
21065    new_path="$unix_path"
21066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21068    new_path="$unix_path"
21069  fi
21070
21071    # remove trailing .exe if any
21072    new_path="${new_path/%.exe/}"
21073
21074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21076  fi
21077
21078    else
21079      # We're on a unix platform. Hooray! :)
21080      # First separate the path from the arguments. This will split at the first
21081      # space.
21082      complete="$FOUND_MAKE"
21083      path="${complete%% *}"
21084      tmp="$complete EOL"
21085      arguments="${tmp#* }"
21086
21087      # Cannot rely on the command "which" here since it doesn't always work.
21088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21089      if test -z "$is_absolute_path"; then
21090        # Path to executable is not absolute. Find it.
21091        IFS_save="$IFS"
21092        IFS=:
21093        for p in $PATH; do
21094          if test -f "$p/$path" && test -x "$p/$path"; then
21095            new_path="$p/$path"
21096            break
21097          fi
21098        done
21099        IFS="$IFS_save"
21100      else
21101        # This is an absolute path, we can use it without further modifications.
21102        new_path="$path"
21103      fi
21104
21105      if test "x$new_path" = x; then
21106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21108        has_space=`$ECHO "$complete" | $GREP " "`
21109        if test "x$has_space" != x; then
21110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21112        fi
21113        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21114      fi
21115    fi
21116
21117    # Now join together the path and the arguments once again
21118    if test "x$arguments" != xEOL; then
21119      new_complete="$new_path ${arguments% *}"
21120    else
21121      new_complete="$new_path"
21122    fi
21123
21124    if test "x$complete" != "x$new_complete"; then
21125      FOUND_MAKE="$new_complete"
21126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21127$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21128    fi
21129  fi
21130
21131        fi
21132      fi
21133    fi
21134  fi
21135
21136    if test "x$FOUND_MAKE" = x; then
21137      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21138    fi
21139
21140  fi
21141
21142
21143  MAKE=$FOUND_MAKE
21144
21145  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21146$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21147
21148
21149  # Check if make supports the output sync option and if so, setup using it.
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21151$as_echo_n "checking if make --output-sync is supported... " >&6; }
21152  if $MAKE --version -O > /dev/null 2>&1; then
21153    OUTPUT_SYNC_SUPPORTED=true
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21155$as_echo "yes" >&6; }
21156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21157$as_echo_n "checking for output-sync value... " >&6; }
21158
21159# Check whether --with-output-sync was given.
21160if test "${with_output_sync+set}" = set; then :
21161  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21162fi
21163
21164    if test "x$OUTPUT_SYNC" = "x"; then
21165      OUTPUT_SYNC=none
21166    fi
21167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21168$as_echo "$OUTPUT_SYNC" >&6; }
21169    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21170      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21171    fi
21172  else
21173    OUTPUT_SYNC_SUPPORTED=false
21174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21175$as_echo "no" >&6; }
21176  fi
21177
21178
21179
21180
21181
21182
21183  # Test if find supports -delete
21184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21185$as_echo_n "checking if find supports -delete... " >&6; }
21186  FIND_DELETE="-delete"
21187
21188  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21189
21190  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21191
21192  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21193  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21194    # No, it does not.
21195    $RM $DELETEDIR/TestIfFindSupportsDelete
21196    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21197      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21198      FIND_DELETE="-print | $XARGS $RM"
21199    else
21200      FIND_DELETE="-exec $RM \{\} \+"
21201    fi
21202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21203$as_echo "no" >&6; }
21204  else
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21206$as_echo "yes" >&6; }
21207  fi
21208  $RMDIR $DELETEDIR
21209
21210
21211
21212  # Test which kind of tar was found
21213  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21214    TAR_TYPE="gnu"
21215  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21216    TAR_TYPE="bsd"
21217  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21218    TAR_TYPE="solaris"
21219  fi
21220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21221$as_echo_n "checking what type of tar was found... " >&6; }
21222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21223$as_echo "$TAR_TYPE" >&6; }
21224
21225  TAR_CREATE_FILE_PARAM=""
21226
21227  if test "x$TAR_TYPE" = "xgnu"; then
21228    TAR_INCLUDE_PARAM="T"
21229    TAR_SUPPORTS_TRANSFORM="true"
21230    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21231      # When using gnu tar for Solaris targets, need to use compatibility mode
21232      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21233    fi
21234  else
21235    TAR_INCLUDE_PARAM="I"
21236    TAR_SUPPORTS_TRANSFORM="false"
21237  fi
21238
21239
21240
21241
21242
21243
21244  # These tools might not be installed by default,
21245  # need hint on how to install them.
21246
21247
21248
21249  # Publish this variable in the help.
21250
21251
21252  if [ -z "${UNZIP+x}" ]; then
21253    # The variable is not set by user, try to locate tool using the code snippet
21254    for ac_prog in unzip
21255do
21256  # Extract the first word of "$ac_prog", so it can be a program name with args.
21257set dummy $ac_prog; ac_word=$2
21258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21259$as_echo_n "checking for $ac_word... " >&6; }
21260if ${ac_cv_path_UNZIP+:} false; then :
21261  $as_echo_n "(cached) " >&6
21262else
21263  case $UNZIP in
21264  [\\/]* | ?:[\\/]*)
21265  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21266  ;;
21267  *)
21268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21269for as_dir in $PATH
21270do
21271  IFS=$as_save_IFS
21272  test -z "$as_dir" && as_dir=.
21273    for ac_exec_ext in '' $ac_executable_extensions; do
21274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21275    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21277    break 2
21278  fi
21279done
21280  done
21281IFS=$as_save_IFS
21282
21283  ;;
21284esac
21285fi
21286UNZIP=$ac_cv_path_UNZIP
21287if test -n "$UNZIP"; then
21288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21289$as_echo "$UNZIP" >&6; }
21290else
21291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21292$as_echo "no" >&6; }
21293fi
21294
21295
21296  test -n "$UNZIP" && break
21297done
21298
21299  else
21300    # The variable is set, but is it from the command line or the environment?
21301
21302    # Try to remove the string !UNZIP! from our list.
21303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21305      # If it failed, the variable was not from the command line. Ignore it,
21306      # but warn the user (except for BASH, which is always set by the calling BASH).
21307      if test "xUNZIP" != xBASH; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21309$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21310      fi
21311      # Try to locate tool using the code snippet
21312      for ac_prog in unzip
21313do
21314  # Extract the first word of "$ac_prog", so it can be a program name with args.
21315set dummy $ac_prog; ac_word=$2
21316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21317$as_echo_n "checking for $ac_word... " >&6; }
21318if ${ac_cv_path_UNZIP+:} false; then :
21319  $as_echo_n "(cached) " >&6
21320else
21321  case $UNZIP in
21322  [\\/]* | ?:[\\/]*)
21323  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21324  ;;
21325  *)
21326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21327for as_dir in $PATH
21328do
21329  IFS=$as_save_IFS
21330  test -z "$as_dir" && as_dir=.
21331    for ac_exec_ext in '' $ac_executable_extensions; do
21332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21333    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21335    break 2
21336  fi
21337done
21338  done
21339IFS=$as_save_IFS
21340
21341  ;;
21342esac
21343fi
21344UNZIP=$ac_cv_path_UNZIP
21345if test -n "$UNZIP"; then
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21347$as_echo "$UNZIP" >&6; }
21348else
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21350$as_echo "no" >&6; }
21351fi
21352
21353
21354  test -n "$UNZIP" && break
21355done
21356
21357    else
21358      # If it succeeded, then it was overridden by the user. We will use it
21359      # for the tool.
21360
21361      # First remove it from the list of overridden variables, so we can test
21362      # for unknown variables in the end.
21363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21364
21365      # Check if we try to supply an empty value
21366      if test "x$UNZIP" = x; then
21367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21368$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21370$as_echo_n "checking for UNZIP... " >&6; }
21371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21372$as_echo "disabled" >&6; }
21373      else
21374        # Check if the provided tool contains a complete path.
21375        tool_specified="$UNZIP"
21376        tool_basename="${tool_specified##*/}"
21377        if test "x$tool_basename" = "x$tool_specified"; then
21378          # A command without a complete path is provided, search $PATH.
21379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21380$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21381          # Extract the first word of "$tool_basename", so it can be a program name with args.
21382set dummy $tool_basename; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if ${ac_cv_path_UNZIP+:} false; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  case $UNZIP in
21389  [\\/]* | ?:[\\/]*)
21390  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21391  ;;
21392  *)
21393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21394for as_dir in $PATH
21395do
21396  IFS=$as_save_IFS
21397  test -z "$as_dir" && as_dir=.
21398    for ac_exec_ext in '' $ac_executable_extensions; do
21399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21400    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21402    break 2
21403  fi
21404done
21405  done
21406IFS=$as_save_IFS
21407
21408  ;;
21409esac
21410fi
21411UNZIP=$ac_cv_path_UNZIP
21412if test -n "$UNZIP"; then
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21414$as_echo "$UNZIP" >&6; }
21415else
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21417$as_echo "no" >&6; }
21418fi
21419
21420
21421          if test "x$UNZIP" = x; then
21422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21423          fi
21424        else
21425          # Otherwise we believe it is a complete path. Use it as it is.
21426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21427$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21429$as_echo_n "checking for UNZIP... " >&6; }
21430          if test ! -x "$tool_specified"; then
21431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21432$as_echo "not found" >&6; }
21433            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21434          fi
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21436$as_echo "$tool_specified" >&6; }
21437        fi
21438      fi
21439    fi
21440
21441  fi
21442
21443
21444
21445  if test "x$UNZIP" = x; then
21446    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21447  fi
21448
21449
21450  # Since zip uses "ZIP" as a environment variable for passing options, we need
21451  # to name our variable differently, hence ZIPEXE.
21452
21453
21454
21455  # Publish this variable in the help.
21456
21457
21458  if [ -z "${ZIPEXE+x}" ]; then
21459    # The variable is not set by user, try to locate tool using the code snippet
21460    for ac_prog in zip
21461do
21462  # Extract the first word of "$ac_prog", so it can be a program name with args.
21463set dummy $ac_prog; ac_word=$2
21464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21465$as_echo_n "checking for $ac_word... " >&6; }
21466if ${ac_cv_path_ZIPEXE+:} false; then :
21467  $as_echo_n "(cached) " >&6
21468else
21469  case $ZIPEXE in
21470  [\\/]* | ?:[\\/]*)
21471  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21472  ;;
21473  *)
21474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21475for as_dir in $PATH
21476do
21477  IFS=$as_save_IFS
21478  test -z "$as_dir" && as_dir=.
21479    for ac_exec_ext in '' $ac_executable_extensions; do
21480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21481    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21483    break 2
21484  fi
21485done
21486  done
21487IFS=$as_save_IFS
21488
21489  ;;
21490esac
21491fi
21492ZIPEXE=$ac_cv_path_ZIPEXE
21493if test -n "$ZIPEXE"; then
21494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21495$as_echo "$ZIPEXE" >&6; }
21496else
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21498$as_echo "no" >&6; }
21499fi
21500
21501
21502  test -n "$ZIPEXE" && break
21503done
21504
21505  else
21506    # The variable is set, but is it from the command line or the environment?
21507
21508    # Try to remove the string !ZIPEXE! from our list.
21509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21511      # If it failed, the variable was not from the command line. Ignore it,
21512      # but warn the user (except for BASH, which is always set by the calling BASH).
21513      if test "xZIPEXE" != xBASH; then
21514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21515$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21516      fi
21517      # Try to locate tool using the code snippet
21518      for ac_prog in zip
21519do
21520  # Extract the first word of "$ac_prog", so it can be a program name with args.
21521set dummy $ac_prog; ac_word=$2
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21523$as_echo_n "checking for $ac_word... " >&6; }
21524if ${ac_cv_path_ZIPEXE+:} false; then :
21525  $as_echo_n "(cached) " >&6
21526else
21527  case $ZIPEXE in
21528  [\\/]* | ?:[\\/]*)
21529  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21530  ;;
21531  *)
21532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21533for as_dir in $PATH
21534do
21535  IFS=$as_save_IFS
21536  test -z "$as_dir" && as_dir=.
21537    for ac_exec_ext in '' $ac_executable_extensions; do
21538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21539    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21541    break 2
21542  fi
21543done
21544  done
21545IFS=$as_save_IFS
21546
21547  ;;
21548esac
21549fi
21550ZIPEXE=$ac_cv_path_ZIPEXE
21551if test -n "$ZIPEXE"; then
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21553$as_echo "$ZIPEXE" >&6; }
21554else
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556$as_echo "no" >&6; }
21557fi
21558
21559
21560  test -n "$ZIPEXE" && break
21561done
21562
21563    else
21564      # If it succeeded, then it was overridden by the user. We will use it
21565      # for the tool.
21566
21567      # First remove it from the list of overridden variables, so we can test
21568      # for unknown variables in the end.
21569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21570
21571      # Check if we try to supply an empty value
21572      if test "x$ZIPEXE" = x; then
21573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21574$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21576$as_echo_n "checking for ZIPEXE... " >&6; }
21577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21578$as_echo "disabled" >&6; }
21579      else
21580        # Check if the provided tool contains a complete path.
21581        tool_specified="$ZIPEXE"
21582        tool_basename="${tool_specified##*/}"
21583        if test "x$tool_basename" = "x$tool_specified"; then
21584          # A command without a complete path is provided, search $PATH.
21585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21586$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21587          # Extract the first word of "$tool_basename", so it can be a program name with args.
21588set dummy $tool_basename; ac_word=$2
21589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21590$as_echo_n "checking for $ac_word... " >&6; }
21591if ${ac_cv_path_ZIPEXE+:} false; then :
21592  $as_echo_n "(cached) " >&6
21593else
21594  case $ZIPEXE in
21595  [\\/]* | ?:[\\/]*)
21596  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21597  ;;
21598  *)
21599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21600for as_dir in $PATH
21601do
21602  IFS=$as_save_IFS
21603  test -z "$as_dir" && as_dir=.
21604    for ac_exec_ext in '' $ac_executable_extensions; do
21605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21606    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21608    break 2
21609  fi
21610done
21611  done
21612IFS=$as_save_IFS
21613
21614  ;;
21615esac
21616fi
21617ZIPEXE=$ac_cv_path_ZIPEXE
21618if test -n "$ZIPEXE"; then
21619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21620$as_echo "$ZIPEXE" >&6; }
21621else
21622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21623$as_echo "no" >&6; }
21624fi
21625
21626
21627          if test "x$ZIPEXE" = x; then
21628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21629          fi
21630        else
21631          # Otherwise we believe it is a complete path. Use it as it is.
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21633$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21635$as_echo_n "checking for ZIPEXE... " >&6; }
21636          if test ! -x "$tool_specified"; then
21637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21638$as_echo "not found" >&6; }
21639            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21640          fi
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21642$as_echo "$tool_specified" >&6; }
21643        fi
21644      fi
21645    fi
21646
21647  fi
21648
21649
21650
21651  if test "x$ZIPEXE" = x; then
21652    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21653  fi
21654
21655
21656
21657  # Non-required basic tools
21658
21659
21660
21661  # Publish this variable in the help.
21662
21663
21664  if [ -z "${LDD+x}" ]; then
21665    # The variable is not set by user, try to locate tool using the code snippet
21666    for ac_prog in ldd
21667do
21668  # Extract the first word of "$ac_prog", so it can be a program name with args.
21669set dummy $ac_prog; ac_word=$2
21670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21671$as_echo_n "checking for $ac_word... " >&6; }
21672if ${ac_cv_path_LDD+:} false; then :
21673  $as_echo_n "(cached) " >&6
21674else
21675  case $LDD in
21676  [\\/]* | ?:[\\/]*)
21677  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21678  ;;
21679  *)
21680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21681for as_dir in $PATH
21682do
21683  IFS=$as_save_IFS
21684  test -z "$as_dir" && as_dir=.
21685    for ac_exec_ext in '' $ac_executable_extensions; do
21686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21687    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21689    break 2
21690  fi
21691done
21692  done
21693IFS=$as_save_IFS
21694
21695  ;;
21696esac
21697fi
21698LDD=$ac_cv_path_LDD
21699if test -n "$LDD"; then
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21701$as_echo "$LDD" >&6; }
21702else
21703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21704$as_echo "no" >&6; }
21705fi
21706
21707
21708  test -n "$LDD" && break
21709done
21710
21711  else
21712    # The variable is set, but is it from the command line or the environment?
21713
21714    # Try to remove the string !LDD! from our list.
21715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21717      # If it failed, the variable was not from the command line. Ignore it,
21718      # but warn the user (except for BASH, which is always set by the calling BASH).
21719      if test "xLDD" != xBASH; then
21720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21721$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21722      fi
21723      # Try to locate tool using the code snippet
21724      for ac_prog in ldd
21725do
21726  # Extract the first word of "$ac_prog", so it can be a program name with args.
21727set dummy $ac_prog; ac_word=$2
21728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21729$as_echo_n "checking for $ac_word... " >&6; }
21730if ${ac_cv_path_LDD+:} false; then :
21731  $as_echo_n "(cached) " >&6
21732else
21733  case $LDD in
21734  [\\/]* | ?:[\\/]*)
21735  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21736  ;;
21737  *)
21738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21739for as_dir in $PATH
21740do
21741  IFS=$as_save_IFS
21742  test -z "$as_dir" && as_dir=.
21743    for ac_exec_ext in '' $ac_executable_extensions; do
21744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21745    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21747    break 2
21748  fi
21749done
21750  done
21751IFS=$as_save_IFS
21752
21753  ;;
21754esac
21755fi
21756LDD=$ac_cv_path_LDD
21757if test -n "$LDD"; then
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21759$as_echo "$LDD" >&6; }
21760else
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21762$as_echo "no" >&6; }
21763fi
21764
21765
21766  test -n "$LDD" && break
21767done
21768
21769    else
21770      # If it succeeded, then it was overridden by the user. We will use it
21771      # for the tool.
21772
21773      # First remove it from the list of overridden variables, so we can test
21774      # for unknown variables in the end.
21775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21776
21777      # Check if we try to supply an empty value
21778      if test "x$LDD" = x; then
21779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21780$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21782$as_echo_n "checking for LDD... " >&6; }
21783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21784$as_echo "disabled" >&6; }
21785      else
21786        # Check if the provided tool contains a complete path.
21787        tool_specified="$LDD"
21788        tool_basename="${tool_specified##*/}"
21789        if test "x$tool_basename" = "x$tool_specified"; then
21790          # A command without a complete path is provided, search $PATH.
21791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21792$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21793          # Extract the first word of "$tool_basename", so it can be a program name with args.
21794set dummy $tool_basename; ac_word=$2
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21796$as_echo_n "checking for $ac_word... " >&6; }
21797if ${ac_cv_path_LDD+:} false; then :
21798  $as_echo_n "(cached) " >&6
21799else
21800  case $LDD in
21801  [\\/]* | ?:[\\/]*)
21802  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21803  ;;
21804  *)
21805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21806for as_dir in $PATH
21807do
21808  IFS=$as_save_IFS
21809  test -z "$as_dir" && as_dir=.
21810    for ac_exec_ext in '' $ac_executable_extensions; do
21811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21812    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21814    break 2
21815  fi
21816done
21817  done
21818IFS=$as_save_IFS
21819
21820  ;;
21821esac
21822fi
21823LDD=$ac_cv_path_LDD
21824if test -n "$LDD"; then
21825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21826$as_echo "$LDD" >&6; }
21827else
21828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21829$as_echo "no" >&6; }
21830fi
21831
21832
21833          if test "x$LDD" = x; then
21834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21835          fi
21836        else
21837          # Otherwise we believe it is a complete path. Use it as it is.
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21839$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21841$as_echo_n "checking for LDD... " >&6; }
21842          if test ! -x "$tool_specified"; then
21843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21844$as_echo "not found" >&6; }
21845            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21846          fi
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21848$as_echo "$tool_specified" >&6; }
21849        fi
21850      fi
21851    fi
21852
21853  fi
21854
21855
21856  if test "x$LDD" = "x"; then
21857    # List shared lib dependencies is used for
21858    # debug output and checking for forbidden dependencies.
21859    # We can build without it.
21860    LDD="true"
21861  fi
21862
21863
21864  # Publish this variable in the help.
21865
21866
21867  if [ -z "${OTOOL+x}" ]; then
21868    # The variable is not set by user, try to locate tool using the code snippet
21869    for ac_prog in otool
21870do
21871  # Extract the first word of "$ac_prog", so it can be a program name with args.
21872set dummy $ac_prog; ac_word=$2
21873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21874$as_echo_n "checking for $ac_word... " >&6; }
21875if ${ac_cv_path_OTOOL+:} false; then :
21876  $as_echo_n "(cached) " >&6
21877else
21878  case $OTOOL in
21879  [\\/]* | ?:[\\/]*)
21880  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21881  ;;
21882  *)
21883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21884for as_dir in $PATH
21885do
21886  IFS=$as_save_IFS
21887  test -z "$as_dir" && as_dir=.
21888    for ac_exec_ext in '' $ac_executable_extensions; do
21889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21890    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21892    break 2
21893  fi
21894done
21895  done
21896IFS=$as_save_IFS
21897
21898  ;;
21899esac
21900fi
21901OTOOL=$ac_cv_path_OTOOL
21902if test -n "$OTOOL"; then
21903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21904$as_echo "$OTOOL" >&6; }
21905else
21906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21907$as_echo "no" >&6; }
21908fi
21909
21910
21911  test -n "$OTOOL" && break
21912done
21913
21914  else
21915    # The variable is set, but is it from the command line or the environment?
21916
21917    # Try to remove the string !OTOOL! from our list.
21918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21920      # If it failed, the variable was not from the command line. Ignore it,
21921      # but warn the user (except for BASH, which is always set by the calling BASH).
21922      if test "xOTOOL" != xBASH; then
21923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21924$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21925      fi
21926      # Try to locate tool using the code snippet
21927      for ac_prog in otool
21928do
21929  # Extract the first word of "$ac_prog", so it can be a program name with args.
21930set dummy $ac_prog; ac_word=$2
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21932$as_echo_n "checking for $ac_word... " >&6; }
21933if ${ac_cv_path_OTOOL+:} false; then :
21934  $as_echo_n "(cached) " >&6
21935else
21936  case $OTOOL in
21937  [\\/]* | ?:[\\/]*)
21938  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21939  ;;
21940  *)
21941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21942for as_dir in $PATH
21943do
21944  IFS=$as_save_IFS
21945  test -z "$as_dir" && as_dir=.
21946    for ac_exec_ext in '' $ac_executable_extensions; do
21947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21948    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21950    break 2
21951  fi
21952done
21953  done
21954IFS=$as_save_IFS
21955
21956  ;;
21957esac
21958fi
21959OTOOL=$ac_cv_path_OTOOL
21960if test -n "$OTOOL"; then
21961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21962$as_echo "$OTOOL" >&6; }
21963else
21964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21965$as_echo "no" >&6; }
21966fi
21967
21968
21969  test -n "$OTOOL" && break
21970done
21971
21972    else
21973      # If it succeeded, then it was overridden by the user. We will use it
21974      # for the tool.
21975
21976      # First remove it from the list of overridden variables, so we can test
21977      # for unknown variables in the end.
21978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21979
21980      # Check if we try to supply an empty value
21981      if test "x$OTOOL" = x; then
21982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21983$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21985$as_echo_n "checking for OTOOL... " >&6; }
21986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21987$as_echo "disabled" >&6; }
21988      else
21989        # Check if the provided tool contains a complete path.
21990        tool_specified="$OTOOL"
21991        tool_basename="${tool_specified##*/}"
21992        if test "x$tool_basename" = "x$tool_specified"; then
21993          # A command without a complete path is provided, search $PATH.
21994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21995$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21996          # Extract the first word of "$tool_basename", so it can be a program name with args.
21997set dummy $tool_basename; ac_word=$2
21998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21999$as_echo_n "checking for $ac_word... " >&6; }
22000if ${ac_cv_path_OTOOL+:} false; then :
22001  $as_echo_n "(cached) " >&6
22002else
22003  case $OTOOL in
22004  [\\/]* | ?:[\\/]*)
22005  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22006  ;;
22007  *)
22008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22009for as_dir in $PATH
22010do
22011  IFS=$as_save_IFS
22012  test -z "$as_dir" && as_dir=.
22013    for ac_exec_ext in '' $ac_executable_extensions; do
22014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22015    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22017    break 2
22018  fi
22019done
22020  done
22021IFS=$as_save_IFS
22022
22023  ;;
22024esac
22025fi
22026OTOOL=$ac_cv_path_OTOOL
22027if test -n "$OTOOL"; then
22028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22029$as_echo "$OTOOL" >&6; }
22030else
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22032$as_echo "no" >&6; }
22033fi
22034
22035
22036          if test "x$OTOOL" = x; then
22037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22038          fi
22039        else
22040          # Otherwise we believe it is a complete path. Use it as it is.
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22042$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22044$as_echo_n "checking for OTOOL... " >&6; }
22045          if test ! -x "$tool_specified"; then
22046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22047$as_echo "not found" >&6; }
22048            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22049          fi
22050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22051$as_echo "$tool_specified" >&6; }
22052        fi
22053      fi
22054    fi
22055
22056  fi
22057
22058
22059  if test "x$OTOOL" = "x"; then
22060    OTOOL="true"
22061  fi
22062
22063
22064  # Publish this variable in the help.
22065
22066
22067  if [ -z "${READELF+x}" ]; then
22068    # The variable is not set by user, try to locate tool using the code snippet
22069    for ac_prog in greadelf readelf
22070do
22071  # Extract the first word of "$ac_prog", so it can be a program name with args.
22072set dummy $ac_prog; ac_word=$2
22073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22074$as_echo_n "checking for $ac_word... " >&6; }
22075if ${ac_cv_path_READELF+:} false; then :
22076  $as_echo_n "(cached) " >&6
22077else
22078  case $READELF in
22079  [\\/]* | ?:[\\/]*)
22080  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22081  ;;
22082  *)
22083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22084for as_dir in $PATH
22085do
22086  IFS=$as_save_IFS
22087  test -z "$as_dir" && as_dir=.
22088    for ac_exec_ext in '' $ac_executable_extensions; do
22089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22090    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22092    break 2
22093  fi
22094done
22095  done
22096IFS=$as_save_IFS
22097
22098  ;;
22099esac
22100fi
22101READELF=$ac_cv_path_READELF
22102if test -n "$READELF"; then
22103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22104$as_echo "$READELF" >&6; }
22105else
22106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22107$as_echo "no" >&6; }
22108fi
22109
22110
22111  test -n "$READELF" && break
22112done
22113
22114  else
22115    # The variable is set, but is it from the command line or the environment?
22116
22117    # Try to remove the string !READELF! from our list.
22118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22120      # If it failed, the variable was not from the command line. Ignore it,
22121      # but warn the user (except for BASH, which is always set by the calling BASH).
22122      if test "xREADELF" != xBASH; then
22123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22124$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22125      fi
22126      # Try to locate tool using the code snippet
22127      for ac_prog in greadelf readelf
22128do
22129  # Extract the first word of "$ac_prog", so it can be a program name with args.
22130set dummy $ac_prog; ac_word=$2
22131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22132$as_echo_n "checking for $ac_word... " >&6; }
22133if ${ac_cv_path_READELF+:} false; then :
22134  $as_echo_n "(cached) " >&6
22135else
22136  case $READELF in
22137  [\\/]* | ?:[\\/]*)
22138  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22139  ;;
22140  *)
22141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22142for as_dir in $PATH
22143do
22144  IFS=$as_save_IFS
22145  test -z "$as_dir" && as_dir=.
22146    for ac_exec_ext in '' $ac_executable_extensions; do
22147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22148    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22150    break 2
22151  fi
22152done
22153  done
22154IFS=$as_save_IFS
22155
22156  ;;
22157esac
22158fi
22159READELF=$ac_cv_path_READELF
22160if test -n "$READELF"; then
22161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22162$as_echo "$READELF" >&6; }
22163else
22164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22165$as_echo "no" >&6; }
22166fi
22167
22168
22169  test -n "$READELF" && break
22170done
22171
22172    else
22173      # If it succeeded, then it was overridden by the user. We will use it
22174      # for the tool.
22175
22176      # First remove it from the list of overridden variables, so we can test
22177      # for unknown variables in the end.
22178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22179
22180      # Check if we try to supply an empty value
22181      if test "x$READELF" = x; then
22182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22183$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22185$as_echo_n "checking for READELF... " >&6; }
22186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22187$as_echo "disabled" >&6; }
22188      else
22189        # Check if the provided tool contains a complete path.
22190        tool_specified="$READELF"
22191        tool_basename="${tool_specified##*/}"
22192        if test "x$tool_basename" = "x$tool_specified"; then
22193          # A command without a complete path is provided, search $PATH.
22194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22195$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22196          # Extract the first word of "$tool_basename", so it can be a program name with args.
22197set dummy $tool_basename; ac_word=$2
22198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22199$as_echo_n "checking for $ac_word... " >&6; }
22200if ${ac_cv_path_READELF+:} false; then :
22201  $as_echo_n "(cached) " >&6
22202else
22203  case $READELF in
22204  [\\/]* | ?:[\\/]*)
22205  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22206  ;;
22207  *)
22208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22209for as_dir in $PATH
22210do
22211  IFS=$as_save_IFS
22212  test -z "$as_dir" && as_dir=.
22213    for ac_exec_ext in '' $ac_executable_extensions; do
22214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22215    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22217    break 2
22218  fi
22219done
22220  done
22221IFS=$as_save_IFS
22222
22223  ;;
22224esac
22225fi
22226READELF=$ac_cv_path_READELF
22227if test -n "$READELF"; then
22228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22229$as_echo "$READELF" >&6; }
22230else
22231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22232$as_echo "no" >&6; }
22233fi
22234
22235
22236          if test "x$READELF" = x; then
22237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22238          fi
22239        else
22240          # Otherwise we believe it is a complete path. Use it as it is.
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22242$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22244$as_echo_n "checking for READELF... " >&6; }
22245          if test ! -x "$tool_specified"; then
22246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22247$as_echo "not found" >&6; }
22248            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22249          fi
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22251$as_echo "$tool_specified" >&6; }
22252        fi
22253      fi
22254    fi
22255
22256  fi
22257
22258
22259
22260
22261  # Publish this variable in the help.
22262
22263
22264  if [ -z "${HG+x}" ]; then
22265    # The variable is not set by user, try to locate tool using the code snippet
22266    for ac_prog in hg
22267do
22268  # Extract the first word of "$ac_prog", so it can be a program name with args.
22269set dummy $ac_prog; ac_word=$2
22270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22271$as_echo_n "checking for $ac_word... " >&6; }
22272if ${ac_cv_path_HG+:} false; then :
22273  $as_echo_n "(cached) " >&6
22274else
22275  case $HG in
22276  [\\/]* | ?:[\\/]*)
22277  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22278  ;;
22279  *)
22280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22281for as_dir in $PATH
22282do
22283  IFS=$as_save_IFS
22284  test -z "$as_dir" && as_dir=.
22285    for ac_exec_ext in '' $ac_executable_extensions; do
22286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22287    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22289    break 2
22290  fi
22291done
22292  done
22293IFS=$as_save_IFS
22294
22295  ;;
22296esac
22297fi
22298HG=$ac_cv_path_HG
22299if test -n "$HG"; then
22300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22301$as_echo "$HG" >&6; }
22302else
22303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22304$as_echo "no" >&6; }
22305fi
22306
22307
22308  test -n "$HG" && break
22309done
22310
22311  else
22312    # The variable is set, but is it from the command line or the environment?
22313
22314    # Try to remove the string !HG! from our list.
22315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22317      # If it failed, the variable was not from the command line. Ignore it,
22318      # but warn the user (except for BASH, which is always set by the calling BASH).
22319      if test "xHG" != xBASH; then
22320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22321$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22322      fi
22323      # Try to locate tool using the code snippet
22324      for ac_prog in hg
22325do
22326  # Extract the first word of "$ac_prog", so it can be a program name with args.
22327set dummy $ac_prog; ac_word=$2
22328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22329$as_echo_n "checking for $ac_word... " >&6; }
22330if ${ac_cv_path_HG+:} false; then :
22331  $as_echo_n "(cached) " >&6
22332else
22333  case $HG in
22334  [\\/]* | ?:[\\/]*)
22335  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22336  ;;
22337  *)
22338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22339for as_dir in $PATH
22340do
22341  IFS=$as_save_IFS
22342  test -z "$as_dir" && as_dir=.
22343    for ac_exec_ext in '' $ac_executable_extensions; do
22344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22345    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22347    break 2
22348  fi
22349done
22350  done
22351IFS=$as_save_IFS
22352
22353  ;;
22354esac
22355fi
22356HG=$ac_cv_path_HG
22357if test -n "$HG"; then
22358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22359$as_echo "$HG" >&6; }
22360else
22361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22362$as_echo "no" >&6; }
22363fi
22364
22365
22366  test -n "$HG" && break
22367done
22368
22369    else
22370      # If it succeeded, then it was overridden by the user. We will use it
22371      # for the tool.
22372
22373      # First remove it from the list of overridden variables, so we can test
22374      # for unknown variables in the end.
22375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22376
22377      # Check if we try to supply an empty value
22378      if test "x$HG" = x; then
22379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22380$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22382$as_echo_n "checking for HG... " >&6; }
22383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22384$as_echo "disabled" >&6; }
22385      else
22386        # Check if the provided tool contains a complete path.
22387        tool_specified="$HG"
22388        tool_basename="${tool_specified##*/}"
22389        if test "x$tool_basename" = "x$tool_specified"; then
22390          # A command without a complete path is provided, search $PATH.
22391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22392$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22393          # Extract the first word of "$tool_basename", so it can be a program name with args.
22394set dummy $tool_basename; ac_word=$2
22395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22396$as_echo_n "checking for $ac_word... " >&6; }
22397if ${ac_cv_path_HG+:} false; then :
22398  $as_echo_n "(cached) " >&6
22399else
22400  case $HG in
22401  [\\/]* | ?:[\\/]*)
22402  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22403  ;;
22404  *)
22405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22406for as_dir in $PATH
22407do
22408  IFS=$as_save_IFS
22409  test -z "$as_dir" && as_dir=.
22410    for ac_exec_ext in '' $ac_executable_extensions; do
22411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22412    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22414    break 2
22415  fi
22416done
22417  done
22418IFS=$as_save_IFS
22419
22420  ;;
22421esac
22422fi
22423HG=$ac_cv_path_HG
22424if test -n "$HG"; then
22425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22426$as_echo "$HG" >&6; }
22427else
22428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22429$as_echo "no" >&6; }
22430fi
22431
22432
22433          if test "x$HG" = x; then
22434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22435          fi
22436        else
22437          # Otherwise we believe it is a complete path. Use it as it is.
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22439$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22441$as_echo_n "checking for HG... " >&6; }
22442          if test ! -x "$tool_specified"; then
22443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22444$as_echo "not found" >&6; }
22445            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22446          fi
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22448$as_echo "$tool_specified" >&6; }
22449        fi
22450      fi
22451    fi
22452
22453  fi
22454
22455
22456
22457
22458  # Publish this variable in the help.
22459
22460
22461  if [ -z "${STAT+x}" ]; then
22462    # The variable is not set by user, try to locate tool using the code snippet
22463    for ac_prog in stat
22464do
22465  # Extract the first word of "$ac_prog", so it can be a program name with args.
22466set dummy $ac_prog; ac_word=$2
22467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22468$as_echo_n "checking for $ac_word... " >&6; }
22469if ${ac_cv_path_STAT+:} false; then :
22470  $as_echo_n "(cached) " >&6
22471else
22472  case $STAT in
22473  [\\/]* | ?:[\\/]*)
22474  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22475  ;;
22476  *)
22477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22478for as_dir in $PATH
22479do
22480  IFS=$as_save_IFS
22481  test -z "$as_dir" && as_dir=.
22482    for ac_exec_ext in '' $ac_executable_extensions; do
22483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22484    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22486    break 2
22487  fi
22488done
22489  done
22490IFS=$as_save_IFS
22491
22492  ;;
22493esac
22494fi
22495STAT=$ac_cv_path_STAT
22496if test -n "$STAT"; then
22497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22498$as_echo "$STAT" >&6; }
22499else
22500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22501$as_echo "no" >&6; }
22502fi
22503
22504
22505  test -n "$STAT" && break
22506done
22507
22508  else
22509    # The variable is set, but is it from the command line or the environment?
22510
22511    # Try to remove the string !STAT! from our list.
22512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22514      # If it failed, the variable was not from the command line. Ignore it,
22515      # but warn the user (except for BASH, which is always set by the calling BASH).
22516      if test "xSTAT" != xBASH; then
22517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22518$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22519      fi
22520      # Try to locate tool using the code snippet
22521      for ac_prog in stat
22522do
22523  # Extract the first word of "$ac_prog", so it can be a program name with args.
22524set dummy $ac_prog; ac_word=$2
22525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22526$as_echo_n "checking for $ac_word... " >&6; }
22527if ${ac_cv_path_STAT+:} false; then :
22528  $as_echo_n "(cached) " >&6
22529else
22530  case $STAT in
22531  [\\/]* | ?:[\\/]*)
22532  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22533  ;;
22534  *)
22535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22536for as_dir in $PATH
22537do
22538  IFS=$as_save_IFS
22539  test -z "$as_dir" && as_dir=.
22540    for ac_exec_ext in '' $ac_executable_extensions; do
22541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22542    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22544    break 2
22545  fi
22546done
22547  done
22548IFS=$as_save_IFS
22549
22550  ;;
22551esac
22552fi
22553STAT=$ac_cv_path_STAT
22554if test -n "$STAT"; then
22555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22556$as_echo "$STAT" >&6; }
22557else
22558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22559$as_echo "no" >&6; }
22560fi
22561
22562
22563  test -n "$STAT" && break
22564done
22565
22566    else
22567      # If it succeeded, then it was overridden by the user. We will use it
22568      # for the tool.
22569
22570      # First remove it from the list of overridden variables, so we can test
22571      # for unknown variables in the end.
22572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22573
22574      # Check if we try to supply an empty value
22575      if test "x$STAT" = x; then
22576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22577$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22579$as_echo_n "checking for STAT... " >&6; }
22580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22581$as_echo "disabled" >&6; }
22582      else
22583        # Check if the provided tool contains a complete path.
22584        tool_specified="$STAT"
22585        tool_basename="${tool_specified##*/}"
22586        if test "x$tool_basename" = "x$tool_specified"; then
22587          # A command without a complete path is provided, search $PATH.
22588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22589$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22590          # Extract the first word of "$tool_basename", so it can be a program name with args.
22591set dummy $tool_basename; ac_word=$2
22592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22593$as_echo_n "checking for $ac_word... " >&6; }
22594if ${ac_cv_path_STAT+:} false; then :
22595  $as_echo_n "(cached) " >&6
22596else
22597  case $STAT in
22598  [\\/]* | ?:[\\/]*)
22599  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22600  ;;
22601  *)
22602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22603for as_dir in $PATH
22604do
22605  IFS=$as_save_IFS
22606  test -z "$as_dir" && as_dir=.
22607    for ac_exec_ext in '' $ac_executable_extensions; do
22608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22609    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22611    break 2
22612  fi
22613done
22614  done
22615IFS=$as_save_IFS
22616
22617  ;;
22618esac
22619fi
22620STAT=$ac_cv_path_STAT
22621if test -n "$STAT"; then
22622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22623$as_echo "$STAT" >&6; }
22624else
22625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22626$as_echo "no" >&6; }
22627fi
22628
22629
22630          if test "x$STAT" = x; then
22631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22632          fi
22633        else
22634          # Otherwise we believe it is a complete path. Use it as it is.
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22636$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22638$as_echo_n "checking for STAT... " >&6; }
22639          if test ! -x "$tool_specified"; then
22640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22641$as_echo "not found" >&6; }
22642            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22643          fi
22644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22645$as_echo "$tool_specified" >&6; }
22646        fi
22647      fi
22648    fi
22649
22650  fi
22651
22652
22653
22654
22655  # Publish this variable in the help.
22656
22657
22658  if [ -z "${TIME+x}" ]; then
22659    # The variable is not set by user, try to locate tool using the code snippet
22660    for ac_prog in time
22661do
22662  # Extract the first word of "$ac_prog", so it can be a program name with args.
22663set dummy $ac_prog; ac_word=$2
22664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22665$as_echo_n "checking for $ac_word... " >&6; }
22666if ${ac_cv_path_TIME+:} false; then :
22667  $as_echo_n "(cached) " >&6
22668else
22669  case $TIME in
22670  [\\/]* | ?:[\\/]*)
22671  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22672  ;;
22673  *)
22674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22675for as_dir in $PATH
22676do
22677  IFS=$as_save_IFS
22678  test -z "$as_dir" && as_dir=.
22679    for ac_exec_ext in '' $ac_executable_extensions; do
22680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22681    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22683    break 2
22684  fi
22685done
22686  done
22687IFS=$as_save_IFS
22688
22689  ;;
22690esac
22691fi
22692TIME=$ac_cv_path_TIME
22693if test -n "$TIME"; then
22694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22695$as_echo "$TIME" >&6; }
22696else
22697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22698$as_echo "no" >&6; }
22699fi
22700
22701
22702  test -n "$TIME" && break
22703done
22704
22705  else
22706    # The variable is set, but is it from the command line or the environment?
22707
22708    # Try to remove the string !TIME! from our list.
22709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22711      # If it failed, the variable was not from the command line. Ignore it,
22712      # but warn the user (except for BASH, which is always set by the calling BASH).
22713      if test "xTIME" != xBASH; then
22714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22715$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22716      fi
22717      # Try to locate tool using the code snippet
22718      for ac_prog in time
22719do
22720  # Extract the first word of "$ac_prog", so it can be a program name with args.
22721set dummy $ac_prog; ac_word=$2
22722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22723$as_echo_n "checking for $ac_word... " >&6; }
22724if ${ac_cv_path_TIME+:} false; then :
22725  $as_echo_n "(cached) " >&6
22726else
22727  case $TIME in
22728  [\\/]* | ?:[\\/]*)
22729  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22730  ;;
22731  *)
22732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22733for as_dir in $PATH
22734do
22735  IFS=$as_save_IFS
22736  test -z "$as_dir" && as_dir=.
22737    for ac_exec_ext in '' $ac_executable_extensions; do
22738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22739    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22741    break 2
22742  fi
22743done
22744  done
22745IFS=$as_save_IFS
22746
22747  ;;
22748esac
22749fi
22750TIME=$ac_cv_path_TIME
22751if test -n "$TIME"; then
22752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22753$as_echo "$TIME" >&6; }
22754else
22755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22756$as_echo "no" >&6; }
22757fi
22758
22759
22760  test -n "$TIME" && break
22761done
22762
22763    else
22764      # If it succeeded, then it was overridden by the user. We will use it
22765      # for the tool.
22766
22767      # First remove it from the list of overridden variables, so we can test
22768      # for unknown variables in the end.
22769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22770
22771      # Check if we try to supply an empty value
22772      if test "x$TIME" = x; then
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22774$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22776$as_echo_n "checking for TIME... " >&6; }
22777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22778$as_echo "disabled" >&6; }
22779      else
22780        # Check if the provided tool contains a complete path.
22781        tool_specified="$TIME"
22782        tool_basename="${tool_specified##*/}"
22783        if test "x$tool_basename" = "x$tool_specified"; then
22784          # A command without a complete path is provided, search $PATH.
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22786$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22787          # Extract the first word of "$tool_basename", so it can be a program name with args.
22788set dummy $tool_basename; ac_word=$2
22789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790$as_echo_n "checking for $ac_word... " >&6; }
22791if ${ac_cv_path_TIME+:} false; then :
22792  $as_echo_n "(cached) " >&6
22793else
22794  case $TIME in
22795  [\\/]* | ?:[\\/]*)
22796  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22797  ;;
22798  *)
22799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22800for as_dir in $PATH
22801do
22802  IFS=$as_save_IFS
22803  test -z "$as_dir" && as_dir=.
22804    for ac_exec_ext in '' $ac_executable_extensions; do
22805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22806    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22808    break 2
22809  fi
22810done
22811  done
22812IFS=$as_save_IFS
22813
22814  ;;
22815esac
22816fi
22817TIME=$ac_cv_path_TIME
22818if test -n "$TIME"; then
22819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22820$as_echo "$TIME" >&6; }
22821else
22822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22823$as_echo "no" >&6; }
22824fi
22825
22826
22827          if test "x$TIME" = x; then
22828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22829          fi
22830        else
22831          # Otherwise we believe it is a complete path. Use it as it is.
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22833$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22835$as_echo_n "checking for TIME... " >&6; }
22836          if test ! -x "$tool_specified"; then
22837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22838$as_echo "not found" >&6; }
22839            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22840          fi
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22842$as_echo "$tool_specified" >&6; }
22843        fi
22844      fi
22845    fi
22846
22847  fi
22848
22849
22850  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22851  # be in the user path.
22852
22853
22854  # Publish this variable in the help.
22855
22856
22857  if [ -z "${DTRACE+x}" ]; then
22858    # The variable is not set by user, try to locate tool using the code snippet
22859    for ac_prog in dtrace
22860do
22861  # Extract the first word of "$ac_prog", so it can be a program name with args.
22862set dummy $ac_prog; ac_word=$2
22863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22864$as_echo_n "checking for $ac_word... " >&6; }
22865if ${ac_cv_path_DTRACE+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  case $DTRACE in
22869  [\\/]* | ?:[\\/]*)
22870  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22871  ;;
22872  *)
22873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22874as_dummy="$PATH:/usr/sbin"
22875for as_dir in $as_dummy
22876do
22877  IFS=$as_save_IFS
22878  test -z "$as_dir" && as_dir=.
22879    for ac_exec_ext in '' $ac_executable_extensions; do
22880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22881    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22883    break 2
22884  fi
22885done
22886  done
22887IFS=$as_save_IFS
22888
22889  ;;
22890esac
22891fi
22892DTRACE=$ac_cv_path_DTRACE
22893if test -n "$DTRACE"; then
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22895$as_echo "$DTRACE" >&6; }
22896else
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22898$as_echo "no" >&6; }
22899fi
22900
22901
22902  test -n "$DTRACE" && break
22903done
22904
22905  else
22906    # The variable is set, but is it from the command line or the environment?
22907
22908    # Try to remove the string !DTRACE! from our list.
22909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22911      # If it failed, the variable was not from the command line. Ignore it,
22912      # but warn the user (except for BASH, which is always set by the calling BASH).
22913      if test "xDTRACE" != xBASH; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22915$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22916      fi
22917      # Try to locate tool using the code snippet
22918      for ac_prog in dtrace
22919do
22920  # Extract the first word of "$ac_prog", so it can be a program name with args.
22921set dummy $ac_prog; ac_word=$2
22922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22923$as_echo_n "checking for $ac_word... " >&6; }
22924if ${ac_cv_path_DTRACE+:} false; then :
22925  $as_echo_n "(cached) " >&6
22926else
22927  case $DTRACE in
22928  [\\/]* | ?:[\\/]*)
22929  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22930  ;;
22931  *)
22932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22933as_dummy="$PATH:/usr/sbin"
22934for as_dir in $as_dummy
22935do
22936  IFS=$as_save_IFS
22937  test -z "$as_dir" && as_dir=.
22938    for ac_exec_ext in '' $ac_executable_extensions; do
22939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22940    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22942    break 2
22943  fi
22944done
22945  done
22946IFS=$as_save_IFS
22947
22948  ;;
22949esac
22950fi
22951DTRACE=$ac_cv_path_DTRACE
22952if test -n "$DTRACE"; then
22953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22954$as_echo "$DTRACE" >&6; }
22955else
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22957$as_echo "no" >&6; }
22958fi
22959
22960
22961  test -n "$DTRACE" && break
22962done
22963
22964    else
22965      # If it succeeded, then it was overridden by the user. We will use it
22966      # for the tool.
22967
22968      # First remove it from the list of overridden variables, so we can test
22969      # for unknown variables in the end.
22970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22971
22972      # Check if we try to supply an empty value
22973      if test "x$DTRACE" = x; then
22974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22975$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22977$as_echo_n "checking for DTRACE... " >&6; }
22978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22979$as_echo "disabled" >&6; }
22980      else
22981        # Check if the provided tool contains a complete path.
22982        tool_specified="$DTRACE"
22983        tool_basename="${tool_specified##*/}"
22984        if test "x$tool_basename" = "x$tool_specified"; then
22985          # A command without a complete path is provided, search $PATH.
22986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22987$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22988          # Extract the first word of "$tool_basename", so it can be a program name with args.
22989set dummy $tool_basename; ac_word=$2
22990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22991$as_echo_n "checking for $ac_word... " >&6; }
22992if ${ac_cv_path_DTRACE+:} false; then :
22993  $as_echo_n "(cached) " >&6
22994else
22995  case $DTRACE in
22996  [\\/]* | ?:[\\/]*)
22997  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22998  ;;
22999  *)
23000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23001for as_dir in $PATH
23002do
23003  IFS=$as_save_IFS
23004  test -z "$as_dir" && as_dir=.
23005    for ac_exec_ext in '' $ac_executable_extensions; do
23006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23007    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23009    break 2
23010  fi
23011done
23012  done
23013IFS=$as_save_IFS
23014
23015  ;;
23016esac
23017fi
23018DTRACE=$ac_cv_path_DTRACE
23019if test -n "$DTRACE"; then
23020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23021$as_echo "$DTRACE" >&6; }
23022else
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23024$as_echo "no" >&6; }
23025fi
23026
23027
23028          if test "x$DTRACE" = x; then
23029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23030          fi
23031        else
23032          # Otherwise we believe it is a complete path. Use it as it is.
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23034$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23036$as_echo_n "checking for DTRACE... " >&6; }
23037          if test ! -x "$tool_specified"; then
23038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23039$as_echo "not found" >&6; }
23040            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23041          fi
23042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23043$as_echo "$tool_specified" >&6; }
23044        fi
23045      fi
23046    fi
23047
23048  fi
23049
23050
23051
23052
23053  # Publish this variable in the help.
23054
23055
23056  if [ -z "${PATCH+x}" ]; then
23057    # The variable is not set by user, try to locate tool using the code snippet
23058    for ac_prog in gpatch patch
23059do
23060  # Extract the first word of "$ac_prog", so it can be a program name with args.
23061set dummy $ac_prog; ac_word=$2
23062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23063$as_echo_n "checking for $ac_word... " >&6; }
23064if ${ac_cv_path_PATCH+:} false; then :
23065  $as_echo_n "(cached) " >&6
23066else
23067  case $PATCH in
23068  [\\/]* | ?:[\\/]*)
23069  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23070  ;;
23071  *)
23072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23073for as_dir in $PATH
23074do
23075  IFS=$as_save_IFS
23076  test -z "$as_dir" && as_dir=.
23077    for ac_exec_ext in '' $ac_executable_extensions; do
23078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23079    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23081    break 2
23082  fi
23083done
23084  done
23085IFS=$as_save_IFS
23086
23087  ;;
23088esac
23089fi
23090PATCH=$ac_cv_path_PATCH
23091if test -n "$PATCH"; then
23092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23093$as_echo "$PATCH" >&6; }
23094else
23095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23096$as_echo "no" >&6; }
23097fi
23098
23099
23100  test -n "$PATCH" && break
23101done
23102
23103  else
23104    # The variable is set, but is it from the command line or the environment?
23105
23106    # Try to remove the string !PATCH! from our list.
23107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23109      # If it failed, the variable was not from the command line. Ignore it,
23110      # but warn the user (except for BASH, which is always set by the calling BASH).
23111      if test "xPATCH" != xBASH; then
23112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23113$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23114      fi
23115      # Try to locate tool using the code snippet
23116      for ac_prog in gpatch patch
23117do
23118  # Extract the first word of "$ac_prog", so it can be a program name with args.
23119set dummy $ac_prog; ac_word=$2
23120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23121$as_echo_n "checking for $ac_word... " >&6; }
23122if ${ac_cv_path_PATCH+:} false; then :
23123  $as_echo_n "(cached) " >&6
23124else
23125  case $PATCH in
23126  [\\/]* | ?:[\\/]*)
23127  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23128  ;;
23129  *)
23130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23131for as_dir in $PATH
23132do
23133  IFS=$as_save_IFS
23134  test -z "$as_dir" && as_dir=.
23135    for ac_exec_ext in '' $ac_executable_extensions; do
23136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23137    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23139    break 2
23140  fi
23141done
23142  done
23143IFS=$as_save_IFS
23144
23145  ;;
23146esac
23147fi
23148PATCH=$ac_cv_path_PATCH
23149if test -n "$PATCH"; then
23150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23151$as_echo "$PATCH" >&6; }
23152else
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23154$as_echo "no" >&6; }
23155fi
23156
23157
23158  test -n "$PATCH" && break
23159done
23160
23161    else
23162      # If it succeeded, then it was overridden by the user. We will use it
23163      # for the tool.
23164
23165      # First remove it from the list of overridden variables, so we can test
23166      # for unknown variables in the end.
23167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23168
23169      # Check if we try to supply an empty value
23170      if test "x$PATCH" = x; then
23171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23172$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23174$as_echo_n "checking for PATCH... " >&6; }
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23176$as_echo "disabled" >&6; }
23177      else
23178        # Check if the provided tool contains a complete path.
23179        tool_specified="$PATCH"
23180        tool_basename="${tool_specified##*/}"
23181        if test "x$tool_basename" = "x$tool_specified"; then
23182          # A command without a complete path is provided, search $PATH.
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23184$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23185          # Extract the first word of "$tool_basename", so it can be a program name with args.
23186set dummy $tool_basename; ac_word=$2
23187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23188$as_echo_n "checking for $ac_word... " >&6; }
23189if ${ac_cv_path_PATCH+:} false; then :
23190  $as_echo_n "(cached) " >&6
23191else
23192  case $PATCH in
23193  [\\/]* | ?:[\\/]*)
23194  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23195  ;;
23196  *)
23197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23198for as_dir in $PATH
23199do
23200  IFS=$as_save_IFS
23201  test -z "$as_dir" && as_dir=.
23202    for ac_exec_ext in '' $ac_executable_extensions; do
23203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23204    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23206    break 2
23207  fi
23208done
23209  done
23210IFS=$as_save_IFS
23211
23212  ;;
23213esac
23214fi
23215PATCH=$ac_cv_path_PATCH
23216if test -n "$PATCH"; then
23217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23218$as_echo "$PATCH" >&6; }
23219else
23220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23221$as_echo "no" >&6; }
23222fi
23223
23224
23225          if test "x$PATCH" = x; then
23226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23227          fi
23228        else
23229          # Otherwise we believe it is a complete path. Use it as it is.
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23231$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23233$as_echo_n "checking for PATCH... " >&6; }
23234          if test ! -x "$tool_specified"; then
23235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23236$as_echo "not found" >&6; }
23237            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23238          fi
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23240$as_echo "$tool_specified" >&6; }
23241        fi
23242      fi
23243    fi
23244
23245  fi
23246
23247
23248  # Check if it's GNU time
23249  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23250  if test "x$IS_GNU_TIME" != x; then
23251    IS_GNU_TIME=yes
23252  else
23253    IS_GNU_TIME=no
23254  fi
23255
23256
23257  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23258
23259
23260
23261  # Publish this variable in the help.
23262
23263
23264  if [ -z "${DSYMUTIL+x}" ]; then
23265    # The variable is not set by user, try to locate tool using the code snippet
23266    for ac_prog in dsymutil
23267do
23268  # Extract the first word of "$ac_prog", so it can be a program name with args.
23269set dummy $ac_prog; ac_word=$2
23270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23271$as_echo_n "checking for $ac_word... " >&6; }
23272if ${ac_cv_path_DSYMUTIL+:} false; then :
23273  $as_echo_n "(cached) " >&6
23274else
23275  case $DSYMUTIL in
23276  [\\/]* | ?:[\\/]*)
23277  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23278  ;;
23279  *)
23280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23281for as_dir in $PATH
23282do
23283  IFS=$as_save_IFS
23284  test -z "$as_dir" && as_dir=.
23285    for ac_exec_ext in '' $ac_executable_extensions; do
23286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23287    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23289    break 2
23290  fi
23291done
23292  done
23293IFS=$as_save_IFS
23294
23295  ;;
23296esac
23297fi
23298DSYMUTIL=$ac_cv_path_DSYMUTIL
23299if test -n "$DSYMUTIL"; then
23300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23301$as_echo "$DSYMUTIL" >&6; }
23302else
23303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23304$as_echo "no" >&6; }
23305fi
23306
23307
23308  test -n "$DSYMUTIL" && break
23309done
23310
23311  else
23312    # The variable is set, but is it from the command line or the environment?
23313
23314    # Try to remove the string !DSYMUTIL! from our list.
23315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23317      # If it failed, the variable was not from the command line. Ignore it,
23318      # but warn the user (except for BASH, which is always set by the calling BASH).
23319      if test "xDSYMUTIL" != xBASH; then
23320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23321$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23322      fi
23323      # Try to locate tool using the code snippet
23324      for ac_prog in dsymutil
23325do
23326  # Extract the first word of "$ac_prog", so it can be a program name with args.
23327set dummy $ac_prog; ac_word=$2
23328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23329$as_echo_n "checking for $ac_word... " >&6; }
23330if ${ac_cv_path_DSYMUTIL+:} false; then :
23331  $as_echo_n "(cached) " >&6
23332else
23333  case $DSYMUTIL in
23334  [\\/]* | ?:[\\/]*)
23335  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23336  ;;
23337  *)
23338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23339for as_dir in $PATH
23340do
23341  IFS=$as_save_IFS
23342  test -z "$as_dir" && as_dir=.
23343    for ac_exec_ext in '' $ac_executable_extensions; do
23344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23345    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23347    break 2
23348  fi
23349done
23350  done
23351IFS=$as_save_IFS
23352
23353  ;;
23354esac
23355fi
23356DSYMUTIL=$ac_cv_path_DSYMUTIL
23357if test -n "$DSYMUTIL"; then
23358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23359$as_echo "$DSYMUTIL" >&6; }
23360else
23361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23362$as_echo "no" >&6; }
23363fi
23364
23365
23366  test -n "$DSYMUTIL" && break
23367done
23368
23369    else
23370      # If it succeeded, then it was overridden by the user. We will use it
23371      # for the tool.
23372
23373      # First remove it from the list of overridden variables, so we can test
23374      # for unknown variables in the end.
23375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23376
23377      # Check if we try to supply an empty value
23378      if test "x$DSYMUTIL" = x; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23380$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23382$as_echo_n "checking for DSYMUTIL... " >&6; }
23383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23384$as_echo "disabled" >&6; }
23385      else
23386        # Check if the provided tool contains a complete path.
23387        tool_specified="$DSYMUTIL"
23388        tool_basename="${tool_specified##*/}"
23389        if test "x$tool_basename" = "x$tool_specified"; then
23390          # A command without a complete path is provided, search $PATH.
23391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23392$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23393          # Extract the first word of "$tool_basename", so it can be a program name with args.
23394set dummy $tool_basename; ac_word=$2
23395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23396$as_echo_n "checking for $ac_word... " >&6; }
23397if ${ac_cv_path_DSYMUTIL+:} false; then :
23398  $as_echo_n "(cached) " >&6
23399else
23400  case $DSYMUTIL in
23401  [\\/]* | ?:[\\/]*)
23402  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23403  ;;
23404  *)
23405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23406for as_dir in $PATH
23407do
23408  IFS=$as_save_IFS
23409  test -z "$as_dir" && as_dir=.
23410    for ac_exec_ext in '' $ac_executable_extensions; do
23411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23412    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23414    break 2
23415  fi
23416done
23417  done
23418IFS=$as_save_IFS
23419
23420  ;;
23421esac
23422fi
23423DSYMUTIL=$ac_cv_path_DSYMUTIL
23424if test -n "$DSYMUTIL"; then
23425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23426$as_echo "$DSYMUTIL" >&6; }
23427else
23428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23429$as_echo "no" >&6; }
23430fi
23431
23432
23433          if test "x$DSYMUTIL" = x; then
23434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23435          fi
23436        else
23437          # Otherwise we believe it is a complete path. Use it as it is.
23438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23439$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23441$as_echo_n "checking for DSYMUTIL... " >&6; }
23442          if test ! -x "$tool_specified"; then
23443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23444$as_echo "not found" >&6; }
23445            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23446          fi
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23448$as_echo "$tool_specified" >&6; }
23449        fi
23450      fi
23451    fi
23452
23453  fi
23454
23455
23456
23457  if test "x$DSYMUTIL" = x; then
23458    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23459  fi
23460
23461
23462
23463
23464
23465  # Publish this variable in the help.
23466
23467
23468  if [ -z "${XATTR+x}" ]; then
23469    # The variable is not set by user, try to locate tool using the code snippet
23470    for ac_prog in xattr
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_XATTR+:} false; then :
23477  $as_echo_n "(cached) " >&6
23478else
23479  case $XATTR in
23480  [\\/]* | ?:[\\/]*)
23481  ac_cv_path_XATTR="$XATTR" # 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_XATTR="$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
23502XATTR=$ac_cv_path_XATTR
23503if test -n "$XATTR"; then
23504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23505$as_echo "$XATTR" >&6; }
23506else
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23508$as_echo "no" >&6; }
23509fi
23510
23511
23512  test -n "$XATTR" && 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 !XATTR! from our list.
23519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
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 "xXATTR" != xBASH; then
23524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23525$as_echo "$as_me: WARNING: Ignoring value of XATTR 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 xattr
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_XATTR+:} false; then :
23535  $as_echo_n "(cached) " >&6
23536else
23537  case $XATTR in
23538  [\\/]* | ?:[\\/]*)
23539  ac_cv_path_XATTR="$XATTR" # 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_XATTR="$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
23560XATTR=$ac_cv_path_XATTR
23561if test -n "$XATTR"; then
23562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23563$as_echo "$XATTR" >&6; }
23564else
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23566$as_echo "no" >&6; }
23567fi
23568
23569
23570  test -n "$XATTR" && 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$XATTR" = x; then
23583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23584$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23586$as_echo_n "checking for XATTR... " >&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="$XATTR"
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 XATTR=$tool_basename" >&5
23596$as_echo "$as_me: Will search for user supplied tool XATTR=$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_XATTR+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $XATTR in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_XATTR="$XATTR" # 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_XATTR="$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
23627XATTR=$ac_cv_path_XATTR
23628if test -n "$XATTR"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23630$as_echo "$XATTR" >&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$XATTR" = 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 XATTR=$tool_specified" >&5
23643$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23645$as_echo_n "checking for XATTR... " >&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 XATTR=$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
23661  if test "x$XATTR" = x; then
23662    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23663  fi
23664
23665
23666
23667
23668  # Publish this variable in the help.
23669
23670
23671  if [ -z "${CODESIGN+x}" ]; then
23672    # The variable is not set by user, try to locate tool using the code snippet
23673    for ac_prog in codesign
23674do
23675  # Extract the first word of "$ac_prog", so it can be a program name with args.
23676set dummy $ac_prog; ac_word=$2
23677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23678$as_echo_n "checking for $ac_word... " >&6; }
23679if ${ac_cv_path_CODESIGN+:} false; then :
23680  $as_echo_n "(cached) " >&6
23681else
23682  case $CODESIGN in
23683  [\\/]* | ?:[\\/]*)
23684  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23685  ;;
23686  *)
23687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23688for as_dir in $PATH
23689do
23690  IFS=$as_save_IFS
23691  test -z "$as_dir" && as_dir=.
23692    for ac_exec_ext in '' $ac_executable_extensions; do
23693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23694    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23696    break 2
23697  fi
23698done
23699  done
23700IFS=$as_save_IFS
23701
23702  ;;
23703esac
23704fi
23705CODESIGN=$ac_cv_path_CODESIGN
23706if test -n "$CODESIGN"; then
23707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23708$as_echo "$CODESIGN" >&6; }
23709else
23710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23711$as_echo "no" >&6; }
23712fi
23713
23714
23715  test -n "$CODESIGN" && break
23716done
23717
23718  else
23719    # The variable is set, but is it from the command line or the environment?
23720
23721    # Try to remove the string !CODESIGN! from our list.
23722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23724      # If it failed, the variable was not from the command line. Ignore it,
23725      # but warn the user (except for BASH, which is always set by the calling BASH).
23726      if test "xCODESIGN" != xBASH; then
23727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23728$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23729      fi
23730      # Try to locate tool using the code snippet
23731      for ac_prog in codesign
23732do
23733  # Extract the first word of "$ac_prog", so it can be a program name with args.
23734set dummy $ac_prog; ac_word=$2
23735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23736$as_echo_n "checking for $ac_word... " >&6; }
23737if ${ac_cv_path_CODESIGN+:} false; then :
23738  $as_echo_n "(cached) " >&6
23739else
23740  case $CODESIGN in
23741  [\\/]* | ?:[\\/]*)
23742  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23743  ;;
23744  *)
23745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23746for as_dir in $PATH
23747do
23748  IFS=$as_save_IFS
23749  test -z "$as_dir" && as_dir=.
23750    for ac_exec_ext in '' $ac_executable_extensions; do
23751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23752    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23754    break 2
23755  fi
23756done
23757  done
23758IFS=$as_save_IFS
23759
23760  ;;
23761esac
23762fi
23763CODESIGN=$ac_cv_path_CODESIGN
23764if test -n "$CODESIGN"; then
23765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23766$as_echo "$CODESIGN" >&6; }
23767else
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23769$as_echo "no" >&6; }
23770fi
23771
23772
23773  test -n "$CODESIGN" && break
23774done
23775
23776    else
23777      # If it succeeded, then it was overridden by the user. We will use it
23778      # for the tool.
23779
23780      # First remove it from the list of overridden variables, so we can test
23781      # for unknown variables in the end.
23782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23783
23784      # Check if we try to supply an empty value
23785      if test "x$CODESIGN" = x; then
23786        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23787$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23789$as_echo_n "checking for CODESIGN... " >&6; }
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23791$as_echo "disabled" >&6; }
23792      else
23793        # Check if the provided tool contains a complete path.
23794        tool_specified="$CODESIGN"
23795        tool_basename="${tool_specified##*/}"
23796        if test "x$tool_basename" = "x$tool_specified"; then
23797          # A command without a complete path is provided, search $PATH.
23798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23799$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23800          # Extract the first word of "$tool_basename", so it can be a program name with args.
23801set dummy $tool_basename; ac_word=$2
23802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23803$as_echo_n "checking for $ac_word... " >&6; }
23804if ${ac_cv_path_CODESIGN+:} false; then :
23805  $as_echo_n "(cached) " >&6
23806else
23807  case $CODESIGN in
23808  [\\/]* | ?:[\\/]*)
23809  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23810  ;;
23811  *)
23812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23813for as_dir in $PATH
23814do
23815  IFS=$as_save_IFS
23816  test -z "$as_dir" && as_dir=.
23817    for ac_exec_ext in '' $ac_executable_extensions; do
23818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23819    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23821    break 2
23822  fi
23823done
23824  done
23825IFS=$as_save_IFS
23826
23827  ;;
23828esac
23829fi
23830CODESIGN=$ac_cv_path_CODESIGN
23831if test -n "$CODESIGN"; then
23832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23833$as_echo "$CODESIGN" >&6; }
23834else
23835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23836$as_echo "no" >&6; }
23837fi
23838
23839
23840          if test "x$CODESIGN" = x; then
23841            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23842          fi
23843        else
23844          # Otherwise we believe it is a complete path. Use it as it is.
23845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23846$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23847          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23848$as_echo_n "checking for CODESIGN... " >&6; }
23849          if test ! -x "$tool_specified"; then
23850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23851$as_echo "not found" >&6; }
23852            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23853          fi
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23855$as_echo "$tool_specified" >&6; }
23856        fi
23857      fi
23858    fi
23859
23860  fi
23861
23862
23863    if test "x$CODESIGN" != "x"; then
23864      # Verify that the openjdk_codesign certificate is present
23865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23866$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23867      $RM codesign-testfile
23868      $TOUCH codesign-testfile
23869      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23870      $RM codesign-testfile
23871      if test "x$CODESIGN" = x; then
23872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23873$as_echo "no" >&6; }
23874      else
23875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23876$as_echo "yes" >&6; }
23877      fi
23878    fi
23879
23880
23881
23882  # Publish this variable in the help.
23883
23884
23885  if [ -z "${SETFILE+x}" ]; then
23886    # The variable is not set by user, try to locate tool using the code snippet
23887    for ac_prog in SetFile
23888do
23889  # Extract the first word of "$ac_prog", so it can be a program name with args.
23890set dummy $ac_prog; ac_word=$2
23891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23892$as_echo_n "checking for $ac_word... " >&6; }
23893if ${ac_cv_path_SETFILE+:} false; then :
23894  $as_echo_n "(cached) " >&6
23895else
23896  case $SETFILE in
23897  [\\/]* | ?:[\\/]*)
23898  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23899  ;;
23900  *)
23901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23902for as_dir in $PATH
23903do
23904  IFS=$as_save_IFS
23905  test -z "$as_dir" && as_dir=.
23906    for ac_exec_ext in '' $ac_executable_extensions; do
23907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23908    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23910    break 2
23911  fi
23912done
23913  done
23914IFS=$as_save_IFS
23915
23916  ;;
23917esac
23918fi
23919SETFILE=$ac_cv_path_SETFILE
23920if test -n "$SETFILE"; then
23921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23922$as_echo "$SETFILE" >&6; }
23923else
23924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23925$as_echo "no" >&6; }
23926fi
23927
23928
23929  test -n "$SETFILE" && break
23930done
23931
23932  else
23933    # The variable is set, but is it from the command line or the environment?
23934
23935    # Try to remove the string !SETFILE! from our list.
23936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23938      # If it failed, the variable was not from the command line. Ignore it,
23939      # but warn the user (except for BASH, which is always set by the calling BASH).
23940      if test "xSETFILE" != xBASH; then
23941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23942$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23943      fi
23944      # Try to locate tool using the code snippet
23945      for ac_prog in SetFile
23946do
23947  # Extract the first word of "$ac_prog", so it can be a program name with args.
23948set dummy $ac_prog; ac_word=$2
23949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23950$as_echo_n "checking for $ac_word... " >&6; }
23951if ${ac_cv_path_SETFILE+:} false; then :
23952  $as_echo_n "(cached) " >&6
23953else
23954  case $SETFILE in
23955  [\\/]* | ?:[\\/]*)
23956  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23957  ;;
23958  *)
23959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23960for as_dir in $PATH
23961do
23962  IFS=$as_save_IFS
23963  test -z "$as_dir" && as_dir=.
23964    for ac_exec_ext in '' $ac_executable_extensions; do
23965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23966    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23968    break 2
23969  fi
23970done
23971  done
23972IFS=$as_save_IFS
23973
23974  ;;
23975esac
23976fi
23977SETFILE=$ac_cv_path_SETFILE
23978if test -n "$SETFILE"; then
23979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23980$as_echo "$SETFILE" >&6; }
23981else
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23983$as_echo "no" >&6; }
23984fi
23985
23986
23987  test -n "$SETFILE" && break
23988done
23989
23990    else
23991      # If it succeeded, then it was overridden by the user. We will use it
23992      # for the tool.
23993
23994      # First remove it from the list of overridden variables, so we can test
23995      # for unknown variables in the end.
23996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23997
23998      # Check if we try to supply an empty value
23999      if test "x$SETFILE" = x; then
24000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24001$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24003$as_echo_n "checking for SETFILE... " >&6; }
24004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24005$as_echo "disabled" >&6; }
24006      else
24007        # Check if the provided tool contains a complete path.
24008        tool_specified="$SETFILE"
24009        tool_basename="${tool_specified##*/}"
24010        if test "x$tool_basename" = "x$tool_specified"; then
24011          # A command without a complete path is provided, search $PATH.
24012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24013$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24014          # Extract the first word of "$tool_basename", so it can be a program name with args.
24015set dummy $tool_basename; ac_word=$2
24016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24017$as_echo_n "checking for $ac_word... " >&6; }
24018if ${ac_cv_path_SETFILE+:} false; then :
24019  $as_echo_n "(cached) " >&6
24020else
24021  case $SETFILE in
24022  [\\/]* | ?:[\\/]*)
24023  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24024  ;;
24025  *)
24026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24027for as_dir in $PATH
24028do
24029  IFS=$as_save_IFS
24030  test -z "$as_dir" && as_dir=.
24031    for ac_exec_ext in '' $ac_executable_extensions; do
24032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24033    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24035    break 2
24036  fi
24037done
24038  done
24039IFS=$as_save_IFS
24040
24041  ;;
24042esac
24043fi
24044SETFILE=$ac_cv_path_SETFILE
24045if test -n "$SETFILE"; then
24046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24047$as_echo "$SETFILE" >&6; }
24048else
24049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24050$as_echo "no" >&6; }
24051fi
24052
24053
24054          if test "x$SETFILE" = x; then
24055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24056          fi
24057        else
24058          # Otherwise we believe it is a complete path. Use it as it is.
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24060$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24062$as_echo_n "checking for SETFILE... " >&6; }
24063          if test ! -x "$tool_specified"; then
24064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24065$as_echo "not found" >&6; }
24066            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24067          fi
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24069$as_echo "$tool_specified" >&6; }
24070        fi
24071      fi
24072    fi
24073
24074  fi
24075
24076
24077
24078  if test "x$SETFILE" = x; then
24079    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24080  fi
24081
24082
24083  fi
24084
24085
24086  # Test if bash supports pipefail.
24087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24088$as_echo_n "checking if bash supports pipefail... " >&6; }
24089  if ${BASH} -c 'set -o pipefail'; then
24090    BASH_ARGS="$BASH_ARGS -o pipefail"
24091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24092$as_echo "yes" >&6; }
24093  else
24094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24095$as_echo "no" >&6; }
24096  fi
24097
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24099$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24100  if ${BASH} -e -c 'true'; then
24101    BASH_ARGS="$BASH_ARGS -e"
24102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24103$as_echo "yes" >&6; }
24104  else
24105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24106$as_echo "no" >&6; }
24107  fi
24108
24109
24110
24111
24112# Check if pkg-config is available.
24113
24114
24115if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24116	if test -n "$ac_tool_prefix"; then
24117  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24118set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24120$as_echo_n "checking for $ac_word... " >&6; }
24121if ${ac_cv_path_PKG_CONFIG+:} false; then :
24122  $as_echo_n "(cached) " >&6
24123else
24124  case $PKG_CONFIG in
24125  [\\/]* | ?:[\\/]*)
24126  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24127  ;;
24128  *)
24129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24130for as_dir in $PATH
24131do
24132  IFS=$as_save_IFS
24133  test -z "$as_dir" && as_dir=.
24134    for ac_exec_ext in '' $ac_executable_extensions; do
24135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24136    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24138    break 2
24139  fi
24140done
24141  done
24142IFS=$as_save_IFS
24143
24144  ;;
24145esac
24146fi
24147PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24148if test -n "$PKG_CONFIG"; then
24149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24150$as_echo "$PKG_CONFIG" >&6; }
24151else
24152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24153$as_echo "no" >&6; }
24154fi
24155
24156
24157fi
24158if test -z "$ac_cv_path_PKG_CONFIG"; then
24159  ac_pt_PKG_CONFIG=$PKG_CONFIG
24160  # Extract the first word of "pkg-config", so it can be a program name with args.
24161set dummy pkg-config; ac_word=$2
24162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24163$as_echo_n "checking for $ac_word... " >&6; }
24164if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24165  $as_echo_n "(cached) " >&6
24166else
24167  case $ac_pt_PKG_CONFIG in
24168  [\\/]* | ?:[\\/]*)
24169  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24170  ;;
24171  *)
24172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24173for as_dir in $PATH
24174do
24175  IFS=$as_save_IFS
24176  test -z "$as_dir" && as_dir=.
24177    for ac_exec_ext in '' $ac_executable_extensions; do
24178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24179    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24181    break 2
24182  fi
24183done
24184  done
24185IFS=$as_save_IFS
24186
24187  ;;
24188esac
24189fi
24190ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24191if test -n "$ac_pt_PKG_CONFIG"; then
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24193$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24194else
24195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24196$as_echo "no" >&6; }
24197fi
24198
24199  if test "x$ac_pt_PKG_CONFIG" = x; then
24200    PKG_CONFIG=""
24201  else
24202    case $cross_compiling:$ac_tool_warned in
24203yes:)
24204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24206ac_tool_warned=yes ;;
24207esac
24208    PKG_CONFIG=$ac_pt_PKG_CONFIG
24209  fi
24210else
24211  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24212fi
24213
24214fi
24215if test -n "$PKG_CONFIG"; then
24216	_pkg_min_version=0.9.0
24217	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24218$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24219	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24220		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24221$as_echo "yes" >&6; }
24222	else
24223		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24224$as_echo "no" >&6; }
24225		PKG_CONFIG=""
24226	fi
24227
24228fi
24229
24230# After basic tools have been setup, we can check build os specific details.
24231
24232  ###############################################################################
24233
24234  # Note that this is the build platform OS version!
24235
24236  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24237  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24238  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24239  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24240
24241
24242
24243
24244
24245# Misc basic settings
24246
24247
24248# Check whether --with-default-make-target was given.
24249if test "${with_default_make_target+set}" = set; then :
24250  withval=$with_default_make_target;
24251fi
24252
24253  if test "x$with_default_make_target" = "x" \
24254      || test "x$with_default_make_target" = "xyes"; then
24255    DEFAULT_MAKE_TARGET="exploded-image"
24256  elif test "x$with_default_make_target" = "xno"; then
24257    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24258  else
24259    DEFAULT_MAKE_TARGET="$with_default_make_target"
24260  fi
24261
24262
24263
24264
24265###############################################################################
24266#
24267# Determine OpenJDK variants, options and version numbers.
24268#
24269###############################################################################
24270
24271# We need build & target for this.
24272
24273  # Should we build a JDK without a graphical UI?
24274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24275$as_echo_n "checking headless only... " >&6; }
24276  # Check whether --enable-headless-only was given.
24277if test "${enable_headless_only+set}" = set; then :
24278  enableval=$enable_headless_only;
24279fi
24280
24281
24282  if test "x$enable_headless_only" = "xyes"; then
24283    ENABLE_HEADLESS_ONLY="true"
24284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24285$as_echo "yes" >&6; }
24286  elif test "x$enable_headless_only" = "xno"; then
24287    ENABLE_HEADLESS_ONLY="false"
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24289$as_echo "no" >&6; }
24290  elif test "x$enable_headless_only" = "x"; then
24291    ENABLE_HEADLESS_ONLY="false"
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24293$as_echo "no" >&6; }
24294  else
24295    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24296  fi
24297
24298
24299
24300  # Choose cacerts source file
24301
24302# Check whether --with-cacerts-file was given.
24303if test "${with_cacerts_file+set}" = set; then :
24304  withval=$with_cacerts_file;
24305fi
24306
24307  if test "x$with_cacerts_file" != x; then
24308    CACERTS_FILE=$with_cacerts_file
24309  fi
24310
24311
24312  # Enable or disable unlimited crypto
24313  # Check whether --enable-unlimited-crypto was given.
24314if test "${enable_unlimited_crypto+set}" = set; then :
24315  enableval=$enable_unlimited_crypto;
24316else
24317  enable_unlimited_crypto=yes
24318fi
24319
24320  if test "x$enable_unlimited_crypto" = "xyes"; then
24321    UNLIMITED_CRYPTO=true
24322  else
24323    UNLIMITED_CRYPTO=false
24324  fi
24325
24326
24327  # Should we build the serviceability agent (SA)?
24328  INCLUDE_SA=true
24329  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24330    INCLUDE_SA=false
24331  fi
24332  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24333    INCLUDE_SA=false
24334  fi
24335
24336
24337  # Compress jars
24338  COMPRESS_JARS=false
24339
24340
24341
24342  # Setup default copyright year. Mostly overridden when building close to a new year.
24343
24344# Check whether --with-copyright-year was given.
24345if test "${with_copyright_year+set}" = set; then :
24346  withval=$with_copyright_year;
24347fi
24348
24349  if test "x$with_copyright_year" = xyes; then
24350    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24351  elif test "x$with_copyright_year" != x; then
24352    COPYRIGHT_YEAR="$with_copyright_year"
24353  else
24354    COPYRIGHT_YEAR=`$DATE +'%Y'`
24355  fi
24356
24357
24358
24359  # Check whether --enable-keep-packaged-modules was given.
24360if test "${enable_keep_packaged_modules+set}" = set; then :
24361  enableval=$enable_keep_packaged_modules;
24362fi
24363
24364
24365  if test "x$enable_keep_packaged_modules" = "xyes"; then
24366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24367$as_echo_n "checking if packaged modules are kept... " >&6; }
24368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24369$as_echo "yes" >&6; }
24370    JLINK_KEEP_PACKAGED_MODULES=true
24371  elif test "x$enable_keep_packaged_modules" = "xno"; then
24372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24373$as_echo_n "checking if packaged modules are kept... " >&6; }
24374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24375$as_echo "no" >&6; }
24376    JLINK_KEEP_PACKAGED_MODULES=false
24377  elif test "x$enable_keep_packaged_modules" = "x"; then
24378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24379$as_echo "yes (default)" >&6; }
24380    JLINK_KEEP_PACKAGED_MODULES=true
24381  else
24382    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24383  fi
24384
24385
24386
24387
24388  # Warn user that old version arguments are deprecated.
24389
24390
24391# Check whether --with-milestone was given.
24392if test "${with_milestone+set}" = set; then :
24393  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24394$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24395fi
24396
24397
24398
24399
24400# Check whether --with-update-version was given.
24401if test "${with_update_version+set}" = set; then :
24402  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24403$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24404fi
24405
24406
24407
24408
24409# Check whether --with-user-release-suffix was given.
24410if test "${with_user_release_suffix+set}" = set; then :
24411  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
24412$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24413fi
24414
24415
24416
24417
24418# Check whether --with-build-number was given.
24419if test "${with_build_number+set}" = set; then :
24420  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24421$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24422fi
24423
24424
24425
24426  # Source the version numbers file
24427  . $AUTOCONF_DIR/version-numbers
24428
24429  # Some non-version number information is set in that file
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439  # Override version from arguments
24440
24441  # If --with-version-string is set, process it first. It is possible to
24442  # override parts with more specific flags, since these are processed later.
24443
24444# Check whether --with-version-string was given.
24445if test "${with_version_string+set}" = set; then :
24446  withval=$with_version_string;
24447fi
24448
24449  if test "x$with_version_string" = xyes; then
24450    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24451  elif test "x$with_version_string" != x; then
24452    # Additional [] needed to keep m4 from mangling shell constructs.
24453    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24454      VERSION_MAJOR=${BASH_REMATCH[1]}
24455      VERSION_MINOR=${BASH_REMATCH[3]}
24456      VERSION_SECURITY=${BASH_REMATCH[5]}
24457      VERSION_PATCH=${BASH_REMATCH[7]}
24458      VERSION_PRE=${BASH_REMATCH[9]}
24459      version_plus_separator=${BASH_REMATCH[11]}
24460      VERSION_BUILD=${BASH_REMATCH[12]}
24461      VERSION_OPT=${BASH_REMATCH[14]}
24462      # Unspecified numerical fields are interpreted as 0.
24463      if test "x$VERSION_MINOR" = x; then
24464        VERSION_MINOR=0
24465      fi
24466      if test "x$VERSION_SECURITY" = x; then
24467        VERSION_SECURITY=0
24468      fi
24469      if test "x$VERSION_PATCH" = x; then
24470        VERSION_PATCH=0
24471      fi
24472      if test "x$version_plus_separator" != x \
24473          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24474        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24475      fi
24476      # Stop the version part process from setting default values.
24477      # We still allow them to explicitly override though.
24478      NO_DEFAULT_VERSION_PARTS=true
24479    else
24480      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24481    fi
24482  fi
24483
24484
24485# Check whether --with-version-pre was given.
24486if test "${with_version_pre+set}" = set; then :
24487  withval=$with_version_pre; with_version_pre_present=true
24488else
24489  with_version_pre_present=false
24490fi
24491
24492
24493  if test "x$with_version_pre_present" = xtrue; then
24494    if test "x$with_version_pre" = xyes; then
24495      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24496    elif test "x$with_version_pre" = xno; then
24497      # Interpret --without-* as empty string instead of the literal "no"
24498      VERSION_PRE=
24499    else
24500      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24501       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24502      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24504$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24505      fi
24506    fi
24507  else
24508    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24509      # Default is to use "internal" as pre
24510      VERSION_PRE="internal"
24511    fi
24512  fi
24513
24514
24515# Check whether --with-version-opt was given.
24516if test "${with_version_opt+set}" = set; then :
24517  withval=$with_version_opt; with_version_opt_present=true
24518else
24519  with_version_opt_present=false
24520fi
24521
24522
24523  if test "x$with_version_opt_present" = xtrue; then
24524    if test "x$with_version_opt" = xyes; then
24525      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24526    elif test "x$with_version_opt" = xno; then
24527      # Interpret --without-* as empty string instead of the literal "no"
24528      VERSION_OPT=
24529    else
24530      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24531       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24532      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24534$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24535      fi
24536    fi
24537  else
24538    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24539      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24540      # Outer [ ] to quote m4.
24541       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24542      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24543    fi
24544  fi
24545
24546
24547# Check whether --with-version-build was given.
24548if test "${with_version_build+set}" = set; then :
24549  withval=$with_version_build; with_version_build_present=true
24550else
24551  with_version_build_present=false
24552fi
24553
24554
24555  if test "x$with_version_build_present" = xtrue; then
24556    if test "x$with_version_build" = xyes; then
24557      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24558    elif test "x$with_version_build" = xno; then
24559      # Interpret --without-* as empty string instead of the literal "no"
24560      VERSION_BUILD=
24561    elif test "x$with_version_build" = x; then
24562      VERSION_BUILD=
24563    else
24564
24565  # Additional [] needed to keep m4 from mangling shell constructs.
24566  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24567    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24568  fi
24569  # Extract the version number without leading zeros.
24570  cleaned_value=${BASH_REMATCH[1]}
24571  if test "x$cleaned_value" = x; then
24572    # Special case for zero
24573    cleaned_value=${BASH_REMATCH[2]}
24574  fi
24575
24576  if test $cleaned_value -gt 255; then
24577    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24578  fi
24579  if test "x$cleaned_value" != "x$with_version_build"; then
24580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24581$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24582  fi
24583  VERSION_BUILD=$cleaned_value
24584
24585    fi
24586  else
24587    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24588      # Default is to not have a build number.
24589      VERSION_BUILD=""
24590      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24591      VERSION_BUILD=0
24592    fi
24593  fi
24594
24595
24596# Check whether --with-version-major was given.
24597if test "${with_version_major+set}" = set; then :
24598  withval=$with_version_major; with_version_major_present=true
24599else
24600  with_version_major_present=false
24601fi
24602
24603
24604  if test "x$with_version_major_present" = xtrue; then
24605    if test "x$with_version_major" = xyes; then
24606      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24607    else
24608
24609  # Additional [] needed to keep m4 from mangling shell constructs.
24610  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24611    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24612  fi
24613  # Extract the version number without leading zeros.
24614  cleaned_value=${BASH_REMATCH[1]}
24615  if test "x$cleaned_value" = x; then
24616    # Special case for zero
24617    cleaned_value=${BASH_REMATCH[2]}
24618  fi
24619
24620  if test $cleaned_value -gt 255; then
24621    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24622  fi
24623  if test "x$cleaned_value" != "x$with_version_major"; then
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24625$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24626  fi
24627  VERSION_MAJOR=$cleaned_value
24628
24629    fi
24630  else
24631    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24632      # Default is to get value from version-numbers
24633      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24634    fi
24635  fi
24636
24637
24638# Check whether --with-version-minor was given.
24639if test "${with_version_minor+set}" = set; then :
24640  withval=$with_version_minor; with_version_minor_present=true
24641else
24642  with_version_minor_present=false
24643fi
24644
24645
24646  if test "x$with_version_minor_present" = xtrue; then
24647    if test "x$with_version_minor" = xyes; then
24648      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24649    elif test "x$with_version_minor" = xno; then
24650      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24651      VERSION_MINOR=0
24652    elif test "x$with_version_minor" = x; then
24653      VERSION_MINOR=0
24654    else
24655
24656  # Additional [] needed to keep m4 from mangling shell constructs.
24657  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24658    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24659  fi
24660  # Extract the version number without leading zeros.
24661  cleaned_value=${BASH_REMATCH[1]}
24662  if test "x$cleaned_value" = x; then
24663    # Special case for zero
24664    cleaned_value=${BASH_REMATCH[2]}
24665  fi
24666
24667  if test $cleaned_value -gt 255; then
24668    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24669  fi
24670  if test "x$cleaned_value" != "x$with_version_minor"; then
24671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24672$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24673  fi
24674  VERSION_MINOR=$cleaned_value
24675
24676    fi
24677  else
24678    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24679      # Default is 0, if unspecified
24680      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24681    fi
24682  fi
24683
24684
24685# Check whether --with-version-security was given.
24686if test "${with_version_security+set}" = set; then :
24687  withval=$with_version_security; with_version_security_present=true
24688else
24689  with_version_security_present=false
24690fi
24691
24692
24693  if test "x$with_version_security_present" = xtrue; then
24694    if test "x$with_version_security" = xyes; then
24695      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24696    elif test "x$with_version_security" = xno; then
24697      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24698      VERSION_SECURITY=0
24699    elif test "x$with_version_security" = x; then
24700      VERSION_SECURITY=0
24701    else
24702
24703  # Additional [] needed to keep m4 from mangling shell constructs.
24704  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24705    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24706  fi
24707  # Extract the version number without leading zeros.
24708  cleaned_value=${BASH_REMATCH[1]}
24709  if test "x$cleaned_value" = x; then
24710    # Special case for zero
24711    cleaned_value=${BASH_REMATCH[2]}
24712  fi
24713
24714  if test $cleaned_value -gt 255; then
24715    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24716  fi
24717  if test "x$cleaned_value" != "x$with_version_security"; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24719$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24720  fi
24721  VERSION_SECURITY=$cleaned_value
24722
24723    fi
24724  else
24725    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24726      # Default is 0, if unspecified
24727      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24728    fi
24729  fi
24730
24731
24732# Check whether --with-version-patch was given.
24733if test "${with_version_patch+set}" = set; then :
24734  withval=$with_version_patch; with_version_patch_present=true
24735else
24736  with_version_patch_present=false
24737fi
24738
24739
24740  if test "x$with_version_patch_present" = xtrue; then
24741    if test "x$with_version_patch" = xyes; then
24742      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24743    elif test "x$with_version_patch" = xno; then
24744      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24745      VERSION_PATCH=0
24746    elif test "x$with_version_patch" = x; then
24747      VERSION_PATCH=0
24748    else
24749
24750  # Additional [] needed to keep m4 from mangling shell constructs.
24751  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24752    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24753  fi
24754  # Extract the version number without leading zeros.
24755  cleaned_value=${BASH_REMATCH[1]}
24756  if test "x$cleaned_value" = x; then
24757    # Special case for zero
24758    cleaned_value=${BASH_REMATCH[2]}
24759  fi
24760
24761  if test $cleaned_value -gt 255; then
24762    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24763  fi
24764  if test "x$cleaned_value" != "x$with_version_patch"; then
24765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24766$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24767  fi
24768  VERSION_PATCH=$cleaned_value
24769
24770    fi
24771  else
24772    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24773      # Default is 0, if unspecified
24774      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24775    fi
24776  fi
24777
24778  # Calculate derived version properties
24779
24780  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24781  if test "x$VERSION_PRE" = x; then
24782    VERSION_IS_GA=true
24783  else
24784    VERSION_IS_GA=false
24785  fi
24786
24787  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24788  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24789
24790  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24791  # Strip trailing zeroes from stripped_version_number
24792  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24793  VERSION_NUMBER=$stripped_version_number
24794
24795  # The complete version string, with additional build information
24796  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24797    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24798  else
24799    # If either build or opt is set, we need a + separator
24800    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24801  fi
24802
24803  # The short version string, just VERSION_NUMBER and PRE, if present.
24804  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24805
24806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24807$as_echo_n "checking for version string... " >&6; }
24808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24809$as_echo "$VERSION_STRING" >&6; }
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825###############################################################################
24826#
24827# Setup BootJDK, used to bootstrap the build.
24828#
24829###############################################################################
24830
24831
24832  BOOT_JDK_FOUND=no
24833
24834# Check whether --with-boot-jdk was given.
24835if test "${with_boot_jdk+set}" = set; then :
24836  withval=$with_boot_jdk;
24837fi
24838
24839
24840  # We look for the Boot JDK through various means, going from more certain to
24841  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24842  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24843  # must check if this is indeed valid; otherwise we'll continue looking.
24844
24845  # Test: Is bootjdk explicitly set by command line arguments?
24846
24847  if test "x$BOOT_JDK_FOUND" = xno; then
24848    # Now execute the test
24849
24850  if test "x$with_boot_jdk" != x; then
24851    BOOT_JDK=$with_boot_jdk
24852    BOOT_JDK_FOUND=maybe
24853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24854$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24855  fi
24856
24857
24858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24860      # Do we have a bin/java?
24861      if test ! -x "$BOOT_JDK/bin/java"; then
24862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24864        BOOT_JDK_FOUND=no
24865      else
24866        # Do we have a bin/javac?
24867        if test ! -x "$BOOT_JDK/bin/javac"; then
24868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24872          BOOT_JDK_FOUND=no
24873        else
24874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24876
24877          # Extra M4 quote needed to protect [] in grep expression.
24878          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24879          if test "x$FOUND_CORRECT_VERSION" = x; then
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24884            BOOT_JDK_FOUND=no
24885          else
24886            # We're done! :-)
24887            BOOT_JDK_FOUND=yes
24888
24889  # Only process if variable expands to non-empty
24890
24891  if test "x$BOOT_JDK" != x; then
24892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893
24894  # Input might be given as Windows format, start by converting to
24895  # unix format.
24896  path="$BOOT_JDK"
24897  new_path=`$CYGPATH -u "$path"`
24898
24899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24902  # "foo.exe" is OK but "foo" is an error.
24903  #
24904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24905  # It is also a way to make sure we got the proper file name for the real test later on.
24906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24907  if test "x$test_shortpath" = x; then
24908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24911  fi
24912
24913  # Call helper function which possibly converts this using DOS-style short mode.
24914  # If so, the updated path is stored in $new_path.
24915
24916  input_path="$new_path"
24917  # Check if we need to convert this using DOS-style short mode. If the path
24918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24919  # take no chances and rewrite it.
24920  # Note: m4 eats our [], so we need to use [ and ] instead.
24921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24922  if test "x$has_forbidden_chars" != x; then
24923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24927      # Going to short mode and back again did indeed matter. Since short mode is
24928      # case insensitive, let's make it lowercase to improve readability.
24929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24930      # Now convert it back to Unix-style (cygpath)
24931      input_path=`$CYGPATH -u "$shortmode_path"`
24932      new_path="$input_path"
24933    fi
24934  fi
24935
24936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24937  if test "x$test_cygdrive_prefix" = x; then
24938    # As a simple fix, exclude /usr/bin since it's not a real path.
24939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24941      # a path prefixed by /cygdrive for fixpath to work.
24942      new_path="$CYGWIN_ROOT_PATH$input_path"
24943    fi
24944  fi
24945
24946
24947  if test "x$path" != "x$new_path"; then
24948    BOOT_JDK="$new_path"
24949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24951  fi
24952
24953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24954
24955  path="$BOOT_JDK"
24956  has_colon=`$ECHO $path | $GREP ^.:`
24957  new_path="$path"
24958  if test "x$has_colon" = x; then
24959    # Not in mixed or Windows style, start by that.
24960    new_path=`cmd //c echo $path`
24961  fi
24962
24963
24964  input_path="$new_path"
24965  # Check if we need to convert this using DOS-style short mode. If the path
24966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24967  # take no chances and rewrite it.
24968  # Note: m4 eats our [], so we need to use [ and ] instead.
24969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24970  if test "x$has_forbidden_chars" != x; then
24971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24973  fi
24974
24975
24976  windows_path="$new_path"
24977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24978    unix_path=`$CYGPATH -u "$windows_path"`
24979    new_path="$unix_path"
24980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24982    new_path="$unix_path"
24983  fi
24984
24985  if test "x$path" != "x$new_path"; then
24986    BOOT_JDK="$new_path"
24987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24989  fi
24990
24991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24993
24994    else
24995      # We're on a unix platform. Hooray! :)
24996      path="$BOOT_JDK"
24997      has_space=`$ECHO "$path" | $GREP " "`
24998      if test "x$has_space" != x; then
24999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25002      fi
25003
25004      # Use eval to expand a potential ~
25005      eval path="$path"
25006      if test ! -f "$path" && test ! -d "$path"; then
25007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25008      fi
25009
25010      if test -d "$path"; then
25011        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25012      else
25013        dir="`$DIRNAME "$path"`"
25014        base="`$BASENAME "$path"`"
25015        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25016      fi
25017    fi
25018  fi
25019
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25021$as_echo_n "checking for Boot JDK... " >&6; }
25022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25023$as_echo "$BOOT_JDK" >&6; }
25024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25025$as_echo_n "checking Boot JDK version... " >&6; }
25026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25028$as_echo "$BOOT_JDK_VERSION" >&6; }
25029          fi # end check jdk version
25030        fi # end check javac
25031      fi # end check java
25032    fi # end check boot jdk found
25033  fi
25034
25035  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25036    # Having specified an argument which is incorrect will produce an instant failure;
25037    # we should not go on looking
25038    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25039  fi
25040
25041  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25042
25043  if test "x$BOOT_JDK_FOUND" = xno; then
25044    # Now execute the test
25045
25046  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25047    # First check at user selected default
25048
25049  if test "x$BOOT_JDK_FOUND" = xno; then
25050    # Now execute the test
25051
25052  if test -x /usr/libexec/java_home; then
25053    BOOT_JDK=`/usr/libexec/java_home `
25054    BOOT_JDK_FOUND=maybe
25055    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25056$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25057  fi
25058
25059
25060    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25061    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25062      # Do we have a bin/java?
25063      if test ! -x "$BOOT_JDK/bin/java"; then
25064        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25066        BOOT_JDK_FOUND=no
25067      else
25068        # Do we have a bin/javac?
25069        if test ! -x "$BOOT_JDK/bin/javac"; then
25070          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25072          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25073$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25074          BOOT_JDK_FOUND=no
25075        else
25076          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25077          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25078
25079          # Extra M4 quote needed to protect [] in grep expression.
25080          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25081          if test "x$FOUND_CORRECT_VERSION" = x; then
25082            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25084            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25085$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25086            BOOT_JDK_FOUND=no
25087          else
25088            # We're done! :-)
25089            BOOT_JDK_FOUND=yes
25090
25091  # Only process if variable expands to non-empty
25092
25093  if test "x$BOOT_JDK" != x; then
25094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095
25096  # Input might be given as Windows format, start by converting to
25097  # unix format.
25098  path="$BOOT_JDK"
25099  new_path=`$CYGPATH -u "$path"`
25100
25101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25104  # "foo.exe" is OK but "foo" is an error.
25105  #
25106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25107  # It is also a way to make sure we got the proper file name for the real test later on.
25108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25109  if test "x$test_shortpath" = x; then
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25113  fi
25114
25115  # Call helper function which possibly converts this using DOS-style short mode.
25116  # If so, the updated path is stored in $new_path.
25117
25118  input_path="$new_path"
25119  # Check if we need to convert this using DOS-style short mode. If the path
25120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121  # take no chances and rewrite it.
25122  # Note: m4 eats our [], so we need to use [ and ] instead.
25123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25124  if test "x$has_forbidden_chars" != x; then
25125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25129      # Going to short mode and back again did indeed matter. Since short mode is
25130      # case insensitive, let's make it lowercase to improve readability.
25131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132      # Now convert it back to Unix-style (cygpath)
25133      input_path=`$CYGPATH -u "$shortmode_path"`
25134      new_path="$input_path"
25135    fi
25136  fi
25137
25138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25139  if test "x$test_cygdrive_prefix" = x; then
25140    # As a simple fix, exclude /usr/bin since it's not a real path.
25141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25143      # a path prefixed by /cygdrive for fixpath to work.
25144      new_path="$CYGWIN_ROOT_PATH$input_path"
25145    fi
25146  fi
25147
25148
25149  if test "x$path" != "x$new_path"; then
25150    BOOT_JDK="$new_path"
25151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25153  fi
25154
25155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25156
25157  path="$BOOT_JDK"
25158  has_colon=`$ECHO $path | $GREP ^.:`
25159  new_path="$path"
25160  if test "x$has_colon" = x; then
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $path`
25163  fi
25164
25165
25166  input_path="$new_path"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25175  fi
25176
25177
25178  windows_path="$new_path"
25179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25180    unix_path=`$CYGPATH -u "$windows_path"`
25181    new_path="$unix_path"
25182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25184    new_path="$unix_path"
25185  fi
25186
25187  if test "x$path" != "x$new_path"; then
25188    BOOT_JDK="$new_path"
25189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25191  fi
25192
25193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25195
25196    else
25197      # We're on a unix platform. Hooray! :)
25198      path="$BOOT_JDK"
25199      has_space=`$ECHO "$path" | $GREP " "`
25200      if test "x$has_space" != x; then
25201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25204      fi
25205
25206      # Use eval to expand a potential ~
25207      eval path="$path"
25208      if test ! -f "$path" && test ! -d "$path"; then
25209        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25210      fi
25211
25212      if test -d "$path"; then
25213        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25214      else
25215        dir="`$DIRNAME "$path"`"
25216        base="`$BASENAME "$path"`"
25217        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25218      fi
25219    fi
25220  fi
25221
25222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25223$as_echo_n "checking for Boot JDK... " >&6; }
25224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25225$as_echo "$BOOT_JDK" >&6; }
25226            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25227$as_echo_n "checking Boot JDK version... " >&6; }
25228            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25230$as_echo "$BOOT_JDK_VERSION" >&6; }
25231          fi # end check jdk version
25232        fi # end check javac
25233      fi # end check java
25234    fi # end check boot jdk found
25235  fi
25236
25237    # If that did not work out (e.g. too old), try explicit versions instead
25238
25239  if test "x$BOOT_JDK_FOUND" = xno; then
25240    # Now execute the test
25241
25242  if test -x /usr/libexec/java_home; then
25243    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25244    BOOT_JDK_FOUND=maybe
25245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25246$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25247  fi
25248
25249
25250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25252      # Do we have a bin/java?
25253      if test ! -x "$BOOT_JDK/bin/java"; then
25254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25256        BOOT_JDK_FOUND=no
25257      else
25258        # Do we have a bin/javac?
25259        if test ! -x "$BOOT_JDK/bin/javac"; then
25260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25264          BOOT_JDK_FOUND=no
25265        else
25266          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25267          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25268
25269          # Extra M4 quote needed to protect [] in grep expression.
25270          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25271          if test "x$FOUND_CORRECT_VERSION" = x; then
25272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25274            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25275$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25276            BOOT_JDK_FOUND=no
25277          else
25278            # We're done! :-)
25279            BOOT_JDK_FOUND=yes
25280
25281  # Only process if variable expands to non-empty
25282
25283  if test "x$BOOT_JDK" != x; then
25284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285
25286  # Input might be given as Windows format, start by converting to
25287  # unix format.
25288  path="$BOOT_JDK"
25289  new_path=`$CYGPATH -u "$path"`
25290
25291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25294  # "foo.exe" is OK but "foo" is an error.
25295  #
25296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25297  # It is also a way to make sure we got the proper file name for the real test later on.
25298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25299  if test "x$test_shortpath" = x; then
25300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25303  fi
25304
25305  # Call helper function which possibly converts this using DOS-style short mode.
25306  # If so, the updated path is stored in $new_path.
25307
25308  input_path="$new_path"
25309  # Check if we need to convert this using DOS-style short mode. If the path
25310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311  # take no chances and rewrite it.
25312  # Note: m4 eats our [], so we need to use [ and ] instead.
25313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25314  if test "x$has_forbidden_chars" != x; then
25315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25319      # Going to short mode and back again did indeed matter. Since short mode is
25320      # case insensitive, let's make it lowercase to improve readability.
25321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322      # Now convert it back to Unix-style (cygpath)
25323      input_path=`$CYGPATH -u "$shortmode_path"`
25324      new_path="$input_path"
25325    fi
25326  fi
25327
25328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25329  if test "x$test_cygdrive_prefix" = x; then
25330    # As a simple fix, exclude /usr/bin since it's not a real path.
25331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25333      # a path prefixed by /cygdrive for fixpath to work.
25334      new_path="$CYGWIN_ROOT_PATH$input_path"
25335    fi
25336  fi
25337
25338
25339  if test "x$path" != "x$new_path"; then
25340    BOOT_JDK="$new_path"
25341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25343  fi
25344
25345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346
25347  path="$BOOT_JDK"
25348  has_colon=`$ECHO $path | $GREP ^.:`
25349  new_path="$path"
25350  if test "x$has_colon" = x; then
25351    # Not in mixed or Windows style, start by that.
25352    new_path=`cmd //c echo $path`
25353  fi
25354
25355
25356  input_path="$new_path"
25357  # Check if we need to convert this using DOS-style short mode. If the path
25358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25359  # take no chances and rewrite it.
25360  # Note: m4 eats our [], so we need to use [ and ] instead.
25361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25362  if test "x$has_forbidden_chars" != x; then
25363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25365  fi
25366
25367
25368  windows_path="$new_path"
25369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25370    unix_path=`$CYGPATH -u "$windows_path"`
25371    new_path="$unix_path"
25372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25374    new_path="$unix_path"
25375  fi
25376
25377  if test "x$path" != "x$new_path"; then
25378    BOOT_JDK="$new_path"
25379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25381  fi
25382
25383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25385
25386    else
25387      # We're on a unix platform. Hooray! :)
25388      path="$BOOT_JDK"
25389      has_space=`$ECHO "$path" | $GREP " "`
25390      if test "x$has_space" != x; then
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25394      fi
25395
25396      # Use eval to expand a potential ~
25397      eval path="$path"
25398      if test ! -f "$path" && test ! -d "$path"; then
25399        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25400      fi
25401
25402      if test -d "$path"; then
25403        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25404      else
25405        dir="`$DIRNAME "$path"`"
25406        base="`$BASENAME "$path"`"
25407        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25408      fi
25409    fi
25410  fi
25411
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25413$as_echo_n "checking for Boot JDK... " >&6; }
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25415$as_echo "$BOOT_JDK" >&6; }
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25417$as_echo_n "checking Boot JDK version... " >&6; }
25418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25420$as_echo "$BOOT_JDK_VERSION" >&6; }
25421          fi # end check jdk version
25422        fi # end check javac
25423      fi # end check java
25424    fi # end check boot jdk found
25425  fi
25426
25427
25428  if test "x$BOOT_JDK_FOUND" = xno; then
25429    # Now execute the test
25430
25431  if test -x /usr/libexec/java_home; then
25432    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25433    BOOT_JDK_FOUND=maybe
25434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25435$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25436  fi
25437
25438
25439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25441      # Do we have a bin/java?
25442      if test ! -x "$BOOT_JDK/bin/java"; then
25443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25445        BOOT_JDK_FOUND=no
25446      else
25447        # Do we have a bin/javac?
25448        if test ! -x "$BOOT_JDK/bin/javac"; then
25449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25453          BOOT_JDK_FOUND=no
25454        else
25455          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25456          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25457
25458          # Extra M4 quote needed to protect [] in grep expression.
25459          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25460          if test "x$FOUND_CORRECT_VERSION" = x; then
25461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25463            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25464$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25465            BOOT_JDK_FOUND=no
25466          else
25467            # We're done! :-)
25468            BOOT_JDK_FOUND=yes
25469
25470  # Only process if variable expands to non-empty
25471
25472  if test "x$BOOT_JDK" != x; then
25473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474
25475  # Input might be given as Windows format, start by converting to
25476  # unix format.
25477  path="$BOOT_JDK"
25478  new_path=`$CYGPATH -u "$path"`
25479
25480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25483  # "foo.exe" is OK but "foo" is an error.
25484  #
25485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25486  # It is also a way to make sure we got the proper file name for the real test later on.
25487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25488  if test "x$test_shortpath" = x; then
25489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25492  fi
25493
25494  # Call helper function which possibly converts this using DOS-style short mode.
25495  # If so, the updated path is stored in $new_path.
25496
25497  input_path="$new_path"
25498  # Check if we need to convert this using DOS-style short mode. If the path
25499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25500  # take no chances and rewrite it.
25501  # Note: m4 eats our [], so we need to use [ and ] instead.
25502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25503  if test "x$has_forbidden_chars" != x; then
25504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25508      # Going to short mode and back again did indeed matter. Since short mode is
25509      # case insensitive, let's make it lowercase to improve readability.
25510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25511      # Now convert it back to Unix-style (cygpath)
25512      input_path=`$CYGPATH -u "$shortmode_path"`
25513      new_path="$input_path"
25514    fi
25515  fi
25516
25517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25518  if test "x$test_cygdrive_prefix" = x; then
25519    # As a simple fix, exclude /usr/bin since it's not a real path.
25520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25522      # a path prefixed by /cygdrive for fixpath to work.
25523      new_path="$CYGWIN_ROOT_PATH$input_path"
25524    fi
25525  fi
25526
25527
25528  if test "x$path" != "x$new_path"; then
25529    BOOT_JDK="$new_path"
25530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25532  fi
25533
25534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25535
25536  path="$BOOT_JDK"
25537  has_colon=`$ECHO $path | $GREP ^.:`
25538  new_path="$path"
25539  if test "x$has_colon" = x; then
25540    # Not in mixed or Windows style, start by that.
25541    new_path=`cmd //c echo $path`
25542  fi
25543
25544
25545  input_path="$new_path"
25546  # Check if we need to convert this using DOS-style short mode. If the path
25547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25548  # take no chances and rewrite it.
25549  # Note: m4 eats our [], so we need to use [ and ] instead.
25550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25551  if test "x$has_forbidden_chars" != x; then
25552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25554  fi
25555
25556
25557  windows_path="$new_path"
25558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559    unix_path=`$CYGPATH -u "$windows_path"`
25560    new_path="$unix_path"
25561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25563    new_path="$unix_path"
25564  fi
25565
25566  if test "x$path" != "x$new_path"; then
25567    BOOT_JDK="$new_path"
25568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25570  fi
25571
25572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25574
25575    else
25576      # We're on a unix platform. Hooray! :)
25577      path="$BOOT_JDK"
25578      has_space=`$ECHO "$path" | $GREP " "`
25579      if test "x$has_space" != x; then
25580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25583      fi
25584
25585      # Use eval to expand a potential ~
25586      eval path="$path"
25587      if test ! -f "$path" && test ! -d "$path"; then
25588        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25589      fi
25590
25591      if test -d "$path"; then
25592        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25593      else
25594        dir="`$DIRNAME "$path"`"
25595        base="`$BASENAME "$path"`"
25596        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25597      fi
25598    fi
25599  fi
25600
25601            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25602$as_echo_n "checking for Boot JDK... " >&6; }
25603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25604$as_echo "$BOOT_JDK" >&6; }
25605            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25606$as_echo_n "checking Boot JDK version... " >&6; }
25607            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25609$as_echo "$BOOT_JDK_VERSION" >&6; }
25610          fi # end check jdk version
25611        fi # end check javac
25612      fi # end check java
25613    fi # end check boot jdk found
25614  fi
25615
25616
25617  if test "x$BOOT_JDK_FOUND" = xno; then
25618    # Now execute the test
25619
25620  if test -x /usr/libexec/java_home; then
25621    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25622    BOOT_JDK_FOUND=maybe
25623    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25624$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25625  fi
25626
25627
25628    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25629    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25630      # Do we have a bin/java?
25631      if test ! -x "$BOOT_JDK/bin/java"; then
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25634        BOOT_JDK_FOUND=no
25635      else
25636        # Do we have a bin/javac?
25637        if test ! -x "$BOOT_JDK/bin/javac"; then
25638          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25640          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25641$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25642          BOOT_JDK_FOUND=no
25643        else
25644          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25645          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25646
25647          # Extra M4 quote needed to protect [] in grep expression.
25648          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25649          if test "x$FOUND_CORRECT_VERSION" = x; then
25650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25652            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25653$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25654            BOOT_JDK_FOUND=no
25655          else
25656            # We're done! :-)
25657            BOOT_JDK_FOUND=yes
25658
25659  # Only process if variable expands to non-empty
25660
25661  if test "x$BOOT_JDK" != x; then
25662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25663
25664  # Input might be given as Windows format, start by converting to
25665  # unix format.
25666  path="$BOOT_JDK"
25667  new_path=`$CYGPATH -u "$path"`
25668
25669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25672  # "foo.exe" is OK but "foo" is an error.
25673  #
25674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25675  # It is also a way to make sure we got the proper file name for the real test later on.
25676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25677  if test "x$test_shortpath" = x; then
25678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25681  fi
25682
25683  # Call helper function which possibly converts this using DOS-style short mode.
25684  # If so, the updated path is stored in $new_path.
25685
25686  input_path="$new_path"
25687  # Check if we need to convert this using DOS-style short mode. If the path
25688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25689  # take no chances and rewrite it.
25690  # Note: m4 eats our [], so we need to use [ and ] instead.
25691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25692  if test "x$has_forbidden_chars" != x; then
25693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25697      # Going to short mode and back again did indeed matter. Since short mode is
25698      # case insensitive, let's make it lowercase to improve readability.
25699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25700      # Now convert it back to Unix-style (cygpath)
25701      input_path=`$CYGPATH -u "$shortmode_path"`
25702      new_path="$input_path"
25703    fi
25704  fi
25705
25706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25707  if test "x$test_cygdrive_prefix" = x; then
25708    # As a simple fix, exclude /usr/bin since it's not a real path.
25709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25711      # a path prefixed by /cygdrive for fixpath to work.
25712      new_path="$CYGWIN_ROOT_PATH$input_path"
25713    fi
25714  fi
25715
25716
25717  if test "x$path" != "x$new_path"; then
25718    BOOT_JDK="$new_path"
25719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25721  fi
25722
25723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25724
25725  path="$BOOT_JDK"
25726  has_colon=`$ECHO $path | $GREP ^.:`
25727  new_path="$path"
25728  if test "x$has_colon" = x; then
25729    # Not in mixed or Windows style, start by that.
25730    new_path=`cmd //c echo $path`
25731  fi
25732
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25743  fi
25744
25745
25746  windows_path="$new_path"
25747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25748    unix_path=`$CYGPATH -u "$windows_path"`
25749    new_path="$unix_path"
25750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25752    new_path="$unix_path"
25753  fi
25754
25755  if test "x$path" != "x$new_path"; then
25756    BOOT_JDK="$new_path"
25757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25759  fi
25760
25761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25763
25764    else
25765      # We're on a unix platform. Hooray! :)
25766      path="$BOOT_JDK"
25767      has_space=`$ECHO "$path" | $GREP " "`
25768      if test "x$has_space" != x; then
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25772      fi
25773
25774      # Use eval to expand a potential ~
25775      eval path="$path"
25776      if test ! -f "$path" && test ! -d "$path"; then
25777        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25778      fi
25779
25780      if test -d "$path"; then
25781        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25782      else
25783        dir="`$DIRNAME "$path"`"
25784        base="`$BASENAME "$path"`"
25785        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25786      fi
25787    fi
25788  fi
25789
25790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25791$as_echo_n "checking for Boot JDK... " >&6; }
25792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25793$as_echo "$BOOT_JDK" >&6; }
25794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25795$as_echo_n "checking Boot JDK version... " >&6; }
25796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25798$as_echo "$BOOT_JDK_VERSION" >&6; }
25799          fi # end check jdk version
25800        fi # end check javac
25801      fi # end check java
25802    fi # end check boot jdk found
25803  fi
25804
25805  fi
25806
25807
25808    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25809    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25810      # Do we have a bin/java?
25811      if test ! -x "$BOOT_JDK/bin/java"; then
25812        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25814        BOOT_JDK_FOUND=no
25815      else
25816        # Do we have a bin/javac?
25817        if test ! -x "$BOOT_JDK/bin/javac"; then
25818          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25820          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25821$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25822          BOOT_JDK_FOUND=no
25823        else
25824          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25825          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25826
25827          # Extra M4 quote needed to protect [] in grep expression.
25828          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25829          if test "x$FOUND_CORRECT_VERSION" = x; then
25830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25832            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25833$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25834            BOOT_JDK_FOUND=no
25835          else
25836            # We're done! :-)
25837            BOOT_JDK_FOUND=yes
25838
25839  # Only process if variable expands to non-empty
25840
25841  if test "x$BOOT_JDK" != x; then
25842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25843
25844  # Input might be given as Windows format, start by converting to
25845  # unix format.
25846  path="$BOOT_JDK"
25847  new_path=`$CYGPATH -u "$path"`
25848
25849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25852  # "foo.exe" is OK but "foo" is an error.
25853  #
25854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25855  # It is also a way to make sure we got the proper file name for the real test later on.
25856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25857  if test "x$test_shortpath" = x; then
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25861  fi
25862
25863  # Call helper function which possibly converts this using DOS-style short mode.
25864  # If so, the updated path is stored in $new_path.
25865
25866  input_path="$new_path"
25867  # Check if we need to convert this using DOS-style short mode. If the path
25868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25869  # take no chances and rewrite it.
25870  # Note: m4 eats our [], so we need to use [ and ] instead.
25871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25872  if test "x$has_forbidden_chars" != x; then
25873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25877      # Going to short mode and back again did indeed matter. Since short mode is
25878      # case insensitive, let's make it lowercase to improve readability.
25879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25880      # Now convert it back to Unix-style (cygpath)
25881      input_path=`$CYGPATH -u "$shortmode_path"`
25882      new_path="$input_path"
25883    fi
25884  fi
25885
25886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25887  if test "x$test_cygdrive_prefix" = x; then
25888    # As a simple fix, exclude /usr/bin since it's not a real path.
25889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25891      # a path prefixed by /cygdrive for fixpath to work.
25892      new_path="$CYGWIN_ROOT_PATH$input_path"
25893    fi
25894  fi
25895
25896
25897  if test "x$path" != "x$new_path"; then
25898    BOOT_JDK="$new_path"
25899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25901  fi
25902
25903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904
25905  path="$BOOT_JDK"
25906  has_colon=`$ECHO $path | $GREP ^.:`
25907  new_path="$path"
25908  if test "x$has_colon" = x; then
25909    # Not in mixed or Windows style, start by that.
25910    new_path=`cmd //c echo $path`
25911  fi
25912
25913
25914  input_path="$new_path"
25915  # Check if we need to convert this using DOS-style short mode. If the path
25916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25917  # take no chances and rewrite it.
25918  # Note: m4 eats our [], so we need to use [ and ] instead.
25919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25920  if test "x$has_forbidden_chars" != x; then
25921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25923  fi
25924
25925
25926  windows_path="$new_path"
25927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25928    unix_path=`$CYGPATH -u "$windows_path"`
25929    new_path="$unix_path"
25930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25932    new_path="$unix_path"
25933  fi
25934
25935  if test "x$path" != "x$new_path"; then
25936    BOOT_JDK="$new_path"
25937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25939  fi
25940
25941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25943
25944    else
25945      # We're on a unix platform. Hooray! :)
25946      path="$BOOT_JDK"
25947      has_space=`$ECHO "$path" | $GREP " "`
25948      if test "x$has_space" != x; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25952      fi
25953
25954      # Use eval to expand a potential ~
25955      eval path="$path"
25956      if test ! -f "$path" && test ! -d "$path"; then
25957        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25958      fi
25959
25960      if test -d "$path"; then
25961        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25962      else
25963        dir="`$DIRNAME "$path"`"
25964        base="`$BASENAME "$path"`"
25965        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25966      fi
25967    fi
25968  fi
25969
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25971$as_echo_n "checking for Boot JDK... " >&6; }
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25973$as_echo "$BOOT_JDK" >&6; }
25974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25975$as_echo_n "checking Boot JDK version... " >&6; }
25976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25978$as_echo "$BOOT_JDK_VERSION" >&6; }
25979          fi # end check jdk version
25980        fi # end check javac
25981      fi # end check java
25982    fi # end check boot jdk found
25983  fi
25984
25985
25986  # Test: Is $JAVA_HOME set?
25987
25988  if test "x$BOOT_JDK_FOUND" = xno; then
25989    # Now execute the test
25990
25991  if test "x$JAVA_HOME" != x; then
25992    JAVA_HOME_PROCESSED="$JAVA_HOME"
25993
25994  # Only process if variable expands to non-empty
25995
25996  if test "x$JAVA_HOME_PROCESSED" != x; then
25997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25998
25999  # Input might be given as Windows format, start by converting to
26000  # unix format.
26001  path="$JAVA_HOME_PROCESSED"
26002  new_path=`$CYGPATH -u "$path"`
26003
26004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26007  # "foo.exe" is OK but "foo" is an error.
26008  #
26009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26010  # It is also a way to make sure we got the proper file name for the real test later on.
26011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26012  if test "x$test_shortpath" = x; then
26013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26014$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26015    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26016  fi
26017
26018  # Call helper function which possibly converts this using DOS-style short mode.
26019  # If so, the updated path is stored in $new_path.
26020
26021  input_path="$new_path"
26022  # Check if we need to convert this using DOS-style short mode. If the path
26023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26024  # take no chances and rewrite it.
26025  # Note: m4 eats our [], so we need to use [ and ] instead.
26026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26027  if test "x$has_forbidden_chars" != x; then
26028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26032      # Going to short mode and back again did indeed matter. Since short mode is
26033      # case insensitive, let's make it lowercase to improve readability.
26034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26035      # Now convert it back to Unix-style (cygpath)
26036      input_path=`$CYGPATH -u "$shortmode_path"`
26037      new_path="$input_path"
26038    fi
26039  fi
26040
26041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26042  if test "x$test_cygdrive_prefix" = x; then
26043    # As a simple fix, exclude /usr/bin since it's not a real path.
26044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26046      # a path prefixed by /cygdrive for fixpath to work.
26047      new_path="$CYGWIN_ROOT_PATH$input_path"
26048    fi
26049  fi
26050
26051
26052  if test "x$path" != "x$new_path"; then
26053    JAVA_HOME_PROCESSED="$new_path"
26054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26055$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26056  fi
26057
26058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26059
26060  path="$JAVA_HOME_PROCESSED"
26061  has_colon=`$ECHO $path | $GREP ^.:`
26062  new_path="$path"
26063  if test "x$has_colon" = x; then
26064    # Not in mixed or Windows style, start by that.
26065    new_path=`cmd //c echo $path`
26066  fi
26067
26068
26069  input_path="$new_path"
26070  # Check if we need to convert this using DOS-style short mode. If the path
26071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26072  # take no chances and rewrite it.
26073  # Note: m4 eats our [], so we need to use [ and ] instead.
26074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26075  if test "x$has_forbidden_chars" != x; then
26076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26078  fi
26079
26080
26081  windows_path="$new_path"
26082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26083    unix_path=`$CYGPATH -u "$windows_path"`
26084    new_path="$unix_path"
26085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26087    new_path="$unix_path"
26088  fi
26089
26090  if test "x$path" != "x$new_path"; then
26091    JAVA_HOME_PROCESSED="$new_path"
26092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26093$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26094  fi
26095
26096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26098
26099    else
26100      # We're on a unix platform. Hooray! :)
26101      path="$JAVA_HOME_PROCESSED"
26102      has_space=`$ECHO "$path" | $GREP " "`
26103      if test "x$has_space" != x; then
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26105$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26107      fi
26108
26109      # Use eval to expand a potential ~
26110      eval path="$path"
26111      if test ! -f "$path" && test ! -d "$path"; then
26112        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26113      fi
26114
26115      if test -d "$path"; then
26116        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26117      else
26118        dir="`$DIRNAME "$path"`"
26119        base="`$BASENAME "$path"`"
26120        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26121      fi
26122    fi
26123  fi
26124
26125    if test ! -d "$JAVA_HOME_PROCESSED"; then
26126      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26127$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26128    else
26129      # Aha, the user has set a JAVA_HOME
26130      # let us use that as the Boot JDK.
26131      BOOT_JDK="$JAVA_HOME_PROCESSED"
26132      BOOT_JDK_FOUND=maybe
26133      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26134$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26135    fi
26136  fi
26137
26138
26139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26141      # Do we have a bin/java?
26142      if test ! -x "$BOOT_JDK/bin/java"; then
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26145        BOOT_JDK_FOUND=no
26146      else
26147        # Do we have a bin/javac?
26148        if test ! -x "$BOOT_JDK/bin/javac"; then
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26153          BOOT_JDK_FOUND=no
26154        else
26155          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26156          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26157
26158          # Extra M4 quote needed to protect [] in grep expression.
26159          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26160          if test "x$FOUND_CORRECT_VERSION" = x; then
26161            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26163            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26164$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26165            BOOT_JDK_FOUND=no
26166          else
26167            # We're done! :-)
26168            BOOT_JDK_FOUND=yes
26169
26170  # Only process if variable expands to non-empty
26171
26172  if test "x$BOOT_JDK" != x; then
26173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26174
26175  # Input might be given as Windows format, start by converting to
26176  # unix format.
26177  path="$BOOT_JDK"
26178  new_path=`$CYGPATH -u "$path"`
26179
26180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26183  # "foo.exe" is OK but "foo" is an error.
26184  #
26185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26186  # It is also a way to make sure we got the proper file name for the real test later on.
26187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26188  if test "x$test_shortpath" = x; then
26189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26192  fi
26193
26194  # Call helper function which possibly converts this using DOS-style short mode.
26195  # If so, the updated path is stored in $new_path.
26196
26197  input_path="$new_path"
26198  # Check if we need to convert this using DOS-style short mode. If the path
26199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200  # take no chances and rewrite it.
26201  # Note: m4 eats our [], so we need to use [ and ] instead.
26202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26203  if test "x$has_forbidden_chars" != x; then
26204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26208      # Going to short mode and back again did indeed matter. Since short mode is
26209      # case insensitive, let's make it lowercase to improve readability.
26210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26211      # Now convert it back to Unix-style (cygpath)
26212      input_path=`$CYGPATH -u "$shortmode_path"`
26213      new_path="$input_path"
26214    fi
26215  fi
26216
26217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26218  if test "x$test_cygdrive_prefix" = x; then
26219    # As a simple fix, exclude /usr/bin since it's not a real path.
26220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26222      # a path prefixed by /cygdrive for fixpath to work.
26223      new_path="$CYGWIN_ROOT_PATH$input_path"
26224    fi
26225  fi
26226
26227
26228  if test "x$path" != "x$new_path"; then
26229    BOOT_JDK="$new_path"
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26232  fi
26233
26234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26235
26236  path="$BOOT_JDK"
26237  has_colon=`$ECHO $path | $GREP ^.:`
26238  new_path="$path"
26239  if test "x$has_colon" = x; then
26240    # Not in mixed or Windows style, start by that.
26241    new_path=`cmd //c echo $path`
26242  fi
26243
26244
26245  input_path="$new_path"
26246  # Check if we need to convert this using DOS-style short mode. If the path
26247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26248  # take no chances and rewrite it.
26249  # Note: m4 eats our [], so we need to use [ and ] instead.
26250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26251  if test "x$has_forbidden_chars" != x; then
26252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26254  fi
26255
26256
26257  windows_path="$new_path"
26258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26259    unix_path=`$CYGPATH -u "$windows_path"`
26260    new_path="$unix_path"
26261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26263    new_path="$unix_path"
26264  fi
26265
26266  if test "x$path" != "x$new_path"; then
26267    BOOT_JDK="$new_path"
26268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26270  fi
26271
26272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26274
26275    else
26276      # We're on a unix platform. Hooray! :)
26277      path="$BOOT_JDK"
26278      has_space=`$ECHO "$path" | $GREP " "`
26279      if test "x$has_space" != x; then
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26283      fi
26284
26285      # Use eval to expand a potential ~
26286      eval path="$path"
26287      if test ! -f "$path" && test ! -d "$path"; then
26288        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26289      fi
26290
26291      if test -d "$path"; then
26292        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26293      else
26294        dir="`$DIRNAME "$path"`"
26295        base="`$BASENAME "$path"`"
26296        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26297      fi
26298    fi
26299  fi
26300
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26302$as_echo_n "checking for Boot JDK... " >&6; }
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26304$as_echo "$BOOT_JDK" >&6; }
26305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26306$as_echo_n "checking Boot JDK version... " >&6; }
26307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26309$as_echo "$BOOT_JDK_VERSION" >&6; }
26310          fi # end check jdk version
26311        fi # end check javac
26312      fi # end check java
26313    fi # end check boot jdk found
26314  fi
26315
26316
26317  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26318
26319  if test "x$BOOT_JDK_FOUND" = xno; then
26320    # Now execute the test
26321
26322  # Extract the first word of "javac", so it can be a program name with args.
26323set dummy javac; ac_word=$2
26324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26325$as_echo_n "checking for $ac_word... " >&6; }
26326if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26327  $as_echo_n "(cached) " >&6
26328else
26329  case $JAVAC_CHECK in
26330  [\\/]* | ?:[\\/]*)
26331  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26332  ;;
26333  *)
26334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26335for as_dir in $PATH
26336do
26337  IFS=$as_save_IFS
26338  test -z "$as_dir" && as_dir=.
26339    for ac_exec_ext in '' $ac_executable_extensions; do
26340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26341    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26343    break 2
26344  fi
26345done
26346  done
26347IFS=$as_save_IFS
26348
26349  ;;
26350esac
26351fi
26352JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26353if test -n "$JAVAC_CHECK"; then
26354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26355$as_echo "$JAVAC_CHECK" >&6; }
26356else
26357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26358$as_echo "no" >&6; }
26359fi
26360
26361
26362  # Extract the first word of "java", so it can be a program name with args.
26363set dummy java; ac_word=$2
26364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26365$as_echo_n "checking for $ac_word... " >&6; }
26366if ${ac_cv_path_JAVA_CHECK+:} false; then :
26367  $as_echo_n "(cached) " >&6
26368else
26369  case $JAVA_CHECK in
26370  [\\/]* | ?:[\\/]*)
26371  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26372  ;;
26373  *)
26374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26375for as_dir in $PATH
26376do
26377  IFS=$as_save_IFS
26378  test -z "$as_dir" && as_dir=.
26379    for ac_exec_ext in '' $ac_executable_extensions; do
26380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26381    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26383    break 2
26384  fi
26385done
26386  done
26387IFS=$as_save_IFS
26388
26389  ;;
26390esac
26391fi
26392JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26393if test -n "$JAVA_CHECK"; then
26394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26395$as_echo "$JAVA_CHECK" >&6; }
26396else
26397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26398$as_echo "no" >&6; }
26399fi
26400
26401
26402  BINARY="$JAVAC_CHECK"
26403  if test "x$JAVAC_CHECK" = x; then
26404    BINARY="$JAVA_CHECK"
26405  fi
26406  if test "x$BINARY" != x; then
26407    # So there is a java(c) binary, it might be part of a JDK.
26408    # Lets find the JDK/JRE directory by following symbolic links.
26409    # Linux/GNU systems often have links from /usr/bin/java to
26410    # /etc/alternatives/java to the real JDK binary.
26411
26412  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26413    # Follow a chain of symbolic links. Use readlink
26414    # where it exists, else fall back to horribly
26415    # complicated shell code.
26416    if test "x$READLINK_TESTED" != yes; then
26417      # On MacOSX there is a readlink tool with a different
26418      # purpose than the GNU readlink tool. Check the found readlink.
26419      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26420      if test "x$ISGNU" = x; then
26421        # A readlink that we do not know how to use.
26422        # Are there other non-GNU readlinks out there?
26423        READLINK_TESTED=yes
26424        READLINK=
26425      fi
26426    fi
26427
26428    if test "x$READLINK" != x; then
26429      BINARY=`$READLINK -f $BINARY`
26430    else
26431      # Save the current directory for restoring afterwards
26432      STARTDIR=$PWD
26433      COUNTER=0
26434      sym_link_dir=`$DIRNAME $BINARY`
26435      sym_link_file=`$BASENAME $BINARY`
26436      cd $sym_link_dir
26437      # Use -P flag to resolve symlinks in directories.
26438      cd `$THEPWDCMD -P`
26439      sym_link_dir=`$THEPWDCMD -P`
26440      # Resolve file symlinks
26441      while test $COUNTER -lt 20; do
26442        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26443        if test "x$ISLINK" == x; then
26444          # This is not a symbolic link! We are done!
26445          break
26446        fi
26447        # Again resolve directory symlinks since the target of the just found
26448        # link could be in a different directory
26449        cd `$DIRNAME $ISLINK`
26450        sym_link_dir=`$THEPWDCMD -P`
26451        sym_link_file=`$BASENAME $ISLINK`
26452        let COUNTER=COUNTER+1
26453      done
26454      cd $STARTDIR
26455      BINARY=$sym_link_dir/$sym_link_file
26456    fi
26457  fi
26458
26459    BOOT_JDK=`dirname "$BINARY"`
26460    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26461    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26462      # Looks like we found ourselves an JDK
26463      BOOT_JDK_FOUND=maybe
26464      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26465$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26466    fi
26467  fi
26468
26469
26470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26472      # Do we have a bin/java?
26473      if test ! -x "$BOOT_JDK/bin/java"; then
26474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26476        BOOT_JDK_FOUND=no
26477      else
26478        # Do we have a bin/javac?
26479        if test ! -x "$BOOT_JDK/bin/javac"; then
26480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26484          BOOT_JDK_FOUND=no
26485        else
26486          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26487          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26488
26489          # Extra M4 quote needed to protect [] in grep expression.
26490          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26491          if test "x$FOUND_CORRECT_VERSION" = x; then
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26496            BOOT_JDK_FOUND=no
26497          else
26498            # We're done! :-)
26499            BOOT_JDK_FOUND=yes
26500
26501  # Only process if variable expands to non-empty
26502
26503  if test "x$BOOT_JDK" != x; then
26504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26505
26506  # Input might be given as Windows format, start by converting to
26507  # unix format.
26508  path="$BOOT_JDK"
26509  new_path=`$CYGPATH -u "$path"`
26510
26511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26514  # "foo.exe" is OK but "foo" is an error.
26515  #
26516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26517  # It is also a way to make sure we got the proper file name for the real test later on.
26518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26519  if test "x$test_shortpath" = x; then
26520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26523  fi
26524
26525  # Call helper function which possibly converts this using DOS-style short mode.
26526  # If so, the updated path is stored in $new_path.
26527
26528  input_path="$new_path"
26529  # Check if we need to convert this using DOS-style short mode. If the path
26530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26531  # take no chances and rewrite it.
26532  # Note: m4 eats our [], so we need to use [ and ] instead.
26533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26534  if test "x$has_forbidden_chars" != x; then
26535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26539      # Going to short mode and back again did indeed matter. Since short mode is
26540      # case insensitive, let's make it lowercase to improve readability.
26541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26542      # Now convert it back to Unix-style (cygpath)
26543      input_path=`$CYGPATH -u "$shortmode_path"`
26544      new_path="$input_path"
26545    fi
26546  fi
26547
26548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26549  if test "x$test_cygdrive_prefix" = x; then
26550    # As a simple fix, exclude /usr/bin since it's not a real path.
26551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26553      # a path prefixed by /cygdrive for fixpath to work.
26554      new_path="$CYGWIN_ROOT_PATH$input_path"
26555    fi
26556  fi
26557
26558
26559  if test "x$path" != "x$new_path"; then
26560    BOOT_JDK="$new_path"
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26563  fi
26564
26565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26566
26567  path="$BOOT_JDK"
26568  has_colon=`$ECHO $path | $GREP ^.:`
26569  new_path="$path"
26570  if test "x$has_colon" = x; then
26571    # Not in mixed or Windows style, start by that.
26572    new_path=`cmd //c echo $path`
26573  fi
26574
26575
26576  input_path="$new_path"
26577  # Check if we need to convert this using DOS-style short mode. If the path
26578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26579  # take no chances and rewrite it.
26580  # Note: m4 eats our [], so we need to use [ and ] instead.
26581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26582  if test "x$has_forbidden_chars" != x; then
26583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26585  fi
26586
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597  if test "x$path" != "x$new_path"; then
26598    BOOT_JDK="$new_path"
26599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26601  fi
26602
26603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26605
26606    else
26607      # We're on a unix platform. Hooray! :)
26608      path="$BOOT_JDK"
26609      has_space=`$ECHO "$path" | $GREP " "`
26610      if test "x$has_space" != x; then
26611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26614      fi
26615
26616      # Use eval to expand a potential ~
26617      eval path="$path"
26618      if test ! -f "$path" && test ! -d "$path"; then
26619        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26620      fi
26621
26622      if test -d "$path"; then
26623        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26624      else
26625        dir="`$DIRNAME "$path"`"
26626        base="`$BASENAME "$path"`"
26627        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26628      fi
26629    fi
26630  fi
26631
26632            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26633$as_echo_n "checking for Boot JDK... " >&6; }
26634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26635$as_echo "$BOOT_JDK" >&6; }
26636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26637$as_echo_n "checking Boot JDK version... " >&6; }
26638            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26640$as_echo "$BOOT_JDK_VERSION" >&6; }
26641          fi # end check jdk version
26642        fi # end check javac
26643      fi # end check java
26644    fi # end check boot jdk found
26645  fi
26646
26647
26648  # Test: Is there a JDK installed in default, well-known locations?
26649
26650  if test "x$BOOT_JDK_FOUND" = xno; then
26651    # Now execute the test
26652
26653  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26654
26655  if test "x$BOOT_JDK_FOUND" = xno; then
26656    # Now execute the test
26657
26658  if test "x$ProgramW6432" != x; then
26659    VIRTUAL_DIR="$ProgramW6432/Java"
26660
26661  windows_path="$VIRTUAL_DIR"
26662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26663    unix_path=`$CYGPATH -u "$windows_path"`
26664    VIRTUAL_DIR="$unix_path"
26665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26667    VIRTUAL_DIR="$unix_path"
26668  fi
26669
26670
26671  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26672  BOOT_JDK_SUFFIX=""
26673  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26674  if test "x$ALL_JDKS_FOUND" != x; then
26675    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26676
26677  if test "x$BOOT_JDK_FOUND" = xno; then
26678    # Now execute the test
26679
26680        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26681        if test -d "$BOOT_JDK"; then
26682          BOOT_JDK_FOUND=maybe
26683          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26684$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26685        fi
26686
26687
26688    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26689    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26690      # Do we have a bin/java?
26691      if test ! -x "$BOOT_JDK/bin/java"; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26694        BOOT_JDK_FOUND=no
26695      else
26696        # Do we have a bin/javac?
26697        if test ! -x "$BOOT_JDK/bin/javac"; then
26698          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26700          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26701$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26702          BOOT_JDK_FOUND=no
26703        else
26704          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26705          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26706
26707          # Extra M4 quote needed to protect [] in grep expression.
26708          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26709          if test "x$FOUND_CORRECT_VERSION" = x; then
26710            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26712            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26713$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26714            BOOT_JDK_FOUND=no
26715          else
26716            # We're done! :-)
26717            BOOT_JDK_FOUND=yes
26718
26719  # Only process if variable expands to non-empty
26720
26721  if test "x$BOOT_JDK" != x; then
26722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26723
26724  # Input might be given as Windows format, start by converting to
26725  # unix format.
26726  path="$BOOT_JDK"
26727  new_path=`$CYGPATH -u "$path"`
26728
26729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26732  # "foo.exe" is OK but "foo" is an error.
26733  #
26734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26735  # It is also a way to make sure we got the proper file name for the real test later on.
26736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26737  if test "x$test_shortpath" = x; then
26738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26740    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26741  fi
26742
26743  # Call helper function which possibly converts this using DOS-style short mode.
26744  # If so, the updated path is stored in $new_path.
26745
26746  input_path="$new_path"
26747  # Check if we need to convert this using DOS-style short mode. If the path
26748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26749  # take no chances and rewrite it.
26750  # Note: m4 eats our [], so we need to use [ and ] instead.
26751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26752  if test "x$has_forbidden_chars" != x; then
26753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26757      # Going to short mode and back again did indeed matter. Since short mode is
26758      # case insensitive, let's make it lowercase to improve readability.
26759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26760      # Now convert it back to Unix-style (cygpath)
26761      input_path=`$CYGPATH -u "$shortmode_path"`
26762      new_path="$input_path"
26763    fi
26764  fi
26765
26766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26767  if test "x$test_cygdrive_prefix" = x; then
26768    # As a simple fix, exclude /usr/bin since it's not a real path.
26769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26771      # a path prefixed by /cygdrive for fixpath to work.
26772      new_path="$CYGWIN_ROOT_PATH$input_path"
26773    fi
26774  fi
26775
26776
26777  if test "x$path" != "x$new_path"; then
26778    BOOT_JDK="$new_path"
26779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26781  fi
26782
26783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784
26785  path="$BOOT_JDK"
26786  has_colon=`$ECHO $path | $GREP ^.:`
26787  new_path="$path"
26788  if test "x$has_colon" = x; then
26789    # Not in mixed or Windows style, start by that.
26790    new_path=`cmd //c echo $path`
26791  fi
26792
26793
26794  input_path="$new_path"
26795  # Check if we need to convert this using DOS-style short mode. If the path
26796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26797  # take no chances and rewrite it.
26798  # Note: m4 eats our [], so we need to use [ and ] instead.
26799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26800  if test "x$has_forbidden_chars" != x; then
26801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803  fi
26804
26805
26806  windows_path="$new_path"
26807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26808    unix_path=`$CYGPATH -u "$windows_path"`
26809    new_path="$unix_path"
26810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26812    new_path="$unix_path"
26813  fi
26814
26815  if test "x$path" != "x$new_path"; then
26816    BOOT_JDK="$new_path"
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26819  fi
26820
26821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26823
26824    else
26825      # We're on a unix platform. Hooray! :)
26826      path="$BOOT_JDK"
26827      has_space=`$ECHO "$path" | $GREP " "`
26828      if test "x$has_space" != x; then
26829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26831        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26832      fi
26833
26834      # Use eval to expand a potential ~
26835      eval path="$path"
26836      if test ! -f "$path" && test ! -d "$path"; then
26837        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26838      fi
26839
26840      if test -d "$path"; then
26841        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26842      else
26843        dir="`$DIRNAME "$path"`"
26844        base="`$BASENAME "$path"`"
26845        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26846      fi
26847    fi
26848  fi
26849
26850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26851$as_echo_n "checking for Boot JDK... " >&6; }
26852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26853$as_echo "$BOOT_JDK" >&6; }
26854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26855$as_echo_n "checking Boot JDK version... " >&6; }
26856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26858$as_echo "$BOOT_JDK_VERSION" >&6; }
26859          fi # end check jdk version
26860        fi # end check javac
26861      fi # end check java
26862    fi # end check boot jdk found
26863  fi
26864
26865    done
26866  fi
26867
26868  fi
26869
26870
26871    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26872    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26873      # Do we have a bin/java?
26874      if test ! -x "$BOOT_JDK/bin/java"; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26877        BOOT_JDK_FOUND=no
26878      else
26879        # Do we have a bin/javac?
26880        if test ! -x "$BOOT_JDK/bin/javac"; then
26881          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26883          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26884$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26885          BOOT_JDK_FOUND=no
26886        else
26887          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26888          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26889
26890          # Extra M4 quote needed to protect [] in grep expression.
26891          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26892          if test "x$FOUND_CORRECT_VERSION" = x; then
26893            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26895            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26896$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26897            BOOT_JDK_FOUND=no
26898          else
26899            # We're done! :-)
26900            BOOT_JDK_FOUND=yes
26901
26902  # Only process if variable expands to non-empty
26903
26904  if test "x$BOOT_JDK" != x; then
26905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906
26907  # Input might be given as Windows format, start by converting to
26908  # unix format.
26909  path="$BOOT_JDK"
26910  new_path=`$CYGPATH -u "$path"`
26911
26912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26915  # "foo.exe" is OK but "foo" is an error.
26916  #
26917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26918  # It is also a way to make sure we got the proper file name for the real test later on.
26919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26920  if test "x$test_shortpath" = x; then
26921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26924  fi
26925
26926  # Call helper function which possibly converts this using DOS-style short mode.
26927  # If so, the updated path is stored in $new_path.
26928
26929  input_path="$new_path"
26930  # Check if we need to convert this using DOS-style short mode. If the path
26931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26932  # take no chances and rewrite it.
26933  # Note: m4 eats our [], so we need to use [ and ] instead.
26934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26935  if test "x$has_forbidden_chars" != x; then
26936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26940      # Going to short mode and back again did indeed matter. Since short mode is
26941      # case insensitive, let's make it lowercase to improve readability.
26942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26943      # Now convert it back to Unix-style (cygpath)
26944      input_path=`$CYGPATH -u "$shortmode_path"`
26945      new_path="$input_path"
26946    fi
26947  fi
26948
26949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26950  if test "x$test_cygdrive_prefix" = x; then
26951    # As a simple fix, exclude /usr/bin since it's not a real path.
26952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26954      # a path prefixed by /cygdrive for fixpath to work.
26955      new_path="$CYGWIN_ROOT_PATH$input_path"
26956    fi
26957  fi
26958
26959
26960  if test "x$path" != "x$new_path"; then
26961    BOOT_JDK="$new_path"
26962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26964  fi
26965
26966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967
26968  path="$BOOT_JDK"
26969  has_colon=`$ECHO $path | $GREP ^.:`
26970  new_path="$path"
26971  if test "x$has_colon" = x; then
26972    # Not in mixed or Windows style, start by that.
26973    new_path=`cmd //c echo $path`
26974  fi
26975
26976
26977  input_path="$new_path"
26978  # Check if we need to convert this using DOS-style short mode. If the path
26979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26980  # take no chances and rewrite it.
26981  # Note: m4 eats our [], so we need to use [ and ] instead.
26982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26983  if test "x$has_forbidden_chars" != x; then
26984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26986  fi
26987
26988
26989  windows_path="$new_path"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    new_path="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    new_path="$unix_path"
26996  fi
26997
26998  if test "x$path" != "x$new_path"; then
26999    BOOT_JDK="$new_path"
27000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27002  fi
27003
27004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27006
27007    else
27008      # We're on a unix platform. Hooray! :)
27009      path="$BOOT_JDK"
27010      has_space=`$ECHO "$path" | $GREP " "`
27011      if test "x$has_space" != x; then
27012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27015      fi
27016
27017      # Use eval to expand a potential ~
27018      eval path="$path"
27019      if test ! -f "$path" && test ! -d "$path"; then
27020        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27021      fi
27022
27023      if test -d "$path"; then
27024        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27025      else
27026        dir="`$DIRNAME "$path"`"
27027        base="`$BASENAME "$path"`"
27028        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27029      fi
27030    fi
27031  fi
27032
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27034$as_echo_n "checking for Boot JDK... " >&6; }
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27036$as_echo "$BOOT_JDK" >&6; }
27037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27038$as_echo_n "checking Boot JDK version... " >&6; }
27039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27041$as_echo "$BOOT_JDK_VERSION" >&6; }
27042          fi # end check jdk version
27043        fi # end check javac
27044      fi # end check java
27045    fi # end check boot jdk found
27046  fi
27047
27048
27049  if test "x$BOOT_JDK_FOUND" = xno; then
27050    # Now execute the test
27051
27052  if test "x$PROGRAMW6432" != x; then
27053    VIRTUAL_DIR="$PROGRAMW6432/Java"
27054
27055  windows_path="$VIRTUAL_DIR"
27056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057    unix_path=`$CYGPATH -u "$windows_path"`
27058    VIRTUAL_DIR="$unix_path"
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061    VIRTUAL_DIR="$unix_path"
27062  fi
27063
27064
27065  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27066  BOOT_JDK_SUFFIX=""
27067  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27068  if test "x$ALL_JDKS_FOUND" != x; then
27069    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27070
27071  if test "x$BOOT_JDK_FOUND" = xno; then
27072    # Now execute the test
27073
27074        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27075        if test -d "$BOOT_JDK"; then
27076          BOOT_JDK_FOUND=maybe
27077          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27078$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27079        fi
27080
27081
27082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27084      # Do we have a bin/java?
27085      if test ! -x "$BOOT_JDK/bin/java"; then
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27088        BOOT_JDK_FOUND=no
27089      else
27090        # Do we have a bin/javac?
27091        if test ! -x "$BOOT_JDK/bin/javac"; then
27092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27096          BOOT_JDK_FOUND=no
27097        else
27098          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27099          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27100
27101          # Extra M4 quote needed to protect [] in grep expression.
27102          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27103          if test "x$FOUND_CORRECT_VERSION" = x; then
27104            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27106            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27107$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27108            BOOT_JDK_FOUND=no
27109          else
27110            # We're done! :-)
27111            BOOT_JDK_FOUND=yes
27112
27113  # Only process if variable expands to non-empty
27114
27115  if test "x$BOOT_JDK" != x; then
27116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27117
27118  # Input might be given as Windows format, start by converting to
27119  # unix format.
27120  path="$BOOT_JDK"
27121  new_path=`$CYGPATH -u "$path"`
27122
27123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27126  # "foo.exe" is OK but "foo" is an error.
27127  #
27128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27129  # It is also a way to make sure we got the proper file name for the real test later on.
27130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27131  if test "x$test_shortpath" = x; then
27132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27134    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27135  fi
27136
27137  # Call helper function which possibly converts this using DOS-style short mode.
27138  # If so, the updated path is stored in $new_path.
27139
27140  input_path="$new_path"
27141  # Check if we need to convert this using DOS-style short mode. If the path
27142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27143  # take no chances and rewrite it.
27144  # Note: m4 eats our [], so we need to use [ and ] instead.
27145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27146  if test "x$has_forbidden_chars" != x; then
27147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27151      # Going to short mode and back again did indeed matter. Since short mode is
27152      # case insensitive, let's make it lowercase to improve readability.
27153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27154      # Now convert it back to Unix-style (cygpath)
27155      input_path=`$CYGPATH -u "$shortmode_path"`
27156      new_path="$input_path"
27157    fi
27158  fi
27159
27160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27161  if test "x$test_cygdrive_prefix" = x; then
27162    # As a simple fix, exclude /usr/bin since it's not a real path.
27163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27165      # a path prefixed by /cygdrive for fixpath to work.
27166      new_path="$CYGWIN_ROOT_PATH$input_path"
27167    fi
27168  fi
27169
27170
27171  if test "x$path" != "x$new_path"; then
27172    BOOT_JDK="$new_path"
27173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27175  fi
27176
27177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27178
27179  path="$BOOT_JDK"
27180  has_colon=`$ECHO $path | $GREP ^.:`
27181  new_path="$path"
27182  if test "x$has_colon" = x; then
27183    # Not in mixed or Windows style, start by that.
27184    new_path=`cmd //c echo $path`
27185  fi
27186
27187
27188  input_path="$new_path"
27189  # Check if we need to convert this using DOS-style short mode. If the path
27190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27191  # take no chances and rewrite it.
27192  # Note: m4 eats our [], so we need to use [ and ] instead.
27193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27194  if test "x$has_forbidden_chars" != x; then
27195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27197  fi
27198
27199
27200  windows_path="$new_path"
27201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27202    unix_path=`$CYGPATH -u "$windows_path"`
27203    new_path="$unix_path"
27204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27206    new_path="$unix_path"
27207  fi
27208
27209  if test "x$path" != "x$new_path"; then
27210    BOOT_JDK="$new_path"
27211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27213  fi
27214
27215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27217
27218    else
27219      # We're on a unix platform. Hooray! :)
27220      path="$BOOT_JDK"
27221      has_space=`$ECHO "$path" | $GREP " "`
27222      if test "x$has_space" != x; then
27223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27226      fi
27227
27228      # Use eval to expand a potential ~
27229      eval path="$path"
27230      if test ! -f "$path" && test ! -d "$path"; then
27231        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27232      fi
27233
27234      if test -d "$path"; then
27235        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27236      else
27237        dir="`$DIRNAME "$path"`"
27238        base="`$BASENAME "$path"`"
27239        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27240      fi
27241    fi
27242  fi
27243
27244            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27245$as_echo_n "checking for Boot JDK... " >&6; }
27246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27247$as_echo "$BOOT_JDK" >&6; }
27248            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27249$as_echo_n "checking Boot JDK version... " >&6; }
27250            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27252$as_echo "$BOOT_JDK_VERSION" >&6; }
27253          fi # end check jdk version
27254        fi # end check javac
27255      fi # end check java
27256    fi # end check boot jdk found
27257  fi
27258
27259    done
27260  fi
27261
27262  fi
27263
27264
27265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27267      # Do we have a bin/java?
27268      if test ! -x "$BOOT_JDK/bin/java"; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27271        BOOT_JDK_FOUND=no
27272      else
27273        # Do we have a bin/javac?
27274        if test ! -x "$BOOT_JDK/bin/javac"; then
27275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27279          BOOT_JDK_FOUND=no
27280        else
27281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27283
27284          # Extra M4 quote needed to protect [] in grep expression.
27285          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27286          if test "x$FOUND_CORRECT_VERSION" = x; then
27287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27291            BOOT_JDK_FOUND=no
27292          else
27293            # We're done! :-)
27294            BOOT_JDK_FOUND=yes
27295
27296  # Only process if variable expands to non-empty
27297
27298  if test "x$BOOT_JDK" != x; then
27299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300
27301  # Input might be given as Windows format, start by converting to
27302  # unix format.
27303  path="$BOOT_JDK"
27304  new_path=`$CYGPATH -u "$path"`
27305
27306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27309  # "foo.exe" is OK but "foo" is an error.
27310  #
27311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27312  # It is also a way to make sure we got the proper file name for the real test later on.
27313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27314  if test "x$test_shortpath" = x; then
27315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27318  fi
27319
27320  # Call helper function which possibly converts this using DOS-style short mode.
27321  # If so, the updated path is stored in $new_path.
27322
27323  input_path="$new_path"
27324  # Check if we need to convert this using DOS-style short mode. If the path
27325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27326  # take no chances and rewrite it.
27327  # Note: m4 eats our [], so we need to use [ and ] instead.
27328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27329  if test "x$has_forbidden_chars" != x; then
27330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27334      # Going to short mode and back again did indeed matter. Since short mode is
27335      # case insensitive, let's make it lowercase to improve readability.
27336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27337      # Now convert it back to Unix-style (cygpath)
27338      input_path=`$CYGPATH -u "$shortmode_path"`
27339      new_path="$input_path"
27340    fi
27341  fi
27342
27343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27344  if test "x$test_cygdrive_prefix" = x; then
27345    # As a simple fix, exclude /usr/bin since it's not a real path.
27346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27348      # a path prefixed by /cygdrive for fixpath to work.
27349      new_path="$CYGWIN_ROOT_PATH$input_path"
27350    fi
27351  fi
27352
27353
27354  if test "x$path" != "x$new_path"; then
27355    BOOT_JDK="$new_path"
27356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27358  fi
27359
27360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361
27362  path="$BOOT_JDK"
27363  has_colon=`$ECHO $path | $GREP ^.:`
27364  new_path="$path"
27365  if test "x$has_colon" = x; then
27366    # Not in mixed or Windows style, start by that.
27367    new_path=`cmd //c echo $path`
27368  fi
27369
27370
27371  input_path="$new_path"
27372  # Check if we need to convert this using DOS-style short mode. If the path
27373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27374  # take no chances and rewrite it.
27375  # Note: m4 eats our [], so we need to use [ and ] instead.
27376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27377  if test "x$has_forbidden_chars" != x; then
27378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27380  fi
27381
27382
27383  windows_path="$new_path"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    new_path="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    new_path="$unix_path"
27390  fi
27391
27392  if test "x$path" != "x$new_path"; then
27393    BOOT_JDK="$new_path"
27394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27396  fi
27397
27398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27400
27401    else
27402      # We're on a unix platform. Hooray! :)
27403      path="$BOOT_JDK"
27404      has_space=`$ECHO "$path" | $GREP " "`
27405      if test "x$has_space" != x; then
27406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27409      fi
27410
27411      # Use eval to expand a potential ~
27412      eval path="$path"
27413      if test ! -f "$path" && test ! -d "$path"; then
27414        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27415      fi
27416
27417      if test -d "$path"; then
27418        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27419      else
27420        dir="`$DIRNAME "$path"`"
27421        base="`$BASENAME "$path"`"
27422        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27423      fi
27424    fi
27425  fi
27426
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27428$as_echo_n "checking for Boot JDK... " >&6; }
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27430$as_echo "$BOOT_JDK" >&6; }
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27432$as_echo_n "checking Boot JDK version... " >&6; }
27433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27435$as_echo "$BOOT_JDK_VERSION" >&6; }
27436          fi # end check jdk version
27437        fi # end check javac
27438      fi # end check java
27439    fi # end check boot jdk found
27440  fi
27441
27442
27443  if test "x$BOOT_JDK_FOUND" = xno; then
27444    # Now execute the test
27445
27446  if test "x$PROGRAMFILES" != x; then
27447    VIRTUAL_DIR="$PROGRAMFILES/Java"
27448
27449  windows_path="$VIRTUAL_DIR"
27450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27451    unix_path=`$CYGPATH -u "$windows_path"`
27452    VIRTUAL_DIR="$unix_path"
27453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27455    VIRTUAL_DIR="$unix_path"
27456  fi
27457
27458
27459  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27460  BOOT_JDK_SUFFIX=""
27461  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27462  if test "x$ALL_JDKS_FOUND" != x; then
27463    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27464
27465  if test "x$BOOT_JDK_FOUND" = xno; then
27466    # Now execute the test
27467
27468        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27469        if test -d "$BOOT_JDK"; then
27470          BOOT_JDK_FOUND=maybe
27471          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27472$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27473        fi
27474
27475
27476    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27477    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27478      # Do we have a bin/java?
27479      if test ! -x "$BOOT_JDK/bin/java"; then
27480        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27482        BOOT_JDK_FOUND=no
27483      else
27484        # Do we have a bin/javac?
27485        if test ! -x "$BOOT_JDK/bin/javac"; then
27486          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27488          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27489$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27490          BOOT_JDK_FOUND=no
27491        else
27492          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27493          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27494
27495          # Extra M4 quote needed to protect [] in grep expression.
27496          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27497          if test "x$FOUND_CORRECT_VERSION" = x; then
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27500            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27501$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27502            BOOT_JDK_FOUND=no
27503          else
27504            # We're done! :-)
27505            BOOT_JDK_FOUND=yes
27506
27507  # Only process if variable expands to non-empty
27508
27509  if test "x$BOOT_JDK" != x; then
27510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27511
27512  # Input might be given as Windows format, start by converting to
27513  # unix format.
27514  path="$BOOT_JDK"
27515  new_path=`$CYGPATH -u "$path"`
27516
27517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27520  # "foo.exe" is OK but "foo" is an error.
27521  #
27522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27523  # It is also a way to make sure we got the proper file name for the real test later on.
27524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27525  if test "x$test_shortpath" = x; then
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27529  fi
27530
27531  # Call helper function which possibly converts this using DOS-style short mode.
27532  # If so, the updated path is stored in $new_path.
27533
27534  input_path="$new_path"
27535  # Check if we need to convert this using DOS-style short mode. If the path
27536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27537  # take no chances and rewrite it.
27538  # Note: m4 eats our [], so we need to use [ and ] instead.
27539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27540  if test "x$has_forbidden_chars" != x; then
27541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27545      # Going to short mode and back again did indeed matter. Since short mode is
27546      # case insensitive, let's make it lowercase to improve readability.
27547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27548      # Now convert it back to Unix-style (cygpath)
27549      input_path=`$CYGPATH -u "$shortmode_path"`
27550      new_path="$input_path"
27551    fi
27552  fi
27553
27554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27555  if test "x$test_cygdrive_prefix" = x; then
27556    # As a simple fix, exclude /usr/bin since it's not a real path.
27557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27559      # a path prefixed by /cygdrive for fixpath to work.
27560      new_path="$CYGWIN_ROOT_PATH$input_path"
27561    fi
27562  fi
27563
27564
27565  if test "x$path" != "x$new_path"; then
27566    BOOT_JDK="$new_path"
27567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27569  fi
27570
27571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27572
27573  path="$BOOT_JDK"
27574  has_colon=`$ECHO $path | $GREP ^.:`
27575  new_path="$path"
27576  if test "x$has_colon" = x; then
27577    # Not in mixed or Windows style, start by that.
27578    new_path=`cmd //c echo $path`
27579  fi
27580
27581
27582  input_path="$new_path"
27583  # Check if we need to convert this using DOS-style short mode. If the path
27584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27585  # take no chances and rewrite it.
27586  # Note: m4 eats our [], so we need to use [ and ] instead.
27587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27588  if test "x$has_forbidden_chars" != x; then
27589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27591  fi
27592
27593
27594  windows_path="$new_path"
27595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27596    unix_path=`$CYGPATH -u "$windows_path"`
27597    new_path="$unix_path"
27598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27600    new_path="$unix_path"
27601  fi
27602
27603  if test "x$path" != "x$new_path"; then
27604    BOOT_JDK="$new_path"
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27607  fi
27608
27609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27611
27612    else
27613      # We're on a unix platform. Hooray! :)
27614      path="$BOOT_JDK"
27615      has_space=`$ECHO "$path" | $GREP " "`
27616      if test "x$has_space" != x; then
27617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27620      fi
27621
27622      # Use eval to expand a potential ~
27623      eval path="$path"
27624      if test ! -f "$path" && test ! -d "$path"; then
27625        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27626      fi
27627
27628      if test -d "$path"; then
27629        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27630      else
27631        dir="`$DIRNAME "$path"`"
27632        base="`$BASENAME "$path"`"
27633        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27634      fi
27635    fi
27636  fi
27637
27638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27639$as_echo_n "checking for Boot JDK... " >&6; }
27640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27641$as_echo "$BOOT_JDK" >&6; }
27642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27643$as_echo_n "checking Boot JDK version... " >&6; }
27644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27646$as_echo "$BOOT_JDK_VERSION" >&6; }
27647          fi # end check jdk version
27648        fi # end check javac
27649      fi # end check java
27650    fi # end check boot jdk found
27651  fi
27652
27653    done
27654  fi
27655
27656  fi
27657
27658
27659    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27660    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27661      # Do we have a bin/java?
27662      if test ! -x "$BOOT_JDK/bin/java"; then
27663        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27665        BOOT_JDK_FOUND=no
27666      else
27667        # Do we have a bin/javac?
27668        if test ! -x "$BOOT_JDK/bin/javac"; then
27669          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27671          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27672$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27673          BOOT_JDK_FOUND=no
27674        else
27675          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27676          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27677
27678          # Extra M4 quote needed to protect [] in grep expression.
27679          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27680          if test "x$FOUND_CORRECT_VERSION" = x; then
27681            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27683            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27684$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27685            BOOT_JDK_FOUND=no
27686          else
27687            # We're done! :-)
27688            BOOT_JDK_FOUND=yes
27689
27690  # Only process if variable expands to non-empty
27691
27692  if test "x$BOOT_JDK" != x; then
27693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694
27695  # Input might be given as Windows format, start by converting to
27696  # unix format.
27697  path="$BOOT_JDK"
27698  new_path=`$CYGPATH -u "$path"`
27699
27700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27703  # "foo.exe" is OK but "foo" is an error.
27704  #
27705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27706  # It is also a way to make sure we got the proper file name for the real test later on.
27707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27708  if test "x$test_shortpath" = x; then
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27711    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27712  fi
27713
27714  # Call helper function which possibly converts this using DOS-style short mode.
27715  # If so, the updated path is stored in $new_path.
27716
27717  input_path="$new_path"
27718  # Check if we need to convert this using DOS-style short mode. If the path
27719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27720  # take no chances and rewrite it.
27721  # Note: m4 eats our [], so we need to use [ and ] instead.
27722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27723  if test "x$has_forbidden_chars" != x; then
27724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27728      # Going to short mode and back again did indeed matter. Since short mode is
27729      # case insensitive, let's make it lowercase to improve readability.
27730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27731      # Now convert it back to Unix-style (cygpath)
27732      input_path=`$CYGPATH -u "$shortmode_path"`
27733      new_path="$input_path"
27734    fi
27735  fi
27736
27737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27738  if test "x$test_cygdrive_prefix" = x; then
27739    # As a simple fix, exclude /usr/bin since it's not a real path.
27740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27742      # a path prefixed by /cygdrive for fixpath to work.
27743      new_path="$CYGWIN_ROOT_PATH$input_path"
27744    fi
27745  fi
27746
27747
27748  if test "x$path" != "x$new_path"; then
27749    BOOT_JDK="$new_path"
27750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27752  fi
27753
27754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27755
27756  path="$BOOT_JDK"
27757  has_colon=`$ECHO $path | $GREP ^.:`
27758  new_path="$path"
27759  if test "x$has_colon" = x; then
27760    # Not in mixed or Windows style, start by that.
27761    new_path=`cmd //c echo $path`
27762  fi
27763
27764
27765  input_path="$new_path"
27766  # Check if we need to convert this using DOS-style short mode. If the path
27767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27768  # take no chances and rewrite it.
27769  # Note: m4 eats our [], so we need to use [ and ] instead.
27770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27771  if test "x$has_forbidden_chars" != x; then
27772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27774  fi
27775
27776
27777  windows_path="$new_path"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    new_path="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    new_path="$unix_path"
27784  fi
27785
27786  if test "x$path" != "x$new_path"; then
27787    BOOT_JDK="$new_path"
27788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27790  fi
27791
27792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27794
27795    else
27796      # We're on a unix platform. Hooray! :)
27797      path="$BOOT_JDK"
27798      has_space=`$ECHO "$path" | $GREP " "`
27799      if test "x$has_space" != x; then
27800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27803      fi
27804
27805      # Use eval to expand a potential ~
27806      eval path="$path"
27807      if test ! -f "$path" && test ! -d "$path"; then
27808        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27809      fi
27810
27811      if test -d "$path"; then
27812        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27813      else
27814        dir="`$DIRNAME "$path"`"
27815        base="`$BASENAME "$path"`"
27816        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27817      fi
27818    fi
27819  fi
27820
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27822$as_echo_n "checking for Boot JDK... " >&6; }
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27824$as_echo "$BOOT_JDK" >&6; }
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27826$as_echo_n "checking Boot JDK version... " >&6; }
27827            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27829$as_echo "$BOOT_JDK_VERSION" >&6; }
27830          fi # end check jdk version
27831        fi # end check javac
27832      fi # end check java
27833    fi # end check boot jdk found
27834  fi
27835
27836
27837  if test "x$BOOT_JDK_FOUND" = xno; then
27838    # Now execute the test
27839
27840  if test "x$ProgramFiles" != x; then
27841    VIRTUAL_DIR="$ProgramFiles/Java"
27842
27843  windows_path="$VIRTUAL_DIR"
27844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27845    unix_path=`$CYGPATH -u "$windows_path"`
27846    VIRTUAL_DIR="$unix_path"
27847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27849    VIRTUAL_DIR="$unix_path"
27850  fi
27851
27852
27853  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27854  BOOT_JDK_SUFFIX=""
27855  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27856  if test "x$ALL_JDKS_FOUND" != x; then
27857    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27858
27859  if test "x$BOOT_JDK_FOUND" = xno; then
27860    # Now execute the test
27861
27862        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27863        if test -d "$BOOT_JDK"; then
27864          BOOT_JDK_FOUND=maybe
27865          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27866$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27867        fi
27868
27869
27870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27872      # Do we have a bin/java?
27873      if test ! -x "$BOOT_JDK/bin/java"; then
27874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27876        BOOT_JDK_FOUND=no
27877      else
27878        # Do we have a bin/javac?
27879        if test ! -x "$BOOT_JDK/bin/javac"; then
27880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27884          BOOT_JDK_FOUND=no
27885        else
27886          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27887          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27888
27889          # Extra M4 quote needed to protect [] in grep expression.
27890          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27891          if test "x$FOUND_CORRECT_VERSION" = x; then
27892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27894            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27895$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27896            BOOT_JDK_FOUND=no
27897          else
27898            # We're done! :-)
27899            BOOT_JDK_FOUND=yes
27900
27901  # Only process if variable expands to non-empty
27902
27903  if test "x$BOOT_JDK" != x; then
27904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27905
27906  # Input might be given as Windows format, start by converting to
27907  # unix format.
27908  path="$BOOT_JDK"
27909  new_path=`$CYGPATH -u "$path"`
27910
27911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27914  # "foo.exe" is OK but "foo" is an error.
27915  #
27916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27917  # It is also a way to make sure we got the proper file name for the real test later on.
27918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27919  if test "x$test_shortpath" = x; then
27920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27922    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27923  fi
27924
27925  # Call helper function which possibly converts this using DOS-style short mode.
27926  # If so, the updated path is stored in $new_path.
27927
27928  input_path="$new_path"
27929  # Check if we need to convert this using DOS-style short mode. If the path
27930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27931  # take no chances and rewrite it.
27932  # Note: m4 eats our [], so we need to use [ and ] instead.
27933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27934  if test "x$has_forbidden_chars" != x; then
27935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27939      # Going to short mode and back again did indeed matter. Since short mode is
27940      # case insensitive, let's make it lowercase to improve readability.
27941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27942      # Now convert it back to Unix-style (cygpath)
27943      input_path=`$CYGPATH -u "$shortmode_path"`
27944      new_path="$input_path"
27945    fi
27946  fi
27947
27948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27949  if test "x$test_cygdrive_prefix" = x; then
27950    # As a simple fix, exclude /usr/bin since it's not a real path.
27951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27953      # a path prefixed by /cygdrive for fixpath to work.
27954      new_path="$CYGWIN_ROOT_PATH$input_path"
27955    fi
27956  fi
27957
27958
27959  if test "x$path" != "x$new_path"; then
27960    BOOT_JDK="$new_path"
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27963  fi
27964
27965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27966
27967  path="$BOOT_JDK"
27968  has_colon=`$ECHO $path | $GREP ^.:`
27969  new_path="$path"
27970  if test "x$has_colon" = x; then
27971    # Not in mixed or Windows style, start by that.
27972    new_path=`cmd //c echo $path`
27973  fi
27974
27975
27976  input_path="$new_path"
27977  # Check if we need to convert this using DOS-style short mode. If the path
27978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27979  # take no chances and rewrite it.
27980  # Note: m4 eats our [], so we need to use [ and ] instead.
27981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27982  if test "x$has_forbidden_chars" != x; then
27983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27985  fi
27986
27987
27988  windows_path="$new_path"
27989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27990    unix_path=`$CYGPATH -u "$windows_path"`
27991    new_path="$unix_path"
27992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27994    new_path="$unix_path"
27995  fi
27996
27997  if test "x$path" != "x$new_path"; then
27998    BOOT_JDK="$new_path"
27999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28001  fi
28002
28003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28005
28006    else
28007      # We're on a unix platform. Hooray! :)
28008      path="$BOOT_JDK"
28009      has_space=`$ECHO "$path" | $GREP " "`
28010      if test "x$has_space" != x; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28014      fi
28015
28016      # Use eval to expand a potential ~
28017      eval path="$path"
28018      if test ! -f "$path" && test ! -d "$path"; then
28019        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28020      fi
28021
28022      if test -d "$path"; then
28023        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28024      else
28025        dir="`$DIRNAME "$path"`"
28026        base="`$BASENAME "$path"`"
28027        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28028      fi
28029    fi
28030  fi
28031
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28033$as_echo_n "checking for Boot JDK... " >&6; }
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28035$as_echo "$BOOT_JDK" >&6; }
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28037$as_echo_n "checking Boot JDK version... " >&6; }
28038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28040$as_echo "$BOOT_JDK_VERSION" >&6; }
28041          fi # end check jdk version
28042        fi # end check javac
28043      fi # end check java
28044    fi # end check boot jdk found
28045  fi
28046
28047    done
28048  fi
28049
28050  fi
28051
28052
28053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28055      # Do we have a bin/java?
28056      if test ! -x "$BOOT_JDK/bin/java"; then
28057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28059        BOOT_JDK_FOUND=no
28060      else
28061        # Do we have a bin/javac?
28062        if test ! -x "$BOOT_JDK/bin/javac"; then
28063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28067          BOOT_JDK_FOUND=no
28068        else
28069          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28070          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28071
28072          # Extra M4 quote needed to protect [] in grep expression.
28073          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28074          if test "x$FOUND_CORRECT_VERSION" = x; then
28075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28077            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28079            BOOT_JDK_FOUND=no
28080          else
28081            # We're done! :-)
28082            BOOT_JDK_FOUND=yes
28083
28084  # Only process if variable expands to non-empty
28085
28086  if test "x$BOOT_JDK" != x; then
28087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28088
28089  # Input might be given as Windows format, start by converting to
28090  # unix format.
28091  path="$BOOT_JDK"
28092  new_path=`$CYGPATH -u "$path"`
28093
28094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28097  # "foo.exe" is OK but "foo" is an error.
28098  #
28099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28100  # It is also a way to make sure we got the proper file name for the real test later on.
28101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28102  if test "x$test_shortpath" = x; then
28103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28106  fi
28107
28108  # Call helper function which possibly converts this using DOS-style short mode.
28109  # If so, the updated path is stored in $new_path.
28110
28111  input_path="$new_path"
28112  # Check if we need to convert this using DOS-style short mode. If the path
28113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28114  # take no chances and rewrite it.
28115  # Note: m4 eats our [], so we need to use [ and ] instead.
28116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28117  if test "x$has_forbidden_chars" != x; then
28118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28122      # Going to short mode and back again did indeed matter. Since short mode is
28123      # case insensitive, let's make it lowercase to improve readability.
28124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28125      # Now convert it back to Unix-style (cygpath)
28126      input_path=`$CYGPATH -u "$shortmode_path"`
28127      new_path="$input_path"
28128    fi
28129  fi
28130
28131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28132  if test "x$test_cygdrive_prefix" = x; then
28133    # As a simple fix, exclude /usr/bin since it's not a real path.
28134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28136      # a path prefixed by /cygdrive for fixpath to work.
28137      new_path="$CYGWIN_ROOT_PATH$input_path"
28138    fi
28139  fi
28140
28141
28142  if test "x$path" != "x$new_path"; then
28143    BOOT_JDK="$new_path"
28144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28146  fi
28147
28148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28149
28150  path="$BOOT_JDK"
28151  has_colon=`$ECHO $path | $GREP ^.:`
28152  new_path="$path"
28153  if test "x$has_colon" = x; then
28154    # Not in mixed or Windows style, start by that.
28155    new_path=`cmd //c echo $path`
28156  fi
28157
28158
28159  input_path="$new_path"
28160  # Check if we need to convert this using DOS-style short mode. If the path
28161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28162  # take no chances and rewrite it.
28163  # Note: m4 eats our [], so we need to use [ and ] instead.
28164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28165  if test "x$has_forbidden_chars" != x; then
28166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28168  fi
28169
28170
28171  windows_path="$new_path"
28172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28173    unix_path=`$CYGPATH -u "$windows_path"`
28174    new_path="$unix_path"
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28177    new_path="$unix_path"
28178  fi
28179
28180  if test "x$path" != "x$new_path"; then
28181    BOOT_JDK="$new_path"
28182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28184  fi
28185
28186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28188
28189    else
28190      # We're on a unix platform. Hooray! :)
28191      path="$BOOT_JDK"
28192      has_space=`$ECHO "$path" | $GREP " "`
28193      if test "x$has_space" != x; then
28194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28197      fi
28198
28199      # Use eval to expand a potential ~
28200      eval path="$path"
28201      if test ! -f "$path" && test ! -d "$path"; then
28202        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28203      fi
28204
28205      if test -d "$path"; then
28206        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28207      else
28208        dir="`$DIRNAME "$path"`"
28209        base="`$BASENAME "$path"`"
28210        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28211      fi
28212    fi
28213  fi
28214
28215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28216$as_echo_n "checking for Boot JDK... " >&6; }
28217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28218$as_echo "$BOOT_JDK" >&6; }
28219            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28220$as_echo_n "checking Boot JDK version... " >&6; }
28221            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28223$as_echo "$BOOT_JDK_VERSION" >&6; }
28224          fi # end check jdk version
28225        fi # end check javac
28226      fi # end check java
28227    fi # end check boot jdk found
28228  fi
28229
28230
28231  if test "x$BOOT_JDK_FOUND" = xno; then
28232    # Now execute the test
28233
28234  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28235  BOOT_JDK_SUFFIX=""
28236  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28237  if test "x$ALL_JDKS_FOUND" != x; then
28238    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28239
28240  if test "x$BOOT_JDK_FOUND" = xno; then
28241    # Now execute the test
28242
28243        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28244        if test -d "$BOOT_JDK"; then
28245          BOOT_JDK_FOUND=maybe
28246          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28247$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28248        fi
28249
28250
28251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28253      # Do we have a bin/java?
28254      if test ! -x "$BOOT_JDK/bin/java"; then
28255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28257        BOOT_JDK_FOUND=no
28258      else
28259        # Do we have a bin/javac?
28260        if test ! -x "$BOOT_JDK/bin/javac"; then
28261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28265          BOOT_JDK_FOUND=no
28266        else
28267          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28268          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28269
28270          # Extra M4 quote needed to protect [] in grep expression.
28271          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28272          if test "x$FOUND_CORRECT_VERSION" = x; then
28273            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28275            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28276$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28277            BOOT_JDK_FOUND=no
28278          else
28279            # We're done! :-)
28280            BOOT_JDK_FOUND=yes
28281
28282  # Only process if variable expands to non-empty
28283
28284  if test "x$BOOT_JDK" != x; then
28285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28286
28287  # Input might be given as Windows format, start by converting to
28288  # unix format.
28289  path="$BOOT_JDK"
28290  new_path=`$CYGPATH -u "$path"`
28291
28292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28295  # "foo.exe" is OK but "foo" is an error.
28296  #
28297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28298  # It is also a way to make sure we got the proper file name for the real test later on.
28299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28300  if test "x$test_shortpath" = x; then
28301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28303    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28304  fi
28305
28306  # Call helper function which possibly converts this using DOS-style short mode.
28307  # If so, the updated path is stored in $new_path.
28308
28309  input_path="$new_path"
28310  # Check if we need to convert this using DOS-style short mode. If the path
28311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28312  # take no chances and rewrite it.
28313  # Note: m4 eats our [], so we need to use [ and ] instead.
28314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28315  if test "x$has_forbidden_chars" != x; then
28316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28320      # Going to short mode and back again did indeed matter. Since short mode is
28321      # case insensitive, let's make it lowercase to improve readability.
28322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28323      # Now convert it back to Unix-style (cygpath)
28324      input_path=`$CYGPATH -u "$shortmode_path"`
28325      new_path="$input_path"
28326    fi
28327  fi
28328
28329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28330  if test "x$test_cygdrive_prefix" = x; then
28331    # As a simple fix, exclude /usr/bin since it's not a real path.
28332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28334      # a path prefixed by /cygdrive for fixpath to work.
28335      new_path="$CYGWIN_ROOT_PATH$input_path"
28336    fi
28337  fi
28338
28339
28340  if test "x$path" != "x$new_path"; then
28341    BOOT_JDK="$new_path"
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28344  fi
28345
28346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347
28348  path="$BOOT_JDK"
28349  has_colon=`$ECHO $path | $GREP ^.:`
28350  new_path="$path"
28351  if test "x$has_colon" = x; then
28352    # Not in mixed or Windows style, start by that.
28353    new_path=`cmd //c echo $path`
28354  fi
28355
28356
28357  input_path="$new_path"
28358  # Check if we need to convert this using DOS-style short mode. If the path
28359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28360  # take no chances and rewrite it.
28361  # Note: m4 eats our [], so we need to use [ and ] instead.
28362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28363  if test "x$has_forbidden_chars" != x; then
28364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28366  fi
28367
28368
28369  windows_path="$new_path"
28370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28371    unix_path=`$CYGPATH -u "$windows_path"`
28372    new_path="$unix_path"
28373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28375    new_path="$unix_path"
28376  fi
28377
28378  if test "x$path" != "x$new_path"; then
28379    BOOT_JDK="$new_path"
28380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28381$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28382  fi
28383
28384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28386
28387    else
28388      # We're on a unix platform. Hooray! :)
28389      path="$BOOT_JDK"
28390      has_space=`$ECHO "$path" | $GREP " "`
28391      if test "x$has_space" != x; then
28392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28395      fi
28396
28397      # Use eval to expand a potential ~
28398      eval path="$path"
28399      if test ! -f "$path" && test ! -d "$path"; then
28400        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28401      fi
28402
28403      if test -d "$path"; then
28404        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28405      else
28406        dir="`$DIRNAME "$path"`"
28407        base="`$BASENAME "$path"`"
28408        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28409      fi
28410    fi
28411  fi
28412
28413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28414$as_echo_n "checking for Boot JDK... " >&6; }
28415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28416$as_echo "$BOOT_JDK" >&6; }
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28418$as_echo_n "checking Boot JDK version... " >&6; }
28419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28421$as_echo "$BOOT_JDK_VERSION" >&6; }
28422          fi # end check jdk version
28423        fi # end check javac
28424      fi # end check java
28425    fi # end check boot jdk found
28426  fi
28427
28428    done
28429  fi
28430
28431
28432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28434      # Do we have a bin/java?
28435      if test ! -x "$BOOT_JDK/bin/java"; then
28436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28438        BOOT_JDK_FOUND=no
28439      else
28440        # Do we have a bin/javac?
28441        if test ! -x "$BOOT_JDK/bin/javac"; then
28442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28446          BOOT_JDK_FOUND=no
28447        else
28448          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28449          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28450
28451          # Extra M4 quote needed to protect [] in grep expression.
28452          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28453          if test "x$FOUND_CORRECT_VERSION" = x; then
28454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28456            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28457$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28458            BOOT_JDK_FOUND=no
28459          else
28460            # We're done! :-)
28461            BOOT_JDK_FOUND=yes
28462
28463  # Only process if variable expands to non-empty
28464
28465  if test "x$BOOT_JDK" != x; then
28466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28467
28468  # Input might be given as Windows format, start by converting to
28469  # unix format.
28470  path="$BOOT_JDK"
28471  new_path=`$CYGPATH -u "$path"`
28472
28473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28476  # "foo.exe" is OK but "foo" is an error.
28477  #
28478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28479  # It is also a way to make sure we got the proper file name for the real test later on.
28480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28481  if test "x$test_shortpath" = x; then
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28485  fi
28486
28487  # Call helper function which possibly converts this using DOS-style short mode.
28488  # If so, the updated path is stored in $new_path.
28489
28490  input_path="$new_path"
28491  # Check if we need to convert this using DOS-style short mode. If the path
28492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28493  # take no chances and rewrite it.
28494  # Note: m4 eats our [], so we need to use [ and ] instead.
28495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28496  if test "x$has_forbidden_chars" != x; then
28497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28501      # Going to short mode and back again did indeed matter. Since short mode is
28502      # case insensitive, let's make it lowercase to improve readability.
28503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28504      # Now convert it back to Unix-style (cygpath)
28505      input_path=`$CYGPATH -u "$shortmode_path"`
28506      new_path="$input_path"
28507    fi
28508  fi
28509
28510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28511  if test "x$test_cygdrive_prefix" = x; then
28512    # As a simple fix, exclude /usr/bin since it's not a real path.
28513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28515      # a path prefixed by /cygdrive for fixpath to work.
28516      new_path="$CYGWIN_ROOT_PATH$input_path"
28517    fi
28518  fi
28519
28520
28521  if test "x$path" != "x$new_path"; then
28522    BOOT_JDK="$new_path"
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28525  fi
28526
28527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28528
28529  path="$BOOT_JDK"
28530  has_colon=`$ECHO $path | $GREP ^.:`
28531  new_path="$path"
28532  if test "x$has_colon" = x; then
28533    # Not in mixed or Windows style, start by that.
28534    new_path=`cmd //c echo $path`
28535  fi
28536
28537
28538  input_path="$new_path"
28539  # Check if we need to convert this using DOS-style short mode. If the path
28540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28541  # take no chances and rewrite it.
28542  # Note: m4 eats our [], so we need to use [ and ] instead.
28543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28544  if test "x$has_forbidden_chars" != x; then
28545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28547  fi
28548
28549
28550  windows_path="$new_path"
28551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28552    unix_path=`$CYGPATH -u "$windows_path"`
28553    new_path="$unix_path"
28554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28556    new_path="$unix_path"
28557  fi
28558
28559  if test "x$path" != "x$new_path"; then
28560    BOOT_JDK="$new_path"
28561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28563  fi
28564
28565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28567
28568    else
28569      # We're on a unix platform. Hooray! :)
28570      path="$BOOT_JDK"
28571      has_space=`$ECHO "$path" | $GREP " "`
28572      if test "x$has_space" != x; then
28573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28576      fi
28577
28578      # Use eval to expand a potential ~
28579      eval path="$path"
28580      if test ! -f "$path" && test ! -d "$path"; then
28581        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28582      fi
28583
28584      if test -d "$path"; then
28585        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28586      else
28587        dir="`$DIRNAME "$path"`"
28588        base="`$BASENAME "$path"`"
28589        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28590      fi
28591    fi
28592  fi
28593
28594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28595$as_echo_n "checking for Boot JDK... " >&6; }
28596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28597$as_echo "$BOOT_JDK" >&6; }
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28599$as_echo_n "checking Boot JDK version... " >&6; }
28600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28602$as_echo "$BOOT_JDK_VERSION" >&6; }
28603          fi # end check jdk version
28604        fi # end check javac
28605      fi # end check java
28606    fi # end check boot jdk found
28607  fi
28608
28609  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28610
28611  if test "x$BOOT_JDK_FOUND" = xno; then
28612    # Now execute the test
28613
28614  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28615  BOOT_JDK_SUFFIX="/Contents/Home"
28616  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28617  if test "x$ALL_JDKS_FOUND" != x; then
28618    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28619
28620  if test "x$BOOT_JDK_FOUND" = xno; then
28621    # Now execute the test
28622
28623        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28624        if test -d "$BOOT_JDK"; then
28625          BOOT_JDK_FOUND=maybe
28626          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28627$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28628        fi
28629
28630
28631    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28632    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28633      # Do we have a bin/java?
28634      if test ! -x "$BOOT_JDK/bin/java"; then
28635        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28637        BOOT_JDK_FOUND=no
28638      else
28639        # Do we have a bin/javac?
28640        if test ! -x "$BOOT_JDK/bin/javac"; then
28641          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28643          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28644$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28645          BOOT_JDK_FOUND=no
28646        else
28647          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28648          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28649
28650          # Extra M4 quote needed to protect [] in grep expression.
28651          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28652          if test "x$FOUND_CORRECT_VERSION" = x; then
28653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28655            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28656$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28657            BOOT_JDK_FOUND=no
28658          else
28659            # We're done! :-)
28660            BOOT_JDK_FOUND=yes
28661
28662  # Only process if variable expands to non-empty
28663
28664  if test "x$BOOT_JDK" != x; then
28665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28666
28667  # Input might be given as Windows format, start by converting to
28668  # unix format.
28669  path="$BOOT_JDK"
28670  new_path=`$CYGPATH -u "$path"`
28671
28672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28675  # "foo.exe" is OK but "foo" is an error.
28676  #
28677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28678  # It is also a way to make sure we got the proper file name for the real test later on.
28679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28680  if test "x$test_shortpath" = x; then
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28683    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28684  fi
28685
28686  # Call helper function which possibly converts this using DOS-style short mode.
28687  # If so, the updated path is stored in $new_path.
28688
28689  input_path="$new_path"
28690  # Check if we need to convert this using DOS-style short mode. If the path
28691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28692  # take no chances and rewrite it.
28693  # Note: m4 eats our [], so we need to use [ and ] instead.
28694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28695  if test "x$has_forbidden_chars" != x; then
28696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28700      # Going to short mode and back again did indeed matter. Since short mode is
28701      # case insensitive, let's make it lowercase to improve readability.
28702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28703      # Now convert it back to Unix-style (cygpath)
28704      input_path=`$CYGPATH -u "$shortmode_path"`
28705      new_path="$input_path"
28706    fi
28707  fi
28708
28709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28710  if test "x$test_cygdrive_prefix" = x; then
28711    # As a simple fix, exclude /usr/bin since it's not a real path.
28712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28714      # a path prefixed by /cygdrive for fixpath to work.
28715      new_path="$CYGWIN_ROOT_PATH$input_path"
28716    fi
28717  fi
28718
28719
28720  if test "x$path" != "x$new_path"; then
28721    BOOT_JDK="$new_path"
28722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28724  fi
28725
28726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28727
28728  path="$BOOT_JDK"
28729  has_colon=`$ECHO $path | $GREP ^.:`
28730  new_path="$path"
28731  if test "x$has_colon" = x; then
28732    # Not in mixed or Windows style, start by that.
28733    new_path=`cmd //c echo $path`
28734  fi
28735
28736
28737  input_path="$new_path"
28738  # Check if we need to convert this using DOS-style short mode. If the path
28739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28740  # take no chances and rewrite it.
28741  # Note: m4 eats our [], so we need to use [ and ] instead.
28742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28743  if test "x$has_forbidden_chars" != x; then
28744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28746  fi
28747
28748
28749  windows_path="$new_path"
28750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28751    unix_path=`$CYGPATH -u "$windows_path"`
28752    new_path="$unix_path"
28753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28755    new_path="$unix_path"
28756  fi
28757
28758  if test "x$path" != "x$new_path"; then
28759    BOOT_JDK="$new_path"
28760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28762  fi
28763
28764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28766
28767    else
28768      # We're on a unix platform. Hooray! :)
28769      path="$BOOT_JDK"
28770      has_space=`$ECHO "$path" | $GREP " "`
28771      if test "x$has_space" != x; then
28772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28775      fi
28776
28777      # Use eval to expand a potential ~
28778      eval path="$path"
28779      if test ! -f "$path" && test ! -d "$path"; then
28780        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28781      fi
28782
28783      if test -d "$path"; then
28784        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28785      else
28786        dir="`$DIRNAME "$path"`"
28787        base="`$BASENAME "$path"`"
28788        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28789      fi
28790    fi
28791  fi
28792
28793            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28794$as_echo_n "checking for Boot JDK... " >&6; }
28795            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28796$as_echo "$BOOT_JDK" >&6; }
28797            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28798$as_echo_n "checking Boot JDK version... " >&6; }
28799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28801$as_echo "$BOOT_JDK_VERSION" >&6; }
28802          fi # end check jdk version
28803        fi # end check javac
28804      fi # end check java
28805    fi # end check boot jdk found
28806  fi
28807
28808    done
28809  fi
28810
28811
28812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28814      # Do we have a bin/java?
28815      if test ! -x "$BOOT_JDK/bin/java"; then
28816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28818        BOOT_JDK_FOUND=no
28819      else
28820        # Do we have a bin/javac?
28821        if test ! -x "$BOOT_JDK/bin/javac"; then
28822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28826          BOOT_JDK_FOUND=no
28827        else
28828          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28829          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28830
28831          # Extra M4 quote needed to protect [] in grep expression.
28832          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28833          if test "x$FOUND_CORRECT_VERSION" = x; then
28834            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28836            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28837$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28838            BOOT_JDK_FOUND=no
28839          else
28840            # We're done! :-)
28841            BOOT_JDK_FOUND=yes
28842
28843  # Only process if variable expands to non-empty
28844
28845  if test "x$BOOT_JDK" != x; then
28846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28847
28848  # Input might be given as Windows format, start by converting to
28849  # unix format.
28850  path="$BOOT_JDK"
28851  new_path=`$CYGPATH -u "$path"`
28852
28853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28856  # "foo.exe" is OK but "foo" is an error.
28857  #
28858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28859  # It is also a way to make sure we got the proper file name for the real test later on.
28860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28861  if test "x$test_shortpath" = x; then
28862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28865  fi
28866
28867  # Call helper function which possibly converts this using DOS-style short mode.
28868  # If so, the updated path is stored in $new_path.
28869
28870  input_path="$new_path"
28871  # Check if we need to convert this using DOS-style short mode. If the path
28872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28873  # take no chances and rewrite it.
28874  # Note: m4 eats our [], so we need to use [ and ] instead.
28875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28876  if test "x$has_forbidden_chars" != x; then
28877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28881      # Going to short mode and back again did indeed matter. Since short mode is
28882      # case insensitive, let's make it lowercase to improve readability.
28883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28884      # Now convert it back to Unix-style (cygpath)
28885      input_path=`$CYGPATH -u "$shortmode_path"`
28886      new_path="$input_path"
28887    fi
28888  fi
28889
28890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28891  if test "x$test_cygdrive_prefix" = x; then
28892    # As a simple fix, exclude /usr/bin since it's not a real path.
28893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28895      # a path prefixed by /cygdrive for fixpath to work.
28896      new_path="$CYGWIN_ROOT_PATH$input_path"
28897    fi
28898  fi
28899
28900
28901  if test "x$path" != "x$new_path"; then
28902    BOOT_JDK="$new_path"
28903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28905  fi
28906
28907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28908
28909  path="$BOOT_JDK"
28910  has_colon=`$ECHO $path | $GREP ^.:`
28911  new_path="$path"
28912  if test "x$has_colon" = x; then
28913    # Not in mixed or Windows style, start by that.
28914    new_path=`cmd //c echo $path`
28915  fi
28916
28917
28918  input_path="$new_path"
28919  # Check if we need to convert this using DOS-style short mode. If the path
28920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28921  # take no chances and rewrite it.
28922  # Note: m4 eats our [], so we need to use [ and ] instead.
28923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28924  if test "x$has_forbidden_chars" != x; then
28925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28927  fi
28928
28929
28930  windows_path="$new_path"
28931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28932    unix_path=`$CYGPATH -u "$windows_path"`
28933    new_path="$unix_path"
28934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28936    new_path="$unix_path"
28937  fi
28938
28939  if test "x$path" != "x$new_path"; then
28940    BOOT_JDK="$new_path"
28941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28943  fi
28944
28945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28947
28948    else
28949      # We're on a unix platform. Hooray! :)
28950      path="$BOOT_JDK"
28951      has_space=`$ECHO "$path" | $GREP " "`
28952      if test "x$has_space" != x; then
28953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28956      fi
28957
28958      # Use eval to expand a potential ~
28959      eval path="$path"
28960      if test ! -f "$path" && test ! -d "$path"; then
28961        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28962      fi
28963
28964      if test -d "$path"; then
28965        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28966      else
28967        dir="`$DIRNAME "$path"`"
28968        base="`$BASENAME "$path"`"
28969        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28970      fi
28971    fi
28972  fi
28973
28974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28975$as_echo_n "checking for Boot JDK... " >&6; }
28976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28977$as_echo "$BOOT_JDK" >&6; }
28978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28979$as_echo_n "checking Boot JDK version... " >&6; }
28980            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28982$as_echo "$BOOT_JDK_VERSION" >&6; }
28983          fi # end check jdk version
28984        fi # end check javac
28985      fi # end check java
28986    fi # end check boot jdk found
28987  fi
28988
28989
28990  if test "x$BOOT_JDK_FOUND" = xno; then
28991    # Now execute the test
28992
28993  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28994  BOOT_JDK_SUFFIX="/Contents/Home"
28995  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28996  if test "x$ALL_JDKS_FOUND" != x; then
28997    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28998
28999  if test "x$BOOT_JDK_FOUND" = xno; then
29000    # Now execute the test
29001
29002        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29003        if test -d "$BOOT_JDK"; then
29004          BOOT_JDK_FOUND=maybe
29005          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29006$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29007        fi
29008
29009
29010    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29011    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29012      # Do we have a bin/java?
29013      if test ! -x "$BOOT_JDK/bin/java"; then
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29016        BOOT_JDK_FOUND=no
29017      else
29018        # Do we have a bin/javac?
29019        if test ! -x "$BOOT_JDK/bin/javac"; then
29020          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29022          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29023$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29024          BOOT_JDK_FOUND=no
29025        else
29026          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29027          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29028
29029          # Extra M4 quote needed to protect [] in grep expression.
29030          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29031          if test "x$FOUND_CORRECT_VERSION" = x; then
29032            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29034            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29035$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29036            BOOT_JDK_FOUND=no
29037          else
29038            # We're done! :-)
29039            BOOT_JDK_FOUND=yes
29040
29041  # Only process if variable expands to non-empty
29042
29043  if test "x$BOOT_JDK" != x; then
29044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29045
29046  # Input might be given as Windows format, start by converting to
29047  # unix format.
29048  path="$BOOT_JDK"
29049  new_path=`$CYGPATH -u "$path"`
29050
29051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29054  # "foo.exe" is OK but "foo" is an error.
29055  #
29056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29057  # It is also a way to make sure we got the proper file name for the real test later on.
29058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29059  if test "x$test_shortpath" = x; then
29060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29063  fi
29064
29065  # Call helper function which possibly converts this using DOS-style short mode.
29066  # If so, the updated path is stored in $new_path.
29067
29068  input_path="$new_path"
29069  # Check if we need to convert this using DOS-style short mode. If the path
29070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29071  # take no chances and rewrite it.
29072  # Note: m4 eats our [], so we need to use [ and ] instead.
29073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29074  if test "x$has_forbidden_chars" != x; then
29075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29079      # Going to short mode and back again did indeed matter. Since short mode is
29080      # case insensitive, let's make it lowercase to improve readability.
29081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29082      # Now convert it back to Unix-style (cygpath)
29083      input_path=`$CYGPATH -u "$shortmode_path"`
29084      new_path="$input_path"
29085    fi
29086  fi
29087
29088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29089  if test "x$test_cygdrive_prefix" = x; then
29090    # As a simple fix, exclude /usr/bin since it's not a real path.
29091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29093      # a path prefixed by /cygdrive for fixpath to work.
29094      new_path="$CYGWIN_ROOT_PATH$input_path"
29095    fi
29096  fi
29097
29098
29099  if test "x$path" != "x$new_path"; then
29100    BOOT_JDK="$new_path"
29101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29103  fi
29104
29105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29106
29107  path="$BOOT_JDK"
29108  has_colon=`$ECHO $path | $GREP ^.:`
29109  new_path="$path"
29110  if test "x$has_colon" = x; then
29111    # Not in mixed or Windows style, start by that.
29112    new_path=`cmd //c echo $path`
29113  fi
29114
29115
29116  input_path="$new_path"
29117  # Check if we need to convert this using DOS-style short mode. If the path
29118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29119  # take no chances and rewrite it.
29120  # Note: m4 eats our [], so we need to use [ and ] instead.
29121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29122  if test "x$has_forbidden_chars" != x; then
29123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29125  fi
29126
29127
29128  windows_path="$new_path"
29129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29130    unix_path=`$CYGPATH -u "$windows_path"`
29131    new_path="$unix_path"
29132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29134    new_path="$unix_path"
29135  fi
29136
29137  if test "x$path" != "x$new_path"; then
29138    BOOT_JDK="$new_path"
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29141  fi
29142
29143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29145
29146    else
29147      # We're on a unix platform. Hooray! :)
29148      path="$BOOT_JDK"
29149      has_space=`$ECHO "$path" | $GREP " "`
29150      if test "x$has_space" != x; then
29151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29154      fi
29155
29156      # Use eval to expand a potential ~
29157      eval path="$path"
29158      if test ! -f "$path" && test ! -d "$path"; then
29159        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29160      fi
29161
29162      if test -d "$path"; then
29163        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29164      else
29165        dir="`$DIRNAME "$path"`"
29166        base="`$BASENAME "$path"`"
29167        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29168      fi
29169    fi
29170  fi
29171
29172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29173$as_echo_n "checking for Boot JDK... " >&6; }
29174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29175$as_echo "$BOOT_JDK" >&6; }
29176            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29177$as_echo_n "checking Boot JDK version... " >&6; }
29178            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29180$as_echo "$BOOT_JDK_VERSION" >&6; }
29181          fi # end check jdk version
29182        fi # end check javac
29183      fi # end check java
29184    fi # end check boot jdk found
29185  fi
29186
29187    done
29188  fi
29189
29190
29191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29193      # Do we have a bin/java?
29194      if test ! -x "$BOOT_JDK/bin/java"; then
29195        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29197        BOOT_JDK_FOUND=no
29198      else
29199        # Do we have a bin/javac?
29200        if test ! -x "$BOOT_JDK/bin/javac"; then
29201          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29203          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29205          BOOT_JDK_FOUND=no
29206        else
29207          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29208          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29209
29210          # Extra M4 quote needed to protect [] in grep expression.
29211          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29212          if test "x$FOUND_CORRECT_VERSION" = x; then
29213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29215            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29216$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29217            BOOT_JDK_FOUND=no
29218          else
29219            # We're done! :-)
29220            BOOT_JDK_FOUND=yes
29221
29222  # Only process if variable expands to non-empty
29223
29224  if test "x$BOOT_JDK" != x; then
29225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29226
29227  # Input might be given as Windows format, start by converting to
29228  # unix format.
29229  path="$BOOT_JDK"
29230  new_path=`$CYGPATH -u "$path"`
29231
29232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29235  # "foo.exe" is OK but "foo" is an error.
29236  #
29237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29238  # It is also a way to make sure we got the proper file name for the real test later on.
29239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29240  if test "x$test_shortpath" = x; then
29241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29244  fi
29245
29246  # Call helper function which possibly converts this using DOS-style short mode.
29247  # If so, the updated path is stored in $new_path.
29248
29249  input_path="$new_path"
29250  # Check if we need to convert this using DOS-style short mode. If the path
29251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29252  # take no chances and rewrite it.
29253  # Note: m4 eats our [], so we need to use [ and ] instead.
29254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29255  if test "x$has_forbidden_chars" != x; then
29256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29260      # Going to short mode and back again did indeed matter. Since short mode is
29261      # case insensitive, let's make it lowercase to improve readability.
29262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29263      # Now convert it back to Unix-style (cygpath)
29264      input_path=`$CYGPATH -u "$shortmode_path"`
29265      new_path="$input_path"
29266    fi
29267  fi
29268
29269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29270  if test "x$test_cygdrive_prefix" = x; then
29271    # As a simple fix, exclude /usr/bin since it's not a real path.
29272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29274      # a path prefixed by /cygdrive for fixpath to work.
29275      new_path="$CYGWIN_ROOT_PATH$input_path"
29276    fi
29277  fi
29278
29279
29280  if test "x$path" != "x$new_path"; then
29281    BOOT_JDK="$new_path"
29282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29284  fi
29285
29286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29287
29288  path="$BOOT_JDK"
29289  has_colon=`$ECHO $path | $GREP ^.:`
29290  new_path="$path"
29291  if test "x$has_colon" = x; then
29292    # Not in mixed or Windows style, start by that.
29293    new_path=`cmd //c echo $path`
29294  fi
29295
29296
29297  input_path="$new_path"
29298  # Check if we need to convert this using DOS-style short mode. If the path
29299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29300  # take no chances and rewrite it.
29301  # Note: m4 eats our [], so we need to use [ and ] instead.
29302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29303  if test "x$has_forbidden_chars" != x; then
29304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29306  fi
29307
29308
29309  windows_path="$new_path"
29310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29311    unix_path=`$CYGPATH -u "$windows_path"`
29312    new_path="$unix_path"
29313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29315    new_path="$unix_path"
29316  fi
29317
29318  if test "x$path" != "x$new_path"; then
29319    BOOT_JDK="$new_path"
29320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29322  fi
29323
29324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29326
29327    else
29328      # We're on a unix platform. Hooray! :)
29329      path="$BOOT_JDK"
29330      has_space=`$ECHO "$path" | $GREP " "`
29331      if test "x$has_space" != x; then
29332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29335      fi
29336
29337      # Use eval to expand a potential ~
29338      eval path="$path"
29339      if test ! -f "$path" && test ! -d "$path"; then
29340        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29341      fi
29342
29343      if test -d "$path"; then
29344        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29345      else
29346        dir="`$DIRNAME "$path"`"
29347        base="`$BASENAME "$path"`"
29348        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29349      fi
29350    fi
29351  fi
29352
29353            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29354$as_echo_n "checking for Boot JDK... " >&6; }
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29356$as_echo "$BOOT_JDK" >&6; }
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29358$as_echo_n "checking Boot JDK version... " >&6; }
29359            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29361$as_echo "$BOOT_JDK_VERSION" >&6; }
29362          fi # end check jdk version
29363        fi # end check javac
29364      fi # end check java
29365    fi # end check boot jdk found
29366  fi
29367
29368  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29369
29370  if test "x$BOOT_JDK_FOUND" = xno; then
29371    # Now execute the test
29372
29373  BOOT_JDK_PREFIX="/usr/lib/jvm"
29374  BOOT_JDK_SUFFIX=""
29375  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29376  if test "x$ALL_JDKS_FOUND" != x; then
29377    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29378
29379  if test "x$BOOT_JDK_FOUND" = xno; then
29380    # Now execute the test
29381
29382        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29383        if test -d "$BOOT_JDK"; then
29384          BOOT_JDK_FOUND=maybe
29385          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29386$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29387        fi
29388
29389
29390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29392      # Do we have a bin/java?
29393      if test ! -x "$BOOT_JDK/bin/java"; then
29394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29396        BOOT_JDK_FOUND=no
29397      else
29398        # Do we have a bin/javac?
29399        if test ! -x "$BOOT_JDK/bin/javac"; then
29400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29404          BOOT_JDK_FOUND=no
29405        else
29406          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29407          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29408
29409          # Extra M4 quote needed to protect [] in grep expression.
29410          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29411          if test "x$FOUND_CORRECT_VERSION" = x; then
29412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29414            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29415$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29416            BOOT_JDK_FOUND=no
29417          else
29418            # We're done! :-)
29419            BOOT_JDK_FOUND=yes
29420
29421  # Only process if variable expands to non-empty
29422
29423  if test "x$BOOT_JDK" != x; then
29424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29425
29426  # Input might be given as Windows format, start by converting to
29427  # unix format.
29428  path="$BOOT_JDK"
29429  new_path=`$CYGPATH -u "$path"`
29430
29431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29434  # "foo.exe" is OK but "foo" is an error.
29435  #
29436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29437  # It is also a way to make sure we got the proper file name for the real test later on.
29438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29439  if test "x$test_shortpath" = x; then
29440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29443  fi
29444
29445  # Call helper function which possibly converts this using DOS-style short mode.
29446  # If so, the updated path is stored in $new_path.
29447
29448  input_path="$new_path"
29449  # Check if we need to convert this using DOS-style short mode. If the path
29450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29451  # take no chances and rewrite it.
29452  # Note: m4 eats our [], so we need to use [ and ] instead.
29453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29454  if test "x$has_forbidden_chars" != x; then
29455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29459      # Going to short mode and back again did indeed matter. Since short mode is
29460      # case insensitive, let's make it lowercase to improve readability.
29461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29462      # Now convert it back to Unix-style (cygpath)
29463      input_path=`$CYGPATH -u "$shortmode_path"`
29464      new_path="$input_path"
29465    fi
29466  fi
29467
29468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29469  if test "x$test_cygdrive_prefix" = x; then
29470    # As a simple fix, exclude /usr/bin since it's not a real path.
29471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29473      # a path prefixed by /cygdrive for fixpath to work.
29474      new_path="$CYGWIN_ROOT_PATH$input_path"
29475    fi
29476  fi
29477
29478
29479  if test "x$path" != "x$new_path"; then
29480    BOOT_JDK="$new_path"
29481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29483  fi
29484
29485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29486
29487  path="$BOOT_JDK"
29488  has_colon=`$ECHO $path | $GREP ^.:`
29489  new_path="$path"
29490  if test "x$has_colon" = x; then
29491    # Not in mixed or Windows style, start by that.
29492    new_path=`cmd //c echo $path`
29493  fi
29494
29495
29496  input_path="$new_path"
29497  # Check if we need to convert this using DOS-style short mode. If the path
29498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29499  # take no chances and rewrite it.
29500  # Note: m4 eats our [], so we need to use [ and ] instead.
29501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29502  if test "x$has_forbidden_chars" != x; then
29503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29505  fi
29506
29507
29508  windows_path="$new_path"
29509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29510    unix_path=`$CYGPATH -u "$windows_path"`
29511    new_path="$unix_path"
29512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29514    new_path="$unix_path"
29515  fi
29516
29517  if test "x$path" != "x$new_path"; then
29518    BOOT_JDK="$new_path"
29519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29521  fi
29522
29523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29525
29526    else
29527      # We're on a unix platform. Hooray! :)
29528      path="$BOOT_JDK"
29529      has_space=`$ECHO "$path" | $GREP " "`
29530      if test "x$has_space" != x; then
29531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29534      fi
29535
29536      # Use eval to expand a potential ~
29537      eval path="$path"
29538      if test ! -f "$path" && test ! -d "$path"; then
29539        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29540      fi
29541
29542      if test -d "$path"; then
29543        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29544      else
29545        dir="`$DIRNAME "$path"`"
29546        base="`$BASENAME "$path"`"
29547        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29548      fi
29549    fi
29550  fi
29551
29552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29553$as_echo_n "checking for Boot JDK... " >&6; }
29554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29555$as_echo "$BOOT_JDK" >&6; }
29556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29557$as_echo_n "checking Boot JDK version... " >&6; }
29558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29560$as_echo "$BOOT_JDK_VERSION" >&6; }
29561          fi # end check jdk version
29562        fi # end check javac
29563      fi # end check java
29564    fi # end check boot jdk found
29565  fi
29566
29567    done
29568  fi
29569
29570
29571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29573      # Do we have a bin/java?
29574      if test ! -x "$BOOT_JDK/bin/java"; then
29575        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29577        BOOT_JDK_FOUND=no
29578      else
29579        # Do we have a bin/javac?
29580        if test ! -x "$BOOT_JDK/bin/javac"; then
29581          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29583          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29585          BOOT_JDK_FOUND=no
29586        else
29587          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29588          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29589
29590          # Extra M4 quote needed to protect [] in grep expression.
29591          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29592          if test "x$FOUND_CORRECT_VERSION" = x; then
29593            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29595            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29596$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29597            BOOT_JDK_FOUND=no
29598          else
29599            # We're done! :-)
29600            BOOT_JDK_FOUND=yes
29601
29602  # Only process if variable expands to non-empty
29603
29604  if test "x$BOOT_JDK" != x; then
29605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29606
29607  # Input might be given as Windows format, start by converting to
29608  # unix format.
29609  path="$BOOT_JDK"
29610  new_path=`$CYGPATH -u "$path"`
29611
29612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29615  # "foo.exe" is OK but "foo" is an error.
29616  #
29617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29618  # It is also a way to make sure we got the proper file name for the real test later on.
29619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29620  if test "x$test_shortpath" = x; then
29621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29623    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29624  fi
29625
29626  # Call helper function which possibly converts this using DOS-style short mode.
29627  # If so, the updated path is stored in $new_path.
29628
29629  input_path="$new_path"
29630  # Check if we need to convert this using DOS-style short mode. If the path
29631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29632  # take no chances and rewrite it.
29633  # Note: m4 eats our [], so we need to use [ and ] instead.
29634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29635  if test "x$has_forbidden_chars" != x; then
29636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29640      # Going to short mode and back again did indeed matter. Since short mode is
29641      # case insensitive, let's make it lowercase to improve readability.
29642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29643      # Now convert it back to Unix-style (cygpath)
29644      input_path=`$CYGPATH -u "$shortmode_path"`
29645      new_path="$input_path"
29646    fi
29647  fi
29648
29649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29650  if test "x$test_cygdrive_prefix" = x; then
29651    # As a simple fix, exclude /usr/bin since it's not a real path.
29652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29654      # a path prefixed by /cygdrive for fixpath to work.
29655      new_path="$CYGWIN_ROOT_PATH$input_path"
29656    fi
29657  fi
29658
29659
29660  if test "x$path" != "x$new_path"; then
29661    BOOT_JDK="$new_path"
29662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29664  fi
29665
29666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29667
29668  path="$BOOT_JDK"
29669  has_colon=`$ECHO $path | $GREP ^.:`
29670  new_path="$path"
29671  if test "x$has_colon" = x; then
29672    # Not in mixed or Windows style, start by that.
29673    new_path=`cmd //c echo $path`
29674  fi
29675
29676
29677  input_path="$new_path"
29678  # Check if we need to convert this using DOS-style short mode. If the path
29679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29680  # take no chances and rewrite it.
29681  # Note: m4 eats our [], so we need to use [ and ] instead.
29682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29683  if test "x$has_forbidden_chars" != x; then
29684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29686  fi
29687
29688
29689  windows_path="$new_path"
29690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29691    unix_path=`$CYGPATH -u "$windows_path"`
29692    new_path="$unix_path"
29693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29695    new_path="$unix_path"
29696  fi
29697
29698  if test "x$path" != "x$new_path"; then
29699    BOOT_JDK="$new_path"
29700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29702  fi
29703
29704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29706
29707    else
29708      # We're on a unix platform. Hooray! :)
29709      path="$BOOT_JDK"
29710      has_space=`$ECHO "$path" | $GREP " "`
29711      if test "x$has_space" != x; then
29712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29715      fi
29716
29717      # Use eval to expand a potential ~
29718      eval path="$path"
29719      if test ! -f "$path" && test ! -d "$path"; then
29720        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29721      fi
29722
29723      if test -d "$path"; then
29724        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29725      else
29726        dir="`$DIRNAME "$path"`"
29727        base="`$BASENAME "$path"`"
29728        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29729      fi
29730    fi
29731  fi
29732
29733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29734$as_echo_n "checking for Boot JDK... " >&6; }
29735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29736$as_echo "$BOOT_JDK" >&6; }
29737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29738$as_echo_n "checking Boot JDK version... " >&6; }
29739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29741$as_echo "$BOOT_JDK_VERSION" >&6; }
29742          fi # end check jdk version
29743        fi # end check javac
29744      fi # end check java
29745    fi # end check boot jdk found
29746  fi
29747
29748  fi
29749
29750
29751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29753      # Do we have a bin/java?
29754      if test ! -x "$BOOT_JDK/bin/java"; then
29755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29757        BOOT_JDK_FOUND=no
29758      else
29759        # Do we have a bin/javac?
29760        if test ! -x "$BOOT_JDK/bin/javac"; then
29761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29765          BOOT_JDK_FOUND=no
29766        else
29767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29769
29770          # Extra M4 quote needed to protect [] in grep expression.
29771          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29772          if test "x$FOUND_CORRECT_VERSION" = x; then
29773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29777            BOOT_JDK_FOUND=no
29778          else
29779            # We're done! :-)
29780            BOOT_JDK_FOUND=yes
29781
29782  # Only process if variable expands to non-empty
29783
29784  if test "x$BOOT_JDK" != x; then
29785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786
29787  # Input might be given as Windows format, start by converting to
29788  # unix format.
29789  path="$BOOT_JDK"
29790  new_path=`$CYGPATH -u "$path"`
29791
29792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29795  # "foo.exe" is OK but "foo" is an error.
29796  #
29797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29798  # It is also a way to make sure we got the proper file name for the real test later on.
29799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29800  if test "x$test_shortpath" = x; then
29801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29804  fi
29805
29806  # Call helper function which possibly converts this using DOS-style short mode.
29807  # If so, the updated path is stored in $new_path.
29808
29809  input_path="$new_path"
29810  # Check if we need to convert this using DOS-style short mode. If the path
29811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29812  # take no chances and rewrite it.
29813  # Note: m4 eats our [], so we need to use [ and ] instead.
29814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29815  if test "x$has_forbidden_chars" != x; then
29816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29820      # Going to short mode and back again did indeed matter. Since short mode is
29821      # case insensitive, let's make it lowercase to improve readability.
29822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29823      # Now convert it back to Unix-style (cygpath)
29824      input_path=`$CYGPATH -u "$shortmode_path"`
29825      new_path="$input_path"
29826    fi
29827  fi
29828
29829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29830  if test "x$test_cygdrive_prefix" = x; then
29831    # As a simple fix, exclude /usr/bin since it's not a real path.
29832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29834      # a path prefixed by /cygdrive for fixpath to work.
29835      new_path="$CYGWIN_ROOT_PATH$input_path"
29836    fi
29837  fi
29838
29839
29840  if test "x$path" != "x$new_path"; then
29841    BOOT_JDK="$new_path"
29842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29844  fi
29845
29846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29847
29848  path="$BOOT_JDK"
29849  has_colon=`$ECHO $path | $GREP ^.:`
29850  new_path="$path"
29851  if test "x$has_colon" = x; then
29852    # Not in mixed or Windows style, start by that.
29853    new_path=`cmd //c echo $path`
29854  fi
29855
29856
29857  input_path="$new_path"
29858  # Check if we need to convert this using DOS-style short mode. If the path
29859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29860  # take no chances and rewrite it.
29861  # Note: m4 eats our [], so we need to use [ and ] instead.
29862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29863  if test "x$has_forbidden_chars" != x; then
29864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29866  fi
29867
29868
29869  windows_path="$new_path"
29870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29871    unix_path=`$CYGPATH -u "$windows_path"`
29872    new_path="$unix_path"
29873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29875    new_path="$unix_path"
29876  fi
29877
29878  if test "x$path" != "x$new_path"; then
29879    BOOT_JDK="$new_path"
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29882  fi
29883
29884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29886
29887    else
29888      # We're on a unix platform. Hooray! :)
29889      path="$BOOT_JDK"
29890      has_space=`$ECHO "$path" | $GREP " "`
29891      if test "x$has_space" != x; then
29892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29895      fi
29896
29897      # Use eval to expand a potential ~
29898      eval path="$path"
29899      if test ! -f "$path" && test ! -d "$path"; then
29900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29901      fi
29902
29903      if test -d "$path"; then
29904        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29905      else
29906        dir="`$DIRNAME "$path"`"
29907        base="`$BASENAME "$path"`"
29908        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29909      fi
29910    fi
29911  fi
29912
29913            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29914$as_echo_n "checking for Boot JDK... " >&6; }
29915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29916$as_echo "$BOOT_JDK" >&6; }
29917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29918$as_echo_n "checking Boot JDK version... " >&6; }
29919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29921$as_echo "$BOOT_JDK_VERSION" >&6; }
29922          fi # end check jdk version
29923        fi # end check javac
29924      fi # end check java
29925    fi # end check boot jdk found
29926  fi
29927
29928
29929  # If we haven't found anything yet, we've truly lost. Give up.
29930  if test "x$BOOT_JDK_FOUND" = xno; then
29931
29932  # Print a helpful message on how to acquire the necessary build dependency.
29933  # openjdk is the help tag: freetype, cups, alsa etc
29934  MISSING_DEPENDENCY=openjdk
29935
29936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29937    cygwin_help $MISSING_DEPENDENCY
29938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29939    msys_help $MISSING_DEPENDENCY
29940  else
29941    PKGHANDLER_COMMAND=
29942
29943    case $PKGHANDLER in
29944      apt-get)
29945        apt_help     $MISSING_DEPENDENCY ;;
29946      yum)
29947        yum_help     $MISSING_DEPENDENCY ;;
29948      port)
29949        port_help    $MISSING_DEPENDENCY ;;
29950      pkgutil)
29951        pkgutil_help $MISSING_DEPENDENCY ;;
29952      pkgadd)
29953        pkgadd_help  $MISSING_DEPENDENCY ;;
29954    esac
29955
29956    if test "x$PKGHANDLER_COMMAND" != x; then
29957      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29958    fi
29959  fi
29960
29961    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29962$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29964$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29965    as_fn_error $? "Cannot continue" "$LINENO" 5
29966  fi
29967
29968
29969
29970  # Setup tools from the Boot JDK.
29971
29972  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29973
29974  # Publish this variable in the help.
29975
29976
29977  if [ -z "${JAVA+x}" ]; then
29978    # The variable is not set by user, try to locate tool using the code snippet
29979
29980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29981$as_echo_n "checking for java in Boot JDK... " >&6; }
29982      JAVA=$BOOT_JDK/bin/java
29983      if test ! -x $JAVA; then
29984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29985$as_echo "not found" >&6; }
29986        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29987$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29988        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29989      fi
29990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29991$as_echo "ok" >&6; }
29992
29993
29994  else
29995    # The variable is set, but is it from the command line or the environment?
29996
29997    # Try to remove the string !JAVA! from our list.
29998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30000      # If it failed, the variable was not from the command line. Ignore it,
30001      # but warn the user (except for BASH, which is always set by the calling BASH).
30002      if test "xJAVA" != xBASH; then
30003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30004$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30005      fi
30006      # Try to locate tool using the code snippet
30007
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30009$as_echo_n "checking for java in Boot JDK... " >&6; }
30010      JAVA=$BOOT_JDK/bin/java
30011      if test ! -x $JAVA; then
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30013$as_echo "not found" >&6; }
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30015$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30016        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30017      fi
30018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30019$as_echo "ok" >&6; }
30020
30021
30022    else
30023      # If it succeeded, then it was overridden by the user. We will use it
30024      # for the tool.
30025
30026      # First remove it from the list of overridden variables, so we can test
30027      # for unknown variables in the end.
30028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30029
30030      # Check if we try to supply an empty value
30031      if test "x$JAVA" = x; then
30032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30033$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30035$as_echo_n "checking for JAVA... " >&6; }
30036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30037$as_echo "disabled" >&6; }
30038      else
30039        # Check if the provided tool contains a complete path.
30040        tool_specified="$JAVA"
30041        tool_basename="${tool_specified##*/}"
30042        if test "x$tool_basename" = "x$tool_specified"; then
30043          # A command without a complete path is provided, search $PATH.
30044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30045$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30046          # Extract the first word of "$tool_basename", so it can be a program name with args.
30047set dummy $tool_basename; ac_word=$2
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30049$as_echo_n "checking for $ac_word... " >&6; }
30050if ${ac_cv_path_JAVA+:} false; then :
30051  $as_echo_n "(cached) " >&6
30052else
30053  case $JAVA in
30054  [\\/]* | ?:[\\/]*)
30055  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30056  ;;
30057  *)
30058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30059for as_dir in $PATH
30060do
30061  IFS=$as_save_IFS
30062  test -z "$as_dir" && as_dir=.
30063    for ac_exec_ext in '' $ac_executable_extensions; do
30064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30065    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30067    break 2
30068  fi
30069done
30070  done
30071IFS=$as_save_IFS
30072
30073  ;;
30074esac
30075fi
30076JAVA=$ac_cv_path_JAVA
30077if test -n "$JAVA"; then
30078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30079$as_echo "$JAVA" >&6; }
30080else
30081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30082$as_echo "no" >&6; }
30083fi
30084
30085
30086          if test "x$JAVA" = x; then
30087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30088          fi
30089        else
30090          # Otherwise we believe it is a complete path. Use it as it is.
30091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30092$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30094$as_echo_n "checking for JAVA... " >&6; }
30095          if test ! -x "$tool_specified"; then
30096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30097$as_echo "not found" >&6; }
30098            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30099          fi
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30101$as_echo "$tool_specified" >&6; }
30102        fi
30103      fi
30104    fi
30105
30106  fi
30107
30108
30109
30110  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30111
30112  # Publish this variable in the help.
30113
30114
30115  if [ -z "${JAVAC+x}" ]; then
30116    # The variable is not set by user, try to locate tool using the code snippet
30117
30118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30119$as_echo_n "checking for javac in Boot JDK... " >&6; }
30120      JAVAC=$BOOT_JDK/bin/javac
30121      if test ! -x $JAVAC; then
30122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30123$as_echo "not found" >&6; }
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30125$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30126        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30127      fi
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30129$as_echo "ok" >&6; }
30130
30131
30132  else
30133    # The variable is set, but is it from the command line or the environment?
30134
30135    # Try to remove the string !JAVAC! from our list.
30136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30138      # If it failed, the variable was not from the command line. Ignore it,
30139      # but warn the user (except for BASH, which is always set by the calling BASH).
30140      if test "xJAVAC" != xBASH; then
30141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30142$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30143      fi
30144      # Try to locate tool using the code snippet
30145
30146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30147$as_echo_n "checking for javac in Boot JDK... " >&6; }
30148      JAVAC=$BOOT_JDK/bin/javac
30149      if test ! -x $JAVAC; then
30150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30151$as_echo "not found" >&6; }
30152        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30153$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30154        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30155      fi
30156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30157$as_echo "ok" >&6; }
30158
30159
30160    else
30161      # If it succeeded, then it was overridden by the user. We will use it
30162      # for the tool.
30163
30164      # First remove it from the list of overridden variables, so we can test
30165      # for unknown variables in the end.
30166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30167
30168      # Check if we try to supply an empty value
30169      if test "x$JAVAC" = x; then
30170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30171$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30173$as_echo_n "checking for JAVAC... " >&6; }
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30175$as_echo "disabled" >&6; }
30176      else
30177        # Check if the provided tool contains a complete path.
30178        tool_specified="$JAVAC"
30179        tool_basename="${tool_specified##*/}"
30180        if test "x$tool_basename" = "x$tool_specified"; then
30181          # A command without a complete path is provided, search $PATH.
30182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30183$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30184          # Extract the first word of "$tool_basename", so it can be a program name with args.
30185set dummy $tool_basename; ac_word=$2
30186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30187$as_echo_n "checking for $ac_word... " >&6; }
30188if ${ac_cv_path_JAVAC+:} false; then :
30189  $as_echo_n "(cached) " >&6
30190else
30191  case $JAVAC in
30192  [\\/]* | ?:[\\/]*)
30193  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30194  ;;
30195  *)
30196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30197for as_dir in $PATH
30198do
30199  IFS=$as_save_IFS
30200  test -z "$as_dir" && as_dir=.
30201    for ac_exec_ext in '' $ac_executable_extensions; do
30202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30203    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30205    break 2
30206  fi
30207done
30208  done
30209IFS=$as_save_IFS
30210
30211  ;;
30212esac
30213fi
30214JAVAC=$ac_cv_path_JAVAC
30215if test -n "$JAVAC"; then
30216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30217$as_echo "$JAVAC" >&6; }
30218else
30219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30220$as_echo "no" >&6; }
30221fi
30222
30223
30224          if test "x$JAVAC" = x; then
30225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30226          fi
30227        else
30228          # Otherwise we believe it is a complete path. Use it as it is.
30229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30230$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30232$as_echo_n "checking for JAVAC... " >&6; }
30233          if test ! -x "$tool_specified"; then
30234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30235$as_echo "not found" >&6; }
30236            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30237          fi
30238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30239$as_echo "$tool_specified" >&6; }
30240        fi
30241      fi
30242    fi
30243
30244  fi
30245
30246
30247
30248  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30249
30250  # Publish this variable in the help.
30251
30252
30253  if [ -z "${JAVAH+x}" ]; then
30254    # The variable is not set by user, try to locate tool using the code snippet
30255
30256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30257$as_echo_n "checking for javah in Boot JDK... " >&6; }
30258      JAVAH=$BOOT_JDK/bin/javah
30259      if test ! -x $JAVAH; then
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30261$as_echo "not found" >&6; }
30262        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30263$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30264        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30265      fi
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30267$as_echo "ok" >&6; }
30268
30269
30270  else
30271    # The variable is set, but is it from the command line or the environment?
30272
30273    # Try to remove the string !JAVAH! from our list.
30274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30276      # If it failed, the variable was not from the command line. Ignore it,
30277      # but warn the user (except for BASH, which is always set by the calling BASH).
30278      if test "xJAVAH" != xBASH; then
30279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30280$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30281      fi
30282      # Try to locate tool using the code snippet
30283
30284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30285$as_echo_n "checking for javah in Boot JDK... " >&6; }
30286      JAVAH=$BOOT_JDK/bin/javah
30287      if test ! -x $JAVAH; then
30288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30289$as_echo "not found" >&6; }
30290        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30291$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30292        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30293      fi
30294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30295$as_echo "ok" >&6; }
30296
30297
30298    else
30299      # If it succeeded, then it was overridden by the user. We will use it
30300      # for the tool.
30301
30302      # First remove it from the list of overridden variables, so we can test
30303      # for unknown variables in the end.
30304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30305
30306      # Check if we try to supply an empty value
30307      if test "x$JAVAH" = x; then
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30309$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30311$as_echo_n "checking for JAVAH... " >&6; }
30312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30313$as_echo "disabled" >&6; }
30314      else
30315        # Check if the provided tool contains a complete path.
30316        tool_specified="$JAVAH"
30317        tool_basename="${tool_specified##*/}"
30318        if test "x$tool_basename" = "x$tool_specified"; then
30319          # A command without a complete path is provided, search $PATH.
30320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30321$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30322          # Extract the first word of "$tool_basename", so it can be a program name with args.
30323set dummy $tool_basename; ac_word=$2
30324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30325$as_echo_n "checking for $ac_word... " >&6; }
30326if ${ac_cv_path_JAVAH+:} false; then :
30327  $as_echo_n "(cached) " >&6
30328else
30329  case $JAVAH in
30330  [\\/]* | ?:[\\/]*)
30331  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30332  ;;
30333  *)
30334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30335for as_dir in $PATH
30336do
30337  IFS=$as_save_IFS
30338  test -z "$as_dir" && as_dir=.
30339    for ac_exec_ext in '' $ac_executable_extensions; do
30340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30341    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30343    break 2
30344  fi
30345done
30346  done
30347IFS=$as_save_IFS
30348
30349  ;;
30350esac
30351fi
30352JAVAH=$ac_cv_path_JAVAH
30353if test -n "$JAVAH"; then
30354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30355$as_echo "$JAVAH" >&6; }
30356else
30357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30358$as_echo "no" >&6; }
30359fi
30360
30361
30362          if test "x$JAVAH" = x; then
30363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30364          fi
30365        else
30366          # Otherwise we believe it is a complete path. Use it as it is.
30367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30368$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30370$as_echo_n "checking for JAVAH... " >&6; }
30371          if test ! -x "$tool_specified"; then
30372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30373$as_echo "not found" >&6; }
30374            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30375          fi
30376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30377$as_echo "$tool_specified" >&6; }
30378        fi
30379      fi
30380    fi
30381
30382  fi
30383
30384
30385
30386  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30387
30388  # Publish this variable in the help.
30389
30390
30391  if [ -z "${JAR+x}" ]; then
30392    # The variable is not set by user, try to locate tool using the code snippet
30393
30394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30395$as_echo_n "checking for jar in Boot JDK... " >&6; }
30396      JAR=$BOOT_JDK/bin/jar
30397      if test ! -x $JAR; then
30398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30399$as_echo "not found" >&6; }
30400        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30401$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30402        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30403      fi
30404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30405$as_echo "ok" >&6; }
30406
30407
30408  else
30409    # The variable is set, but is it from the command line or the environment?
30410
30411    # Try to remove the string !JAR! from our list.
30412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30414      # If it failed, the variable was not from the command line. Ignore it,
30415      # but warn the user (except for BASH, which is always set by the calling BASH).
30416      if test "xJAR" != xBASH; then
30417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30418$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30419      fi
30420      # Try to locate tool using the code snippet
30421
30422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30423$as_echo_n "checking for jar in Boot JDK... " >&6; }
30424      JAR=$BOOT_JDK/bin/jar
30425      if test ! -x $JAR; then
30426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30427$as_echo "not found" >&6; }
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30429$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30430        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30431      fi
30432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30433$as_echo "ok" >&6; }
30434
30435
30436    else
30437      # If it succeeded, then it was overridden by the user. We will use it
30438      # for the tool.
30439
30440      # First remove it from the list of overridden variables, so we can test
30441      # for unknown variables in the end.
30442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30443
30444      # Check if we try to supply an empty value
30445      if test "x$JAR" = x; then
30446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30447$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30449$as_echo_n "checking for JAR... " >&6; }
30450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30451$as_echo "disabled" >&6; }
30452      else
30453        # Check if the provided tool contains a complete path.
30454        tool_specified="$JAR"
30455        tool_basename="${tool_specified##*/}"
30456        if test "x$tool_basename" = "x$tool_specified"; then
30457          # A command without a complete path is provided, search $PATH.
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30459$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30460          # Extract the first word of "$tool_basename", so it can be a program name with args.
30461set dummy $tool_basename; ac_word=$2
30462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30463$as_echo_n "checking for $ac_word... " >&6; }
30464if ${ac_cv_path_JAR+:} false; then :
30465  $as_echo_n "(cached) " >&6
30466else
30467  case $JAR in
30468  [\\/]* | ?:[\\/]*)
30469  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30470  ;;
30471  *)
30472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30473for as_dir in $PATH
30474do
30475  IFS=$as_save_IFS
30476  test -z "$as_dir" && as_dir=.
30477    for ac_exec_ext in '' $ac_executable_extensions; do
30478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30479    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30481    break 2
30482  fi
30483done
30484  done
30485IFS=$as_save_IFS
30486
30487  ;;
30488esac
30489fi
30490JAR=$ac_cv_path_JAR
30491if test -n "$JAR"; then
30492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30493$as_echo "$JAR" >&6; }
30494else
30495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30496$as_echo "no" >&6; }
30497fi
30498
30499
30500          if test "x$JAR" = x; then
30501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30502          fi
30503        else
30504          # Otherwise we believe it is a complete path. Use it as it is.
30505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30506$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30508$as_echo_n "checking for JAR... " >&6; }
30509          if test ! -x "$tool_specified"; then
30510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30511$as_echo "not found" >&6; }
30512            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30513          fi
30514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30515$as_echo "$tool_specified" >&6; }
30516        fi
30517      fi
30518    fi
30519
30520  fi
30521
30522
30523
30524  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30525
30526  # Publish this variable in the help.
30527
30528
30529  if [ -z "${JARSIGNER+x}" ]; then
30530    # The variable is not set by user, try to locate tool using the code snippet
30531
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30533$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30534      JARSIGNER=$BOOT_JDK/bin/jarsigner
30535      if test ! -x $JARSIGNER; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30537$as_echo "not found" >&6; }
30538        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30539$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30540        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30541      fi
30542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30543$as_echo "ok" >&6; }
30544
30545
30546  else
30547    # The variable is set, but is it from the command line or the environment?
30548
30549    # Try to remove the string !JARSIGNER! from our list.
30550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30552      # If it failed, the variable was not from the command line. Ignore it,
30553      # but warn the user (except for BASH, which is always set by the calling BASH).
30554      if test "xJARSIGNER" != xBASH; then
30555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30556$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30557      fi
30558      # Try to locate tool using the code snippet
30559
30560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30561$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30562      JARSIGNER=$BOOT_JDK/bin/jarsigner
30563      if test ! -x $JARSIGNER; then
30564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30565$as_echo "not found" >&6; }
30566        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30567$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30568        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30569      fi
30570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30571$as_echo "ok" >&6; }
30572
30573
30574    else
30575      # If it succeeded, then it was overridden by the user. We will use it
30576      # for the tool.
30577
30578      # First remove it from the list of overridden variables, so we can test
30579      # for unknown variables in the end.
30580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30581
30582      # Check if we try to supply an empty value
30583      if test "x$JARSIGNER" = x; then
30584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30585$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30587$as_echo_n "checking for JARSIGNER... " >&6; }
30588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30589$as_echo "disabled" >&6; }
30590      else
30591        # Check if the provided tool contains a complete path.
30592        tool_specified="$JARSIGNER"
30593        tool_basename="${tool_specified##*/}"
30594        if test "x$tool_basename" = "x$tool_specified"; then
30595          # A command without a complete path is provided, search $PATH.
30596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30597$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30598          # Extract the first word of "$tool_basename", so it can be a program name with args.
30599set dummy $tool_basename; ac_word=$2
30600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30601$as_echo_n "checking for $ac_word... " >&6; }
30602if ${ac_cv_path_JARSIGNER+:} false; then :
30603  $as_echo_n "(cached) " >&6
30604else
30605  case $JARSIGNER in
30606  [\\/]* | ?:[\\/]*)
30607  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30608  ;;
30609  *)
30610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30611for as_dir in $PATH
30612do
30613  IFS=$as_save_IFS
30614  test -z "$as_dir" && as_dir=.
30615    for ac_exec_ext in '' $ac_executable_extensions; do
30616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30617    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30619    break 2
30620  fi
30621done
30622  done
30623IFS=$as_save_IFS
30624
30625  ;;
30626esac
30627fi
30628JARSIGNER=$ac_cv_path_JARSIGNER
30629if test -n "$JARSIGNER"; then
30630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30631$as_echo "$JARSIGNER" >&6; }
30632else
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30634$as_echo "no" >&6; }
30635fi
30636
30637
30638          if test "x$JARSIGNER" = x; then
30639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30640          fi
30641        else
30642          # Otherwise we believe it is a complete path. Use it as it is.
30643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30644$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30646$as_echo_n "checking for JARSIGNER... " >&6; }
30647          if test ! -x "$tool_specified"; then
30648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30649$as_echo "not found" >&6; }
30650            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30651          fi
30652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30653$as_echo "$tool_specified" >&6; }
30654        fi
30655      fi
30656    fi
30657
30658  fi
30659
30660
30661
30662  # Finally, set some other options...
30663
30664  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30665  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30666
30667
30668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30669$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30670  if "$JAVA" --list-modules > /dev/null 2>&1; then
30671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30672$as_echo "yes" >&6; }
30673    BOOT_JDK_MODULAR="true"
30674  else
30675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30676$as_echo "no" >&6; }
30677    BOOT_JDK_MODULAR="false"
30678  fi
30679
30680
30681
30682
30683  # Check if the boot jdk is 32 or 64 bit
30684  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30685    BOOT_JDK_BITS="64"
30686  else
30687    BOOT_JDK_BITS="32"
30688  fi
30689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30690$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30692$as_echo "$BOOT_JDK_BITS" >&6; }
30693
30694
30695
30696
30697# Check whether --with-build-jdk was given.
30698if test "${with_build_jdk+set}" = set; then :
30699  withval=$with_build_jdk;
30700fi
30701
30702
30703  CREATE_BUILDJDK=false
30704  EXTERNAL_BUILDJDK=false
30705  BUILD_JDK_FOUND="no"
30706  if test "x$with_build_jdk" != "x"; then
30707
30708  if test "x$BUILD_JDK_FOUND" = xno; then
30709    # Execute the test
30710
30711       if test "x$with_build_jdk" != x; then
30712         BUILD_JDK=$with_build_jdk
30713         BUILD_JDK_FOUND=maybe
30714         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30715$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30716       fi
30717
30718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30719    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30720      # Do we have a bin/java?
30721      if test ! -x "$BUILD_JDK/bin/java"; then
30722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30723$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30724        BUILD_JDK_FOUND=no
30725      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30727$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30728        BUILD_JDK_FOUND=no
30729      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30730        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30731$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30732        BUILD_JDK_FOUND=no
30733      elif test ! -x "$BUILD_JDK/bin/javac"; then
30734        # Do we have a bin/javac?
30735        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30736$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30738$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30739        BUILD_JDK_FOUND=no
30740      else
30741        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30742        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30743
30744        # Extra M4 quote needed to protect [] in grep expression.
30745        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30746        if test "x$FOUND_CORRECT_VERSION" = x; then
30747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30748$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30749          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30750$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30751          BUILD_JDK_FOUND=no
30752        else
30753          # We're done!
30754          BUILD_JDK_FOUND=yes
30755
30756  # Only process if variable expands to non-empty
30757
30758  if test "x$BUILD_JDK" != x; then
30759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30760
30761  # Input might be given as Windows format, start by converting to
30762  # unix format.
30763  path="$BUILD_JDK"
30764  new_path=`$CYGPATH -u "$path"`
30765
30766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30769  # "foo.exe" is OK but "foo" is an error.
30770  #
30771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30772  # It is also a way to make sure we got the proper file name for the real test later on.
30773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30774  if test "x$test_shortpath" = x; then
30775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30776$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30777    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30778  fi
30779
30780  # Call helper function which possibly converts this using DOS-style short mode.
30781  # If so, the updated path is stored in $new_path.
30782
30783  input_path="$new_path"
30784  # Check if we need to convert this using DOS-style short mode. If the path
30785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30786  # take no chances and rewrite it.
30787  # Note: m4 eats our [], so we need to use [ and ] instead.
30788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30789  if test "x$has_forbidden_chars" != x; then
30790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30794      # Going to short mode and back again did indeed matter. Since short mode is
30795      # case insensitive, let's make it lowercase to improve readability.
30796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30797      # Now convert it back to Unix-style (cygpath)
30798      input_path=`$CYGPATH -u "$shortmode_path"`
30799      new_path="$input_path"
30800    fi
30801  fi
30802
30803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30804  if test "x$test_cygdrive_prefix" = x; then
30805    # As a simple fix, exclude /usr/bin since it's not a real path.
30806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30808      # a path prefixed by /cygdrive for fixpath to work.
30809      new_path="$CYGWIN_ROOT_PATH$input_path"
30810    fi
30811  fi
30812
30813
30814  if test "x$path" != "x$new_path"; then
30815    BUILD_JDK="$new_path"
30816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30817$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30818  fi
30819
30820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30821
30822  path="$BUILD_JDK"
30823  has_colon=`$ECHO $path | $GREP ^.:`
30824  new_path="$path"
30825  if test "x$has_colon" = x; then
30826    # Not in mixed or Windows style, start by that.
30827    new_path=`cmd //c echo $path`
30828  fi
30829
30830
30831  input_path="$new_path"
30832  # Check if we need to convert this using DOS-style short mode. If the path
30833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30834  # take no chances and rewrite it.
30835  # Note: m4 eats our [], so we need to use [ and ] instead.
30836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30837  if test "x$has_forbidden_chars" != x; then
30838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30840  fi
30841
30842
30843  windows_path="$new_path"
30844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30845    unix_path=`$CYGPATH -u "$windows_path"`
30846    new_path="$unix_path"
30847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30849    new_path="$unix_path"
30850  fi
30851
30852  if test "x$path" != "x$new_path"; then
30853    BUILD_JDK="$new_path"
30854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30855$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30856  fi
30857
30858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30860
30861    else
30862      # We're on a unix platform. Hooray! :)
30863      path="$BUILD_JDK"
30864      has_space=`$ECHO "$path" | $GREP " "`
30865      if test "x$has_space" != x; then
30866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30867$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30868        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30869      fi
30870
30871      # Use eval to expand a potential ~
30872      eval path="$path"
30873      if test ! -f "$path" && test ! -d "$path"; then
30874        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30875      fi
30876
30877      if test -d "$path"; then
30878        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30879      else
30880        dir="`$DIRNAME "$path"`"
30881        base="`$BASENAME "$path"`"
30882        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30883      fi
30884    fi
30885  fi
30886
30887          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30888$as_echo_n "checking for Build JDK... " >&6; }
30889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30890$as_echo "$BUILD_JDK" >&6; }
30891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30892$as_echo_n "checking Build JDK version... " >&6; }
30893          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30895$as_echo "$BUILD_JDK_VERSION" >&6; }
30896        fi # end check jdk version
30897      fi # end check java
30898    fi # end check build jdk found
30899  fi
30900
30901    EXTERNAL_BUILDJDK=true
30902  else
30903    if test "x$COMPILE_TYPE" = "xcross"; then
30904      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30905      BUILD_JDK_FOUND=yes
30906      CREATE_BUILDJDK=true
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30908$as_echo_n "checking for Build JDK... " >&6; }
30909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30910$as_echo "yes, will build it for the host platform" >&6; }
30911    else
30912      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30913      BUILD_JDK_FOUND=yes
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30915$as_echo_n "checking for Build JDK... " >&6; }
30916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30917$as_echo "yes, will use output dir" >&6; }
30918    fi
30919  fi
30920
30921  JMOD="$BUILD_JDK/bin/jmod"
30922  JLINK="$BUILD_JDK/bin/jlink"
30923
30924
30925
30926  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30928$as_echo_n "checking for Build JDK... " >&6; }
30929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30930$as_echo "no" >&6; }
30931    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30932  fi
30933
30934
30935
30936
30937
30938
30939###############################################################################
30940#
30941# Configure the sources to use. We can add or override individual directories.
30942#
30943###############################################################################
30944
30945
30946  # Where are the sources.
30947  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30948  CORBA_TOPDIR="$SRC_ROOT/corba"
30949  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30950  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30951  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30952  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30953  JDK_TOPDIR="$SRC_ROOT/jdk"
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963  # This feature is no longer supported.
30964
30965
30966
30967# Check whether --with-add-source-root was given.
30968if test "${with_add_source_root+set}" = set; then :
30969  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
30970$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30971fi
30972
30973
30974
30975
30976# Check whether --with-override-source-root was given.
30977if test "${with_override_source_root+set}" = set; then :
30978  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
30979$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30980fi
30981
30982
30983
30984
30985# Check whether --with-adds-and-overrides was given.
30986if test "${with_adds_and_overrides+set}" = set; then :
30987  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
30988$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30989fi
30990
30991
30992
30993
30994# Check whether --with-override-langtools was given.
30995if test "${with_override_langtools+set}" = set; then :
30996  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30997$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30998fi
30999
31000
31001
31002
31003# Check whether --with-override-corba was given.
31004if test "${with_override_corba+set}" = set; then :
31005  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31006$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31007fi
31008
31009
31010
31011
31012# Check whether --with-override-jaxp was given.
31013if test "${with_override_jaxp+set}" = set; then :
31014  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31015$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31016fi
31017
31018
31019
31020
31021# Check whether --with-override-jaxws was given.
31022if test "${with_override_jaxws+set}" = set; then :
31023  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31024$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31025fi
31026
31027
31028
31029
31030# Check whether --with-override-hotspot was given.
31031if test "${with_override_hotspot+set}" = set; then :
31032  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31033$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31034fi
31035
31036
31037
31038
31039# Check whether --with-override-nashorn was given.
31040if test "${with_override_nashorn+set}" = set; then :
31041  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31042$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31043fi
31044
31045
31046
31047
31048# Check whether --with-override-jdk was given.
31049if test "${with_override_jdk+set}" = set; then :
31050  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31051$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31052fi
31053
31054
31055
31056
31057  BUILD_OUTPUT="$OUTPUT_ROOT"
31058
31059  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31060
31061
31062
31063# Check whether --with-import_hotspot was given.
31064if test "${with_import_hotspot+set}" = set; then :
31065  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31066$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31067fi
31068
31069
31070
31071
31072
31073
31074# Check whether --with-import-modules was given.
31075if test "${with_import_modules+set}" = set; then :
31076  withval=$with_import_modules;
31077fi
31078
31079
31080  if test "x$with_import_modules" != x \
31081      && test "x$with_import_modules" != "xno"; then
31082    if test -d "$with_import_modules"; then
31083      IMPORT_MODULES_TOPDIR="$with_import_modules"
31084
31085  # Only process if variable expands to non-empty
31086
31087  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31089
31090  # Input might be given as Windows format, start by converting to
31091  # unix format.
31092  path="$IMPORT_MODULES_TOPDIR"
31093  new_path=`$CYGPATH -u "$path"`
31094
31095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31098  # "foo.exe" is OK but "foo" is an error.
31099  #
31100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31101  # It is also a way to make sure we got the proper file name for the real test later on.
31102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31103  if test "x$test_shortpath" = x; then
31104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31105$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31106    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31107  fi
31108
31109  # Call helper function which possibly converts this using DOS-style short mode.
31110  # If so, the updated path is stored in $new_path.
31111
31112  input_path="$new_path"
31113  # Check if we need to convert this using DOS-style short mode. If the path
31114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31115  # take no chances and rewrite it.
31116  # Note: m4 eats our [], so we need to use [ and ] instead.
31117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31118  if test "x$has_forbidden_chars" != x; then
31119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31123      # Going to short mode and back again did indeed matter. Since short mode is
31124      # case insensitive, let's make it lowercase to improve readability.
31125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31126      # Now convert it back to Unix-style (cygpath)
31127      input_path=`$CYGPATH -u "$shortmode_path"`
31128      new_path="$input_path"
31129    fi
31130  fi
31131
31132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31133  if test "x$test_cygdrive_prefix" = x; then
31134    # As a simple fix, exclude /usr/bin since it's not a real path.
31135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31137      # a path prefixed by /cygdrive for fixpath to work.
31138      new_path="$CYGWIN_ROOT_PATH$input_path"
31139    fi
31140  fi
31141
31142
31143  if test "x$path" != "x$new_path"; then
31144    IMPORT_MODULES_TOPDIR="$new_path"
31145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31146$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31147  fi
31148
31149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31150
31151  path="$IMPORT_MODULES_TOPDIR"
31152  has_colon=`$ECHO $path | $GREP ^.:`
31153  new_path="$path"
31154  if test "x$has_colon" = x; then
31155    # Not in mixed or Windows style, start by that.
31156    new_path=`cmd //c echo $path`
31157  fi
31158
31159
31160  input_path="$new_path"
31161  # Check if we need to convert this using DOS-style short mode. If the path
31162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31163  # take no chances and rewrite it.
31164  # Note: m4 eats our [], so we need to use [ and ] instead.
31165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31166  if test "x$has_forbidden_chars" != x; then
31167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31169  fi
31170
31171
31172  windows_path="$new_path"
31173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31174    unix_path=`$CYGPATH -u "$windows_path"`
31175    new_path="$unix_path"
31176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31178    new_path="$unix_path"
31179  fi
31180
31181  if test "x$path" != "x$new_path"; then
31182    IMPORT_MODULES_TOPDIR="$new_path"
31183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31184$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31185  fi
31186
31187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31189
31190    else
31191      # We're on a unix platform. Hooray! :)
31192      path="$IMPORT_MODULES_TOPDIR"
31193      has_space=`$ECHO "$path" | $GREP " "`
31194      if test "x$has_space" != x; then
31195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31196$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31198      fi
31199
31200      # Use eval to expand a potential ~
31201      eval path="$path"
31202      if test ! -f "$path" && test ! -d "$path"; then
31203        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31204      fi
31205
31206      if test -d "$path"; then
31207        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31208      else
31209        dir="`$DIRNAME "$path"`"
31210        base="`$BASENAME "$path"`"
31211        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31212      fi
31213    fi
31214  fi
31215
31216    elif test -e "$with_import_modules"; then
31217      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31218      $RM -rf "$IMPORT_MODULES_TOPDIR"
31219      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31220      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31221        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31222      fi
31223    else
31224      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31225    fi
31226  fi
31227
31228  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31229    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31230  fi
31231  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31232    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31233  fi
31234  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31235    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31236  fi
31237  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31238    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31239  fi
31240  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31241    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31242  fi
31243  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31244    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31245  fi
31246  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31247    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31248  fi
31249  # Workaround for using different imported module-info.java in Jake due to a
31250  # change in format. Remove once new format is standard in JDK 9 and javafx
31251  # delivers just that.
31252  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31253    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31254  fi
31255  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31256    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31257  fi
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269###############################################################################
31270#
31271# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31272# native code.
31273#
31274###############################################################################
31275
31276# See if we are doing a complete static build or not
31277
31278  # Check whether --enable-static-build was given.
31279if test "${enable_static_build+set}" = set; then :
31280  enableval=$enable_static_build;
31281fi
31282
31283  STATIC_BUILD=false
31284  if test "x$enable_static_build" = "xyes"; then
31285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31286$as_echo_n "checking if static build is enabled... " >&6; }
31287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31288$as_echo "yes" >&6; }
31289    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31290      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31291    fi
31292    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31293    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31294    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31295    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31296    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31297    STATIC_BUILD=true
31298  elif test "x$enable_static_build" = "xno"; then
31299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31300$as_echo_n "checking if static build is enabled... " >&6; }
31301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31302$as_echo "no" >&6; }
31303  elif test "x$enable_static_build" != "x"; then
31304    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31305  fi
31306
31307
31308
31309
31310# First determine the toolchain type (compiler family)
31311
31312
31313# Check whether --with-toolchain-type was given.
31314if test "${with_toolchain_type+set}" = set; then :
31315  withval=$with_toolchain_type;
31316fi
31317
31318
31319  # Use indirect variable referencing
31320  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31321  VALID_TOOLCHAINS=${!toolchain_var_name}
31322
31323  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31324    if test -n "$XCODEBUILD"; then
31325      # On Mac OS X, default toolchain to clang after Xcode 5
31326      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31327      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31328      if test $? -ne 0; then
31329        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31330      fi
31331      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31332          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31333          $CUT -f 1 -d .`
31334      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31335$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31336      if test $XCODE_MAJOR_VERSION -ge 5; then
31337          DEFAULT_TOOLCHAIN="clang"
31338      else
31339          DEFAULT_TOOLCHAIN="gcc"
31340      fi
31341    else
31342      # If Xcode is not installed, but the command line tools are
31343      # then we can't run xcodebuild. On these systems we should
31344      # default to clang
31345      DEFAULT_TOOLCHAIN="clang"
31346    fi
31347  else
31348    # First toolchain type in the list is the default
31349    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31350  fi
31351
31352  if test "x$with_toolchain_type" = xlist; then
31353    # List all toolchains
31354    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31355$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31356    for toolchain in $VALID_TOOLCHAINS; do
31357      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31358      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31359      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31360    done
31361
31362    exit 0
31363  elif test "x$with_toolchain_type" != x; then
31364    # User override; check that it is valid
31365    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31366      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31367$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31368      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31369$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31370      as_fn_error $? "Cannot continue." "$LINENO" 5
31371    fi
31372    TOOLCHAIN_TYPE=$with_toolchain_type
31373  else
31374    # No flag given, use default
31375    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31376  fi
31377
31378
31379  TOOLCHAIN_CC_BINARY_clang="clang"
31380  TOOLCHAIN_CC_BINARY_gcc="gcc"
31381  TOOLCHAIN_CC_BINARY_microsoft="cl"
31382  TOOLCHAIN_CC_BINARY_solstudio="cc"
31383  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31384
31385  TOOLCHAIN_CXX_BINARY_clang="clang++"
31386  TOOLCHAIN_CXX_BINARY_gcc="g++"
31387  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31388  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31389  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31390
31391  # Use indirect variable referencing
31392  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31393  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31394  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31395  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31396  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31397  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31398  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31399  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31400
31401
31402  # Define filename patterns
31403  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31404    LIBRARY_PREFIX=
31405    SHARED_LIBRARY_SUFFIX='.dll'
31406    STATIC_LIBRARY_SUFFIX='.lib'
31407    SHARED_LIBRARY='$1.dll'
31408    STATIC_LIBRARY='$1.lib'
31409    OBJ_SUFFIX='.obj'
31410    EXE_SUFFIX='.exe'
31411  else
31412    LIBRARY_PREFIX=lib
31413    SHARED_LIBRARY_SUFFIX='.so'
31414    STATIC_LIBRARY_SUFFIX='.a'
31415    SHARED_LIBRARY='lib$1.so'
31416    STATIC_LIBRARY='lib$1.a'
31417    OBJ_SUFFIX='.o'
31418    EXE_SUFFIX=''
31419    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31420      # For full static builds, we're overloading the SHARED_LIBRARY
31421      # variables in order to limit the amount of changes required.
31422      # It would be better to remove SHARED and just use LIBRARY and
31423      # LIBRARY_SUFFIX for libraries that can be built either
31424      # shared or static and use STATIC_* for libraries that are
31425      # always built statically.
31426      if test "x$STATIC_BUILD" = xtrue; then
31427        SHARED_LIBRARY='lib$1.a'
31428        SHARED_LIBRARY_SUFFIX='.a'
31429      else
31430        SHARED_LIBRARY='lib$1.dylib'
31431        SHARED_LIBRARY_SUFFIX='.dylib'
31432      fi
31433    fi
31434  fi
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31446    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31447$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31448  else
31449    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31450$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31451  fi
31452
31453
31454# User supplied flags should be used when configure detects compilers
31455
31456  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31458$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31459  fi
31460
31461  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31463$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31464  fi
31465
31466  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31468$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31469  fi
31470
31471
31472# Check whether --with-extra-cflags was given.
31473if test "${with_extra_cflags+set}" = set; then :
31474  withval=$with_extra_cflags;
31475fi
31476
31477
31478
31479# Check whether --with-extra-cxxflags was given.
31480if test "${with_extra_cxxflags+set}" = set; then :
31481  withval=$with_extra_cxxflags;
31482fi
31483
31484
31485
31486# Check whether --with-extra-ldflags was given.
31487if test "${with_extra_ldflags+set}" = set; then :
31488  withval=$with_extra_ldflags;
31489fi
31490
31491
31492  EXTRA_CFLAGS="$with_extra_cflags"
31493  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31494  EXTRA_LDFLAGS="$with_extra_ldflags"
31495
31496  # Hotspot needs these set in their legacy form
31497  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31498  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31499  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509  # The global CFLAGS and LDLAGS variables are used by configure tests and
31510  # should include the extra parameters
31511  CFLAGS="$EXTRA_CFLAGS"
31512  CXXFLAGS="$EXTRA_CXXFLAGS"
31513  LDFLAGS="$EXTRA_LDFLAGS"
31514  CPPFLAGS=""
31515
31516# The sysroot cflags are needed for configure to be able to run the compilers
31517
31518  if test "x$SYSROOT" != "x"; then
31519    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31520      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31521        # Solaris Studio does not have a concept of sysroot. Instead we must
31522        # make sure the default include and lib dirs are appended to each
31523        # compile and link command line. Must also add -I-xbuiltin to enable
31524        # inlining of system functions and intrinsics.
31525        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31526        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31527            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31528      fi
31529    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31530      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31531      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31532    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31533      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31534      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31535    fi
31536    # Propagate the sysroot args to hotspot
31537    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31538    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31539    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31540    # The global CFLAGS and LDFLAGS variables need these for configure to function
31541    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31542    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31543    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31544    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31545  fi
31546
31547  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31548    # We also need -iframework<path>/System/Library/Frameworks
31549    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31550    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31551    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31552    # set this here so it doesn't have to be peppered throughout the forest
31553    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31554    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31555  fi
31556
31557
31558
31559
31560
31561# Then detect the actual binaries needed
31562
31563  # FIXME: Is this needed?
31564  ac_ext=cpp
31565ac_cpp='$CXXCPP $CPPFLAGS'
31566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31569
31570
31571  # Store the CFLAGS etc passed to the configure script.
31572  ORG_CFLAGS="$CFLAGS"
31573  ORG_CXXFLAGS="$CXXFLAGS"
31574
31575  # autoconf magic only relies on PATH, so update it if tools dir is specified
31576  OLD_PATH="$PATH"
31577
31578  # On Windows, we need to detect the visual studio installation first.
31579  # This will change the PATH, but we need to keep that new PATH even
31580  # after toolchain detection is done, since the compiler (on x86) uses
31581  # it for DLL resolution in runtime.
31582  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31583      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31584
31585  # Store path to cygwin link.exe to help excluding it when searching for
31586  # VS linker. This must be done before changing the PATH when looking for VS.
31587  # Extract the first word of "link", so it can be a program name with args.
31588set dummy link; ac_word=$2
31589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31590$as_echo_n "checking for $ac_word... " >&6; }
31591if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31592  $as_echo_n "(cached) " >&6
31593else
31594  case $CYGWIN_LINK in
31595  [\\/]* | ?:[\\/]*)
31596  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31597  ;;
31598  *)
31599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31600for as_dir in $PATH
31601do
31602  IFS=$as_save_IFS
31603  test -z "$as_dir" && as_dir=.
31604    for ac_exec_ext in '' $ac_executable_extensions; do
31605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31606    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31608    break 2
31609  fi
31610done
31611  done
31612IFS=$as_save_IFS
31613
31614  ;;
31615esac
31616fi
31617CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31618if test -n "$CYGWIN_LINK"; then
31619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31620$as_echo "$CYGWIN_LINK" >&6; }
31621else
31622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31623$as_echo "no" >&6; }
31624fi
31625
31626
31627  if test "x$CYGWIN_LINK" != x; then
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31629$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31630    "$CYGWIN_LINK" --version > /dev/null
31631    if test $? -eq 0 ; then
31632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31633$as_echo "yes" >&6; }
31634    else
31635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31636$as_echo "no" >&6; }
31637      # This might be the VS linker. Don't exclude it later on.
31638      CYGWIN_LINK=""
31639    fi
31640  fi
31641
31642  # First-hand choice is to locate and run the vsvars bat file.
31643
31644
31645# Check whether --with-toolchain-version was given.
31646if test "${with_toolchain_version+set}" = set; then :
31647  withval=$with_toolchain_version;
31648fi
31649
31650
31651  if test "x$with_toolchain_version" = xlist; then
31652    # List all toolchains
31653    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31654$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31655    for version in $VALID_VS_VERSIONS; do
31656      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31657      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31658    done
31659
31660    exit 0
31661  elif test "x$DEVKIT_VS_VERSION" != x; then
31662    VS_VERSION=$DEVKIT_VS_VERSION
31663    TOOLCHAIN_VERSION=$VS_VERSION
31664    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31665    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31666    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31667    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31668    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31669    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31670
31671    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31672    # can still be exported as INCLUDE for compiler invocations without
31673    # SYSROOT_CFLAGS
31674    OLDIFS="$IFS"
31675    IFS=";"
31676    for i in $DEVKIT_VS_INCLUDE; do
31677      ipath=$i
31678
31679  unix_path="$ipath"
31680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31681    windows_path=`$CYGPATH -m "$unix_path"`
31682    ipath="$windows_path"
31683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684    windows_path=`cmd //c echo $unix_path`
31685    ipath="$windows_path"
31686  fi
31687
31688      VS_INCLUDE="$VS_INCLUDE;$ipath"
31689    done
31690    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31691    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31692    for i in $DEVKIT_VS_LIB; do
31693      libpath=$i
31694
31695  unix_path="$libpath"
31696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31697    windows_path=`$CYGPATH -m "$unix_path"`
31698    libpath="$windows_path"
31699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31700    windows_path=`cmd //c echo $unix_path`
31701    libpath="$windows_path"
31702  fi
31703
31704      VS_LIB="$VS_LIB;$libpath"
31705    done
31706    IFS="$OLDIFS"
31707
31708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31709$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31710
31711  elif test "x$with_toolchain_version" != x; then
31712    # User override; check that it is valid
31713    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31714      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31715$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31716      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31717$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31718      as_fn_error $? "Cannot continue." "$LINENO" 5
31719    fi
31720    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31721  else
31722    # No flag given, use default
31723    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31724  fi
31725
31726  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31727
31728  VS_VERSION="$VS_VERSION"
31729  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31730  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31731  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31732  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31733
31734  # When using --with-tools-dir, assume it points to the correct and default
31735  # version of Visual Studio or that --with-toolchain-version was also set.
31736  if test "x$with_tools_dir" != x; then
31737
31738  if test "x$VS_ENV_CMD" = x; then
31739    VS_VERSION="${VS_VERSION}"
31740    VS_BASE="$with_tools_dir/../.."
31741    METHOD="--with-tools-dir"
31742
31743    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31744      VCVARSFILE="vc/bin/vcvars32.bat"
31745    else
31746      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31747    fi
31748
31749
31750  windows_path="$VS_BASE"
31751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31752    unix_path=`$CYGPATH -u "$windows_path"`
31753    VS_BASE="$unix_path"
31754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31756    VS_BASE="$unix_path"
31757  fi
31758
31759    if test -d "$VS_BASE"; then
31760      if test -f "$VS_BASE/$VCVARSFILE"; then
31761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31762$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31763        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31764        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31765        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31766        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31767      else
31768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31769$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31770        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31771$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31772      fi
31773    fi
31774  fi
31775
31776
31777  if test "x$VS_ENV_CMD" = x; then
31778    VS_VERSION="${VS_VERSION}"
31779    VS_BASE="$with_tools_dir/../../.."
31780    METHOD="--with-tools-dir"
31781
31782    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31783      VCVARSFILE="vc/bin/vcvars32.bat"
31784    else
31785      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31786    fi
31787
31788
31789  windows_path="$VS_BASE"
31790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31791    unix_path=`$CYGPATH -u "$windows_path"`
31792    VS_BASE="$unix_path"
31793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31795    VS_BASE="$unix_path"
31796  fi
31797
31798    if test -d "$VS_BASE"; then
31799      if test -f "$VS_BASE/$VCVARSFILE"; then
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31802        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31803        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31804        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31805        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31806      else
31807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31808$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31811      fi
31812    fi
31813  fi
31814
31815    if test "x$VS_ENV_CMD" = x; then
31816      # Having specified an argument which is incorrect will produce an instant failure;
31817      # we should not go on looking
31818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31819$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31820      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31821$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31822      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31823$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31824      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31825    fi
31826  fi
31827
31828  VS_ENV_CMD=""
31829  VS_ENV_ARGS=""
31830
31831  if test "x$VS_COMNTOOLS" != x; then
31832
31833  if test "x$VS_ENV_CMD" = x; then
31834    VS_VERSION="${VS_VERSION}"
31835    VS_BASE="$VS_COMNTOOLS/../.."
31836    METHOD="$VS_COMNTOOLS_VAR variable"
31837
31838    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31839      VCVARSFILE="vc/bin/vcvars32.bat"
31840    else
31841      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31842    fi
31843
31844
31845  windows_path="$VS_BASE"
31846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31847    unix_path=`$CYGPATH -u "$windows_path"`
31848    VS_BASE="$unix_path"
31849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31851    VS_BASE="$unix_path"
31852  fi
31853
31854    if test -d "$VS_BASE"; then
31855      if test -f "$VS_BASE/$VCVARSFILE"; then
31856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31857$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31858        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31859        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31860        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31861        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31862      else
31863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31864$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31866$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31867      fi
31868    fi
31869  fi
31870
31871  fi
31872  if test "x$PROGRAMFILES" != x; then
31873
31874  if test "x$VS_ENV_CMD" = x; then
31875    VS_VERSION="${VS_VERSION}"
31876    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31877    METHOD="well-known name"
31878
31879    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31880      VCVARSFILE="vc/bin/vcvars32.bat"
31881    else
31882      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31883    fi
31884
31885
31886  windows_path="$VS_BASE"
31887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31888    unix_path=`$CYGPATH -u "$windows_path"`
31889    VS_BASE="$unix_path"
31890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31892    VS_BASE="$unix_path"
31893  fi
31894
31895    if test -d "$VS_BASE"; then
31896      if test -f "$VS_BASE/$VCVARSFILE"; then
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31898$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31899        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31900        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31901        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31902        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31903      else
31904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31905$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31906        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31907$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31908      fi
31909    fi
31910  fi
31911
31912  fi
31913  # Work around the insanely named ProgramFiles(x86) env variable
31914  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31915  if test "x$PROGRAMFILES_X86" != x; then
31916
31917  if test "x$VS_ENV_CMD" = x; then
31918    VS_VERSION="${VS_VERSION}"
31919    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31920    METHOD="well-known name"
31921
31922    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31923      VCVARSFILE="vc/bin/vcvars32.bat"
31924    else
31925      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31926    fi
31927
31928
31929  windows_path="$VS_BASE"
31930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31931    unix_path=`$CYGPATH -u "$windows_path"`
31932    VS_BASE="$unix_path"
31933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31935    VS_BASE="$unix_path"
31936  fi
31937
31938    if test -d "$VS_BASE"; then
31939      if test -f "$VS_BASE/$VCVARSFILE"; then
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31941$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31942        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31943        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31944        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31945        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31946      else
31947        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31948$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31949        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31950$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31951      fi
31952    fi
31953  fi
31954
31955  fi
31956
31957  if test "x$VS_ENV_CMD" = x; then
31958    VS_VERSION="${VS_VERSION}"
31959    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31960    METHOD="well-known name"
31961
31962    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31963      VCVARSFILE="vc/bin/vcvars32.bat"
31964    else
31965      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31966    fi
31967
31968
31969  windows_path="$VS_BASE"
31970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31971    unix_path=`$CYGPATH -u "$windows_path"`
31972    VS_BASE="$unix_path"
31973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31975    VS_BASE="$unix_path"
31976  fi
31977
31978    if test -d "$VS_BASE"; then
31979      if test -f "$VS_BASE/$VCVARSFILE"; then
31980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31981$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31982        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31983        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31984        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31985        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31986      else
31987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31988$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31990$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31991      fi
31992    fi
31993  fi
31994
31995
31996  if test "x$VS_ENV_CMD" = x; then
31997    VS_VERSION="${VS_VERSION}"
31998    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31999    METHOD="well-known name"
32000
32001    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32002      VCVARSFILE="vc/bin/vcvars32.bat"
32003    else
32004      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32005    fi
32006
32007
32008  windows_path="$VS_BASE"
32009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32010    unix_path=`$CYGPATH -u "$windows_path"`
32011    VS_BASE="$unix_path"
32012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32014    VS_BASE="$unix_path"
32015  fi
32016
32017    if test -d "$VS_BASE"; then
32018      if test -f "$VS_BASE/$VCVARSFILE"; then
32019        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32020$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32021        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32022        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32023        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32024        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32025      else
32026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32027$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32029$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32030      fi
32031    fi
32032  fi
32033
32034
32035  if test "x$SDK_INSTALL_DIR" != x; then
32036    if test "x$ProgramW6432" != x; then
32037
32038  if test "x$VS_ENV_CMD" = x; then
32039    VS_VERSION="${VS_VERSION}"
32040    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32041    METHOD="well-known name"
32042
32043  windows_path="$WIN_SDK_BASE"
32044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32045    unix_path=`$CYGPATH -u "$windows_path"`
32046    WIN_SDK_BASE="$unix_path"
32047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32049    WIN_SDK_BASE="$unix_path"
32050  fi
32051
32052    if test -d "$WIN_SDK_BASE"; then
32053      # There have been cases of partial or broken SDK installations. A missing
32054      # lib dir is not going to work.
32055      if test ! -d "$WIN_SDK_BASE/lib"; then
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32059$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32060      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32062$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32063        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32064        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32065          VS_ENV_ARGS="/x86"
32066        else
32067          VS_ENV_ARGS="/x64"
32068        fi
32069        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32070        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32071        # TODO: improve detection for other versions of SDK
32072        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32073      else
32074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32075$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32077$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32078      fi
32079    fi
32080  fi
32081
32082    fi
32083    if test "x$PROGRAMW6432" != x; then
32084
32085  if test "x$VS_ENV_CMD" = x; then
32086    VS_VERSION="${VS_VERSION}"
32087    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32088    METHOD="well-known name"
32089
32090  windows_path="$WIN_SDK_BASE"
32091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32092    unix_path=`$CYGPATH -u "$windows_path"`
32093    WIN_SDK_BASE="$unix_path"
32094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32096    WIN_SDK_BASE="$unix_path"
32097  fi
32098
32099    if test -d "$WIN_SDK_BASE"; then
32100      # There have been cases of partial or broken SDK installations. A missing
32101      # lib dir is not going to work.
32102      if test ! -d "$WIN_SDK_BASE/lib"; then
32103        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32106$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32107      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32109$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32110        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32111        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32112          VS_ENV_ARGS="/x86"
32113        else
32114          VS_ENV_ARGS="/x64"
32115        fi
32116        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32117        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32118        # TODO: improve detection for other versions of SDK
32119        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32120      else
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32124$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32125      fi
32126    fi
32127  fi
32128
32129    fi
32130    if test "x$PROGRAMFILES" != x; then
32131
32132  if test "x$VS_ENV_CMD" = x; then
32133    VS_VERSION="${VS_VERSION}"
32134    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32135    METHOD="well-known name"
32136
32137  windows_path="$WIN_SDK_BASE"
32138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32139    unix_path=`$CYGPATH -u "$windows_path"`
32140    WIN_SDK_BASE="$unix_path"
32141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32143    WIN_SDK_BASE="$unix_path"
32144  fi
32145
32146    if test -d "$WIN_SDK_BASE"; then
32147      # There have been cases of partial or broken SDK installations. A missing
32148      # lib dir is not going to work.
32149      if test ! -d "$WIN_SDK_BASE/lib"; then
32150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32153$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32154      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32158        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32159          VS_ENV_ARGS="/x86"
32160        else
32161          VS_ENV_ARGS="/x64"
32162        fi
32163        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32164        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32165        # TODO: improve detection for other versions of SDK
32166        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32167      else
32168        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32169$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32170        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32171$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32172      fi
32173    fi
32174  fi
32175
32176    fi
32177
32178  if test "x$VS_ENV_CMD" = x; then
32179    VS_VERSION="${VS_VERSION}"
32180    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32181    METHOD="well-known name"
32182
32183  windows_path="$WIN_SDK_BASE"
32184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32185    unix_path=`$CYGPATH -u "$windows_path"`
32186    WIN_SDK_BASE="$unix_path"
32187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32189    WIN_SDK_BASE="$unix_path"
32190  fi
32191
32192    if test -d "$WIN_SDK_BASE"; then
32193      # There have been cases of partial or broken SDK installations. A missing
32194      # lib dir is not going to work.
32195      if test ! -d "$WIN_SDK_BASE/lib"; then
32196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32198        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32199$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32200      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32203        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32204        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32205          VS_ENV_ARGS="/x86"
32206        else
32207          VS_ENV_ARGS="/x64"
32208        fi
32209        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32210        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32211        # TODO: improve detection for other versions of SDK
32212        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32213      else
32214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32217$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32218      fi
32219    fi
32220  fi
32221
32222
32223  if test "x$VS_ENV_CMD" = x; then
32224    VS_VERSION="${VS_VERSION}"
32225    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32226    METHOD="well-known name"
32227
32228  windows_path="$WIN_SDK_BASE"
32229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32230    unix_path=`$CYGPATH -u "$windows_path"`
32231    WIN_SDK_BASE="$unix_path"
32232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32234    WIN_SDK_BASE="$unix_path"
32235  fi
32236
32237    if test -d "$WIN_SDK_BASE"; then
32238      # There have been cases of partial or broken SDK installations. A missing
32239      # lib dir is not going to work.
32240      if test ! -d "$WIN_SDK_BASE/lib"; then
32241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32242$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32243        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32244$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32245      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32248        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32249        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32250          VS_ENV_ARGS="/x86"
32251        else
32252          VS_ENV_ARGS="/x64"
32253        fi
32254        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32255        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32256        # TODO: improve detection for other versions of SDK
32257        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32258      else
32259        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32260$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32261        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32262$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32263      fi
32264    fi
32265  fi
32266
32267  fi
32268
32269    if test "x$VS_ENV_CMD" != x; then
32270      TOOLCHAIN_VERSION=$VS_VERSION
32271      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32272      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32273      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32274      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32275      # The rest of the variables are already evaled while probing
32276      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32277$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32278      break
32279    fi
32280  done
32281
32282
32283  # If we have a devkit, skip all of the below.
32284  if test "x$DEVKIT_VS_VERSION" = x; then
32285    if test "x$VS_ENV_CMD" != x; then
32286      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32287
32288  # Only process if variable expands to non-empty
32289
32290  if test "x$VS_ENV_CMD" != x; then
32291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32292
32293  # First separate the path from the arguments. This will split at the first
32294  # space.
32295  complete="$VS_ENV_CMD"
32296  path="${complete%% *}"
32297  tmp="$complete EOL"
32298  arguments="${tmp#* }"
32299
32300  # Input might be given as Windows format, start by converting to
32301  # unix format.
32302  new_path=`$CYGPATH -u "$path"`
32303
32304  # Now try to locate executable using which
32305  new_path=`$WHICH "$new_path" 2> /dev/null`
32306  # bat and cmd files are not always considered executable in cygwin causing which
32307  # to not find them
32308  if test "x$new_path" = x \
32309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32311    new_path=`$CYGPATH -u "$path"`
32312  fi
32313  if test "x$new_path" = x; then
32314    # Oops. Which didn't find the executable.
32315    # The splitting of arguments from the executable at a space might have been incorrect,
32316    # since paths with space are more likely in Windows. Give it another try with the whole
32317    # argument.
32318    path="$complete"
32319    arguments="EOL"
32320    new_path=`$CYGPATH -u "$path"`
32321    new_path=`$WHICH "$new_path" 2> /dev/null`
32322    # bat and cmd files are not always considered executable in cygwin causing which
32323    # to not find them
32324    if test "x$new_path" = x \
32325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32327      new_path=`$CYGPATH -u "$path"`
32328    fi
32329    if test "x$new_path" = x; then
32330      # It's still not found. Now this is an unrecoverable error.
32331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32332$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32333      has_space=`$ECHO "$complete" | $GREP " "`
32334      if test "x$has_space" != x; then
32335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32337      fi
32338      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32339    fi
32340  fi
32341
32342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32345  # "foo.exe" is OK but "foo" is an error.
32346  #
32347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32348  # It is also a way to make sure we got the proper file name for the real test later on.
32349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32350  if test "x$test_shortpath" = x; then
32351    # Short path failed, file does not exist as specified.
32352    # Try adding .exe or .cmd
32353    if test -f "${new_path}.exe"; then
32354      input_to_shortpath="${new_path}.exe"
32355    elif test -f "${new_path}.cmd"; then
32356      input_to_shortpath="${new_path}.cmd"
32357    else
32358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32359$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32362      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32363    fi
32364  else
32365    input_to_shortpath="$new_path"
32366  fi
32367
32368  # Call helper function which possibly converts this using DOS-style short mode.
32369  # If so, the updated path is stored in $new_path.
32370  new_path="$input_to_shortpath"
32371
32372  input_path="$input_to_shortpath"
32373  # Check if we need to convert this using DOS-style short mode. If the path
32374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32375  # take no chances and rewrite it.
32376  # Note: m4 eats our [], so we need to use [ and ] instead.
32377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32378  if test "x$has_forbidden_chars" != x; then
32379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32383      # Going to short mode and back again did indeed matter. Since short mode is
32384      # case insensitive, let's make it lowercase to improve readability.
32385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32386      # Now convert it back to Unix-style (cygpath)
32387      input_path=`$CYGPATH -u "$shortmode_path"`
32388      new_path="$input_path"
32389    fi
32390  fi
32391
32392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32393  if test "x$test_cygdrive_prefix" = x; then
32394    # As a simple fix, exclude /usr/bin since it's not a real path.
32395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32397      # a path prefixed by /cygdrive for fixpath to work.
32398      new_path="$CYGWIN_ROOT_PATH$input_path"
32399    fi
32400  fi
32401
32402  # remove trailing .exe if any
32403  new_path="${new_path/%.exe/}"
32404
32405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32406
32407  # First separate the path from the arguments. This will split at the first
32408  # space.
32409  complete="$VS_ENV_CMD"
32410  path="${complete%% *}"
32411  tmp="$complete EOL"
32412  arguments="${tmp#* }"
32413
32414  # Input might be given as Windows format, start by converting to
32415  # unix format.
32416  new_path="$path"
32417
32418  windows_path="$new_path"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    new_path="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    new_path="$unix_path"
32425  fi
32426
32427
32428  # Now try to locate executable using which
32429  new_path=`$WHICH "$new_path" 2> /dev/null`
32430
32431  if test "x$new_path" = x; then
32432    # Oops. Which didn't find the executable.
32433    # The splitting of arguments from the executable at a space might have been incorrect,
32434    # since paths with space are more likely in Windows. Give it another try with the whole
32435    # argument.
32436    path="$complete"
32437    arguments="EOL"
32438    new_path="$path"
32439
32440  windows_path="$new_path"
32441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442    unix_path=`$CYGPATH -u "$windows_path"`
32443    new_path="$unix_path"
32444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446    new_path="$unix_path"
32447  fi
32448
32449
32450    new_path=`$WHICH "$new_path" 2> /dev/null`
32451    # bat and cmd files are not always considered executable in MSYS causing which
32452    # to not find them
32453    if test "x$new_path" = x \
32454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32456      new_path="$path"
32457
32458  windows_path="$new_path"
32459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32460    unix_path=`$CYGPATH -u "$windows_path"`
32461    new_path="$unix_path"
32462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32464    new_path="$unix_path"
32465  fi
32466
32467    fi
32468
32469    if test "x$new_path" = x; then
32470      # It's still not found. Now this is an unrecoverable error.
32471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32472$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32473      has_space=`$ECHO "$complete" | $GREP " "`
32474      if test "x$has_space" != x; then
32475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32477      fi
32478      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32479    fi
32480  fi
32481
32482  # Now new_path has a complete unix path to the binary
32483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32484    # Keep paths in /bin as-is, but remove trailing .exe if any
32485    new_path="${new_path/%.exe/}"
32486    # Do not save /bin paths to all_fixpath_prefixes!
32487  else
32488    # Not in mixed or Windows style, start by that.
32489    new_path=`cmd //c echo $new_path`
32490
32491  input_path="$new_path"
32492  # Check if we need to convert this using DOS-style short mode. If the path
32493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32494  # take no chances and rewrite it.
32495  # Note: m4 eats our [], so we need to use [ and ] instead.
32496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32497  if test "x$has_forbidden_chars" != x; then
32498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32500  fi
32501
32502    # Output is in $new_path
32503
32504  windows_path="$new_path"
32505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32506    unix_path=`$CYGPATH -u "$windows_path"`
32507    new_path="$unix_path"
32508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32510    new_path="$unix_path"
32511  fi
32512
32513    # remove trailing .exe if any
32514    new_path="${new_path/%.exe/}"
32515
32516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32518  fi
32519
32520    else
32521      # We're on a unix platform. Hooray! :)
32522      # First separate the path from the arguments. This will split at the first
32523      # space.
32524      complete="$VS_ENV_CMD"
32525      path="${complete%% *}"
32526      tmp="$complete EOL"
32527      arguments="${tmp#* }"
32528
32529      # Cannot rely on the command "which" here since it doesn't always work.
32530      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32531      if test -z "$is_absolute_path"; then
32532        # Path to executable is not absolute. Find it.
32533        IFS_save="$IFS"
32534        IFS=:
32535        for p in $PATH; do
32536          if test -f "$p/$path" && test -x "$p/$path"; then
32537            new_path="$p/$path"
32538            break
32539          fi
32540        done
32541        IFS="$IFS_save"
32542      else
32543        # This is an absolute path, we can use it without further modifications.
32544        new_path="$path"
32545      fi
32546
32547      if test "x$new_path" = x; then
32548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32549$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32550        has_space=`$ECHO "$complete" | $GREP " "`
32551        if test "x$has_space" != x; then
32552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32554        fi
32555        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32556      fi
32557    fi
32558
32559    # Now join together the path and the arguments once again
32560    if test "x$arguments" != xEOL; then
32561      new_complete="$new_path ${arguments% *}"
32562    else
32563      new_complete="$new_path"
32564    fi
32565
32566    if test "x$complete" != "x$new_complete"; then
32567      VS_ENV_CMD="$new_complete"
32568      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32569$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32570    fi
32571  fi
32572
32573
32574      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32575      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32576$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32577
32578      # We need to create a couple of temporary files.
32579      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32580      $MKDIR -p $VS_ENV_TMP_DIR
32581
32582      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32583      # Instead create a shell script which will set the relevant variables when run.
32584      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32585
32586  unix_path="$WINPATH_VS_ENV_CMD"
32587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32588    windows_path=`$CYGPATH -m "$unix_path"`
32589    WINPATH_VS_ENV_CMD="$windows_path"
32590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32591    windows_path=`cmd //c echo $unix_path`
32592    WINPATH_VS_ENV_CMD="$windows_path"
32593  fi
32594
32595      WINPATH_BASH="$BASH"
32596
32597  unix_path="$WINPATH_BASH"
32598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32599    windows_path=`$CYGPATH -m "$unix_path"`
32600    WINPATH_BASH="$windows_path"
32601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32602    windows_path=`cmd //c echo $unix_path`
32603    WINPATH_BASH="$windows_path"
32604  fi
32605
32606
32607      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32608      # script (executable by bash) that will setup the important variables.
32609      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32610      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32611      # This will end up something like:
32612      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32613      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32614      # These will end up something like:
32615      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32616      # The trailing space for everyone except PATH is no typo, but is needed due
32617      # to trailing \ in the Windows paths. These will be stripped later.
32618      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32619          >> $EXTRACT_VC_ENV_BAT_FILE
32620      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32621          >> $EXTRACT_VC_ENV_BAT_FILE
32622      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32623          >> $EXTRACT_VC_ENV_BAT_FILE
32624      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32625          >> $EXTRACT_VC_ENV_BAT_FILE
32626      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32627          >> $EXTRACT_VC_ENV_BAT_FILE
32628      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32629          >> $EXTRACT_VC_ENV_BAT_FILE
32630
32631      # Now execute the newly created bat file.
32632      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32633      # Change directory so we don't need to mess with Windows paths in redirects.
32634      cd $VS_ENV_TMP_DIR
32635      cmd /c extract-vs-env.bat | $CAT
32636      cd $CURDIR
32637
32638      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32640$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32641        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32642$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32643        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32644$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32645        as_fn_error $? "Cannot continue" "$LINENO" 5
32646      fi
32647
32648      # Now set all paths and other env variables. This will allow the rest of
32649      # the configure script to find and run the compiler in the proper way.
32650      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32651$as_echo "$as_me: Setting extracted environment variables" >&6;}
32652      . $VS_ENV_TMP_DIR/set-vs-env.sh
32653      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32654      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32655    else
32656      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32657      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32658$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32659    fi
32660  fi
32661
32662  # At this point, we should have correct variables in the environment, or we can't continue.
32663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32664$as_echo_n "checking for Visual Studio variables... " >&6; }
32665
32666  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32667      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32668    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32670$as_echo "present but broken" >&6; }
32671      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32672    else
32673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32674$as_echo "ok" >&6; }
32675      # Remove any trailing "\" ";" and " " from the variables.
32676      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32677      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32678      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32679      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32680      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32681      # Remove any paths containing # (typically F#) as that messes up make. This
32682      # is needed if visual studio was installed with F# support.
32683      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32684
32685
32686
32687
32688
32689      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32690      OLDIFS="$IFS"
32691      IFS=";"
32692      for i in $VS_INCLUDE; do
32693        ipath=$i
32694        # Only process non-empty elements
32695        if test "x$ipath" != x; then
32696          IFS="$OLDIFS"
32697          # Check that directory exists before calling fixup_path
32698          testpath=$ipath
32699
32700  windows_path="$testpath"
32701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32702    unix_path=`$CYGPATH -u "$windows_path"`
32703    testpath="$unix_path"
32704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32706    testpath="$unix_path"
32707  fi
32708
32709          if test -d "$testpath"; then
32710
32711  # Only process if variable expands to non-empty
32712
32713  if test "x$ipath" != x; then
32714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32715
32716  # Input might be given as Windows format, start by converting to
32717  # unix format.
32718  path="$ipath"
32719  new_path=`$CYGPATH -u "$path"`
32720
32721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32724  # "foo.exe" is OK but "foo" is an error.
32725  #
32726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32727  # It is also a way to make sure we got the proper file name for the real test later on.
32728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32729  if test "x$test_shortpath" = x; then
32730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32731$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32732    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32733  fi
32734
32735  # Call helper function which possibly converts this using DOS-style short mode.
32736  # If so, the updated path is stored in $new_path.
32737
32738  input_path="$new_path"
32739  # Check if we need to convert this using DOS-style short mode. If the path
32740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32741  # take no chances and rewrite it.
32742  # Note: m4 eats our [], so we need to use [ and ] instead.
32743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32744  if test "x$has_forbidden_chars" != x; then
32745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32749      # Going to short mode and back again did indeed matter. Since short mode is
32750      # case insensitive, let's make it lowercase to improve readability.
32751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32752      # Now convert it back to Unix-style (cygpath)
32753      input_path=`$CYGPATH -u "$shortmode_path"`
32754      new_path="$input_path"
32755    fi
32756  fi
32757
32758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32759  if test "x$test_cygdrive_prefix" = x; then
32760    # As a simple fix, exclude /usr/bin since it's not a real path.
32761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32763      # a path prefixed by /cygdrive for fixpath to work.
32764      new_path="$CYGWIN_ROOT_PATH$input_path"
32765    fi
32766  fi
32767
32768
32769  if test "x$path" != "x$new_path"; then
32770    ipath="$new_path"
32771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32772$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32773  fi
32774
32775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32776
32777  path="$ipath"
32778  has_colon=`$ECHO $path | $GREP ^.:`
32779  new_path="$path"
32780  if test "x$has_colon" = x; then
32781    # Not in mixed or Windows style, start by that.
32782    new_path=`cmd //c echo $path`
32783  fi
32784
32785
32786  input_path="$new_path"
32787  # Check if we need to convert this using DOS-style short mode. If the path
32788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32789  # take no chances and rewrite it.
32790  # Note: m4 eats our [], so we need to use [ and ] instead.
32791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32792  if test "x$has_forbidden_chars" != x; then
32793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32795  fi
32796
32797
32798  windows_path="$new_path"
32799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32800    unix_path=`$CYGPATH -u "$windows_path"`
32801    new_path="$unix_path"
32802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32804    new_path="$unix_path"
32805  fi
32806
32807  if test "x$path" != "x$new_path"; then
32808    ipath="$new_path"
32809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32810$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32811  fi
32812
32813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32815
32816    else
32817      # We're on a unix platform. Hooray! :)
32818      path="$ipath"
32819      has_space=`$ECHO "$path" | $GREP " "`
32820      if test "x$has_space" != x; then
32821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32822$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32824      fi
32825
32826      # Use eval to expand a potential ~
32827      eval path="$path"
32828      if test ! -f "$path" && test ! -d "$path"; then
32829        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32830      fi
32831
32832      if test -d "$path"; then
32833        ipath="`cd "$path"; $THEPWDCMD -L`"
32834      else
32835        dir="`$DIRNAME "$path"`"
32836        base="`$BASENAME "$path"`"
32837        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32838      fi
32839    fi
32840  fi
32841
32842            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32843          fi
32844          IFS=";"
32845        fi
32846      done
32847      # Convert VS_LIB into SYSROOT_LDFLAGS
32848      for i in $VS_LIB; do
32849        libpath=$i
32850        # Only process non-empty elements
32851        if test "x$libpath" != x; then
32852          IFS="$OLDIFS"
32853          # Check that directory exists before calling fixup_path
32854          testpath=$libpath
32855
32856  windows_path="$testpath"
32857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32858    unix_path=`$CYGPATH -u "$windows_path"`
32859    testpath="$unix_path"
32860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32862    testpath="$unix_path"
32863  fi
32864
32865          if test -d "$testpath"; then
32866
32867  # Only process if variable expands to non-empty
32868
32869  if test "x$libpath" != x; then
32870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32871
32872  # Input might be given as Windows format, start by converting to
32873  # unix format.
32874  path="$libpath"
32875  new_path=`$CYGPATH -u "$path"`
32876
32877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32880  # "foo.exe" is OK but "foo" is an error.
32881  #
32882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32883  # It is also a way to make sure we got the proper file name for the real test later on.
32884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32885  if test "x$test_shortpath" = x; then
32886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32887$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32888    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32889  fi
32890
32891  # Call helper function which possibly converts this using DOS-style short mode.
32892  # If so, the updated path is stored in $new_path.
32893
32894  input_path="$new_path"
32895  # Check if we need to convert this using DOS-style short mode. If the path
32896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897  # take no chances and rewrite it.
32898  # Note: m4 eats our [], so we need to use [ and ] instead.
32899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32900  if test "x$has_forbidden_chars" != x; then
32901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32905      # Going to short mode and back again did indeed matter. Since short mode is
32906      # case insensitive, let's make it lowercase to improve readability.
32907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32908      # Now convert it back to Unix-style (cygpath)
32909      input_path=`$CYGPATH -u "$shortmode_path"`
32910      new_path="$input_path"
32911    fi
32912  fi
32913
32914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32915  if test "x$test_cygdrive_prefix" = x; then
32916    # As a simple fix, exclude /usr/bin since it's not a real path.
32917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32919      # a path prefixed by /cygdrive for fixpath to work.
32920      new_path="$CYGWIN_ROOT_PATH$input_path"
32921    fi
32922  fi
32923
32924
32925  if test "x$path" != "x$new_path"; then
32926    libpath="$new_path"
32927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32928$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32929  fi
32930
32931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32932
32933  path="$libpath"
32934  has_colon=`$ECHO $path | $GREP ^.:`
32935  new_path="$path"
32936  if test "x$has_colon" = x; then
32937    # Not in mixed or Windows style, start by that.
32938    new_path=`cmd //c echo $path`
32939  fi
32940
32941
32942  input_path="$new_path"
32943  # Check if we need to convert this using DOS-style short mode. If the path
32944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32945  # take no chances and rewrite it.
32946  # Note: m4 eats our [], so we need to use [ and ] instead.
32947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32948  if test "x$has_forbidden_chars" != x; then
32949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32951  fi
32952
32953
32954  windows_path="$new_path"
32955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32956    unix_path=`$CYGPATH -u "$windows_path"`
32957    new_path="$unix_path"
32958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32960    new_path="$unix_path"
32961  fi
32962
32963  if test "x$path" != "x$new_path"; then
32964    libpath="$new_path"
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32966$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32967  fi
32968
32969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32971
32972    else
32973      # We're on a unix platform. Hooray! :)
32974      path="$libpath"
32975      has_space=`$ECHO "$path" | $GREP " "`
32976      if test "x$has_space" != x; then
32977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32978$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32980      fi
32981
32982      # Use eval to expand a potential ~
32983      eval path="$path"
32984      if test ! -f "$path" && test ! -d "$path"; then
32985        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32986      fi
32987
32988      if test -d "$path"; then
32989        libpath="`cd "$path"; $THEPWDCMD -L`"
32990      else
32991        dir="`$DIRNAME "$path"`"
32992        base="`$BASENAME "$path"`"
32993        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32994      fi
32995    fi
32996  fi
32997
32998            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32999          fi
33000          IFS=";"
33001        fi
33002      done
33003      IFS="$OLDIFS"
33004    fi
33005  else
33006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33007$as_echo "not found" >&6; }
33008
33009    if test "x$VS_ENV_CMD" = x; then
33010      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33011$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33012      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33013$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33014    else
33015      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33016$as_echo "$as_me: Running the extraction script failed." >&6;}
33017    fi
33018    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33019$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33020    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33021$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33022    as_fn_error $? "Cannot continue" "$LINENO" 5
33023  fi
33024
33025    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33026    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33027    PATH="$VS_PATH"
33028    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33029    export INCLUDE="$VS_INCLUDE"
33030    export LIB="$VS_LIB"
33031  else
33032    if test "x$XCODE_VERSION_OUTPUT" != x; then
33033      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33034      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33035      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33036    else
33037      # Currently we do not define this for other toolchains. This might change as the need arise.
33038      TOOLCHAIN_VERSION=
33039    fi
33040  fi
33041
33042
33043  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33044  # override all other locations.
33045  if test "x$TOOLCHAIN_PATH" != x; then
33046    PATH=$TOOLCHAIN_PATH:$PATH
33047  fi
33048
33049
33050  #
33051  # Setup the compilers (CC and CXX)
33052  #
33053
33054  COMPILER_NAME=C
33055  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33056
33057  if test "x$CC" != x; then
33058    # User has supplied compiler name already, always let that override.
33059    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33060$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33061    if test "x`basename $CC`" = "x$CC"; then
33062      # A command without a complete path is provided, search $PATH.
33063
33064      for ac_prog in $CC
33065do
33066  # Extract the first word of "$ac_prog", so it can be a program name with args.
33067set dummy $ac_prog; ac_word=$2
33068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33069$as_echo_n "checking for $ac_word... " >&6; }
33070if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33071  $as_echo_n "(cached) " >&6
33072else
33073  case $POTENTIAL_CC in
33074  [\\/]* | ?:[\\/]*)
33075  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33076  ;;
33077  *)
33078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33079for as_dir in $PATH
33080do
33081  IFS=$as_save_IFS
33082  test -z "$as_dir" && as_dir=.
33083    for ac_exec_ext in '' $ac_executable_extensions; do
33084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33085    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33087    break 2
33088  fi
33089done
33090  done
33091IFS=$as_save_IFS
33092
33093  ;;
33094esac
33095fi
33096POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33097if test -n "$POTENTIAL_CC"; then
33098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33099$as_echo "$POTENTIAL_CC" >&6; }
33100else
33101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33102$as_echo "no" >&6; }
33103fi
33104
33105
33106  test -n "$POTENTIAL_CC" && break
33107done
33108
33109      if test "x$POTENTIAL_CC" != x; then
33110        CC=$POTENTIAL_CC
33111      else
33112        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33113      fi
33114    else
33115      # Otherwise it might already be a complete path
33116      if test ! -x "$CC"; then
33117        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33118      fi
33119    fi
33120  else
33121    # No user supplied value. Locate compiler ourselves.
33122
33123    # If we are cross compiling, assume cross compilation tools follows the
33124    # cross compilation standard where they are prefixed with the autoconf
33125    # standard name for the target. For example the binary
33126    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33127    # If we are not cross compiling, then the default compiler name will be
33128    # used.
33129
33130    CC=
33131    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33132    # before checking the rest of the PATH.
33133    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33134    # step, this should not be necessary.
33135    if test -n "$TOOLCHAIN_PATH"; then
33136      PATH_save="$PATH"
33137      PATH="$TOOLCHAIN_PATH"
33138      for ac_prog in $SEARCH_LIST
33139do
33140  # Extract the first word of "$ac_prog", so it can be a program name with args.
33141set dummy $ac_prog; ac_word=$2
33142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33143$as_echo_n "checking for $ac_word... " >&6; }
33144if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33145  $as_echo_n "(cached) " >&6
33146else
33147  case $TOOLCHAIN_PATH_CC in
33148  [\\/]* | ?:[\\/]*)
33149  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33150  ;;
33151  *)
33152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33153for as_dir in $PATH
33154do
33155  IFS=$as_save_IFS
33156  test -z "$as_dir" && as_dir=.
33157    for ac_exec_ext in '' $ac_executable_extensions; do
33158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33159    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33161    break 2
33162  fi
33163done
33164  done
33165IFS=$as_save_IFS
33166
33167  ;;
33168esac
33169fi
33170TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33171if test -n "$TOOLCHAIN_PATH_CC"; then
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33173$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33174else
33175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33176$as_echo "no" >&6; }
33177fi
33178
33179
33180  test -n "$TOOLCHAIN_PATH_CC" && break
33181done
33182
33183      CC=$TOOLCHAIN_PATH_CC
33184      PATH="$PATH_save"
33185    fi
33186
33187    # AC_PATH_PROGS can't be run multiple times with the same variable,
33188    # so create a new name for this run.
33189    if test "x$CC" = x; then
33190      for ac_prog in $SEARCH_LIST
33191do
33192  # Extract the first word of "$ac_prog", so it can be a program name with args.
33193set dummy $ac_prog; ac_word=$2
33194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33195$as_echo_n "checking for $ac_word... " >&6; }
33196if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33197  $as_echo_n "(cached) " >&6
33198else
33199  case $POTENTIAL_CC in
33200  [\\/]* | ?:[\\/]*)
33201  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33202  ;;
33203  *)
33204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33205for as_dir in $PATH
33206do
33207  IFS=$as_save_IFS
33208  test -z "$as_dir" && as_dir=.
33209    for ac_exec_ext in '' $ac_executable_extensions; do
33210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33211    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33213    break 2
33214  fi
33215done
33216  done
33217IFS=$as_save_IFS
33218
33219  ;;
33220esac
33221fi
33222POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33223if test -n "$POTENTIAL_CC"; then
33224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33225$as_echo "$POTENTIAL_CC" >&6; }
33226else
33227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33228$as_echo "no" >&6; }
33229fi
33230
33231
33232  test -n "$POTENTIAL_CC" && break
33233done
33234
33235      CC=$POTENTIAL_CC
33236    fi
33237
33238    if test "x$CC" = x; then
33239
33240  # Print a helpful message on how to acquire the necessary build dependency.
33241  # devkit is the help tag: freetype, cups, alsa etc
33242  MISSING_DEPENDENCY=devkit
33243
33244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33245    cygwin_help $MISSING_DEPENDENCY
33246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33247    msys_help $MISSING_DEPENDENCY
33248  else
33249    PKGHANDLER_COMMAND=
33250
33251    case $PKGHANDLER in
33252      apt-get)
33253        apt_help     $MISSING_DEPENDENCY ;;
33254      yum)
33255        yum_help     $MISSING_DEPENDENCY ;;
33256      port)
33257        port_help    $MISSING_DEPENDENCY ;;
33258      pkgutil)
33259        pkgutil_help $MISSING_DEPENDENCY ;;
33260      pkgadd)
33261        pkgadd_help  $MISSING_DEPENDENCY ;;
33262    esac
33263
33264    if test "x$PKGHANDLER_COMMAND" != x; then
33265      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33266    fi
33267  fi
33268
33269      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33270    fi
33271  fi
33272
33273  # Now we have a compiler binary in CC. Make sure it's okay.
33274
33275  # Only process if variable expands to non-empty
33276
33277  if test "x$CC" != x; then
33278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279
33280  # First separate the path from the arguments. This will split at the first
33281  # space.
33282  complete="$CC"
33283  path="${complete%% *}"
33284  tmp="$complete EOL"
33285  arguments="${tmp#* }"
33286
33287  # Input might be given as Windows format, start by converting to
33288  # unix format.
33289  new_path=`$CYGPATH -u "$path"`
33290
33291  # Now try to locate executable using which
33292  new_path=`$WHICH "$new_path" 2> /dev/null`
33293  # bat and cmd files are not always considered executable in cygwin causing which
33294  # to not find them
33295  if test "x$new_path" = x \
33296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33298    new_path=`$CYGPATH -u "$path"`
33299  fi
33300  if test "x$new_path" = x; then
33301    # Oops. Which didn't find the executable.
33302    # The splitting of arguments from the executable at a space might have been incorrect,
33303    # since paths with space are more likely in Windows. Give it another try with the whole
33304    # argument.
33305    path="$complete"
33306    arguments="EOL"
33307    new_path=`$CYGPATH -u "$path"`
33308    new_path=`$WHICH "$new_path" 2> /dev/null`
33309    # bat and cmd files are not always considered executable in cygwin causing which
33310    # to not find them
33311    if test "x$new_path" = x \
33312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33314      new_path=`$CYGPATH -u "$path"`
33315    fi
33316    if test "x$new_path" = x; then
33317      # It's still not found. Now this is an unrecoverable error.
33318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33319$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33320      has_space=`$ECHO "$complete" | $GREP " "`
33321      if test "x$has_space" != x; then
33322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33324      fi
33325      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33326    fi
33327  fi
33328
33329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33332  # "foo.exe" is OK but "foo" is an error.
33333  #
33334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33335  # It is also a way to make sure we got the proper file name for the real test later on.
33336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33337  if test "x$test_shortpath" = x; then
33338    # Short path failed, file does not exist as specified.
33339    # Try adding .exe or .cmd
33340    if test -f "${new_path}.exe"; then
33341      input_to_shortpath="${new_path}.exe"
33342    elif test -f "${new_path}.cmd"; then
33343      input_to_shortpath="${new_path}.cmd"
33344    else
33345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33346$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33349      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33350    fi
33351  else
33352    input_to_shortpath="$new_path"
33353  fi
33354
33355  # Call helper function which possibly converts this using DOS-style short mode.
33356  # If so, the updated path is stored in $new_path.
33357  new_path="$input_to_shortpath"
33358
33359  input_path="$input_to_shortpath"
33360  # Check if we need to convert this using DOS-style short mode. If the path
33361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33362  # take no chances and rewrite it.
33363  # Note: m4 eats our [], so we need to use [ and ] instead.
33364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33365  if test "x$has_forbidden_chars" != x; then
33366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33370      # Going to short mode and back again did indeed matter. Since short mode is
33371      # case insensitive, let's make it lowercase to improve readability.
33372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33373      # Now convert it back to Unix-style (cygpath)
33374      input_path=`$CYGPATH -u "$shortmode_path"`
33375      new_path="$input_path"
33376    fi
33377  fi
33378
33379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33380  if test "x$test_cygdrive_prefix" = x; then
33381    # As a simple fix, exclude /usr/bin since it's not a real path.
33382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33384      # a path prefixed by /cygdrive for fixpath to work.
33385      new_path="$CYGWIN_ROOT_PATH$input_path"
33386    fi
33387  fi
33388
33389  # remove trailing .exe if any
33390  new_path="${new_path/%.exe/}"
33391
33392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33393
33394  # First separate the path from the arguments. This will split at the first
33395  # space.
33396  complete="$CC"
33397  path="${complete%% *}"
33398  tmp="$complete EOL"
33399  arguments="${tmp#* }"
33400
33401  # Input might be given as Windows format, start by converting to
33402  # unix format.
33403  new_path="$path"
33404
33405  windows_path="$new_path"
33406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33407    unix_path=`$CYGPATH -u "$windows_path"`
33408    new_path="$unix_path"
33409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33411    new_path="$unix_path"
33412  fi
33413
33414
33415  # Now try to locate executable using which
33416  new_path=`$WHICH "$new_path" 2> /dev/null`
33417
33418  if test "x$new_path" = x; then
33419    # Oops. Which didn't find the executable.
33420    # The splitting of arguments from the executable at a space might have been incorrect,
33421    # since paths with space are more likely in Windows. Give it another try with the whole
33422    # argument.
33423    path="$complete"
33424    arguments="EOL"
33425    new_path="$path"
33426
33427  windows_path="$new_path"
33428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33429    unix_path=`$CYGPATH -u "$windows_path"`
33430    new_path="$unix_path"
33431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33433    new_path="$unix_path"
33434  fi
33435
33436
33437    new_path=`$WHICH "$new_path" 2> /dev/null`
33438    # bat and cmd files are not always considered executable in MSYS causing which
33439    # to not find them
33440    if test "x$new_path" = x \
33441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33443      new_path="$path"
33444
33445  windows_path="$new_path"
33446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447    unix_path=`$CYGPATH -u "$windows_path"`
33448    new_path="$unix_path"
33449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33451    new_path="$unix_path"
33452  fi
33453
33454    fi
33455
33456    if test "x$new_path" = x; then
33457      # It's still not found. Now this is an unrecoverable error.
33458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33459$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33460      has_space=`$ECHO "$complete" | $GREP " "`
33461      if test "x$has_space" != x; then
33462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33464      fi
33465      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33466    fi
33467  fi
33468
33469  # Now new_path has a complete unix path to the binary
33470  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33471    # Keep paths in /bin as-is, but remove trailing .exe if any
33472    new_path="${new_path/%.exe/}"
33473    # Do not save /bin paths to all_fixpath_prefixes!
33474  else
33475    # Not in mixed or Windows style, start by that.
33476    new_path=`cmd //c echo $new_path`
33477
33478  input_path="$new_path"
33479  # Check if we need to convert this using DOS-style short mode. If the path
33480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33481  # take no chances and rewrite it.
33482  # Note: m4 eats our [], so we need to use [ and ] instead.
33483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33484  if test "x$has_forbidden_chars" != x; then
33485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33487  fi
33488
33489    # Output is in $new_path
33490
33491  windows_path="$new_path"
33492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33493    unix_path=`$CYGPATH -u "$windows_path"`
33494    new_path="$unix_path"
33495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33497    new_path="$unix_path"
33498  fi
33499
33500    # remove trailing .exe if any
33501    new_path="${new_path/%.exe/}"
33502
33503    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33504    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33505  fi
33506
33507    else
33508      # We're on a unix platform. Hooray! :)
33509      # First separate the path from the arguments. This will split at the first
33510      # space.
33511      complete="$CC"
33512      path="${complete%% *}"
33513      tmp="$complete EOL"
33514      arguments="${tmp#* }"
33515
33516      # Cannot rely on the command "which" here since it doesn't always work.
33517      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33518      if test -z "$is_absolute_path"; then
33519        # Path to executable is not absolute. Find it.
33520        IFS_save="$IFS"
33521        IFS=:
33522        for p in $PATH; do
33523          if test -f "$p/$path" && test -x "$p/$path"; then
33524            new_path="$p/$path"
33525            break
33526          fi
33527        done
33528        IFS="$IFS_save"
33529      else
33530        # This is an absolute path, we can use it without further modifications.
33531        new_path="$path"
33532      fi
33533
33534      if test "x$new_path" = x; then
33535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33536$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33537        has_space=`$ECHO "$complete" | $GREP " "`
33538        if test "x$has_space" != x; then
33539          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33540$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33541        fi
33542        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33543      fi
33544    fi
33545
33546    # Now join together the path and the arguments once again
33547    if test "x$arguments" != xEOL; then
33548      new_complete="$new_path ${arguments% *}"
33549    else
33550      new_complete="$new_path"
33551    fi
33552
33553    if test "x$complete" != "x$new_complete"; then
33554      CC="$new_complete"
33555      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33556$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33557    fi
33558  fi
33559
33560  TEST_COMPILER="$CC"
33561
33562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33563$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33564  SYMLINK_ORIGINAL="$TEST_COMPILER"
33565
33566  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33567    # Follow a chain of symbolic links. Use readlink
33568    # where it exists, else fall back to horribly
33569    # complicated shell code.
33570    if test "x$READLINK_TESTED" != yes; then
33571      # On MacOSX there is a readlink tool with a different
33572      # purpose than the GNU readlink tool. Check the found readlink.
33573      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33574      if test "x$ISGNU" = x; then
33575        # A readlink that we do not know how to use.
33576        # Are there other non-GNU readlinks out there?
33577        READLINK_TESTED=yes
33578        READLINK=
33579      fi
33580    fi
33581
33582    if test "x$READLINK" != x; then
33583      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33584    else
33585      # Save the current directory for restoring afterwards
33586      STARTDIR=$PWD
33587      COUNTER=0
33588      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33589      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33590      cd $sym_link_dir
33591      # Use -P flag to resolve symlinks in directories.
33592      cd `$THEPWDCMD -P`
33593      sym_link_dir=`$THEPWDCMD -P`
33594      # Resolve file symlinks
33595      while test $COUNTER -lt 20; do
33596        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33597        if test "x$ISLINK" == x; then
33598          # This is not a symbolic link! We are done!
33599          break
33600        fi
33601        # Again resolve directory symlinks since the target of the just found
33602        # link could be in a different directory
33603        cd `$DIRNAME $ISLINK`
33604        sym_link_dir=`$THEPWDCMD -P`
33605        sym_link_file=`$BASENAME $ISLINK`
33606        let COUNTER=COUNTER+1
33607      done
33608      cd $STARTDIR
33609      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33610    fi
33611  fi
33612
33613  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33615$as_echo "no symlink" >&6; }
33616  else
33617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33618$as_echo "$SYMLINK_ORIGINAL" >&6; }
33619
33620    # We can't handle ccache by gcc wrappers, since we need to know if we're
33621    # using ccache. Instead ccache usage must be controlled by a configure option.
33622    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33623    if test "x$COMPILER_BASENAME" = "xccache"; then
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33625$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33626      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33627    fi
33628  fi
33629
33630
33631  COMPILER=$CC
33632  COMPILER_NAME=$COMPILER_NAME
33633
33634  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33635    # cc -V output typically looks like
33636    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33637    # or
33638    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33639    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33640    # Check that this is likely to be the Solaris Studio cc.
33641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33642    if test $? -ne 0; then
33643      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644      { $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
33645$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33646      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33647$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33649$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33650      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651    fi
33652    # Remove usage instructions (if present), and
33653    # collapse compiler output into a single line
33654    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655        $SED -e 's/ *[Uu]sage:.*//'`
33656    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33657        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33658  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33659    # xlc -qversion output typically looks like
33660    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33661    #     Version: 11.01.0000.0015
33662    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33663    # Check that this is likely to be the IBM XL C compiler.
33664    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33665    if test $? -ne 0; then
33666      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33667      { $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
33668$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33669      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33670$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33671      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33672$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33673      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33674    fi
33675    # Collapse compiler output into a single line
33676    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33677    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33678        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33679  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33680    # There is no specific version flag, but all output starts with a version string.
33681    # First line typically looks something like:
33682    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33683    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33684    # Check that this is likely to be Microsoft CL.EXE.
33685    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33686    if test $? -ne 0; then
33687      { $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
33688$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33689      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33690$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33691      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33692    fi
33693    # Collapse compiler output into a single line
33694    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33695    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33696        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33697  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33698    # gcc --version output typically looks like
33699    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33700    #     Copyright (C) 2013 Free Software Foundation, Inc.
33701    #     This is free software; see the source for copying conditions.  There is NO
33702    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33703    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33704    # Check that this is likely to be GCC.
33705    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33706    if test $? -ne 0; then
33707      { $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
33708$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33709      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33710$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33711      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33712    fi
33713    # Remove Copyright and legalese from version string, and
33714    # collapse into a single line
33715    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33716        $SED -e 's/ *Copyright .*//'`
33717    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33718        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33719  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33720    # clang --version output typically looks like
33721    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33722    #    clang version 3.3 (tags/RELEASE_33/final)
33723    # or
33724    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33725    #    Target: x86_64-pc-linux-gnu
33726    #    Thread model: posix
33727    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33728    # Check that this is likely to be clang
33729    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33730    if test $? -ne 0; then
33731      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33732$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33733      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33734$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33735      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33736    fi
33737    # Collapse compiler output into a single line
33738    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33739    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33740        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33741  else
33742      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33743  fi
33744  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33745  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33746  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33747  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33748
33749  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33750$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33751
33752
33753  # Now that we have resolved CC ourself, let autoconf have its go at it
33754  ac_ext=c
33755ac_cpp='$CPP $CPPFLAGS'
33756ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33757ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33758ac_compiler_gnu=$ac_cv_c_compiler_gnu
33759if test -n "$ac_tool_prefix"; then
33760  for ac_prog in $CC
33761  do
33762    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33763set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33765$as_echo_n "checking for $ac_word... " >&6; }
33766if ${ac_cv_prog_CC+:} false; then :
33767  $as_echo_n "(cached) " >&6
33768else
33769  if test -n "$CC"; then
33770  ac_cv_prog_CC="$CC" # Let the user override the test.
33771else
33772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33773for as_dir in $PATH
33774do
33775  IFS=$as_save_IFS
33776  test -z "$as_dir" && as_dir=.
33777    for ac_exec_ext in '' $ac_executable_extensions; do
33778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33779    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33781    break 2
33782  fi
33783done
33784  done
33785IFS=$as_save_IFS
33786
33787fi
33788fi
33789CC=$ac_cv_prog_CC
33790if test -n "$CC"; then
33791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33792$as_echo "$CC" >&6; }
33793else
33794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33795$as_echo "no" >&6; }
33796fi
33797
33798
33799    test -n "$CC" && break
33800  done
33801fi
33802if test -z "$CC"; then
33803  ac_ct_CC=$CC
33804  for ac_prog in $CC
33805do
33806  # Extract the first word of "$ac_prog", so it can be a program name with args.
33807set dummy $ac_prog; ac_word=$2
33808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33809$as_echo_n "checking for $ac_word... " >&6; }
33810if ${ac_cv_prog_ac_ct_CC+:} false; then :
33811  $as_echo_n "(cached) " >&6
33812else
33813  if test -n "$ac_ct_CC"; then
33814  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33815else
33816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33817for as_dir in $PATH
33818do
33819  IFS=$as_save_IFS
33820  test -z "$as_dir" && as_dir=.
33821    for ac_exec_ext in '' $ac_executable_extensions; do
33822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33823    ac_cv_prog_ac_ct_CC="$ac_prog"
33824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33825    break 2
33826  fi
33827done
33828  done
33829IFS=$as_save_IFS
33830
33831fi
33832fi
33833ac_ct_CC=$ac_cv_prog_ac_ct_CC
33834if test -n "$ac_ct_CC"; then
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33836$as_echo "$ac_ct_CC" >&6; }
33837else
33838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33839$as_echo "no" >&6; }
33840fi
33841
33842
33843  test -n "$ac_ct_CC" && break
33844done
33845
33846  if test "x$ac_ct_CC" = x; then
33847    CC=""
33848  else
33849    case $cross_compiling:$ac_tool_warned in
33850yes:)
33851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33853ac_tool_warned=yes ;;
33854esac
33855    CC=$ac_ct_CC
33856  fi
33857fi
33858
33859
33860test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33862as_fn_error $? "no acceptable C compiler found in \$PATH
33863See \`config.log' for more details" "$LINENO" 5; }
33864
33865# Provide some information about the compiler.
33866$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33867set X $ac_compile
33868ac_compiler=$2
33869for ac_option in --version -v -V -qversion; do
33870  { { ac_try="$ac_compiler $ac_option >&5"
33871case "(($ac_try" in
33872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33873  *) ac_try_echo=$ac_try;;
33874esac
33875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33876$as_echo "$ac_try_echo"; } >&5
33877  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33878  ac_status=$?
33879  if test -s conftest.err; then
33880    sed '10a\
33881... rest of stderr output deleted ...
33882         10q' conftest.err >conftest.er1
33883    cat conftest.er1 >&5
33884  fi
33885  rm -f conftest.er1 conftest.err
33886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33887  test $ac_status = 0; }
33888done
33889
33890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33891/* end confdefs.h.  */
33892
33893int
33894main ()
33895{
33896
33897  ;
33898  return 0;
33899}
33900_ACEOF
33901ac_clean_files_save=$ac_clean_files
33902ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33903# Try to create an executable without -o first, disregard a.out.
33904# It will help us diagnose broken compilers, and finding out an intuition
33905# of exeext.
33906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33907$as_echo_n "checking whether the C compiler works... " >&6; }
33908ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33909
33910# The possible output files:
33911ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33912
33913ac_rmfiles=
33914for ac_file in $ac_files
33915do
33916  case $ac_file in
33917    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33918    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33919  esac
33920done
33921rm -f $ac_rmfiles
33922
33923if { { ac_try="$ac_link_default"
33924case "(($ac_try" in
33925  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33926  *) ac_try_echo=$ac_try;;
33927esac
33928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33929$as_echo "$ac_try_echo"; } >&5
33930  (eval "$ac_link_default") 2>&5
33931  ac_status=$?
33932  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33933  test $ac_status = 0; }; then :
33934  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33935# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33936# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33937# so that the user can short-circuit this test for compilers unknown to
33938# Autoconf.
33939for ac_file in $ac_files ''
33940do
33941  test -f "$ac_file" || continue
33942  case $ac_file in
33943    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33944	;;
33945    [ab].out )
33946	# We found the default executable, but exeext='' is most
33947	# certainly right.
33948	break;;
33949    *.* )
33950	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33951	then :; else
33952	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33953	fi
33954	# We set ac_cv_exeext here because the later test for it is not
33955	# safe: cross compilers may not add the suffix if given an `-o'
33956	# argument, so we may need to know it at that point already.
33957	# Even if this section looks crufty: it has the advantage of
33958	# actually working.
33959	break;;
33960    * )
33961	break;;
33962  esac
33963done
33964test "$ac_cv_exeext" = no && ac_cv_exeext=
33965
33966else
33967  ac_file=''
33968fi
33969if test -z "$ac_file"; then :
33970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33971$as_echo "no" >&6; }
33972$as_echo "$as_me: failed program was:" >&5
33973sed 's/^/| /' conftest.$ac_ext >&5
33974
33975{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33977as_fn_error 77 "C compiler cannot create executables
33978See \`config.log' for more details" "$LINENO" 5; }
33979else
33980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33981$as_echo "yes" >&6; }
33982fi
33983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33984$as_echo_n "checking for C compiler default output file name... " >&6; }
33985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33986$as_echo "$ac_file" >&6; }
33987ac_exeext=$ac_cv_exeext
33988
33989rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33990ac_clean_files=$ac_clean_files_save
33991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33992$as_echo_n "checking for suffix of executables... " >&6; }
33993if { { ac_try="$ac_link"
33994case "(($ac_try" in
33995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33996  *) ac_try_echo=$ac_try;;
33997esac
33998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33999$as_echo "$ac_try_echo"; } >&5
34000  (eval "$ac_link") 2>&5
34001  ac_status=$?
34002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34003  test $ac_status = 0; }; then :
34004  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34005# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34006# work properly (i.e., refer to `conftest.exe'), while it won't with
34007# `rm'.
34008for ac_file in conftest.exe conftest conftest.*; do
34009  test -f "$ac_file" || continue
34010  case $ac_file in
34011    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34012    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34013	  break;;
34014    * ) break;;
34015  esac
34016done
34017else
34018  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34020as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34021See \`config.log' for more details" "$LINENO" 5; }
34022fi
34023rm -f conftest conftest$ac_cv_exeext
34024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34025$as_echo "$ac_cv_exeext" >&6; }
34026
34027rm -f conftest.$ac_ext
34028EXEEXT=$ac_cv_exeext
34029ac_exeext=$EXEEXT
34030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34031/* end confdefs.h.  */
34032#include <stdio.h>
34033int
34034main ()
34035{
34036FILE *f = fopen ("conftest.out", "w");
34037 return ferror (f) || fclose (f) != 0;
34038
34039  ;
34040  return 0;
34041}
34042_ACEOF
34043ac_clean_files="$ac_clean_files conftest.out"
34044# Check that the compiler produces executables we can run.  If not, either
34045# the compiler is broken, or we cross compile.
34046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34047$as_echo_n "checking whether we are cross compiling... " >&6; }
34048if test "$cross_compiling" != yes; then
34049  { { ac_try="$ac_link"
34050case "(($ac_try" in
34051  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34052  *) ac_try_echo=$ac_try;;
34053esac
34054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34055$as_echo "$ac_try_echo"; } >&5
34056  (eval "$ac_link") 2>&5
34057  ac_status=$?
34058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34059  test $ac_status = 0; }
34060  if { ac_try='./conftest$ac_cv_exeext'
34061  { { case "(($ac_try" in
34062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34063  *) ac_try_echo=$ac_try;;
34064esac
34065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34066$as_echo "$ac_try_echo"; } >&5
34067  (eval "$ac_try") 2>&5
34068  ac_status=$?
34069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34070  test $ac_status = 0; }; }; then
34071    cross_compiling=no
34072  else
34073    if test "$cross_compiling" = maybe; then
34074	cross_compiling=yes
34075    else
34076	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34078as_fn_error $? "cannot run C compiled programs.
34079If you meant to cross compile, use \`--host'.
34080See \`config.log' for more details" "$LINENO" 5; }
34081    fi
34082  fi
34083fi
34084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34085$as_echo "$cross_compiling" >&6; }
34086
34087rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34088ac_clean_files=$ac_clean_files_save
34089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34090$as_echo_n "checking for suffix of object files... " >&6; }
34091if ${ac_cv_objext+:} false; then :
34092  $as_echo_n "(cached) " >&6
34093else
34094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34095/* end confdefs.h.  */
34096
34097int
34098main ()
34099{
34100
34101  ;
34102  return 0;
34103}
34104_ACEOF
34105rm -f conftest.o conftest.obj
34106if { { ac_try="$ac_compile"
34107case "(($ac_try" in
34108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34109  *) ac_try_echo=$ac_try;;
34110esac
34111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34112$as_echo "$ac_try_echo"; } >&5
34113  (eval "$ac_compile") 2>&5
34114  ac_status=$?
34115  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34116  test $ac_status = 0; }; then :
34117  for ac_file in conftest.o conftest.obj conftest.*; do
34118  test -f "$ac_file" || continue;
34119  case $ac_file in
34120    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34121    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34122       break;;
34123  esac
34124done
34125else
34126  $as_echo "$as_me: failed program was:" >&5
34127sed 's/^/| /' conftest.$ac_ext >&5
34128
34129{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34131as_fn_error $? "cannot compute suffix of object files: cannot compile
34132See \`config.log' for more details" "$LINENO" 5; }
34133fi
34134rm -f conftest.$ac_cv_objext conftest.$ac_ext
34135fi
34136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34137$as_echo "$ac_cv_objext" >&6; }
34138OBJEXT=$ac_cv_objext
34139ac_objext=$OBJEXT
34140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34141$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34142if ${ac_cv_c_compiler_gnu+:} false; then :
34143  $as_echo_n "(cached) " >&6
34144else
34145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34146/* end confdefs.h.  */
34147
34148int
34149main ()
34150{
34151#ifndef __GNUC__
34152       choke me
34153#endif
34154
34155  ;
34156  return 0;
34157}
34158_ACEOF
34159if ac_fn_c_try_compile "$LINENO"; then :
34160  ac_compiler_gnu=yes
34161else
34162  ac_compiler_gnu=no
34163fi
34164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34165ac_cv_c_compiler_gnu=$ac_compiler_gnu
34166
34167fi
34168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34169$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34170if test $ac_compiler_gnu = yes; then
34171  GCC=yes
34172else
34173  GCC=
34174fi
34175ac_test_CFLAGS=${CFLAGS+set}
34176ac_save_CFLAGS=$CFLAGS
34177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34178$as_echo_n "checking whether $CC accepts -g... " >&6; }
34179if ${ac_cv_prog_cc_g+:} false; then :
34180  $as_echo_n "(cached) " >&6
34181else
34182  ac_save_c_werror_flag=$ac_c_werror_flag
34183   ac_c_werror_flag=yes
34184   ac_cv_prog_cc_g=no
34185   CFLAGS="-g"
34186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34187/* end confdefs.h.  */
34188
34189int
34190main ()
34191{
34192
34193  ;
34194  return 0;
34195}
34196_ACEOF
34197if ac_fn_c_try_compile "$LINENO"; then :
34198  ac_cv_prog_cc_g=yes
34199else
34200  CFLAGS=""
34201      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202/* end confdefs.h.  */
34203
34204int
34205main ()
34206{
34207
34208  ;
34209  return 0;
34210}
34211_ACEOF
34212if ac_fn_c_try_compile "$LINENO"; then :
34213
34214else
34215  ac_c_werror_flag=$ac_save_c_werror_flag
34216	 CFLAGS="-g"
34217	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34218/* end confdefs.h.  */
34219
34220int
34221main ()
34222{
34223
34224  ;
34225  return 0;
34226}
34227_ACEOF
34228if ac_fn_c_try_compile "$LINENO"; then :
34229  ac_cv_prog_cc_g=yes
34230fi
34231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34232fi
34233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34234fi
34235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34236   ac_c_werror_flag=$ac_save_c_werror_flag
34237fi
34238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34239$as_echo "$ac_cv_prog_cc_g" >&6; }
34240if test "$ac_test_CFLAGS" = set; then
34241  CFLAGS=$ac_save_CFLAGS
34242elif test $ac_cv_prog_cc_g = yes; then
34243  if test "$GCC" = yes; then
34244    CFLAGS="-g -O2"
34245  else
34246    CFLAGS="-g"
34247  fi
34248else
34249  if test "$GCC" = yes; then
34250    CFLAGS="-O2"
34251  else
34252    CFLAGS=
34253  fi
34254fi
34255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34256$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34257if ${ac_cv_prog_cc_c89+:} false; then :
34258  $as_echo_n "(cached) " >&6
34259else
34260  ac_cv_prog_cc_c89=no
34261ac_save_CC=$CC
34262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34263/* end confdefs.h.  */
34264#include <stdarg.h>
34265#include <stdio.h>
34266struct stat;
34267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34268struct buf { int x; };
34269FILE * (*rcsopen) (struct buf *, struct stat *, int);
34270static char *e (p, i)
34271     char **p;
34272     int i;
34273{
34274  return p[i];
34275}
34276static char *f (char * (*g) (char **, int), char **p, ...)
34277{
34278  char *s;
34279  va_list v;
34280  va_start (v,p);
34281  s = g (p, va_arg (v,int));
34282  va_end (v);
34283  return s;
34284}
34285
34286/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34287   function prototypes and stuff, but not '\xHH' hex character constants.
34288   These don't provoke an error unfortunately, instead are silently treated
34289   as 'x'.  The following induces an error, until -std is added to get
34290   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34291   array size at least.  It's necessary to write '\x00'==0 to get something
34292   that's true only with -std.  */
34293int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34294
34295/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34296   inside strings and character constants.  */
34297#define FOO(x) 'x'
34298int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34299
34300int test (int i, double x);
34301struct s1 {int (*f) (int a);};
34302struct s2 {int (*f) (double a);};
34303int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34304int argc;
34305char **argv;
34306int
34307main ()
34308{
34309return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34310  ;
34311  return 0;
34312}
34313_ACEOF
34314for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34315	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34316do
34317  CC="$ac_save_CC $ac_arg"
34318  if ac_fn_c_try_compile "$LINENO"; then :
34319  ac_cv_prog_cc_c89=$ac_arg
34320fi
34321rm -f core conftest.err conftest.$ac_objext
34322  test "x$ac_cv_prog_cc_c89" != "xno" && break
34323done
34324rm -f conftest.$ac_ext
34325CC=$ac_save_CC
34326
34327fi
34328# AC_CACHE_VAL
34329case "x$ac_cv_prog_cc_c89" in
34330  x)
34331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34332$as_echo "none needed" >&6; } ;;
34333  xno)
34334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34335$as_echo "unsupported" >&6; } ;;
34336  *)
34337    CC="$CC $ac_cv_prog_cc_c89"
34338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34339$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34340esac
34341if test "x$ac_cv_prog_cc_c89" != xno; then :
34342
34343fi
34344
34345ac_ext=cpp
34346ac_cpp='$CXXCPP $CPPFLAGS'
34347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34350
34351
34352
34353  COMPILER_NAME=C++
34354  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34355
34356  if test "x$CXX" != x; then
34357    # User has supplied compiler name already, always let that override.
34358    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34359$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34360    if test "x`basename $CXX`" = "x$CXX"; then
34361      # A command without a complete path is provided, search $PATH.
34362
34363      for ac_prog in $CXX
34364do
34365  # Extract the first word of "$ac_prog", so it can be a program name with args.
34366set dummy $ac_prog; ac_word=$2
34367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34368$as_echo_n "checking for $ac_word... " >&6; }
34369if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34370  $as_echo_n "(cached) " >&6
34371else
34372  case $POTENTIAL_CXX in
34373  [\\/]* | ?:[\\/]*)
34374  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34375  ;;
34376  *)
34377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34378for as_dir in $PATH
34379do
34380  IFS=$as_save_IFS
34381  test -z "$as_dir" && as_dir=.
34382    for ac_exec_ext in '' $ac_executable_extensions; do
34383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34384    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34386    break 2
34387  fi
34388done
34389  done
34390IFS=$as_save_IFS
34391
34392  ;;
34393esac
34394fi
34395POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34396if test -n "$POTENTIAL_CXX"; then
34397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34398$as_echo "$POTENTIAL_CXX" >&6; }
34399else
34400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34401$as_echo "no" >&6; }
34402fi
34403
34404
34405  test -n "$POTENTIAL_CXX" && break
34406done
34407
34408      if test "x$POTENTIAL_CXX" != x; then
34409        CXX=$POTENTIAL_CXX
34410      else
34411        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34412      fi
34413    else
34414      # Otherwise it might already be a complete path
34415      if test ! -x "$CXX"; then
34416        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34417      fi
34418    fi
34419  else
34420    # No user supplied value. Locate compiler ourselves.
34421
34422    # If we are cross compiling, assume cross compilation tools follows the
34423    # cross compilation standard where they are prefixed with the autoconf
34424    # standard name for the target. For example the binary
34425    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34426    # If we are not cross compiling, then the default compiler name will be
34427    # used.
34428
34429    CXX=
34430    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34431    # before checking the rest of the PATH.
34432    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34433    # step, this should not be necessary.
34434    if test -n "$TOOLCHAIN_PATH"; then
34435      PATH_save="$PATH"
34436      PATH="$TOOLCHAIN_PATH"
34437      for ac_prog in $SEARCH_LIST
34438do
34439  # Extract the first word of "$ac_prog", so it can be a program name with args.
34440set dummy $ac_prog; ac_word=$2
34441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34442$as_echo_n "checking for $ac_word... " >&6; }
34443if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34444  $as_echo_n "(cached) " >&6
34445else
34446  case $TOOLCHAIN_PATH_CXX in
34447  [\\/]* | ?:[\\/]*)
34448  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34449  ;;
34450  *)
34451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34452for as_dir in $PATH
34453do
34454  IFS=$as_save_IFS
34455  test -z "$as_dir" && as_dir=.
34456    for ac_exec_ext in '' $ac_executable_extensions; do
34457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34458    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34460    break 2
34461  fi
34462done
34463  done
34464IFS=$as_save_IFS
34465
34466  ;;
34467esac
34468fi
34469TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34470if test -n "$TOOLCHAIN_PATH_CXX"; then
34471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34472$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34473else
34474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34475$as_echo "no" >&6; }
34476fi
34477
34478
34479  test -n "$TOOLCHAIN_PATH_CXX" && break
34480done
34481
34482      CXX=$TOOLCHAIN_PATH_CXX
34483      PATH="$PATH_save"
34484    fi
34485
34486    # AC_PATH_PROGS can't be run multiple times with the same variable,
34487    # so create a new name for this run.
34488    if test "x$CXX" = x; then
34489      for ac_prog in $SEARCH_LIST
34490do
34491  # Extract the first word of "$ac_prog", so it can be a program name with args.
34492set dummy $ac_prog; ac_word=$2
34493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34494$as_echo_n "checking for $ac_word... " >&6; }
34495if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34496  $as_echo_n "(cached) " >&6
34497else
34498  case $POTENTIAL_CXX in
34499  [\\/]* | ?:[\\/]*)
34500  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34501  ;;
34502  *)
34503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34504for as_dir in $PATH
34505do
34506  IFS=$as_save_IFS
34507  test -z "$as_dir" && as_dir=.
34508    for ac_exec_ext in '' $ac_executable_extensions; do
34509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34510    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34512    break 2
34513  fi
34514done
34515  done
34516IFS=$as_save_IFS
34517
34518  ;;
34519esac
34520fi
34521POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34522if test -n "$POTENTIAL_CXX"; then
34523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34524$as_echo "$POTENTIAL_CXX" >&6; }
34525else
34526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34527$as_echo "no" >&6; }
34528fi
34529
34530
34531  test -n "$POTENTIAL_CXX" && break
34532done
34533
34534      CXX=$POTENTIAL_CXX
34535    fi
34536
34537    if test "x$CXX" = x; then
34538
34539  # Print a helpful message on how to acquire the necessary build dependency.
34540  # devkit is the help tag: freetype, cups, alsa etc
34541  MISSING_DEPENDENCY=devkit
34542
34543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34544    cygwin_help $MISSING_DEPENDENCY
34545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34546    msys_help $MISSING_DEPENDENCY
34547  else
34548    PKGHANDLER_COMMAND=
34549
34550    case $PKGHANDLER in
34551      apt-get)
34552        apt_help     $MISSING_DEPENDENCY ;;
34553      yum)
34554        yum_help     $MISSING_DEPENDENCY ;;
34555      port)
34556        port_help    $MISSING_DEPENDENCY ;;
34557      pkgutil)
34558        pkgutil_help $MISSING_DEPENDENCY ;;
34559      pkgadd)
34560        pkgadd_help  $MISSING_DEPENDENCY ;;
34561    esac
34562
34563    if test "x$PKGHANDLER_COMMAND" != x; then
34564      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34565    fi
34566  fi
34567
34568      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34569    fi
34570  fi
34571
34572  # Now we have a compiler binary in CXX. Make sure it's okay.
34573
34574  # Only process if variable expands to non-empty
34575
34576  if test "x$CXX" != x; then
34577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34578
34579  # First separate the path from the arguments. This will split at the first
34580  # space.
34581  complete="$CXX"
34582  path="${complete%% *}"
34583  tmp="$complete EOL"
34584  arguments="${tmp#* }"
34585
34586  # Input might be given as Windows format, start by converting to
34587  # unix format.
34588  new_path=`$CYGPATH -u "$path"`
34589
34590  # Now try to locate executable using which
34591  new_path=`$WHICH "$new_path" 2> /dev/null`
34592  # bat and cmd files are not always considered executable in cygwin causing which
34593  # to not find them
34594  if test "x$new_path" = x \
34595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34597    new_path=`$CYGPATH -u "$path"`
34598  fi
34599  if test "x$new_path" = x; then
34600    # Oops. Which didn't find the executable.
34601    # The splitting of arguments from the executable at a space might have been incorrect,
34602    # since paths with space are more likely in Windows. Give it another try with the whole
34603    # argument.
34604    path="$complete"
34605    arguments="EOL"
34606    new_path=`$CYGPATH -u "$path"`
34607    new_path=`$WHICH "$new_path" 2> /dev/null`
34608    # bat and cmd files are not always considered executable in cygwin causing which
34609    # to not find them
34610    if test "x$new_path" = x \
34611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34613      new_path=`$CYGPATH -u "$path"`
34614    fi
34615    if test "x$new_path" = x; then
34616      # It's still not found. Now this is an unrecoverable error.
34617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34618$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34619      has_space=`$ECHO "$complete" | $GREP " "`
34620      if test "x$has_space" != x; then
34621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34623      fi
34624      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34625    fi
34626  fi
34627
34628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34631  # "foo.exe" is OK but "foo" is an error.
34632  #
34633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34634  # It is also a way to make sure we got the proper file name for the real test later on.
34635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34636  if test "x$test_shortpath" = x; then
34637    # Short path failed, file does not exist as specified.
34638    # Try adding .exe or .cmd
34639    if test -f "${new_path}.exe"; then
34640      input_to_shortpath="${new_path}.exe"
34641    elif test -f "${new_path}.cmd"; then
34642      input_to_shortpath="${new_path}.cmd"
34643    else
34644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34645$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34648      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34649    fi
34650  else
34651    input_to_shortpath="$new_path"
34652  fi
34653
34654  # Call helper function which possibly converts this using DOS-style short mode.
34655  # If so, the updated path is stored in $new_path.
34656  new_path="$input_to_shortpath"
34657
34658  input_path="$input_to_shortpath"
34659  # Check if we need to convert this using DOS-style short mode. If the path
34660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34661  # take no chances and rewrite it.
34662  # Note: m4 eats our [], so we need to use [ and ] instead.
34663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34664  if test "x$has_forbidden_chars" != x; then
34665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34669      # Going to short mode and back again did indeed matter. Since short mode is
34670      # case insensitive, let's make it lowercase to improve readability.
34671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34672      # Now convert it back to Unix-style (cygpath)
34673      input_path=`$CYGPATH -u "$shortmode_path"`
34674      new_path="$input_path"
34675    fi
34676  fi
34677
34678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34679  if test "x$test_cygdrive_prefix" = x; then
34680    # As a simple fix, exclude /usr/bin since it's not a real path.
34681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34683      # a path prefixed by /cygdrive for fixpath to work.
34684      new_path="$CYGWIN_ROOT_PATH$input_path"
34685    fi
34686  fi
34687
34688  # remove trailing .exe if any
34689  new_path="${new_path/%.exe/}"
34690
34691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34692
34693  # First separate the path from the arguments. This will split at the first
34694  # space.
34695  complete="$CXX"
34696  path="${complete%% *}"
34697  tmp="$complete EOL"
34698  arguments="${tmp#* }"
34699
34700  # Input might be given as Windows format, start by converting to
34701  # unix format.
34702  new_path="$path"
34703
34704  windows_path="$new_path"
34705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34706    unix_path=`$CYGPATH -u "$windows_path"`
34707    new_path="$unix_path"
34708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34710    new_path="$unix_path"
34711  fi
34712
34713
34714  # Now try to locate executable using which
34715  new_path=`$WHICH "$new_path" 2> /dev/null`
34716
34717  if test "x$new_path" = x; then
34718    # Oops. Which didn't find the executable.
34719    # The splitting of arguments from the executable at a space might have been incorrect,
34720    # since paths with space are more likely in Windows. Give it another try with the whole
34721    # argument.
34722    path="$complete"
34723    arguments="EOL"
34724    new_path="$path"
34725
34726  windows_path="$new_path"
34727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34728    unix_path=`$CYGPATH -u "$windows_path"`
34729    new_path="$unix_path"
34730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34732    new_path="$unix_path"
34733  fi
34734
34735
34736    new_path=`$WHICH "$new_path" 2> /dev/null`
34737    # bat and cmd files are not always considered executable in MSYS causing which
34738    # to not find them
34739    if test "x$new_path" = x \
34740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34742      new_path="$path"
34743
34744  windows_path="$new_path"
34745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34746    unix_path=`$CYGPATH -u "$windows_path"`
34747    new_path="$unix_path"
34748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34750    new_path="$unix_path"
34751  fi
34752
34753    fi
34754
34755    if test "x$new_path" = x; then
34756      # It's still not found. Now this is an unrecoverable error.
34757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34758$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34759      has_space=`$ECHO "$complete" | $GREP " "`
34760      if test "x$has_space" != x; then
34761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34763      fi
34764      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34765    fi
34766  fi
34767
34768  # Now new_path has a complete unix path to the binary
34769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34770    # Keep paths in /bin as-is, but remove trailing .exe if any
34771    new_path="${new_path/%.exe/}"
34772    # Do not save /bin paths to all_fixpath_prefixes!
34773  else
34774    # Not in mixed or Windows style, start by that.
34775    new_path=`cmd //c echo $new_path`
34776
34777  input_path="$new_path"
34778  # Check if we need to convert this using DOS-style short mode. If the path
34779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34780  # take no chances and rewrite it.
34781  # Note: m4 eats our [], so we need to use [ and ] instead.
34782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34783  if test "x$has_forbidden_chars" != x; then
34784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34786  fi
34787
34788    # Output is in $new_path
34789
34790  windows_path="$new_path"
34791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34792    unix_path=`$CYGPATH -u "$windows_path"`
34793    new_path="$unix_path"
34794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34796    new_path="$unix_path"
34797  fi
34798
34799    # remove trailing .exe if any
34800    new_path="${new_path/%.exe/}"
34801
34802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34804  fi
34805
34806    else
34807      # We're on a unix platform. Hooray! :)
34808      # First separate the path from the arguments. This will split at the first
34809      # space.
34810      complete="$CXX"
34811      path="${complete%% *}"
34812      tmp="$complete EOL"
34813      arguments="${tmp#* }"
34814
34815      # Cannot rely on the command "which" here since it doesn't always work.
34816      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34817      if test -z "$is_absolute_path"; then
34818        # Path to executable is not absolute. Find it.
34819        IFS_save="$IFS"
34820        IFS=:
34821        for p in $PATH; do
34822          if test -f "$p/$path" && test -x "$p/$path"; then
34823            new_path="$p/$path"
34824            break
34825          fi
34826        done
34827        IFS="$IFS_save"
34828      else
34829        # This is an absolute path, we can use it without further modifications.
34830        new_path="$path"
34831      fi
34832
34833      if test "x$new_path" = x; then
34834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34835$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34836        has_space=`$ECHO "$complete" | $GREP " "`
34837        if test "x$has_space" != x; then
34838          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34840        fi
34841        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34842      fi
34843    fi
34844
34845    # Now join together the path and the arguments once again
34846    if test "x$arguments" != xEOL; then
34847      new_complete="$new_path ${arguments% *}"
34848    else
34849      new_complete="$new_path"
34850    fi
34851
34852    if test "x$complete" != "x$new_complete"; then
34853      CXX="$new_complete"
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34855$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34856    fi
34857  fi
34858
34859  TEST_COMPILER="$CXX"
34860
34861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34862$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34863  SYMLINK_ORIGINAL="$TEST_COMPILER"
34864
34865  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34866    # Follow a chain of symbolic links. Use readlink
34867    # where it exists, else fall back to horribly
34868    # complicated shell code.
34869    if test "x$READLINK_TESTED" != yes; then
34870      # On MacOSX there is a readlink tool with a different
34871      # purpose than the GNU readlink tool. Check the found readlink.
34872      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34873      if test "x$ISGNU" = x; then
34874        # A readlink that we do not know how to use.
34875        # Are there other non-GNU readlinks out there?
34876        READLINK_TESTED=yes
34877        READLINK=
34878      fi
34879    fi
34880
34881    if test "x$READLINK" != x; then
34882      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34883    else
34884      # Save the current directory for restoring afterwards
34885      STARTDIR=$PWD
34886      COUNTER=0
34887      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34888      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34889      cd $sym_link_dir
34890      # Use -P flag to resolve symlinks in directories.
34891      cd `$THEPWDCMD -P`
34892      sym_link_dir=`$THEPWDCMD -P`
34893      # Resolve file symlinks
34894      while test $COUNTER -lt 20; do
34895        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34896        if test "x$ISLINK" == x; then
34897          # This is not a symbolic link! We are done!
34898          break
34899        fi
34900        # Again resolve directory symlinks since the target of the just found
34901        # link could be in a different directory
34902        cd `$DIRNAME $ISLINK`
34903        sym_link_dir=`$THEPWDCMD -P`
34904        sym_link_file=`$BASENAME $ISLINK`
34905        let COUNTER=COUNTER+1
34906      done
34907      cd $STARTDIR
34908      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34909    fi
34910  fi
34911
34912  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34914$as_echo "no symlink" >&6; }
34915  else
34916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34917$as_echo "$SYMLINK_ORIGINAL" >&6; }
34918
34919    # We can't handle ccache by gcc wrappers, since we need to know if we're
34920    # using ccache. Instead ccache usage must be controlled by a configure option.
34921    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34922    if test "x$COMPILER_BASENAME" = "xccache"; then
34923      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34924$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34925      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34926    fi
34927  fi
34928
34929
34930  COMPILER=$CXX
34931  COMPILER_NAME=$COMPILER_NAME
34932
34933  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34934    # cc -V output typically looks like
34935    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34936    # or
34937    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34938    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34939    # Check that this is likely to be the Solaris Studio cc.
34940    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34941    if test $? -ne 0; then
34942      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34943      { $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
34944$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34945      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34946$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34947      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34948$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34949      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34950    fi
34951    # Remove usage instructions (if present), and
34952    # collapse compiler output into a single line
34953    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34954        $SED -e 's/ *[Uu]sage:.*//'`
34955    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34956        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34957  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34958    # xlc -qversion output typically looks like
34959    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34960    #     Version: 11.01.0000.0015
34961    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34962    # Check that this is likely to be the IBM XL C compiler.
34963    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34964    if test $? -ne 0; then
34965      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34966      { $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
34967$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34969$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34971$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34973    fi
34974    # Collapse compiler output into a single line
34975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34977        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34978  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34979    # There is no specific version flag, but all output starts with a version string.
34980    # First line typically looks something like:
34981    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34982    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34983    # Check that this is likely to be Microsoft CL.EXE.
34984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34985    if test $? -ne 0; then
34986      { $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
34987$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34989$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34990      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34991    fi
34992    # Collapse compiler output into a single line
34993    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34994    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34995        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34996  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34997    # gcc --version output typically looks like
34998    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34999    #     Copyright (C) 2013 Free Software Foundation, Inc.
35000    #     This is free software; see the source for copying conditions.  There is NO
35001    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35002    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35003    # Check that this is likely to be GCC.
35004    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35005    if test $? -ne 0; then
35006      { $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
35007$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35009$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35010      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35011    fi
35012    # Remove Copyright and legalese from version string, and
35013    # collapse into a single line
35014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35015        $SED -e 's/ *Copyright .*//'`
35016    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35017        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35018  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35019    # clang --version output typically looks like
35020    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35021    #    clang version 3.3 (tags/RELEASE_33/final)
35022    # or
35023    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35024    #    Target: x86_64-pc-linux-gnu
35025    #    Thread model: posix
35026    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35027    # Check that this is likely to be clang
35028    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35029    if test $? -ne 0; then
35030      { $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
35031$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35032      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35033$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35034      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35035    fi
35036    # Collapse compiler output into a single line
35037    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35038    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35039        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35040  else
35041      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35042  fi
35043  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35044  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35045  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35046  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35047
35048  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35049$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35050
35051
35052  # Now that we have resolved CXX ourself, let autoconf have its go at it
35053  ac_ext=cpp
35054ac_cpp='$CXXCPP $CPPFLAGS'
35055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35058if test -z "$CXX"; then
35059  if test -n "$CCC"; then
35060    CXX=$CCC
35061  else
35062    if test -n "$ac_tool_prefix"; then
35063  for ac_prog in $CXX
35064  do
35065    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35068$as_echo_n "checking for $ac_word... " >&6; }
35069if ${ac_cv_prog_CXX+:} false; then :
35070  $as_echo_n "(cached) " >&6
35071else
35072  if test -n "$CXX"; then
35073  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35074else
35075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35076for as_dir in $PATH
35077do
35078  IFS=$as_save_IFS
35079  test -z "$as_dir" && as_dir=.
35080    for ac_exec_ext in '' $ac_executable_extensions; do
35081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35082    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35084    break 2
35085  fi
35086done
35087  done
35088IFS=$as_save_IFS
35089
35090fi
35091fi
35092CXX=$ac_cv_prog_CXX
35093if test -n "$CXX"; then
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35095$as_echo "$CXX" >&6; }
35096else
35097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35098$as_echo "no" >&6; }
35099fi
35100
35101
35102    test -n "$CXX" && break
35103  done
35104fi
35105if test -z "$CXX"; then
35106  ac_ct_CXX=$CXX
35107  for ac_prog in $CXX
35108do
35109  # Extract the first word of "$ac_prog", so it can be a program name with args.
35110set dummy $ac_prog; ac_word=$2
35111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35112$as_echo_n "checking for $ac_word... " >&6; }
35113if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35114  $as_echo_n "(cached) " >&6
35115else
35116  if test -n "$ac_ct_CXX"; then
35117  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35118else
35119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35120for as_dir in $PATH
35121do
35122  IFS=$as_save_IFS
35123  test -z "$as_dir" && as_dir=.
35124    for ac_exec_ext in '' $ac_executable_extensions; do
35125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35126    ac_cv_prog_ac_ct_CXX="$ac_prog"
35127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35128    break 2
35129  fi
35130done
35131  done
35132IFS=$as_save_IFS
35133
35134fi
35135fi
35136ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35137if test -n "$ac_ct_CXX"; then
35138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35139$as_echo "$ac_ct_CXX" >&6; }
35140else
35141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35142$as_echo "no" >&6; }
35143fi
35144
35145
35146  test -n "$ac_ct_CXX" && break
35147done
35148
35149  if test "x$ac_ct_CXX" = x; then
35150    CXX="g++"
35151  else
35152    case $cross_compiling:$ac_tool_warned in
35153yes:)
35154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35156ac_tool_warned=yes ;;
35157esac
35158    CXX=$ac_ct_CXX
35159  fi
35160fi
35161
35162  fi
35163fi
35164# Provide some information about the compiler.
35165$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35166set X $ac_compile
35167ac_compiler=$2
35168for ac_option in --version -v -V -qversion; do
35169  { { ac_try="$ac_compiler $ac_option >&5"
35170case "(($ac_try" in
35171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35172  *) ac_try_echo=$ac_try;;
35173esac
35174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35175$as_echo "$ac_try_echo"; } >&5
35176  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35177  ac_status=$?
35178  if test -s conftest.err; then
35179    sed '10a\
35180... rest of stderr output deleted ...
35181         10q' conftest.err >conftest.er1
35182    cat conftest.er1 >&5
35183  fi
35184  rm -f conftest.er1 conftest.err
35185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35186  test $ac_status = 0; }
35187done
35188
35189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35190$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35191if ${ac_cv_cxx_compiler_gnu+:} false; then :
35192  $as_echo_n "(cached) " >&6
35193else
35194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35195/* end confdefs.h.  */
35196
35197int
35198main ()
35199{
35200#ifndef __GNUC__
35201       choke me
35202#endif
35203
35204  ;
35205  return 0;
35206}
35207_ACEOF
35208if ac_fn_cxx_try_compile "$LINENO"; then :
35209  ac_compiler_gnu=yes
35210else
35211  ac_compiler_gnu=no
35212fi
35213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35214ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35215
35216fi
35217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35218$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35219if test $ac_compiler_gnu = yes; then
35220  GXX=yes
35221else
35222  GXX=
35223fi
35224ac_test_CXXFLAGS=${CXXFLAGS+set}
35225ac_save_CXXFLAGS=$CXXFLAGS
35226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35227$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35228if ${ac_cv_prog_cxx_g+:} false; then :
35229  $as_echo_n "(cached) " >&6
35230else
35231  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35232   ac_cxx_werror_flag=yes
35233   ac_cv_prog_cxx_g=no
35234   CXXFLAGS="-g"
35235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35236/* end confdefs.h.  */
35237
35238int
35239main ()
35240{
35241
35242  ;
35243  return 0;
35244}
35245_ACEOF
35246if ac_fn_cxx_try_compile "$LINENO"; then :
35247  ac_cv_prog_cxx_g=yes
35248else
35249  CXXFLAGS=""
35250      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35251/* end confdefs.h.  */
35252
35253int
35254main ()
35255{
35256
35257  ;
35258  return 0;
35259}
35260_ACEOF
35261if ac_fn_cxx_try_compile "$LINENO"; then :
35262
35263else
35264  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35265	 CXXFLAGS="-g"
35266	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35267/* end confdefs.h.  */
35268
35269int
35270main ()
35271{
35272
35273  ;
35274  return 0;
35275}
35276_ACEOF
35277if ac_fn_cxx_try_compile "$LINENO"; then :
35278  ac_cv_prog_cxx_g=yes
35279fi
35280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35281fi
35282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35283fi
35284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35285   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35286fi
35287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35288$as_echo "$ac_cv_prog_cxx_g" >&6; }
35289if test "$ac_test_CXXFLAGS" = set; then
35290  CXXFLAGS=$ac_save_CXXFLAGS
35291elif test $ac_cv_prog_cxx_g = yes; then
35292  if test "$GXX" = yes; then
35293    CXXFLAGS="-g -O2"
35294  else
35295    CXXFLAGS="-g"
35296  fi
35297else
35298  if test "$GXX" = yes; then
35299    CXXFLAGS="-O2"
35300  else
35301    CXXFLAGS=
35302  fi
35303fi
35304ac_ext=cpp
35305ac_cpp='$CXXCPP $CPPFLAGS'
35306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35309
35310
35311  # This is the compiler version number on the form X.Y[.Z]
35312
35313
35314
35315
35316  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35317    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35318$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35320$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35321  fi
35322
35323  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35324  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35325    { $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
35326$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;}
35327  fi
35328
35329  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35330    { $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
35331$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35332  fi
35333
35334  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35335
35336
35337  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387    # Execute function body
35388
35389  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35390  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35391
35392  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35393    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35394  fi
35395
35396  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35397    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35398  fi
35399
35400  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35401  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35402
35403  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35404    :
35405
35406  else
35407    :
35408
35409          { $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
35410$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35411
35412
35413  fi
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428  fi
35429
35430  #
35431  # Setup the preprocessor (CPP and CXXCPP)
35432  #
35433  ac_ext=c
35434ac_cpp='$CPP $CPPFLAGS'
35435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35437ac_compiler_gnu=$ac_cv_c_compiler_gnu
35438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35439$as_echo_n "checking how to run the C preprocessor... " >&6; }
35440# On Suns, sometimes $CPP names a directory.
35441if test -n "$CPP" && test -d "$CPP"; then
35442  CPP=
35443fi
35444if test -z "$CPP"; then
35445  if ${ac_cv_prog_CPP+:} false; then :
35446  $as_echo_n "(cached) " >&6
35447else
35448      # Double quotes because CPP needs to be expanded
35449    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35450    do
35451      ac_preproc_ok=false
35452for ac_c_preproc_warn_flag in '' yes
35453do
35454  # Use a header file that comes with gcc, so configuring glibc
35455  # with a fresh cross-compiler works.
35456  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35457  # <limits.h> exists even on freestanding compilers.
35458  # On the NeXT, cc -E runs the code through the compiler's parser,
35459  # not just through cpp. "Syntax error" is here to catch this case.
35460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35461/* end confdefs.h.  */
35462#ifdef __STDC__
35463# include <limits.h>
35464#else
35465# include <assert.h>
35466#endif
35467		     Syntax error
35468_ACEOF
35469if ac_fn_c_try_cpp "$LINENO"; then :
35470
35471else
35472  # Broken: fails on valid input.
35473continue
35474fi
35475rm -f conftest.err conftest.i conftest.$ac_ext
35476
35477  # OK, works on sane cases.  Now check whether nonexistent headers
35478  # can be detected and how.
35479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35480/* end confdefs.h.  */
35481#include <ac_nonexistent.h>
35482_ACEOF
35483if ac_fn_c_try_cpp "$LINENO"; then :
35484  # Broken: success on invalid input.
35485continue
35486else
35487  # Passes both tests.
35488ac_preproc_ok=:
35489break
35490fi
35491rm -f conftest.err conftest.i conftest.$ac_ext
35492
35493done
35494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35495rm -f conftest.i conftest.err conftest.$ac_ext
35496if $ac_preproc_ok; then :
35497  break
35498fi
35499
35500    done
35501    ac_cv_prog_CPP=$CPP
35502
35503fi
35504  CPP=$ac_cv_prog_CPP
35505else
35506  ac_cv_prog_CPP=$CPP
35507fi
35508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35509$as_echo "$CPP" >&6; }
35510ac_preproc_ok=false
35511for ac_c_preproc_warn_flag in '' yes
35512do
35513  # Use a header file that comes with gcc, so configuring glibc
35514  # with a fresh cross-compiler works.
35515  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35516  # <limits.h> exists even on freestanding compilers.
35517  # On the NeXT, cc -E runs the code through the compiler's parser,
35518  # not just through cpp. "Syntax error" is here to catch this case.
35519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35520/* end confdefs.h.  */
35521#ifdef __STDC__
35522# include <limits.h>
35523#else
35524# include <assert.h>
35525#endif
35526		     Syntax error
35527_ACEOF
35528if ac_fn_c_try_cpp "$LINENO"; then :
35529
35530else
35531  # Broken: fails on valid input.
35532continue
35533fi
35534rm -f conftest.err conftest.i conftest.$ac_ext
35535
35536  # OK, works on sane cases.  Now check whether nonexistent headers
35537  # can be detected and how.
35538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35539/* end confdefs.h.  */
35540#include <ac_nonexistent.h>
35541_ACEOF
35542if ac_fn_c_try_cpp "$LINENO"; then :
35543  # Broken: success on invalid input.
35544continue
35545else
35546  # Passes both tests.
35547ac_preproc_ok=:
35548break
35549fi
35550rm -f conftest.err conftest.i conftest.$ac_ext
35551
35552done
35553# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35554rm -f conftest.i conftest.err conftest.$ac_ext
35555if $ac_preproc_ok; then :
35556
35557else
35558  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35560as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35561See \`config.log' for more details" "$LINENO" 5; }
35562fi
35563
35564ac_ext=cpp
35565ac_cpp='$CXXCPP $CPPFLAGS'
35566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35569
35570
35571  # Only process if variable expands to non-empty
35572
35573  if test "x$CPP" != x; then
35574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35575
35576  # First separate the path from the arguments. This will split at the first
35577  # space.
35578  complete="$CPP"
35579  path="${complete%% *}"
35580  tmp="$complete EOL"
35581  arguments="${tmp#* }"
35582
35583  # Input might be given as Windows format, start by converting to
35584  # unix format.
35585  new_path=`$CYGPATH -u "$path"`
35586
35587  # Now try to locate executable using which
35588  new_path=`$WHICH "$new_path" 2> /dev/null`
35589  # bat and cmd files are not always considered executable in cygwin causing which
35590  # to not find them
35591  if test "x$new_path" = x \
35592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35594    new_path=`$CYGPATH -u "$path"`
35595  fi
35596  if test "x$new_path" = x; then
35597    # Oops. Which didn't find the executable.
35598    # The splitting of arguments from the executable at a space might have been incorrect,
35599    # since paths with space are more likely in Windows. Give it another try with the whole
35600    # argument.
35601    path="$complete"
35602    arguments="EOL"
35603    new_path=`$CYGPATH -u "$path"`
35604    new_path=`$WHICH "$new_path" 2> /dev/null`
35605    # bat and cmd files are not always considered executable in cygwin causing which
35606    # to not find them
35607    if test "x$new_path" = x \
35608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35610      new_path=`$CYGPATH -u "$path"`
35611    fi
35612    if test "x$new_path" = x; then
35613      # It's still not found. Now this is an unrecoverable error.
35614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35615$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35616      has_space=`$ECHO "$complete" | $GREP " "`
35617      if test "x$has_space" != x; then
35618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35620      fi
35621      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35622    fi
35623  fi
35624
35625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35628  # "foo.exe" is OK but "foo" is an error.
35629  #
35630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35631  # It is also a way to make sure we got the proper file name for the real test later on.
35632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35633  if test "x$test_shortpath" = x; then
35634    # Short path failed, file does not exist as specified.
35635    # Try adding .exe or .cmd
35636    if test -f "${new_path}.exe"; then
35637      input_to_shortpath="${new_path}.exe"
35638    elif test -f "${new_path}.cmd"; then
35639      input_to_shortpath="${new_path}.cmd"
35640    else
35641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35642$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35645      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35646    fi
35647  else
35648    input_to_shortpath="$new_path"
35649  fi
35650
35651  # Call helper function which possibly converts this using DOS-style short mode.
35652  # If so, the updated path is stored in $new_path.
35653  new_path="$input_to_shortpath"
35654
35655  input_path="$input_to_shortpath"
35656  # Check if we need to convert this using DOS-style short mode. If the path
35657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35658  # take no chances and rewrite it.
35659  # Note: m4 eats our [], so we need to use [ and ] instead.
35660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35661  if test "x$has_forbidden_chars" != x; then
35662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35666      # Going to short mode and back again did indeed matter. Since short mode is
35667      # case insensitive, let's make it lowercase to improve readability.
35668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35669      # Now convert it back to Unix-style (cygpath)
35670      input_path=`$CYGPATH -u "$shortmode_path"`
35671      new_path="$input_path"
35672    fi
35673  fi
35674
35675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35676  if test "x$test_cygdrive_prefix" = x; then
35677    # As a simple fix, exclude /usr/bin since it's not a real path.
35678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35680      # a path prefixed by /cygdrive for fixpath to work.
35681      new_path="$CYGWIN_ROOT_PATH$input_path"
35682    fi
35683  fi
35684
35685  # remove trailing .exe if any
35686  new_path="${new_path/%.exe/}"
35687
35688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689
35690  # First separate the path from the arguments. This will split at the first
35691  # space.
35692  complete="$CPP"
35693  path="${complete%% *}"
35694  tmp="$complete EOL"
35695  arguments="${tmp#* }"
35696
35697  # Input might be given as Windows format, start by converting to
35698  # unix format.
35699  new_path="$path"
35700
35701  windows_path="$new_path"
35702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35703    unix_path=`$CYGPATH -u "$windows_path"`
35704    new_path="$unix_path"
35705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35707    new_path="$unix_path"
35708  fi
35709
35710
35711  # Now try to locate executable using which
35712  new_path=`$WHICH "$new_path" 2> /dev/null`
35713
35714  if test "x$new_path" = x; then
35715    # Oops. Which didn't find the executable.
35716    # The splitting of arguments from the executable at a space might have been incorrect,
35717    # since paths with space are more likely in Windows. Give it another try with the whole
35718    # argument.
35719    path="$complete"
35720    arguments="EOL"
35721    new_path="$path"
35722
35723  windows_path="$new_path"
35724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35725    unix_path=`$CYGPATH -u "$windows_path"`
35726    new_path="$unix_path"
35727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35729    new_path="$unix_path"
35730  fi
35731
35732
35733    new_path=`$WHICH "$new_path" 2> /dev/null`
35734    # bat and cmd files are not always considered executable in MSYS causing which
35735    # to not find them
35736    if test "x$new_path" = x \
35737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35739      new_path="$path"
35740
35741  windows_path="$new_path"
35742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35743    unix_path=`$CYGPATH -u "$windows_path"`
35744    new_path="$unix_path"
35745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35747    new_path="$unix_path"
35748  fi
35749
35750    fi
35751
35752    if test "x$new_path" = x; then
35753      # It's still not found. Now this is an unrecoverable error.
35754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35755$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35756      has_space=`$ECHO "$complete" | $GREP " "`
35757      if test "x$has_space" != x; then
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35760      fi
35761      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35762    fi
35763  fi
35764
35765  # Now new_path has a complete unix path to the binary
35766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35767    # Keep paths in /bin as-is, but remove trailing .exe if any
35768    new_path="${new_path/%.exe/}"
35769    # Do not save /bin paths to all_fixpath_prefixes!
35770  else
35771    # Not in mixed or Windows style, start by that.
35772    new_path=`cmd //c echo $new_path`
35773
35774  input_path="$new_path"
35775  # Check if we need to convert this using DOS-style short mode. If the path
35776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35777  # take no chances and rewrite it.
35778  # Note: m4 eats our [], so we need to use [ and ] instead.
35779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35780  if test "x$has_forbidden_chars" != x; then
35781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35783  fi
35784
35785    # Output is in $new_path
35786
35787  windows_path="$new_path"
35788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35789    unix_path=`$CYGPATH -u "$windows_path"`
35790    new_path="$unix_path"
35791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35793    new_path="$unix_path"
35794  fi
35795
35796    # remove trailing .exe if any
35797    new_path="${new_path/%.exe/}"
35798
35799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35801  fi
35802
35803    else
35804      # We're on a unix platform. Hooray! :)
35805      # First separate the path from the arguments. This will split at the first
35806      # space.
35807      complete="$CPP"
35808      path="${complete%% *}"
35809      tmp="$complete EOL"
35810      arguments="${tmp#* }"
35811
35812      # Cannot rely on the command "which" here since it doesn't always work.
35813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35814      if test -z "$is_absolute_path"; then
35815        # Path to executable is not absolute. Find it.
35816        IFS_save="$IFS"
35817        IFS=:
35818        for p in $PATH; do
35819          if test -f "$p/$path" && test -x "$p/$path"; then
35820            new_path="$p/$path"
35821            break
35822          fi
35823        done
35824        IFS="$IFS_save"
35825      else
35826        # This is an absolute path, we can use it without further modifications.
35827        new_path="$path"
35828      fi
35829
35830      if test "x$new_path" = x; then
35831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35832$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35833        has_space=`$ECHO "$complete" | $GREP " "`
35834        if test "x$has_space" != x; then
35835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35837        fi
35838        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35839      fi
35840    fi
35841
35842    # Now join together the path and the arguments once again
35843    if test "x$arguments" != xEOL; then
35844      new_complete="$new_path ${arguments% *}"
35845    else
35846      new_complete="$new_path"
35847    fi
35848
35849    if test "x$complete" != "x$new_complete"; then
35850      CPP="$new_complete"
35851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35852$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35853    fi
35854  fi
35855
35856  ac_ext=cpp
35857ac_cpp='$CXXCPP $CPPFLAGS'
35858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35862$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35863if test -z "$CXXCPP"; then
35864  if ${ac_cv_prog_CXXCPP+:} false; then :
35865  $as_echo_n "(cached) " >&6
35866else
35867      # Double quotes because CXXCPP needs to be expanded
35868    for CXXCPP in "$CXX -E" "/lib/cpp"
35869    do
35870      ac_preproc_ok=false
35871for ac_cxx_preproc_warn_flag in '' yes
35872do
35873  # Use a header file that comes with gcc, so configuring glibc
35874  # with a fresh cross-compiler works.
35875  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35876  # <limits.h> exists even on freestanding compilers.
35877  # On the NeXT, cc -E runs the code through the compiler's parser,
35878  # not just through cpp. "Syntax error" is here to catch this case.
35879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35880/* end confdefs.h.  */
35881#ifdef __STDC__
35882# include <limits.h>
35883#else
35884# include <assert.h>
35885#endif
35886		     Syntax error
35887_ACEOF
35888if ac_fn_cxx_try_cpp "$LINENO"; then :
35889
35890else
35891  # Broken: fails on valid input.
35892continue
35893fi
35894rm -f conftest.err conftest.i conftest.$ac_ext
35895
35896  # OK, works on sane cases.  Now check whether nonexistent headers
35897  # can be detected and how.
35898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35899/* end confdefs.h.  */
35900#include <ac_nonexistent.h>
35901_ACEOF
35902if ac_fn_cxx_try_cpp "$LINENO"; then :
35903  # Broken: success on invalid input.
35904continue
35905else
35906  # Passes both tests.
35907ac_preproc_ok=:
35908break
35909fi
35910rm -f conftest.err conftest.i conftest.$ac_ext
35911
35912done
35913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35914rm -f conftest.i conftest.err conftest.$ac_ext
35915if $ac_preproc_ok; then :
35916  break
35917fi
35918
35919    done
35920    ac_cv_prog_CXXCPP=$CXXCPP
35921
35922fi
35923  CXXCPP=$ac_cv_prog_CXXCPP
35924else
35925  ac_cv_prog_CXXCPP=$CXXCPP
35926fi
35927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35928$as_echo "$CXXCPP" >&6; }
35929ac_preproc_ok=false
35930for ac_cxx_preproc_warn_flag in '' yes
35931do
35932  # Use a header file that comes with gcc, so configuring glibc
35933  # with a fresh cross-compiler works.
35934  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35935  # <limits.h> exists even on freestanding compilers.
35936  # On the NeXT, cc -E runs the code through the compiler's parser,
35937  # not just through cpp. "Syntax error" is here to catch this case.
35938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35939/* end confdefs.h.  */
35940#ifdef __STDC__
35941# include <limits.h>
35942#else
35943# include <assert.h>
35944#endif
35945		     Syntax error
35946_ACEOF
35947if ac_fn_cxx_try_cpp "$LINENO"; then :
35948
35949else
35950  # Broken: fails on valid input.
35951continue
35952fi
35953rm -f conftest.err conftest.i conftest.$ac_ext
35954
35955  # OK, works on sane cases.  Now check whether nonexistent headers
35956  # can be detected and how.
35957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35958/* end confdefs.h.  */
35959#include <ac_nonexistent.h>
35960_ACEOF
35961if ac_fn_cxx_try_cpp "$LINENO"; then :
35962  # Broken: success on invalid input.
35963continue
35964else
35965  # Passes both tests.
35966ac_preproc_ok=:
35967break
35968fi
35969rm -f conftest.err conftest.i conftest.$ac_ext
35970
35971done
35972# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35973rm -f conftest.i conftest.err conftest.$ac_ext
35974if $ac_preproc_ok; then :
35975
35976else
35977  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35979as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35980See \`config.log' for more details" "$LINENO" 5; }
35981fi
35982
35983ac_ext=cpp
35984ac_cpp='$CXXCPP $CPPFLAGS'
35985ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35986ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35987ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35988
35989
35990  # Only process if variable expands to non-empty
35991
35992  if test "x$CXXCPP" != x; then
35993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35994
35995  # First separate the path from the arguments. This will split at the first
35996  # space.
35997  complete="$CXXCPP"
35998  path="${complete%% *}"
35999  tmp="$complete EOL"
36000  arguments="${tmp#* }"
36001
36002  # Input might be given as Windows format, start by converting to
36003  # unix format.
36004  new_path=`$CYGPATH -u "$path"`
36005
36006  # Now try to locate executable using which
36007  new_path=`$WHICH "$new_path" 2> /dev/null`
36008  # bat and cmd files are not always considered executable in cygwin causing which
36009  # to not find them
36010  if test "x$new_path" = x \
36011      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36012      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36013    new_path=`$CYGPATH -u "$path"`
36014  fi
36015  if test "x$new_path" = x; then
36016    # Oops. Which didn't find the executable.
36017    # The splitting of arguments from the executable at a space might have been incorrect,
36018    # since paths with space are more likely in Windows. Give it another try with the whole
36019    # argument.
36020    path="$complete"
36021    arguments="EOL"
36022    new_path=`$CYGPATH -u "$path"`
36023    new_path=`$WHICH "$new_path" 2> /dev/null`
36024    # bat and cmd files are not always considered executable in cygwin causing which
36025    # to not find them
36026    if test "x$new_path" = x \
36027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36029      new_path=`$CYGPATH -u "$path"`
36030    fi
36031    if test "x$new_path" = x; then
36032      # It's still not found. Now this is an unrecoverable error.
36033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36034$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36035      has_space=`$ECHO "$complete" | $GREP " "`
36036      if test "x$has_space" != x; then
36037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36039      fi
36040      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36041    fi
36042  fi
36043
36044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36047  # "foo.exe" is OK but "foo" is an error.
36048  #
36049  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36050  # It is also a way to make sure we got the proper file name for the real test later on.
36051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36052  if test "x$test_shortpath" = x; then
36053    # Short path failed, file does not exist as specified.
36054    # Try adding .exe or .cmd
36055    if test -f "${new_path}.exe"; then
36056      input_to_shortpath="${new_path}.exe"
36057    elif test -f "${new_path}.cmd"; then
36058      input_to_shortpath="${new_path}.cmd"
36059    else
36060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36061$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36064      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36065    fi
36066  else
36067    input_to_shortpath="$new_path"
36068  fi
36069
36070  # Call helper function which possibly converts this using DOS-style short mode.
36071  # If so, the updated path is stored in $new_path.
36072  new_path="$input_to_shortpath"
36073
36074  input_path="$input_to_shortpath"
36075  # Check if we need to convert this using DOS-style short mode. If the path
36076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36077  # take no chances and rewrite it.
36078  # Note: m4 eats our [], so we need to use [ and ] instead.
36079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36080  if test "x$has_forbidden_chars" != x; then
36081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36085      # Going to short mode and back again did indeed matter. Since short mode is
36086      # case insensitive, let's make it lowercase to improve readability.
36087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36088      # Now convert it back to Unix-style (cygpath)
36089      input_path=`$CYGPATH -u "$shortmode_path"`
36090      new_path="$input_path"
36091    fi
36092  fi
36093
36094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36095  if test "x$test_cygdrive_prefix" = x; then
36096    # As a simple fix, exclude /usr/bin since it's not a real path.
36097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36099      # a path prefixed by /cygdrive for fixpath to work.
36100      new_path="$CYGWIN_ROOT_PATH$input_path"
36101    fi
36102  fi
36103
36104  # remove trailing .exe if any
36105  new_path="${new_path/%.exe/}"
36106
36107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36108
36109  # First separate the path from the arguments. This will split at the first
36110  # space.
36111  complete="$CXXCPP"
36112  path="${complete%% *}"
36113  tmp="$complete EOL"
36114  arguments="${tmp#* }"
36115
36116  # Input might be given as Windows format, start by converting to
36117  # unix format.
36118  new_path="$path"
36119
36120  windows_path="$new_path"
36121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36122    unix_path=`$CYGPATH -u "$windows_path"`
36123    new_path="$unix_path"
36124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36126    new_path="$unix_path"
36127  fi
36128
36129
36130  # Now try to locate executable using which
36131  new_path=`$WHICH "$new_path" 2> /dev/null`
36132
36133  if test "x$new_path" = x; then
36134    # Oops. Which didn't find the executable.
36135    # The splitting of arguments from the executable at a space might have been incorrect,
36136    # since paths with space are more likely in Windows. Give it another try with the whole
36137    # argument.
36138    path="$complete"
36139    arguments="EOL"
36140    new_path="$path"
36141
36142  windows_path="$new_path"
36143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36144    unix_path=`$CYGPATH -u "$windows_path"`
36145    new_path="$unix_path"
36146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36148    new_path="$unix_path"
36149  fi
36150
36151
36152    new_path=`$WHICH "$new_path" 2> /dev/null`
36153    # bat and cmd files are not always considered executable in MSYS causing which
36154    # to not find them
36155    if test "x$new_path" = x \
36156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36158      new_path="$path"
36159
36160  windows_path="$new_path"
36161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36162    unix_path=`$CYGPATH -u "$windows_path"`
36163    new_path="$unix_path"
36164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36166    new_path="$unix_path"
36167  fi
36168
36169    fi
36170
36171    if test "x$new_path" = x; then
36172      # It's still not found. Now this is an unrecoverable error.
36173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36174$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36175      has_space=`$ECHO "$complete" | $GREP " "`
36176      if test "x$has_space" != x; then
36177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36179      fi
36180      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36181    fi
36182  fi
36183
36184  # Now new_path has a complete unix path to the binary
36185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36186    # Keep paths in /bin as-is, but remove trailing .exe if any
36187    new_path="${new_path/%.exe/}"
36188    # Do not save /bin paths to all_fixpath_prefixes!
36189  else
36190    # Not in mixed or Windows style, start by that.
36191    new_path=`cmd //c echo $new_path`
36192
36193  input_path="$new_path"
36194  # Check if we need to convert this using DOS-style short mode. If the path
36195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36196  # take no chances and rewrite it.
36197  # Note: m4 eats our [], so we need to use [ and ] instead.
36198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36199  if test "x$has_forbidden_chars" != x; then
36200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36202  fi
36203
36204    # Output is in $new_path
36205
36206  windows_path="$new_path"
36207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36208    unix_path=`$CYGPATH -u "$windows_path"`
36209    new_path="$unix_path"
36210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36212    new_path="$unix_path"
36213  fi
36214
36215    # remove trailing .exe if any
36216    new_path="${new_path/%.exe/}"
36217
36218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36220  fi
36221
36222    else
36223      # We're on a unix platform. Hooray! :)
36224      # First separate the path from the arguments. This will split at the first
36225      # space.
36226      complete="$CXXCPP"
36227      path="${complete%% *}"
36228      tmp="$complete EOL"
36229      arguments="${tmp#* }"
36230
36231      # Cannot rely on the command "which" here since it doesn't always work.
36232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36233      if test -z "$is_absolute_path"; then
36234        # Path to executable is not absolute. Find it.
36235        IFS_save="$IFS"
36236        IFS=:
36237        for p in $PATH; do
36238          if test -f "$p/$path" && test -x "$p/$path"; then
36239            new_path="$p/$path"
36240            break
36241          fi
36242        done
36243        IFS="$IFS_save"
36244      else
36245        # This is an absolute path, we can use it without further modifications.
36246        new_path="$path"
36247      fi
36248
36249      if test "x$new_path" = x; then
36250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36251$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36252        has_space=`$ECHO "$complete" | $GREP " "`
36253        if test "x$has_space" != x; then
36254          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36256        fi
36257        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36258      fi
36259    fi
36260
36261    # Now join together the path and the arguments once again
36262    if test "x$arguments" != xEOL; then
36263      new_complete="$new_path ${arguments% *}"
36264    else
36265      new_complete="$new_path"
36266    fi
36267
36268    if test "x$complete" != "x$new_complete"; then
36269      CXXCPP="$new_complete"
36270      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36271$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36272    fi
36273  fi
36274
36275
36276  #
36277  # Setup the linker (LD)
36278  #
36279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36280    # In the Microsoft toolchain we have a separate LD command "link".
36281    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36282    # a cygwin program for something completely different.
36283    # Extract the first word of "link", so it can be a program name with args.
36284set dummy link; ac_word=$2
36285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36286$as_echo_n "checking for $ac_word... " >&6; }
36287if ${ac_cv_prog_LD+:} false; then :
36288  $as_echo_n "(cached) " >&6
36289else
36290  if test -n "$LD"; then
36291  ac_cv_prog_LD="$LD" # Let the user override the test.
36292else
36293  ac_prog_rejected=no
36294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36295for as_dir in $PATH
36296do
36297  IFS=$as_save_IFS
36298  test -z "$as_dir" && as_dir=.
36299    for ac_exec_ext in '' $ac_executable_extensions; do
36300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36301    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36302       ac_prog_rejected=yes
36303       continue
36304     fi
36305    ac_cv_prog_LD="link"
36306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36307    break 2
36308  fi
36309done
36310  done
36311IFS=$as_save_IFS
36312
36313if test $ac_prog_rejected = yes; then
36314  # We found a bogon in the path, so make sure we never use it.
36315  set dummy $ac_cv_prog_LD
36316  shift
36317  if test $# != 0; then
36318    # We chose a different compiler from the bogus one.
36319    # However, it has the same basename, so the bogon will be chosen
36320    # first if we set LD to just the basename; use the full file name.
36321    shift
36322    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36323  fi
36324fi
36325fi
36326fi
36327LD=$ac_cv_prog_LD
36328if test -n "$LD"; then
36329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36330$as_echo "$LD" >&6; }
36331else
36332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36333$as_echo "no" >&6; }
36334fi
36335
36336
36337
36338  # Only process if variable expands to non-empty
36339
36340  if test "x$LD" != x; then
36341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36342
36343  # First separate the path from the arguments. This will split at the first
36344  # space.
36345  complete="$LD"
36346  path="${complete%% *}"
36347  tmp="$complete EOL"
36348  arguments="${tmp#* }"
36349
36350  # Input might be given as Windows format, start by converting to
36351  # unix format.
36352  new_path=`$CYGPATH -u "$path"`
36353
36354  # Now try to locate executable using which
36355  new_path=`$WHICH "$new_path" 2> /dev/null`
36356  # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
36362  fi
36363  if test "x$new_path" = x; then
36364    # Oops. Which didn't find the executable.
36365    # The splitting of arguments from the executable at a space might have been incorrect,
36366    # since paths with space are more likely in Windows. Give it another try with the whole
36367    # argument.
36368    path="$complete"
36369    arguments="EOL"
36370    new_path=`$CYGPATH -u "$path"`
36371    new_path=`$WHICH "$new_path" 2> /dev/null`
36372    # bat and cmd files are not always considered executable in cygwin causing which
36373    # to not find them
36374    if test "x$new_path" = x \
36375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36377      new_path=`$CYGPATH -u "$path"`
36378    fi
36379    if test "x$new_path" = x; then
36380      # It's still not found. Now this is an unrecoverable error.
36381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36382$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36383      has_space=`$ECHO "$complete" | $GREP " "`
36384      if test "x$has_space" != x; then
36385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36387      fi
36388      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36389    fi
36390  fi
36391
36392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36395  # "foo.exe" is OK but "foo" is an error.
36396  #
36397  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36398  # It is also a way to make sure we got the proper file name for the real test later on.
36399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36400  if test "x$test_shortpath" = x; then
36401    # Short path failed, file does not exist as specified.
36402    # Try adding .exe or .cmd
36403    if test -f "${new_path}.exe"; then
36404      input_to_shortpath="${new_path}.exe"
36405    elif test -f "${new_path}.cmd"; then
36406      input_to_shortpath="${new_path}.cmd"
36407    else
36408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36409$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36412      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36413    fi
36414  else
36415    input_to_shortpath="$new_path"
36416  fi
36417
36418  # Call helper function which possibly converts this using DOS-style short mode.
36419  # If so, the updated path is stored in $new_path.
36420  new_path="$input_to_shortpath"
36421
36422  input_path="$input_to_shortpath"
36423  # Check if we need to convert this using DOS-style short mode. If the path
36424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36425  # take no chances and rewrite it.
36426  # Note: m4 eats our [], so we need to use [ and ] instead.
36427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36428  if test "x$has_forbidden_chars" != x; then
36429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36433      # Going to short mode and back again did indeed matter. Since short mode is
36434      # case insensitive, let's make it lowercase to improve readability.
36435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36436      # Now convert it back to Unix-style (cygpath)
36437      input_path=`$CYGPATH -u "$shortmode_path"`
36438      new_path="$input_path"
36439    fi
36440  fi
36441
36442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36443  if test "x$test_cygdrive_prefix" = x; then
36444    # As a simple fix, exclude /usr/bin since it's not a real path.
36445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36447      # a path prefixed by /cygdrive for fixpath to work.
36448      new_path="$CYGWIN_ROOT_PATH$input_path"
36449    fi
36450  fi
36451
36452  # remove trailing .exe if any
36453  new_path="${new_path/%.exe/}"
36454
36455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36456
36457  # First separate the path from the arguments. This will split at the first
36458  # space.
36459  complete="$LD"
36460  path="${complete%% *}"
36461  tmp="$complete EOL"
36462  arguments="${tmp#* }"
36463
36464  # Input might be given as Windows format, start by converting to
36465  # unix format.
36466  new_path="$path"
36467
36468  windows_path="$new_path"
36469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36470    unix_path=`$CYGPATH -u "$windows_path"`
36471    new_path="$unix_path"
36472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36474    new_path="$unix_path"
36475  fi
36476
36477
36478  # Now try to locate executable using which
36479  new_path=`$WHICH "$new_path" 2> /dev/null`
36480
36481  if test "x$new_path" = x; then
36482    # Oops. Which didn't find the executable.
36483    # The splitting of arguments from the executable at a space might have been incorrect,
36484    # since paths with space are more likely in Windows. Give it another try with the whole
36485    # argument.
36486    path="$complete"
36487    arguments="EOL"
36488    new_path="$path"
36489
36490  windows_path="$new_path"
36491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492    unix_path=`$CYGPATH -u "$windows_path"`
36493    new_path="$unix_path"
36494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496    new_path="$unix_path"
36497  fi
36498
36499
36500    new_path=`$WHICH "$new_path" 2> /dev/null`
36501    # bat and cmd files are not always considered executable in MSYS causing which
36502    # to not find them
36503    if test "x$new_path" = x \
36504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36506      new_path="$path"
36507
36508  windows_path="$new_path"
36509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36510    unix_path=`$CYGPATH -u "$windows_path"`
36511    new_path="$unix_path"
36512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36514    new_path="$unix_path"
36515  fi
36516
36517    fi
36518
36519    if test "x$new_path" = x; then
36520      # It's still not found. Now this is an unrecoverable error.
36521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36522$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36523      has_space=`$ECHO "$complete" | $GREP " "`
36524      if test "x$has_space" != x; then
36525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36527      fi
36528      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36529    fi
36530  fi
36531
36532  # Now new_path has a complete unix path to the binary
36533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36534    # Keep paths in /bin as-is, but remove trailing .exe if any
36535    new_path="${new_path/%.exe/}"
36536    # Do not save /bin paths to all_fixpath_prefixes!
36537  else
36538    # Not in mixed or Windows style, start by that.
36539    new_path=`cmd //c echo $new_path`
36540
36541  input_path="$new_path"
36542  # Check if we need to convert this using DOS-style short mode. If the path
36543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36544  # take no chances and rewrite it.
36545  # Note: m4 eats our [], so we need to use [ and ] instead.
36546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36547  if test "x$has_forbidden_chars" != x; then
36548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36550  fi
36551
36552    # Output is in $new_path
36553
36554  windows_path="$new_path"
36555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36556    unix_path=`$CYGPATH -u "$windows_path"`
36557    new_path="$unix_path"
36558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36560    new_path="$unix_path"
36561  fi
36562
36563    # remove trailing .exe if any
36564    new_path="${new_path/%.exe/}"
36565
36566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36568  fi
36569
36570    else
36571      # We're on a unix platform. Hooray! :)
36572      # First separate the path from the arguments. This will split at the first
36573      # space.
36574      complete="$LD"
36575      path="${complete%% *}"
36576      tmp="$complete EOL"
36577      arguments="${tmp#* }"
36578
36579      # Cannot rely on the command "which" here since it doesn't always work.
36580      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36581      if test -z "$is_absolute_path"; then
36582        # Path to executable is not absolute. Find it.
36583        IFS_save="$IFS"
36584        IFS=:
36585        for p in $PATH; do
36586          if test -f "$p/$path" && test -x "$p/$path"; then
36587            new_path="$p/$path"
36588            break
36589          fi
36590        done
36591        IFS="$IFS_save"
36592      else
36593        # This is an absolute path, we can use it without further modifications.
36594        new_path="$path"
36595      fi
36596
36597      if test "x$new_path" = x; then
36598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36599$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36600        has_space=`$ECHO "$complete" | $GREP " "`
36601        if test "x$has_space" != x; then
36602          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36604        fi
36605        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36606      fi
36607    fi
36608
36609    # Now join together the path and the arguments once again
36610    if test "x$arguments" != xEOL; then
36611      new_complete="$new_path ${arguments% *}"
36612    else
36613      new_complete="$new_path"
36614    fi
36615
36616    if test "x$complete" != "x$new_complete"; then
36617      LD="$new_complete"
36618      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36619$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36620    fi
36621  fi
36622
36623    # Verify that we indeed succeeded with this trick.
36624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36625$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36626    "$LD" --version > /dev/null
36627    if test $? -eq 0 ; then
36628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36629$as_echo "no" >&6; }
36630      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36631    else
36632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36633$as_echo "yes" >&6; }
36634    fi
36635    LDCXX="$LD"
36636  else
36637    # All other toolchains use the compiler to link.
36638    LD="$CC"
36639    LDCXX="$CXX"
36640  fi
36641
36642  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36643
36644
36645  #
36646  # Setup the assembler (AS)
36647  #
36648  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36649
36650
36651  # Publish this variable in the help.
36652
36653
36654  if [ -z "${AS+x}" ]; then
36655    # The variable is not set by user, try to locate tool using the code snippet
36656    for ac_prog in as
36657do
36658  # Extract the first word of "$ac_prog", so it can be a program name with args.
36659set dummy $ac_prog; ac_word=$2
36660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36661$as_echo_n "checking for $ac_word... " >&6; }
36662if ${ac_cv_path_AS+:} false; then :
36663  $as_echo_n "(cached) " >&6
36664else
36665  case $AS in
36666  [\\/]* | ?:[\\/]*)
36667  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36668  ;;
36669  *)
36670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36671for as_dir in $PATH
36672do
36673  IFS=$as_save_IFS
36674  test -z "$as_dir" && as_dir=.
36675    for ac_exec_ext in '' $ac_executable_extensions; do
36676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36677    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36679    break 2
36680  fi
36681done
36682  done
36683IFS=$as_save_IFS
36684
36685  ;;
36686esac
36687fi
36688AS=$ac_cv_path_AS
36689if test -n "$AS"; then
36690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36691$as_echo "$AS" >&6; }
36692else
36693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36694$as_echo "no" >&6; }
36695fi
36696
36697
36698  test -n "$AS" && break
36699done
36700
36701  else
36702    # The variable is set, but is it from the command line or the environment?
36703
36704    # Try to remove the string !AS! from our list.
36705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36707      # If it failed, the variable was not from the command line. Ignore it,
36708      # but warn the user (except for BASH, which is always set by the calling BASH).
36709      if test "xAS" != xBASH; then
36710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36711$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36712      fi
36713      # Try to locate tool using the code snippet
36714      for ac_prog in as
36715do
36716  # Extract the first word of "$ac_prog", so it can be a program name with args.
36717set dummy $ac_prog; ac_word=$2
36718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36719$as_echo_n "checking for $ac_word... " >&6; }
36720if ${ac_cv_path_AS+:} false; then :
36721  $as_echo_n "(cached) " >&6
36722else
36723  case $AS in
36724  [\\/]* | ?:[\\/]*)
36725  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36726  ;;
36727  *)
36728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36729for as_dir in $PATH
36730do
36731  IFS=$as_save_IFS
36732  test -z "$as_dir" && as_dir=.
36733    for ac_exec_ext in '' $ac_executable_extensions; do
36734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36735    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36737    break 2
36738  fi
36739done
36740  done
36741IFS=$as_save_IFS
36742
36743  ;;
36744esac
36745fi
36746AS=$ac_cv_path_AS
36747if test -n "$AS"; then
36748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36749$as_echo "$AS" >&6; }
36750else
36751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36752$as_echo "no" >&6; }
36753fi
36754
36755
36756  test -n "$AS" && break
36757done
36758
36759    else
36760      # If it succeeded, then it was overridden by the user. We will use it
36761      # for the tool.
36762
36763      # First remove it from the list of overridden variables, so we can test
36764      # for unknown variables in the end.
36765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36766
36767      # Check if we try to supply an empty value
36768      if test "x$AS" = x; then
36769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36770$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36772$as_echo_n "checking for AS... " >&6; }
36773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36774$as_echo "disabled" >&6; }
36775      else
36776        # Check if the provided tool contains a complete path.
36777        tool_specified="$AS"
36778        tool_basename="${tool_specified##*/}"
36779        if test "x$tool_basename" = "x$tool_specified"; then
36780          # A command without a complete path is provided, search $PATH.
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36782$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36783          # Extract the first word of "$tool_basename", so it can be a program name with args.
36784set dummy $tool_basename; ac_word=$2
36785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36786$as_echo_n "checking for $ac_word... " >&6; }
36787if ${ac_cv_path_AS+:} false; then :
36788  $as_echo_n "(cached) " >&6
36789else
36790  case $AS in
36791  [\\/]* | ?:[\\/]*)
36792  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36793  ;;
36794  *)
36795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36796for as_dir in $PATH
36797do
36798  IFS=$as_save_IFS
36799  test -z "$as_dir" && as_dir=.
36800    for ac_exec_ext in '' $ac_executable_extensions; do
36801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36802    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36804    break 2
36805  fi
36806done
36807  done
36808IFS=$as_save_IFS
36809
36810  ;;
36811esac
36812fi
36813AS=$ac_cv_path_AS
36814if test -n "$AS"; then
36815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36816$as_echo "$AS" >&6; }
36817else
36818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36819$as_echo "no" >&6; }
36820fi
36821
36822
36823          if test "x$AS" = x; then
36824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36825          fi
36826        else
36827          # Otherwise we believe it is a complete path. Use it as it is.
36828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36829$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36831$as_echo_n "checking for AS... " >&6; }
36832          if test ! -x "$tool_specified"; then
36833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36834$as_echo "not found" >&6; }
36835            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36836          fi
36837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36838$as_echo "$tool_specified" >&6; }
36839        fi
36840      fi
36841    fi
36842
36843  fi
36844
36845
36846
36847  # Only process if variable expands to non-empty
36848
36849  if test "x$AS" != x; then
36850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36851
36852  # First separate the path from the arguments. This will split at the first
36853  # space.
36854  complete="$AS"
36855  path="${complete%% *}"
36856  tmp="$complete EOL"
36857  arguments="${tmp#* }"
36858
36859  # Input might be given as Windows format, start by converting to
36860  # unix format.
36861  new_path=`$CYGPATH -u "$path"`
36862
36863  # Now try to locate executable using which
36864  new_path=`$WHICH "$new_path" 2> /dev/null`
36865  # bat and cmd files are not always considered executable in cygwin causing which
36866  # to not find them
36867  if test "x$new_path" = x \
36868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36870    new_path=`$CYGPATH -u "$path"`
36871  fi
36872  if test "x$new_path" = x; then
36873    # Oops. Which didn't find the executable.
36874    # The splitting of arguments from the executable at a space might have been incorrect,
36875    # since paths with space are more likely in Windows. Give it another try with the whole
36876    # argument.
36877    path="$complete"
36878    arguments="EOL"
36879    new_path=`$CYGPATH -u "$path"`
36880    new_path=`$WHICH "$new_path" 2> /dev/null`
36881    # bat and cmd files are not always considered executable in cygwin causing which
36882    # to not find them
36883    if test "x$new_path" = x \
36884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36886      new_path=`$CYGPATH -u "$path"`
36887    fi
36888    if test "x$new_path" = x; then
36889      # It's still not found. Now this is an unrecoverable error.
36890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36891$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36892      has_space=`$ECHO "$complete" | $GREP " "`
36893      if test "x$has_space" != x; then
36894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36896      fi
36897      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36898    fi
36899  fi
36900
36901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36904  # "foo.exe" is OK but "foo" is an error.
36905  #
36906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36907  # It is also a way to make sure we got the proper file name for the real test later on.
36908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36909  if test "x$test_shortpath" = x; then
36910    # Short path failed, file does not exist as specified.
36911    # Try adding .exe or .cmd
36912    if test -f "${new_path}.exe"; then
36913      input_to_shortpath="${new_path}.exe"
36914    elif test -f "${new_path}.cmd"; then
36915      input_to_shortpath="${new_path}.cmd"
36916    else
36917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36918$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36921      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36922    fi
36923  else
36924    input_to_shortpath="$new_path"
36925  fi
36926
36927  # Call helper function which possibly converts this using DOS-style short mode.
36928  # If so, the updated path is stored in $new_path.
36929  new_path="$input_to_shortpath"
36930
36931  input_path="$input_to_shortpath"
36932  # Check if we need to convert this using DOS-style short mode. If the path
36933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36934  # take no chances and rewrite it.
36935  # Note: m4 eats our [], so we need to use [ and ] instead.
36936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36937  if test "x$has_forbidden_chars" != x; then
36938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36942      # Going to short mode and back again did indeed matter. Since short mode is
36943      # case insensitive, let's make it lowercase to improve readability.
36944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36945      # Now convert it back to Unix-style (cygpath)
36946      input_path=`$CYGPATH -u "$shortmode_path"`
36947      new_path="$input_path"
36948    fi
36949  fi
36950
36951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36952  if test "x$test_cygdrive_prefix" = x; then
36953    # As a simple fix, exclude /usr/bin since it's not a real path.
36954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36956      # a path prefixed by /cygdrive for fixpath to work.
36957      new_path="$CYGWIN_ROOT_PATH$input_path"
36958    fi
36959  fi
36960
36961  # remove trailing .exe if any
36962  new_path="${new_path/%.exe/}"
36963
36964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36965
36966  # First separate the path from the arguments. This will split at the first
36967  # space.
36968  complete="$AS"
36969  path="${complete%% *}"
36970  tmp="$complete EOL"
36971  arguments="${tmp#* }"
36972
36973  # Input might be given as Windows format, start by converting to
36974  # unix format.
36975  new_path="$path"
36976
36977  windows_path="$new_path"
36978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36979    unix_path=`$CYGPATH -u "$windows_path"`
36980    new_path="$unix_path"
36981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36983    new_path="$unix_path"
36984  fi
36985
36986
36987  # Now try to locate executable using which
36988  new_path=`$WHICH "$new_path" 2> /dev/null`
36989
36990  if test "x$new_path" = x; then
36991    # Oops. Which didn't find the executable.
36992    # The splitting of arguments from the executable at a space might have been incorrect,
36993    # since paths with space are more likely in Windows. Give it another try with the whole
36994    # argument.
36995    path="$complete"
36996    arguments="EOL"
36997    new_path="$path"
36998
36999  windows_path="$new_path"
37000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37001    unix_path=`$CYGPATH -u "$windows_path"`
37002    new_path="$unix_path"
37003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37005    new_path="$unix_path"
37006  fi
37007
37008
37009    new_path=`$WHICH "$new_path" 2> /dev/null`
37010    # bat and cmd files are not always considered executable in MSYS causing which
37011    # to not find them
37012    if test "x$new_path" = x \
37013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37015      new_path="$path"
37016
37017  windows_path="$new_path"
37018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37019    unix_path=`$CYGPATH -u "$windows_path"`
37020    new_path="$unix_path"
37021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37023    new_path="$unix_path"
37024  fi
37025
37026    fi
37027
37028    if test "x$new_path" = x; then
37029      # It's still not found. Now this is an unrecoverable error.
37030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37031$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37032      has_space=`$ECHO "$complete" | $GREP " "`
37033      if test "x$has_space" != x; then
37034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37036      fi
37037      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37038    fi
37039  fi
37040
37041  # Now new_path has a complete unix path to the binary
37042  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37043    # Keep paths in /bin as-is, but remove trailing .exe if any
37044    new_path="${new_path/%.exe/}"
37045    # Do not save /bin paths to all_fixpath_prefixes!
37046  else
37047    # Not in mixed or Windows style, start by that.
37048    new_path=`cmd //c echo $new_path`
37049
37050  input_path="$new_path"
37051  # Check if we need to convert this using DOS-style short mode. If the path
37052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37053  # take no chances and rewrite it.
37054  # Note: m4 eats our [], so we need to use [ and ] instead.
37055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37056  if test "x$has_forbidden_chars" != x; then
37057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37059  fi
37060
37061    # Output is in $new_path
37062
37063  windows_path="$new_path"
37064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37065    unix_path=`$CYGPATH -u "$windows_path"`
37066    new_path="$unix_path"
37067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37069    new_path="$unix_path"
37070  fi
37071
37072    # remove trailing .exe if any
37073    new_path="${new_path/%.exe/}"
37074
37075    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37076    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37077  fi
37078
37079    else
37080      # We're on a unix platform. Hooray! :)
37081      # First separate the path from the arguments. This will split at the first
37082      # space.
37083      complete="$AS"
37084      path="${complete%% *}"
37085      tmp="$complete EOL"
37086      arguments="${tmp#* }"
37087
37088      # Cannot rely on the command "which" here since it doesn't always work.
37089      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37090      if test -z "$is_absolute_path"; then
37091        # Path to executable is not absolute. Find it.
37092        IFS_save="$IFS"
37093        IFS=:
37094        for p in $PATH; do
37095          if test -f "$p/$path" && test -x "$p/$path"; then
37096            new_path="$p/$path"
37097            break
37098          fi
37099        done
37100        IFS="$IFS_save"
37101      else
37102        # This is an absolute path, we can use it without further modifications.
37103        new_path="$path"
37104      fi
37105
37106      if test "x$new_path" = x; then
37107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37108$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37109        has_space=`$ECHO "$complete" | $GREP " "`
37110        if test "x$has_space" != x; then
37111          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37113        fi
37114        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37115      fi
37116    fi
37117
37118    # Now join together the path and the arguments once again
37119    if test "x$arguments" != xEOL; then
37120      new_complete="$new_path ${arguments% *}"
37121    else
37122      new_complete="$new_path"
37123    fi
37124
37125    if test "x$complete" != "x$new_complete"; then
37126      AS="$new_complete"
37127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37128$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37129    fi
37130  fi
37131
37132    if test "x$AS" = x; then
37133      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37134    fi
37135  else
37136    # FIXME: is this correct for microsoft?
37137    AS="$CC -c"
37138  fi
37139
37140
37141  #
37142  # Setup the archiver (AR)
37143  #
37144  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37145    # The corresponding ar tool is lib.exe (used to create static libraries)
37146    # Extract the first word of "lib", so it can be a program name with args.
37147set dummy lib; ac_word=$2
37148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37149$as_echo_n "checking for $ac_word... " >&6; }
37150if ${ac_cv_prog_AR+:} false; then :
37151  $as_echo_n "(cached) " >&6
37152else
37153  if test -n "$AR"; then
37154  ac_cv_prog_AR="$AR" # Let the user override the test.
37155else
37156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37157for as_dir in $PATH
37158do
37159  IFS=$as_save_IFS
37160  test -z "$as_dir" && as_dir=.
37161    for ac_exec_ext in '' $ac_executable_extensions; do
37162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37163    ac_cv_prog_AR="lib"
37164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37165    break 2
37166  fi
37167done
37168  done
37169IFS=$as_save_IFS
37170
37171fi
37172fi
37173AR=$ac_cv_prog_AR
37174if test -n "$AR"; then
37175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37176$as_echo "$AR" >&6; }
37177else
37178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37179$as_echo "no" >&6; }
37180fi
37181
37182
37183  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37184
37185
37186  # Publish this variable in the help.
37187
37188
37189  if [ -z "${AR+x}" ]; then
37190    # The variable is not set by user, try to locate tool using the code snippet
37191    if test -n "$ac_tool_prefix"; then
37192  for ac_prog in ar gcc-ar
37193  do
37194    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37197$as_echo_n "checking for $ac_word... " >&6; }
37198if ${ac_cv_prog_AR+:} false; then :
37199  $as_echo_n "(cached) " >&6
37200else
37201  if test -n "$AR"; then
37202  ac_cv_prog_AR="$AR" # Let the user override the test.
37203else
37204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219fi
37220fi
37221AR=$ac_cv_prog_AR
37222if test -n "$AR"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37224$as_echo "$AR" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231    test -n "$AR" && break
37232  done
37233fi
37234if test -z "$AR"; then
37235  ac_ct_AR=$AR
37236  for ac_prog in ar gcc-ar
37237do
37238  # Extract the first word of "$ac_prog", so it can be a program name with args.
37239set dummy $ac_prog; ac_word=$2
37240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37241$as_echo_n "checking for $ac_word... " >&6; }
37242if ${ac_cv_prog_ac_ct_AR+:} false; then :
37243  $as_echo_n "(cached) " >&6
37244else
37245  if test -n "$ac_ct_AR"; then
37246  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37247else
37248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37249for as_dir in $PATH
37250do
37251  IFS=$as_save_IFS
37252  test -z "$as_dir" && as_dir=.
37253    for ac_exec_ext in '' $ac_executable_extensions; do
37254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37255    ac_cv_prog_ac_ct_AR="$ac_prog"
37256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37257    break 2
37258  fi
37259done
37260  done
37261IFS=$as_save_IFS
37262
37263fi
37264fi
37265ac_ct_AR=$ac_cv_prog_ac_ct_AR
37266if test -n "$ac_ct_AR"; then
37267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37268$as_echo "$ac_ct_AR" >&6; }
37269else
37270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37271$as_echo "no" >&6; }
37272fi
37273
37274
37275  test -n "$ac_ct_AR" && break
37276done
37277
37278  if test "x$ac_ct_AR" = x; then
37279    AR=""
37280  else
37281    case $cross_compiling:$ac_tool_warned in
37282yes:)
37283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37285ac_tool_warned=yes ;;
37286esac
37287    AR=$ac_ct_AR
37288  fi
37289fi
37290
37291  else
37292    # The variable is set, but is it from the command line or the environment?
37293
37294    # Try to remove the string !AR! from our list.
37295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37297      # If it failed, the variable was not from the command line. Ignore it,
37298      # but warn the user (except for BASH, which is always set by the calling BASH).
37299      if test "xAR" != xBASH; then
37300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37301$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37302      fi
37303      # Try to locate tool using the code snippet
37304      if test -n "$ac_tool_prefix"; then
37305  for ac_prog in ar gcc-ar
37306  do
37307    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37308set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37310$as_echo_n "checking for $ac_word... " >&6; }
37311if ${ac_cv_prog_AR+:} false; then :
37312  $as_echo_n "(cached) " >&6
37313else
37314  if test -n "$AR"; then
37315  ac_cv_prog_AR="$AR" # Let the user override the test.
37316else
37317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37318for as_dir in $PATH
37319do
37320  IFS=$as_save_IFS
37321  test -z "$as_dir" && as_dir=.
37322    for ac_exec_ext in '' $ac_executable_extensions; do
37323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37324    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37326    break 2
37327  fi
37328done
37329  done
37330IFS=$as_save_IFS
37331
37332fi
37333fi
37334AR=$ac_cv_prog_AR
37335if test -n "$AR"; then
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37337$as_echo "$AR" >&6; }
37338else
37339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37340$as_echo "no" >&6; }
37341fi
37342
37343
37344    test -n "$AR" && break
37345  done
37346fi
37347if test -z "$AR"; then
37348  ac_ct_AR=$AR
37349  for ac_prog in ar gcc-ar
37350do
37351  # Extract the first word of "$ac_prog", so it can be a program name with args.
37352set dummy $ac_prog; ac_word=$2
37353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37354$as_echo_n "checking for $ac_word... " >&6; }
37355if ${ac_cv_prog_ac_ct_AR+:} false; then :
37356  $as_echo_n "(cached) " >&6
37357else
37358  if test -n "$ac_ct_AR"; then
37359  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37360else
37361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37362for as_dir in $PATH
37363do
37364  IFS=$as_save_IFS
37365  test -z "$as_dir" && as_dir=.
37366    for ac_exec_ext in '' $ac_executable_extensions; do
37367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37368    ac_cv_prog_ac_ct_AR="$ac_prog"
37369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37370    break 2
37371  fi
37372done
37373  done
37374IFS=$as_save_IFS
37375
37376fi
37377fi
37378ac_ct_AR=$ac_cv_prog_ac_ct_AR
37379if test -n "$ac_ct_AR"; then
37380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37381$as_echo "$ac_ct_AR" >&6; }
37382else
37383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37384$as_echo "no" >&6; }
37385fi
37386
37387
37388  test -n "$ac_ct_AR" && break
37389done
37390
37391  if test "x$ac_ct_AR" = x; then
37392    AR=""
37393  else
37394    case $cross_compiling:$ac_tool_warned in
37395yes:)
37396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37398ac_tool_warned=yes ;;
37399esac
37400    AR=$ac_ct_AR
37401  fi
37402fi
37403
37404    else
37405      # If it succeeded, then it was overridden by the user. We will use it
37406      # for the tool.
37407
37408      # First remove it from the list of overridden variables, so we can test
37409      # for unknown variables in the end.
37410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37411
37412      # Check if we try to supply an empty value
37413      if test "x$AR" = x; then
37414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37415$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37417$as_echo_n "checking for AR... " >&6; }
37418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37419$as_echo "disabled" >&6; }
37420      else
37421        # Check if the provided tool contains a complete path.
37422        tool_specified="$AR"
37423        tool_basename="${tool_specified##*/}"
37424        if test "x$tool_basename" = "x$tool_specified"; then
37425          # A command without a complete path is provided, search $PATH.
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37427$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37428          # Extract the first word of "$tool_basename", so it can be a program name with args.
37429set dummy $tool_basename; ac_word=$2
37430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37431$as_echo_n "checking for $ac_word... " >&6; }
37432if ${ac_cv_path_AR+:} false; then :
37433  $as_echo_n "(cached) " >&6
37434else
37435  case $AR in
37436  [\\/]* | ?:[\\/]*)
37437  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37438  ;;
37439  *)
37440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37441for as_dir in $PATH
37442do
37443  IFS=$as_save_IFS
37444  test -z "$as_dir" && as_dir=.
37445    for ac_exec_ext in '' $ac_executable_extensions; do
37446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37447    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37449    break 2
37450  fi
37451done
37452  done
37453IFS=$as_save_IFS
37454
37455  ;;
37456esac
37457fi
37458AR=$ac_cv_path_AR
37459if test -n "$AR"; then
37460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37461$as_echo "$AR" >&6; }
37462else
37463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37464$as_echo "no" >&6; }
37465fi
37466
37467
37468          if test "x$AR" = x; then
37469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37470          fi
37471        else
37472          # Otherwise we believe it is a complete path. Use it as it is.
37473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37474$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37476$as_echo_n "checking for AR... " >&6; }
37477          if test ! -x "$tool_specified"; then
37478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37479$as_echo "not found" >&6; }
37480            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37481          fi
37482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37483$as_echo "$tool_specified" >&6; }
37484        fi
37485      fi
37486    fi
37487
37488  fi
37489
37490
37491  else
37492
37493
37494  # Publish this variable in the help.
37495
37496
37497  if [ -z "${AR+x}" ]; then
37498    # The variable is not set by user, try to locate tool using the code snippet
37499    if test -n "$ac_tool_prefix"; then
37500  for ac_prog in ar
37501  do
37502    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37503set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37505$as_echo_n "checking for $ac_word... " >&6; }
37506if ${ac_cv_prog_AR+:} false; then :
37507  $as_echo_n "(cached) " >&6
37508else
37509  if test -n "$AR"; then
37510  ac_cv_prog_AR="$AR" # Let the user override the test.
37511else
37512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37513for as_dir in $PATH
37514do
37515  IFS=$as_save_IFS
37516  test -z "$as_dir" && as_dir=.
37517    for ac_exec_ext in '' $ac_executable_extensions; do
37518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37519    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37521    break 2
37522  fi
37523done
37524  done
37525IFS=$as_save_IFS
37526
37527fi
37528fi
37529AR=$ac_cv_prog_AR
37530if test -n "$AR"; then
37531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37532$as_echo "$AR" >&6; }
37533else
37534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37535$as_echo "no" >&6; }
37536fi
37537
37538
37539    test -n "$AR" && break
37540  done
37541fi
37542if test -z "$AR"; then
37543  ac_ct_AR=$AR
37544  for ac_prog in ar
37545do
37546  # Extract the first word of "$ac_prog", so it can be a program name with args.
37547set dummy $ac_prog; ac_word=$2
37548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37549$as_echo_n "checking for $ac_word... " >&6; }
37550if ${ac_cv_prog_ac_ct_AR+:} false; then :
37551  $as_echo_n "(cached) " >&6
37552else
37553  if test -n "$ac_ct_AR"; then
37554  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37555else
37556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37557for as_dir in $PATH
37558do
37559  IFS=$as_save_IFS
37560  test -z "$as_dir" && as_dir=.
37561    for ac_exec_ext in '' $ac_executable_extensions; do
37562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37563    ac_cv_prog_ac_ct_AR="$ac_prog"
37564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37565    break 2
37566  fi
37567done
37568  done
37569IFS=$as_save_IFS
37570
37571fi
37572fi
37573ac_ct_AR=$ac_cv_prog_ac_ct_AR
37574if test -n "$ac_ct_AR"; then
37575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37576$as_echo "$ac_ct_AR" >&6; }
37577else
37578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37579$as_echo "no" >&6; }
37580fi
37581
37582
37583  test -n "$ac_ct_AR" && break
37584done
37585
37586  if test "x$ac_ct_AR" = x; then
37587    AR=""
37588  else
37589    case $cross_compiling:$ac_tool_warned in
37590yes:)
37591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37593ac_tool_warned=yes ;;
37594esac
37595    AR=$ac_ct_AR
37596  fi
37597fi
37598
37599  else
37600    # The variable is set, but is it from the command line or the environment?
37601
37602    # Try to remove the string !AR! from our list.
37603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37605      # If it failed, the variable was not from the command line. Ignore it,
37606      # but warn the user (except for BASH, which is always set by the calling BASH).
37607      if test "xAR" != xBASH; then
37608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37609$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37610      fi
37611      # Try to locate tool using the code snippet
37612      if test -n "$ac_tool_prefix"; then
37613  for ac_prog in ar
37614  do
37615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37618$as_echo_n "checking for $ac_word... " >&6; }
37619if ${ac_cv_prog_AR+:} false; then :
37620  $as_echo_n "(cached) " >&6
37621else
37622  if test -n "$AR"; then
37623  ac_cv_prog_AR="$AR" # Let the user override the test.
37624else
37625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37626for as_dir in $PATH
37627do
37628  IFS=$as_save_IFS
37629  test -z "$as_dir" && as_dir=.
37630    for ac_exec_ext in '' $ac_executable_extensions; do
37631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37632    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37634    break 2
37635  fi
37636done
37637  done
37638IFS=$as_save_IFS
37639
37640fi
37641fi
37642AR=$ac_cv_prog_AR
37643if test -n "$AR"; then
37644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37645$as_echo "$AR" >&6; }
37646else
37647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37648$as_echo "no" >&6; }
37649fi
37650
37651
37652    test -n "$AR" && break
37653  done
37654fi
37655if test -z "$AR"; then
37656  ac_ct_AR=$AR
37657  for ac_prog in ar
37658do
37659  # Extract the first word of "$ac_prog", so it can be a program name with args.
37660set dummy $ac_prog; ac_word=$2
37661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37662$as_echo_n "checking for $ac_word... " >&6; }
37663if ${ac_cv_prog_ac_ct_AR+:} false; then :
37664  $as_echo_n "(cached) " >&6
37665else
37666  if test -n "$ac_ct_AR"; then
37667  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37668else
37669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37670for as_dir in $PATH
37671do
37672  IFS=$as_save_IFS
37673  test -z "$as_dir" && as_dir=.
37674    for ac_exec_ext in '' $ac_executable_extensions; do
37675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37676    ac_cv_prog_ac_ct_AR="$ac_prog"
37677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37678    break 2
37679  fi
37680done
37681  done
37682IFS=$as_save_IFS
37683
37684fi
37685fi
37686ac_ct_AR=$ac_cv_prog_ac_ct_AR
37687if test -n "$ac_ct_AR"; then
37688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37689$as_echo "$ac_ct_AR" >&6; }
37690else
37691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37692$as_echo "no" >&6; }
37693fi
37694
37695
37696  test -n "$ac_ct_AR" && break
37697done
37698
37699  if test "x$ac_ct_AR" = x; then
37700    AR=""
37701  else
37702    case $cross_compiling:$ac_tool_warned in
37703yes:)
37704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37706ac_tool_warned=yes ;;
37707esac
37708    AR=$ac_ct_AR
37709  fi
37710fi
37711
37712    else
37713      # If it succeeded, then it was overridden by the user. We will use it
37714      # for the tool.
37715
37716      # First remove it from the list of overridden variables, so we can test
37717      # for unknown variables in the end.
37718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37719
37720      # Check if we try to supply an empty value
37721      if test "x$AR" = x; then
37722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37723$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37725$as_echo_n "checking for AR... " >&6; }
37726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37727$as_echo "disabled" >&6; }
37728      else
37729        # Check if the provided tool contains a complete path.
37730        tool_specified="$AR"
37731        tool_basename="${tool_specified##*/}"
37732        if test "x$tool_basename" = "x$tool_specified"; then
37733          # A command without a complete path is provided, search $PATH.
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37735$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37736          # Extract the first word of "$tool_basename", so it can be a program name with args.
37737set dummy $tool_basename; ac_word=$2
37738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37739$as_echo_n "checking for $ac_word... " >&6; }
37740if ${ac_cv_path_AR+:} false; then :
37741  $as_echo_n "(cached) " >&6
37742else
37743  case $AR in
37744  [\\/]* | ?:[\\/]*)
37745  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37746  ;;
37747  *)
37748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37749for as_dir in $PATH
37750do
37751  IFS=$as_save_IFS
37752  test -z "$as_dir" && as_dir=.
37753    for ac_exec_ext in '' $ac_executable_extensions; do
37754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37755    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37757    break 2
37758  fi
37759done
37760  done
37761IFS=$as_save_IFS
37762
37763  ;;
37764esac
37765fi
37766AR=$ac_cv_path_AR
37767if test -n "$AR"; then
37768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37769$as_echo "$AR" >&6; }
37770else
37771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37772$as_echo "no" >&6; }
37773fi
37774
37775
37776          if test "x$AR" = x; then
37777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37778          fi
37779        else
37780          # Otherwise we believe it is a complete path. Use it as it is.
37781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37782$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37784$as_echo_n "checking for AR... " >&6; }
37785          if test ! -x "$tool_specified"; then
37786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37787$as_echo "not found" >&6; }
37788            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37789          fi
37790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37791$as_echo "$tool_specified" >&6; }
37792        fi
37793      fi
37794    fi
37795
37796  fi
37797
37798
37799  fi
37800
37801  # Only process if variable expands to non-empty
37802
37803  if test "x$AR" != x; then
37804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37805
37806  # First separate the path from the arguments. This will split at the first
37807  # space.
37808  complete="$AR"
37809  path="${complete%% *}"
37810  tmp="$complete EOL"
37811  arguments="${tmp#* }"
37812
37813  # Input might be given as Windows format, start by converting to
37814  # unix format.
37815  new_path=`$CYGPATH -u "$path"`
37816
37817  # Now try to locate executable using which
37818  new_path=`$WHICH "$new_path" 2> /dev/null`
37819  # bat and cmd files are not always considered executable in cygwin causing which
37820  # to not find them
37821  if test "x$new_path" = x \
37822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37824    new_path=`$CYGPATH -u "$path"`
37825  fi
37826  if test "x$new_path" = x; then
37827    # Oops. Which didn't find the executable.
37828    # The splitting of arguments from the executable at a space might have been incorrect,
37829    # since paths with space are more likely in Windows. Give it another try with the whole
37830    # argument.
37831    path="$complete"
37832    arguments="EOL"
37833    new_path=`$CYGPATH -u "$path"`
37834    new_path=`$WHICH "$new_path" 2> /dev/null`
37835    # bat and cmd files are not always considered executable in cygwin causing which
37836    # to not find them
37837    if test "x$new_path" = x \
37838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37840      new_path=`$CYGPATH -u "$path"`
37841    fi
37842    if test "x$new_path" = x; then
37843      # It's still not found. Now this is an unrecoverable error.
37844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37845$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37846      has_space=`$ECHO "$complete" | $GREP " "`
37847      if test "x$has_space" != x; then
37848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37850      fi
37851      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37852    fi
37853  fi
37854
37855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37858  # "foo.exe" is OK but "foo" is an error.
37859  #
37860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37861  # It is also a way to make sure we got the proper file name for the real test later on.
37862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37863  if test "x$test_shortpath" = x; then
37864    # Short path failed, file does not exist as specified.
37865    # Try adding .exe or .cmd
37866    if test -f "${new_path}.exe"; then
37867      input_to_shortpath="${new_path}.exe"
37868    elif test -f "${new_path}.cmd"; then
37869      input_to_shortpath="${new_path}.cmd"
37870    else
37871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37872$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37875      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37876    fi
37877  else
37878    input_to_shortpath="$new_path"
37879  fi
37880
37881  # Call helper function which possibly converts this using DOS-style short mode.
37882  # If so, the updated path is stored in $new_path.
37883  new_path="$input_to_shortpath"
37884
37885  input_path="$input_to_shortpath"
37886  # Check if we need to convert this using DOS-style short mode. If the path
37887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37888  # take no chances and rewrite it.
37889  # Note: m4 eats our [], so we need to use [ and ] instead.
37890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37891  if test "x$has_forbidden_chars" != x; then
37892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37896      # Going to short mode and back again did indeed matter. Since short mode is
37897      # case insensitive, let's make it lowercase to improve readability.
37898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37899      # Now convert it back to Unix-style (cygpath)
37900      input_path=`$CYGPATH -u "$shortmode_path"`
37901      new_path="$input_path"
37902    fi
37903  fi
37904
37905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37906  if test "x$test_cygdrive_prefix" = x; then
37907    # As a simple fix, exclude /usr/bin since it's not a real path.
37908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37910      # a path prefixed by /cygdrive for fixpath to work.
37911      new_path="$CYGWIN_ROOT_PATH$input_path"
37912    fi
37913  fi
37914
37915  # remove trailing .exe if any
37916  new_path="${new_path/%.exe/}"
37917
37918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37919
37920  # First separate the path from the arguments. This will split at the first
37921  # space.
37922  complete="$AR"
37923  path="${complete%% *}"
37924  tmp="$complete EOL"
37925  arguments="${tmp#* }"
37926
37927  # Input might be given as Windows format, start by converting to
37928  # unix format.
37929  new_path="$path"
37930
37931  windows_path="$new_path"
37932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37933    unix_path=`$CYGPATH -u "$windows_path"`
37934    new_path="$unix_path"
37935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37937    new_path="$unix_path"
37938  fi
37939
37940
37941  # Now try to locate executable using which
37942  new_path=`$WHICH "$new_path" 2> /dev/null`
37943
37944  if test "x$new_path" = x; then
37945    # Oops. Which didn't find the executable.
37946    # The splitting of arguments from the executable at a space might have been incorrect,
37947    # since paths with space are more likely in Windows. Give it another try with the whole
37948    # argument.
37949    path="$complete"
37950    arguments="EOL"
37951    new_path="$path"
37952
37953  windows_path="$new_path"
37954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955    unix_path=`$CYGPATH -u "$windows_path"`
37956    new_path="$unix_path"
37957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959    new_path="$unix_path"
37960  fi
37961
37962
37963    new_path=`$WHICH "$new_path" 2> /dev/null`
37964    # bat and cmd files are not always considered executable in MSYS causing which
37965    # to not find them
37966    if test "x$new_path" = x \
37967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37969      new_path="$path"
37970
37971  windows_path="$new_path"
37972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37973    unix_path=`$CYGPATH -u "$windows_path"`
37974    new_path="$unix_path"
37975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37977    new_path="$unix_path"
37978  fi
37979
37980    fi
37981
37982    if test "x$new_path" = x; then
37983      # It's still not found. Now this is an unrecoverable error.
37984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37985$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37986      has_space=`$ECHO "$complete" | $GREP " "`
37987      if test "x$has_space" != x; then
37988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37990      fi
37991      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37992    fi
37993  fi
37994
37995  # Now new_path has a complete unix path to the binary
37996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37997    # Keep paths in /bin as-is, but remove trailing .exe if any
37998    new_path="${new_path/%.exe/}"
37999    # Do not save /bin paths to all_fixpath_prefixes!
38000  else
38001    # Not in mixed or Windows style, start by that.
38002    new_path=`cmd //c echo $new_path`
38003
38004  input_path="$new_path"
38005  # Check if we need to convert this using DOS-style short mode. If the path
38006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38007  # take no chances and rewrite it.
38008  # Note: m4 eats our [], so we need to use [ and ] instead.
38009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38010  if test "x$has_forbidden_chars" != x; then
38011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38013  fi
38014
38015    # Output is in $new_path
38016
38017  windows_path="$new_path"
38018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38019    unix_path=`$CYGPATH -u "$windows_path"`
38020    new_path="$unix_path"
38021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38023    new_path="$unix_path"
38024  fi
38025
38026    # remove trailing .exe if any
38027    new_path="${new_path/%.exe/}"
38028
38029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38031  fi
38032
38033    else
38034      # We're on a unix platform. Hooray! :)
38035      # First separate the path from the arguments. This will split at the first
38036      # space.
38037      complete="$AR"
38038      path="${complete%% *}"
38039      tmp="$complete EOL"
38040      arguments="${tmp#* }"
38041
38042      # Cannot rely on the command "which" here since it doesn't always work.
38043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38044      if test -z "$is_absolute_path"; then
38045        # Path to executable is not absolute. Find it.
38046        IFS_save="$IFS"
38047        IFS=:
38048        for p in $PATH; do
38049          if test -f "$p/$path" && test -x "$p/$path"; then
38050            new_path="$p/$path"
38051            break
38052          fi
38053        done
38054        IFS="$IFS_save"
38055      else
38056        # This is an absolute path, we can use it without further modifications.
38057        new_path="$path"
38058      fi
38059
38060      if test "x$new_path" = x; then
38061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38062$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38063        has_space=`$ECHO "$complete" | $GREP " "`
38064        if test "x$has_space" != x; then
38065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38067        fi
38068        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38069      fi
38070    fi
38071
38072    # Now join together the path and the arguments once again
38073    if test "x$arguments" != xEOL; then
38074      new_complete="$new_path ${arguments% *}"
38075    else
38076      new_complete="$new_path"
38077    fi
38078
38079    if test "x$complete" != "x$new_complete"; then
38080      AR="$new_complete"
38081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38082$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38083    fi
38084  fi
38085
38086
38087
38088  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38089
38090
38091  # Publish this variable in the help.
38092
38093
38094  if [ -z "${LIPO+x}" ]; then
38095    # The variable is not set by user, try to locate tool using the code snippet
38096    for ac_prog in lipo
38097do
38098  # Extract the first word of "$ac_prog", so it can be a program name with args.
38099set dummy $ac_prog; ac_word=$2
38100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38101$as_echo_n "checking for $ac_word... " >&6; }
38102if ${ac_cv_path_LIPO+:} false; then :
38103  $as_echo_n "(cached) " >&6
38104else
38105  case $LIPO in
38106  [\\/]* | ?:[\\/]*)
38107  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38108  ;;
38109  *)
38110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38111for as_dir in $PATH
38112do
38113  IFS=$as_save_IFS
38114  test -z "$as_dir" && as_dir=.
38115    for ac_exec_ext in '' $ac_executable_extensions; do
38116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38117    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38119    break 2
38120  fi
38121done
38122  done
38123IFS=$as_save_IFS
38124
38125  ;;
38126esac
38127fi
38128LIPO=$ac_cv_path_LIPO
38129if test -n "$LIPO"; then
38130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38131$as_echo "$LIPO" >&6; }
38132else
38133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38134$as_echo "no" >&6; }
38135fi
38136
38137
38138  test -n "$LIPO" && break
38139done
38140
38141  else
38142    # The variable is set, but is it from the command line or the environment?
38143
38144    # Try to remove the string !LIPO! from our list.
38145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38147      # If it failed, the variable was not from the command line. Ignore it,
38148      # but warn the user (except for BASH, which is always set by the calling BASH).
38149      if test "xLIPO" != xBASH; then
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38151$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38152      fi
38153      # Try to locate tool using the code snippet
38154      for ac_prog in lipo
38155do
38156  # Extract the first word of "$ac_prog", so it can be a program name with args.
38157set dummy $ac_prog; ac_word=$2
38158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38159$as_echo_n "checking for $ac_word... " >&6; }
38160if ${ac_cv_path_LIPO+:} false; then :
38161  $as_echo_n "(cached) " >&6
38162else
38163  case $LIPO in
38164  [\\/]* | ?:[\\/]*)
38165  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38166  ;;
38167  *)
38168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38169for as_dir in $PATH
38170do
38171  IFS=$as_save_IFS
38172  test -z "$as_dir" && as_dir=.
38173    for ac_exec_ext in '' $ac_executable_extensions; do
38174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38175    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38177    break 2
38178  fi
38179done
38180  done
38181IFS=$as_save_IFS
38182
38183  ;;
38184esac
38185fi
38186LIPO=$ac_cv_path_LIPO
38187if test -n "$LIPO"; then
38188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38189$as_echo "$LIPO" >&6; }
38190else
38191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38192$as_echo "no" >&6; }
38193fi
38194
38195
38196  test -n "$LIPO" && break
38197done
38198
38199    else
38200      # If it succeeded, then it was overridden by the user. We will use it
38201      # for the tool.
38202
38203      # First remove it from the list of overridden variables, so we can test
38204      # for unknown variables in the end.
38205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38206
38207      # Check if we try to supply an empty value
38208      if test "x$LIPO" = x; then
38209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38210$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38212$as_echo_n "checking for LIPO... " >&6; }
38213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38214$as_echo "disabled" >&6; }
38215      else
38216        # Check if the provided tool contains a complete path.
38217        tool_specified="$LIPO"
38218        tool_basename="${tool_specified##*/}"
38219        if test "x$tool_basename" = "x$tool_specified"; then
38220          # A command without a complete path is provided, search $PATH.
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38222$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38223          # Extract the first word of "$tool_basename", so it can be a program name with args.
38224set dummy $tool_basename; ac_word=$2
38225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38226$as_echo_n "checking for $ac_word... " >&6; }
38227if ${ac_cv_path_LIPO+:} false; then :
38228  $as_echo_n "(cached) " >&6
38229else
38230  case $LIPO in
38231  [\\/]* | ?:[\\/]*)
38232  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38233  ;;
38234  *)
38235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38236for as_dir in $PATH
38237do
38238  IFS=$as_save_IFS
38239  test -z "$as_dir" && as_dir=.
38240    for ac_exec_ext in '' $ac_executable_extensions; do
38241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38242    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38244    break 2
38245  fi
38246done
38247  done
38248IFS=$as_save_IFS
38249
38250  ;;
38251esac
38252fi
38253LIPO=$ac_cv_path_LIPO
38254if test -n "$LIPO"; then
38255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38256$as_echo "$LIPO" >&6; }
38257else
38258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38259$as_echo "no" >&6; }
38260fi
38261
38262
38263          if test "x$LIPO" = x; then
38264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38265          fi
38266        else
38267          # Otherwise we believe it is a complete path. Use it as it is.
38268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38269$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38271$as_echo_n "checking for LIPO... " >&6; }
38272          if test ! -x "$tool_specified"; then
38273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38274$as_echo "not found" >&6; }
38275            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38276          fi
38277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38278$as_echo "$tool_specified" >&6; }
38279        fi
38280      fi
38281    fi
38282
38283  fi
38284
38285
38286
38287  # Only process if variable expands to non-empty
38288
38289  if test "x$LIPO" != x; then
38290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38291
38292  # First separate the path from the arguments. This will split at the first
38293  # space.
38294  complete="$LIPO"
38295  path="${complete%% *}"
38296  tmp="$complete EOL"
38297  arguments="${tmp#* }"
38298
38299  # Input might be given as Windows format, start by converting to
38300  # unix format.
38301  new_path=`$CYGPATH -u "$path"`
38302
38303  # Now try to locate executable using which
38304  new_path=`$WHICH "$new_path" 2> /dev/null`
38305  # bat and cmd files are not always considered executable in cygwin causing which
38306  # to not find them
38307  if test "x$new_path" = x \
38308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38310    new_path=`$CYGPATH -u "$path"`
38311  fi
38312  if test "x$new_path" = x; then
38313    # Oops. Which didn't find the executable.
38314    # The splitting of arguments from the executable at a space might have been incorrect,
38315    # since paths with space are more likely in Windows. Give it another try with the whole
38316    # argument.
38317    path="$complete"
38318    arguments="EOL"
38319    new_path=`$CYGPATH -u "$path"`
38320    new_path=`$WHICH "$new_path" 2> /dev/null`
38321    # bat and cmd files are not always considered executable in cygwin causing which
38322    # to not find them
38323    if test "x$new_path" = x \
38324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38326      new_path=`$CYGPATH -u "$path"`
38327    fi
38328    if test "x$new_path" = x; then
38329      # It's still not found. Now this is an unrecoverable error.
38330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38331$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38332      has_space=`$ECHO "$complete" | $GREP " "`
38333      if test "x$has_space" != x; then
38334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38336      fi
38337      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38338    fi
38339  fi
38340
38341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38344  # "foo.exe" is OK but "foo" is an error.
38345  #
38346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38347  # It is also a way to make sure we got the proper file name for the real test later on.
38348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38349  if test "x$test_shortpath" = x; then
38350    # Short path failed, file does not exist as specified.
38351    # Try adding .exe or .cmd
38352    if test -f "${new_path}.exe"; then
38353      input_to_shortpath="${new_path}.exe"
38354    elif test -f "${new_path}.cmd"; then
38355      input_to_shortpath="${new_path}.cmd"
38356    else
38357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38358$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38361      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38362    fi
38363  else
38364    input_to_shortpath="$new_path"
38365  fi
38366
38367  # Call helper function which possibly converts this using DOS-style short mode.
38368  # If so, the updated path is stored in $new_path.
38369  new_path="$input_to_shortpath"
38370
38371  input_path="$input_to_shortpath"
38372  # Check if we need to convert this using DOS-style short mode. If the path
38373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38374  # take no chances and rewrite it.
38375  # Note: m4 eats our [], so we need to use [ and ] instead.
38376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38377  if test "x$has_forbidden_chars" != x; then
38378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38382      # Going to short mode and back again did indeed matter. Since short mode is
38383      # case insensitive, let's make it lowercase to improve readability.
38384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38385      # Now convert it back to Unix-style (cygpath)
38386      input_path=`$CYGPATH -u "$shortmode_path"`
38387      new_path="$input_path"
38388    fi
38389  fi
38390
38391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38392  if test "x$test_cygdrive_prefix" = x; then
38393    # As a simple fix, exclude /usr/bin since it's not a real path.
38394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38396      # a path prefixed by /cygdrive for fixpath to work.
38397      new_path="$CYGWIN_ROOT_PATH$input_path"
38398    fi
38399  fi
38400
38401  # remove trailing .exe if any
38402  new_path="${new_path/%.exe/}"
38403
38404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38405
38406  # First separate the path from the arguments. This will split at the first
38407  # space.
38408  complete="$LIPO"
38409  path="${complete%% *}"
38410  tmp="$complete EOL"
38411  arguments="${tmp#* }"
38412
38413  # Input might be given as Windows format, start by converting to
38414  # unix format.
38415  new_path="$path"
38416
38417  windows_path="$new_path"
38418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38419    unix_path=`$CYGPATH -u "$windows_path"`
38420    new_path="$unix_path"
38421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38423    new_path="$unix_path"
38424  fi
38425
38426
38427  # Now try to locate executable using which
38428  new_path=`$WHICH "$new_path" 2> /dev/null`
38429
38430  if test "x$new_path" = x; then
38431    # Oops. Which didn't find the executable.
38432    # The splitting of arguments from the executable at a space might have been incorrect,
38433    # since paths with space are more likely in Windows. Give it another try with the whole
38434    # argument.
38435    path="$complete"
38436    arguments="EOL"
38437    new_path="$path"
38438
38439  windows_path="$new_path"
38440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38441    unix_path=`$CYGPATH -u "$windows_path"`
38442    new_path="$unix_path"
38443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38445    new_path="$unix_path"
38446  fi
38447
38448
38449    new_path=`$WHICH "$new_path" 2> /dev/null`
38450    # bat and cmd files are not always considered executable in MSYS causing which
38451    # to not find them
38452    if test "x$new_path" = x \
38453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38455      new_path="$path"
38456
38457  windows_path="$new_path"
38458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38459    unix_path=`$CYGPATH -u "$windows_path"`
38460    new_path="$unix_path"
38461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38463    new_path="$unix_path"
38464  fi
38465
38466    fi
38467
38468    if test "x$new_path" = x; then
38469      # It's still not found. Now this is an unrecoverable error.
38470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38471$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38472      has_space=`$ECHO "$complete" | $GREP " "`
38473      if test "x$has_space" != x; then
38474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38476      fi
38477      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38478    fi
38479  fi
38480
38481  # Now new_path has a complete unix path to the binary
38482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38483    # Keep paths in /bin as-is, but remove trailing .exe if any
38484    new_path="${new_path/%.exe/}"
38485    # Do not save /bin paths to all_fixpath_prefixes!
38486  else
38487    # Not in mixed or Windows style, start by that.
38488    new_path=`cmd //c echo $new_path`
38489
38490  input_path="$new_path"
38491  # Check if we need to convert this using DOS-style short mode. If the path
38492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38493  # take no chances and rewrite it.
38494  # Note: m4 eats our [], so we need to use [ and ] instead.
38495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38496  if test "x$has_forbidden_chars" != x; then
38497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38499  fi
38500
38501    # Output is in $new_path
38502
38503  windows_path="$new_path"
38504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38505    unix_path=`$CYGPATH -u "$windows_path"`
38506    new_path="$unix_path"
38507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38509    new_path="$unix_path"
38510  fi
38511
38512    # remove trailing .exe if any
38513    new_path="${new_path/%.exe/}"
38514
38515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38517  fi
38518
38519    else
38520      # We're on a unix platform. Hooray! :)
38521      # First separate the path from the arguments. This will split at the first
38522      # space.
38523      complete="$LIPO"
38524      path="${complete%% *}"
38525      tmp="$complete EOL"
38526      arguments="${tmp#* }"
38527
38528      # Cannot rely on the command "which" here since it doesn't always work.
38529      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38530      if test -z "$is_absolute_path"; then
38531        # Path to executable is not absolute. Find it.
38532        IFS_save="$IFS"
38533        IFS=:
38534        for p in $PATH; do
38535          if test -f "$p/$path" && test -x "$p/$path"; then
38536            new_path="$p/$path"
38537            break
38538          fi
38539        done
38540        IFS="$IFS_save"
38541      else
38542        # This is an absolute path, we can use it without further modifications.
38543        new_path="$path"
38544      fi
38545
38546      if test "x$new_path" = x; then
38547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38548$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38549        has_space=`$ECHO "$complete" | $GREP " "`
38550        if test "x$has_space" != x; then
38551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38553        fi
38554        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38555      fi
38556    fi
38557
38558    # Now join together the path and the arguments once again
38559    if test "x$arguments" != xEOL; then
38560      new_complete="$new_path ${arguments% *}"
38561    else
38562      new_complete="$new_path"
38563    fi
38564
38565    if test "x$complete" != "x$new_complete"; then
38566      LIPO="$new_complete"
38567      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38568$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38569    fi
38570  fi
38571
38572  fi
38573
38574  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38575    # Extract the first word of "mt", so it can be a program name with args.
38576set dummy mt; ac_word=$2
38577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38578$as_echo_n "checking for $ac_word... " >&6; }
38579if ${ac_cv_prog_MT+:} false; then :
38580  $as_echo_n "(cached) " >&6
38581else
38582  if test -n "$MT"; then
38583  ac_cv_prog_MT="$MT" # Let the user override the test.
38584else
38585  ac_prog_rejected=no
38586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38587for as_dir in $PATH
38588do
38589  IFS=$as_save_IFS
38590  test -z "$as_dir" && as_dir=.
38591    for ac_exec_ext in '' $ac_executable_extensions; do
38592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38593    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38594       ac_prog_rejected=yes
38595       continue
38596     fi
38597    ac_cv_prog_MT="mt"
38598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38599    break 2
38600  fi
38601done
38602  done
38603IFS=$as_save_IFS
38604
38605if test $ac_prog_rejected = yes; then
38606  # We found a bogon in the path, so make sure we never use it.
38607  set dummy $ac_cv_prog_MT
38608  shift
38609  if test $# != 0; then
38610    # We chose a different compiler from the bogus one.
38611    # However, it has the same basename, so the bogon will be chosen
38612    # first if we set MT to just the basename; use the full file name.
38613    shift
38614    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38615  fi
38616fi
38617fi
38618fi
38619MT=$ac_cv_prog_MT
38620if test -n "$MT"; then
38621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38622$as_echo "$MT" >&6; }
38623else
38624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38625$as_echo "no" >&6; }
38626fi
38627
38628
38629
38630  # Only process if variable expands to non-empty
38631
38632  if test "x$MT" != x; then
38633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38634
38635  # First separate the path from the arguments. This will split at the first
38636  # space.
38637  complete="$MT"
38638  path="${complete%% *}"
38639  tmp="$complete EOL"
38640  arguments="${tmp#* }"
38641
38642  # Input might be given as Windows format, start by converting to
38643  # unix format.
38644  new_path=`$CYGPATH -u "$path"`
38645
38646  # Now try to locate executable using which
38647  new_path=`$WHICH "$new_path" 2> /dev/null`
38648  # bat and cmd files are not always considered executable in cygwin causing which
38649  # to not find them
38650  if test "x$new_path" = x \
38651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38653    new_path=`$CYGPATH -u "$path"`
38654  fi
38655  if test "x$new_path" = x; then
38656    # Oops. Which didn't find the executable.
38657    # The splitting of arguments from the executable at a space might have been incorrect,
38658    # since paths with space are more likely in Windows. Give it another try with the whole
38659    # argument.
38660    path="$complete"
38661    arguments="EOL"
38662    new_path=`$CYGPATH -u "$path"`
38663    new_path=`$WHICH "$new_path" 2> /dev/null`
38664    # bat and cmd files are not always considered executable in cygwin causing which
38665    # to not find them
38666    if test "x$new_path" = x \
38667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38669      new_path=`$CYGPATH -u "$path"`
38670    fi
38671    if test "x$new_path" = x; then
38672      # It's still not found. Now this is an unrecoverable error.
38673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38674$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38675      has_space=`$ECHO "$complete" | $GREP " "`
38676      if test "x$has_space" != x; then
38677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38679      fi
38680      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38681    fi
38682  fi
38683
38684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38687  # "foo.exe" is OK but "foo" is an error.
38688  #
38689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38690  # It is also a way to make sure we got the proper file name for the real test later on.
38691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38692  if test "x$test_shortpath" = x; then
38693    # Short path failed, file does not exist as specified.
38694    # Try adding .exe or .cmd
38695    if test -f "${new_path}.exe"; then
38696      input_to_shortpath="${new_path}.exe"
38697    elif test -f "${new_path}.cmd"; then
38698      input_to_shortpath="${new_path}.cmd"
38699    else
38700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38701$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38704      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38705    fi
38706  else
38707    input_to_shortpath="$new_path"
38708  fi
38709
38710  # Call helper function which possibly converts this using DOS-style short mode.
38711  # If so, the updated path is stored in $new_path.
38712  new_path="$input_to_shortpath"
38713
38714  input_path="$input_to_shortpath"
38715  # Check if we need to convert this using DOS-style short mode. If the path
38716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38717  # take no chances and rewrite it.
38718  # Note: m4 eats our [], so we need to use [ and ] instead.
38719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38720  if test "x$has_forbidden_chars" != x; then
38721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38725      # Going to short mode and back again did indeed matter. Since short mode is
38726      # case insensitive, let's make it lowercase to improve readability.
38727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38728      # Now convert it back to Unix-style (cygpath)
38729      input_path=`$CYGPATH -u "$shortmode_path"`
38730      new_path="$input_path"
38731    fi
38732  fi
38733
38734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38735  if test "x$test_cygdrive_prefix" = x; then
38736    # As a simple fix, exclude /usr/bin since it's not a real path.
38737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38739      # a path prefixed by /cygdrive for fixpath to work.
38740      new_path="$CYGWIN_ROOT_PATH$input_path"
38741    fi
38742  fi
38743
38744  # remove trailing .exe if any
38745  new_path="${new_path/%.exe/}"
38746
38747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38748
38749  # First separate the path from the arguments. This will split at the first
38750  # space.
38751  complete="$MT"
38752  path="${complete%% *}"
38753  tmp="$complete EOL"
38754  arguments="${tmp#* }"
38755
38756  # Input might be given as Windows format, start by converting to
38757  # unix format.
38758  new_path="$path"
38759
38760  windows_path="$new_path"
38761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38762    unix_path=`$CYGPATH -u "$windows_path"`
38763    new_path="$unix_path"
38764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38766    new_path="$unix_path"
38767  fi
38768
38769
38770  # Now try to locate executable using which
38771  new_path=`$WHICH "$new_path" 2> /dev/null`
38772
38773  if test "x$new_path" = x; then
38774    # Oops. Which didn't find the executable.
38775    # The splitting of arguments from the executable at a space might have been incorrect,
38776    # since paths with space are more likely in Windows. Give it another try with the whole
38777    # argument.
38778    path="$complete"
38779    arguments="EOL"
38780    new_path="$path"
38781
38782  windows_path="$new_path"
38783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38784    unix_path=`$CYGPATH -u "$windows_path"`
38785    new_path="$unix_path"
38786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38788    new_path="$unix_path"
38789  fi
38790
38791
38792    new_path=`$WHICH "$new_path" 2> /dev/null`
38793    # bat and cmd files are not always considered executable in MSYS causing which
38794    # to not find them
38795    if test "x$new_path" = x \
38796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38798      new_path="$path"
38799
38800  windows_path="$new_path"
38801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38802    unix_path=`$CYGPATH -u "$windows_path"`
38803    new_path="$unix_path"
38804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38806    new_path="$unix_path"
38807  fi
38808
38809    fi
38810
38811    if test "x$new_path" = x; then
38812      # It's still not found. Now this is an unrecoverable error.
38813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38814$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38815      has_space=`$ECHO "$complete" | $GREP " "`
38816      if test "x$has_space" != x; then
38817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38819      fi
38820      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38821    fi
38822  fi
38823
38824  # Now new_path has a complete unix path to the binary
38825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38826    # Keep paths in /bin as-is, but remove trailing .exe if any
38827    new_path="${new_path/%.exe/}"
38828    # Do not save /bin paths to all_fixpath_prefixes!
38829  else
38830    # Not in mixed or Windows style, start by that.
38831    new_path=`cmd //c echo $new_path`
38832
38833  input_path="$new_path"
38834  # Check if we need to convert this using DOS-style short mode. If the path
38835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38836  # take no chances and rewrite it.
38837  # Note: m4 eats our [], so we need to use [ and ] instead.
38838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38839  if test "x$has_forbidden_chars" != x; then
38840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38842  fi
38843
38844    # Output is in $new_path
38845
38846  windows_path="$new_path"
38847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38848    unix_path=`$CYGPATH -u "$windows_path"`
38849    new_path="$unix_path"
38850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38852    new_path="$unix_path"
38853  fi
38854
38855    # remove trailing .exe if any
38856    new_path="${new_path/%.exe/}"
38857
38858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38860  fi
38861
38862    else
38863      # We're on a unix platform. Hooray! :)
38864      # First separate the path from the arguments. This will split at the first
38865      # space.
38866      complete="$MT"
38867      path="${complete%% *}"
38868      tmp="$complete EOL"
38869      arguments="${tmp#* }"
38870
38871      # Cannot rely on the command "which" here since it doesn't always work.
38872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38873      if test -z "$is_absolute_path"; then
38874        # Path to executable is not absolute. Find it.
38875        IFS_save="$IFS"
38876        IFS=:
38877        for p in $PATH; do
38878          if test -f "$p/$path" && test -x "$p/$path"; then
38879            new_path="$p/$path"
38880            break
38881          fi
38882        done
38883        IFS="$IFS_save"
38884      else
38885        # This is an absolute path, we can use it without further modifications.
38886        new_path="$path"
38887      fi
38888
38889      if test "x$new_path" = x; then
38890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38891$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38892        has_space=`$ECHO "$complete" | $GREP " "`
38893        if test "x$has_space" != x; then
38894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38896        fi
38897        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38898      fi
38899    fi
38900
38901    # Now join together the path and the arguments once again
38902    if test "x$arguments" != xEOL; then
38903      new_complete="$new_path ${arguments% *}"
38904    else
38905      new_complete="$new_path"
38906    fi
38907
38908    if test "x$complete" != "x$new_complete"; then
38909      MT="$new_complete"
38910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38911$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38912    fi
38913  fi
38914
38915    # Setup the resource compiler (RC)
38916    # Extract the first word of "rc", so it can be a program name with args.
38917set dummy rc; ac_word=$2
38918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38919$as_echo_n "checking for $ac_word... " >&6; }
38920if ${ac_cv_prog_RC+:} false; then :
38921  $as_echo_n "(cached) " >&6
38922else
38923  if test -n "$RC"; then
38924  ac_cv_prog_RC="$RC" # Let the user override the test.
38925else
38926  ac_prog_rejected=no
38927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38928for as_dir in $PATH
38929do
38930  IFS=$as_save_IFS
38931  test -z "$as_dir" && as_dir=.
38932    for ac_exec_ext in '' $ac_executable_extensions; do
38933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38934    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38935       ac_prog_rejected=yes
38936       continue
38937     fi
38938    ac_cv_prog_RC="rc"
38939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38940    break 2
38941  fi
38942done
38943  done
38944IFS=$as_save_IFS
38945
38946if test $ac_prog_rejected = yes; then
38947  # We found a bogon in the path, so make sure we never use it.
38948  set dummy $ac_cv_prog_RC
38949  shift
38950  if test $# != 0; then
38951    # We chose a different compiler from the bogus one.
38952    # However, it has the same basename, so the bogon will be chosen
38953    # first if we set RC to just the basename; use the full file name.
38954    shift
38955    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38956  fi
38957fi
38958fi
38959fi
38960RC=$ac_cv_prog_RC
38961if test -n "$RC"; then
38962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38963$as_echo "$RC" >&6; }
38964else
38965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38966$as_echo "no" >&6; }
38967fi
38968
38969
38970
38971  # Only process if variable expands to non-empty
38972
38973  if test "x$RC" != x; then
38974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38975
38976  # First separate the path from the arguments. This will split at the first
38977  # space.
38978  complete="$RC"
38979  path="${complete%% *}"
38980  tmp="$complete EOL"
38981  arguments="${tmp#* }"
38982
38983  # Input might be given as Windows format, start by converting to
38984  # unix format.
38985  new_path=`$CYGPATH -u "$path"`
38986
38987  # Now try to locate executable using which
38988  new_path=`$WHICH "$new_path" 2> /dev/null`
38989  # bat and cmd files are not always considered executable in cygwin causing which
38990  # to not find them
38991  if test "x$new_path" = x \
38992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38994    new_path=`$CYGPATH -u "$path"`
38995  fi
38996  if test "x$new_path" = x; then
38997    # Oops. Which didn't find the executable.
38998    # The splitting of arguments from the executable at a space might have been incorrect,
38999    # since paths with space are more likely in Windows. Give it another try with the whole
39000    # argument.
39001    path="$complete"
39002    arguments="EOL"
39003    new_path=`$CYGPATH -u "$path"`
39004    new_path=`$WHICH "$new_path" 2> /dev/null`
39005    # bat and cmd files are not always considered executable in cygwin causing which
39006    # to not find them
39007    if test "x$new_path" = x \
39008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39010      new_path=`$CYGPATH -u "$path"`
39011    fi
39012    if test "x$new_path" = x; then
39013      # It's still not found. Now this is an unrecoverable error.
39014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39015$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39016      has_space=`$ECHO "$complete" | $GREP " "`
39017      if test "x$has_space" != x; then
39018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39020      fi
39021      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39022    fi
39023  fi
39024
39025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39028  # "foo.exe" is OK but "foo" is an error.
39029  #
39030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39031  # It is also a way to make sure we got the proper file name for the real test later on.
39032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39033  if test "x$test_shortpath" = x; then
39034    # Short path failed, file does not exist as specified.
39035    # Try adding .exe or .cmd
39036    if test -f "${new_path}.exe"; then
39037      input_to_shortpath="${new_path}.exe"
39038    elif test -f "${new_path}.cmd"; then
39039      input_to_shortpath="${new_path}.cmd"
39040    else
39041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39042$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39045      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39046    fi
39047  else
39048    input_to_shortpath="$new_path"
39049  fi
39050
39051  # Call helper function which possibly converts this using DOS-style short mode.
39052  # If so, the updated path is stored in $new_path.
39053  new_path="$input_to_shortpath"
39054
39055  input_path="$input_to_shortpath"
39056  # Check if we need to convert this using DOS-style short mode. If the path
39057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39058  # take no chances and rewrite it.
39059  # Note: m4 eats our [], so we need to use [ and ] instead.
39060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39061  if test "x$has_forbidden_chars" != x; then
39062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39066      # Going to short mode and back again did indeed matter. Since short mode is
39067      # case insensitive, let's make it lowercase to improve readability.
39068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39069      # Now convert it back to Unix-style (cygpath)
39070      input_path=`$CYGPATH -u "$shortmode_path"`
39071      new_path="$input_path"
39072    fi
39073  fi
39074
39075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39076  if test "x$test_cygdrive_prefix" = x; then
39077    # As a simple fix, exclude /usr/bin since it's not a real path.
39078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39080      # a path prefixed by /cygdrive for fixpath to work.
39081      new_path="$CYGWIN_ROOT_PATH$input_path"
39082    fi
39083  fi
39084
39085  # remove trailing .exe if any
39086  new_path="${new_path/%.exe/}"
39087
39088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089
39090  # First separate the path from the arguments. This will split at the first
39091  # space.
39092  complete="$RC"
39093  path="${complete%% *}"
39094  tmp="$complete EOL"
39095  arguments="${tmp#* }"
39096
39097  # Input might be given as Windows format, start by converting to
39098  # unix format.
39099  new_path="$path"
39100
39101  windows_path="$new_path"
39102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39103    unix_path=`$CYGPATH -u "$windows_path"`
39104    new_path="$unix_path"
39105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39107    new_path="$unix_path"
39108  fi
39109
39110
39111  # Now try to locate executable using which
39112  new_path=`$WHICH "$new_path" 2> /dev/null`
39113
39114  if test "x$new_path" = x; then
39115    # Oops. Which didn't find the executable.
39116    # The splitting of arguments from the executable at a space might have been incorrect,
39117    # since paths with space are more likely in Windows. Give it another try with the whole
39118    # argument.
39119    path="$complete"
39120    arguments="EOL"
39121    new_path="$path"
39122
39123  windows_path="$new_path"
39124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39125    unix_path=`$CYGPATH -u "$windows_path"`
39126    new_path="$unix_path"
39127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39129    new_path="$unix_path"
39130  fi
39131
39132
39133    new_path=`$WHICH "$new_path" 2> /dev/null`
39134    # bat and cmd files are not always considered executable in MSYS causing which
39135    # to not find them
39136    if test "x$new_path" = x \
39137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39139      new_path="$path"
39140
39141  windows_path="$new_path"
39142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39143    unix_path=`$CYGPATH -u "$windows_path"`
39144    new_path="$unix_path"
39145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39147    new_path="$unix_path"
39148  fi
39149
39150    fi
39151
39152    if test "x$new_path" = x; then
39153      # It's still not found. Now this is an unrecoverable error.
39154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39155$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39156      has_space=`$ECHO "$complete" | $GREP " "`
39157      if test "x$has_space" != x; then
39158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39160      fi
39161      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39162    fi
39163  fi
39164
39165  # Now new_path has a complete unix path to the binary
39166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39167    # Keep paths in /bin as-is, but remove trailing .exe if any
39168    new_path="${new_path/%.exe/}"
39169    # Do not save /bin paths to all_fixpath_prefixes!
39170  else
39171    # Not in mixed or Windows style, start by that.
39172    new_path=`cmd //c echo $new_path`
39173
39174  input_path="$new_path"
39175  # Check if we need to convert this using DOS-style short mode. If the path
39176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39177  # take no chances and rewrite it.
39178  # Note: m4 eats our [], so we need to use [ and ] instead.
39179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39180  if test "x$has_forbidden_chars" != x; then
39181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39183  fi
39184
39185    # Output is in $new_path
39186
39187  windows_path="$new_path"
39188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39189    unix_path=`$CYGPATH -u "$windows_path"`
39190    new_path="$unix_path"
39191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39193    new_path="$unix_path"
39194  fi
39195
39196    # remove trailing .exe if any
39197    new_path="${new_path/%.exe/}"
39198
39199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39201  fi
39202
39203    else
39204      # We're on a unix platform. Hooray! :)
39205      # First separate the path from the arguments. This will split at the first
39206      # space.
39207      complete="$RC"
39208      path="${complete%% *}"
39209      tmp="$complete EOL"
39210      arguments="${tmp#* }"
39211
39212      # Cannot rely on the command "which" here since it doesn't always work.
39213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39214      if test -z "$is_absolute_path"; then
39215        # Path to executable is not absolute. Find it.
39216        IFS_save="$IFS"
39217        IFS=:
39218        for p in $PATH; do
39219          if test -f "$p/$path" && test -x "$p/$path"; then
39220            new_path="$p/$path"
39221            break
39222          fi
39223        done
39224        IFS="$IFS_save"
39225      else
39226        # This is an absolute path, we can use it without further modifications.
39227        new_path="$path"
39228      fi
39229
39230      if test "x$new_path" = x; then
39231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39232$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39233        has_space=`$ECHO "$complete" | $GREP " "`
39234        if test "x$has_space" != x; then
39235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39237        fi
39238        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39239      fi
39240    fi
39241
39242    # Now join together the path and the arguments once again
39243    if test "x$arguments" != xEOL; then
39244      new_complete="$new_path ${arguments% *}"
39245    else
39246      new_complete="$new_path"
39247    fi
39248
39249    if test "x$complete" != "x$new_complete"; then
39250      RC="$new_complete"
39251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39252$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39253    fi
39254  fi
39255
39256    # Extract the first word of "dumpbin", so it can be a program name with args.
39257set dummy dumpbin; ac_word=$2
39258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39259$as_echo_n "checking for $ac_word... " >&6; }
39260if ${ac_cv_prog_DUMPBIN+:} false; then :
39261  $as_echo_n "(cached) " >&6
39262else
39263  if test -n "$DUMPBIN"; then
39264  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39265else
39266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39267for as_dir in $PATH
39268do
39269  IFS=$as_save_IFS
39270  test -z "$as_dir" && as_dir=.
39271    for ac_exec_ext in '' $ac_executable_extensions; do
39272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39273    ac_cv_prog_DUMPBIN="dumpbin"
39274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39275    break 2
39276  fi
39277done
39278  done
39279IFS=$as_save_IFS
39280
39281fi
39282fi
39283DUMPBIN=$ac_cv_prog_DUMPBIN
39284if test -n "$DUMPBIN"; then
39285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39286$as_echo "$DUMPBIN" >&6; }
39287else
39288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39289$as_echo "no" >&6; }
39290fi
39291
39292
39293
39294  # Only process if variable expands to non-empty
39295
39296  if test "x$DUMPBIN" != x; then
39297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298
39299  # First separate the path from the arguments. This will split at the first
39300  # space.
39301  complete="$DUMPBIN"
39302  path="${complete%% *}"
39303  tmp="$complete EOL"
39304  arguments="${tmp#* }"
39305
39306  # Input might be given as Windows format, start by converting to
39307  # unix format.
39308  new_path=`$CYGPATH -u "$path"`
39309
39310  # Now try to locate executable using which
39311  new_path=`$WHICH "$new_path" 2> /dev/null`
39312  # bat and cmd files are not always considered executable in cygwin causing which
39313  # to not find them
39314  if test "x$new_path" = x \
39315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39317    new_path=`$CYGPATH -u "$path"`
39318  fi
39319  if test "x$new_path" = x; then
39320    # Oops. Which didn't find the executable.
39321    # The splitting of arguments from the executable at a space might have been incorrect,
39322    # since paths with space are more likely in Windows. Give it another try with the whole
39323    # argument.
39324    path="$complete"
39325    arguments="EOL"
39326    new_path=`$CYGPATH -u "$path"`
39327    new_path=`$WHICH "$new_path" 2> /dev/null`
39328    # bat and cmd files are not always considered executable in cygwin causing which
39329    # to not find them
39330    if test "x$new_path" = x \
39331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39333      new_path=`$CYGPATH -u "$path"`
39334    fi
39335    if test "x$new_path" = x; then
39336      # It's still not found. Now this is an unrecoverable error.
39337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39338$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39339      has_space=`$ECHO "$complete" | $GREP " "`
39340      if test "x$has_space" != x; then
39341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39343      fi
39344      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39345    fi
39346  fi
39347
39348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39351  # "foo.exe" is OK but "foo" is an error.
39352  #
39353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39354  # It is also a way to make sure we got the proper file name for the real test later on.
39355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39356  if test "x$test_shortpath" = x; then
39357    # Short path failed, file does not exist as specified.
39358    # Try adding .exe or .cmd
39359    if test -f "${new_path}.exe"; then
39360      input_to_shortpath="${new_path}.exe"
39361    elif test -f "${new_path}.cmd"; then
39362      input_to_shortpath="${new_path}.cmd"
39363    else
39364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39365$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39368      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39369    fi
39370  else
39371    input_to_shortpath="$new_path"
39372  fi
39373
39374  # Call helper function which possibly converts this using DOS-style short mode.
39375  # If so, the updated path is stored in $new_path.
39376  new_path="$input_to_shortpath"
39377
39378  input_path="$input_to_shortpath"
39379  # Check if we need to convert this using DOS-style short mode. If the path
39380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39381  # take no chances and rewrite it.
39382  # Note: m4 eats our [], so we need to use [ and ] instead.
39383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39384  if test "x$has_forbidden_chars" != x; then
39385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39389      # Going to short mode and back again did indeed matter. Since short mode is
39390      # case insensitive, let's make it lowercase to improve readability.
39391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39392      # Now convert it back to Unix-style (cygpath)
39393      input_path=`$CYGPATH -u "$shortmode_path"`
39394      new_path="$input_path"
39395    fi
39396  fi
39397
39398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39399  if test "x$test_cygdrive_prefix" = x; then
39400    # As a simple fix, exclude /usr/bin since it's not a real path.
39401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39403      # a path prefixed by /cygdrive for fixpath to work.
39404      new_path="$CYGWIN_ROOT_PATH$input_path"
39405    fi
39406  fi
39407
39408  # remove trailing .exe if any
39409  new_path="${new_path/%.exe/}"
39410
39411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412
39413  # First separate the path from the arguments. This will split at the first
39414  # space.
39415  complete="$DUMPBIN"
39416  path="${complete%% *}"
39417  tmp="$complete EOL"
39418  arguments="${tmp#* }"
39419
39420  # Input might be given as Windows format, start by converting to
39421  # unix format.
39422  new_path="$path"
39423
39424  windows_path="$new_path"
39425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39426    unix_path=`$CYGPATH -u "$windows_path"`
39427    new_path="$unix_path"
39428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39430    new_path="$unix_path"
39431  fi
39432
39433
39434  # Now try to locate executable using which
39435  new_path=`$WHICH "$new_path" 2> /dev/null`
39436
39437  if test "x$new_path" = x; then
39438    # Oops. Which didn't find the executable.
39439    # The splitting of arguments from the executable at a space might have been incorrect,
39440    # since paths with space are more likely in Windows. Give it another try with the whole
39441    # argument.
39442    path="$complete"
39443    arguments="EOL"
39444    new_path="$path"
39445
39446  windows_path="$new_path"
39447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39448    unix_path=`$CYGPATH -u "$windows_path"`
39449    new_path="$unix_path"
39450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39452    new_path="$unix_path"
39453  fi
39454
39455
39456    new_path=`$WHICH "$new_path" 2> /dev/null`
39457    # bat and cmd files are not always considered executable in MSYS causing which
39458    # to not find them
39459    if test "x$new_path" = x \
39460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39462      new_path="$path"
39463
39464  windows_path="$new_path"
39465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39466    unix_path=`$CYGPATH -u "$windows_path"`
39467    new_path="$unix_path"
39468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39470    new_path="$unix_path"
39471  fi
39472
39473    fi
39474
39475    if test "x$new_path" = x; then
39476      # It's still not found. Now this is an unrecoverable error.
39477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39478$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39479      has_space=`$ECHO "$complete" | $GREP " "`
39480      if test "x$has_space" != x; then
39481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39483      fi
39484      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39485    fi
39486  fi
39487
39488  # Now new_path has a complete unix path to the binary
39489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39490    # Keep paths in /bin as-is, but remove trailing .exe if any
39491    new_path="${new_path/%.exe/}"
39492    # Do not save /bin paths to all_fixpath_prefixes!
39493  else
39494    # Not in mixed or Windows style, start by that.
39495    new_path=`cmd //c echo $new_path`
39496
39497  input_path="$new_path"
39498  # Check if we need to convert this using DOS-style short mode. If the path
39499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39500  # take no chances and rewrite it.
39501  # Note: m4 eats our [], so we need to use [ and ] instead.
39502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39503  if test "x$has_forbidden_chars" != x; then
39504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39506  fi
39507
39508    # Output is in $new_path
39509
39510  windows_path="$new_path"
39511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39512    unix_path=`$CYGPATH -u "$windows_path"`
39513    new_path="$unix_path"
39514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39516    new_path="$unix_path"
39517  fi
39518
39519    # remove trailing .exe if any
39520    new_path="${new_path/%.exe/}"
39521
39522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39524  fi
39525
39526    else
39527      # We're on a unix platform. Hooray! :)
39528      # First separate the path from the arguments. This will split at the first
39529      # space.
39530      complete="$DUMPBIN"
39531      path="${complete%% *}"
39532      tmp="$complete EOL"
39533      arguments="${tmp#* }"
39534
39535      # Cannot rely on the command "which" here since it doesn't always work.
39536      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39537      if test -z "$is_absolute_path"; then
39538        # Path to executable is not absolute. Find it.
39539        IFS_save="$IFS"
39540        IFS=:
39541        for p in $PATH; do
39542          if test -f "$p/$path" && test -x "$p/$path"; then
39543            new_path="$p/$path"
39544            break
39545          fi
39546        done
39547        IFS="$IFS_save"
39548      else
39549        # This is an absolute path, we can use it without further modifications.
39550        new_path="$path"
39551      fi
39552
39553      if test "x$new_path" = x; then
39554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39555$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39556        has_space=`$ECHO "$complete" | $GREP " "`
39557        if test "x$has_space" != x; then
39558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39560        fi
39561        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39562      fi
39563    fi
39564
39565    # Now join together the path and the arguments once again
39566    if test "x$arguments" != xEOL; then
39567      new_complete="$new_path ${arguments% *}"
39568    else
39569      new_complete="$new_path"
39570    fi
39571
39572    if test "x$complete" != "x$new_complete"; then
39573      DUMPBIN="$new_complete"
39574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39575$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39576    fi
39577  fi
39578
39579    # We need to check for 'msbuild.exe' because at the place where we expect to
39580    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39581    # won't find the 'msbuild.exe' executable in that case (and the
39582    # 'ac_executable_extensions' is unusable due to performance reasons).
39583    # Notice that we intentionally don't fix up the path to MSBUILD because we
39584    # will call it in a DOS shell during freetype detection on Windows (see
39585    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39586    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39587set dummy msbuild.exe; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_prog_MSBUILD+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  if test -n "$MSBUILD"; then
39594  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39595else
39596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39597for as_dir in $PATH
39598do
39599  IFS=$as_save_IFS
39600  test -z "$as_dir" && as_dir=.
39601    for ac_exec_ext in '' $ac_executable_extensions; do
39602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39603    ac_cv_prog_MSBUILD="msbuild.exe"
39604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39605    break 2
39606  fi
39607done
39608  done
39609IFS=$as_save_IFS
39610
39611fi
39612fi
39613MSBUILD=$ac_cv_prog_MSBUILD
39614if test -n "$MSBUILD"; then
39615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39616$as_echo "$MSBUILD" >&6; }
39617else
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39619$as_echo "no" >&6; }
39620fi
39621
39622
39623  fi
39624
39625  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39626
39627
39628  # Publish this variable in the help.
39629
39630
39631  if [ -z "${STRIP+x}" ]; then
39632    # The variable is not set by user, try to locate tool using the code snippet
39633    for ac_prog in strip
39634do
39635  # Extract the first word of "$ac_prog", so it can be a program name with args.
39636set dummy $ac_prog; ac_word=$2
39637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39638$as_echo_n "checking for $ac_word... " >&6; }
39639if ${ac_cv_path_STRIP+:} false; then :
39640  $as_echo_n "(cached) " >&6
39641else
39642  case $STRIP in
39643  [\\/]* | ?:[\\/]*)
39644  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39645  ;;
39646  *)
39647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39648for as_dir in $PATH
39649do
39650  IFS=$as_save_IFS
39651  test -z "$as_dir" && as_dir=.
39652    for ac_exec_ext in '' $ac_executable_extensions; do
39653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39654    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39656    break 2
39657  fi
39658done
39659  done
39660IFS=$as_save_IFS
39661
39662  ;;
39663esac
39664fi
39665STRIP=$ac_cv_path_STRIP
39666if test -n "$STRIP"; then
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39668$as_echo "$STRIP" >&6; }
39669else
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39671$as_echo "no" >&6; }
39672fi
39673
39674
39675  test -n "$STRIP" && break
39676done
39677
39678  else
39679    # The variable is set, but is it from the command line or the environment?
39680
39681    # Try to remove the string !STRIP! from our list.
39682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39684      # If it failed, the variable was not from the command line. Ignore it,
39685      # but warn the user (except for BASH, which is always set by the calling BASH).
39686      if test "xSTRIP" != xBASH; then
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39688$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39689      fi
39690      # Try to locate tool using the code snippet
39691      for ac_prog in strip
39692do
39693  # Extract the first word of "$ac_prog", so it can be a program name with args.
39694set dummy $ac_prog; ac_word=$2
39695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39696$as_echo_n "checking for $ac_word... " >&6; }
39697if ${ac_cv_path_STRIP+:} false; then :
39698  $as_echo_n "(cached) " >&6
39699else
39700  case $STRIP in
39701  [\\/]* | ?:[\\/]*)
39702  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39703  ;;
39704  *)
39705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39706for as_dir in $PATH
39707do
39708  IFS=$as_save_IFS
39709  test -z "$as_dir" && as_dir=.
39710    for ac_exec_ext in '' $ac_executable_extensions; do
39711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39712    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39714    break 2
39715  fi
39716done
39717  done
39718IFS=$as_save_IFS
39719
39720  ;;
39721esac
39722fi
39723STRIP=$ac_cv_path_STRIP
39724if test -n "$STRIP"; then
39725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39726$as_echo "$STRIP" >&6; }
39727else
39728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39729$as_echo "no" >&6; }
39730fi
39731
39732
39733  test -n "$STRIP" && break
39734done
39735
39736    else
39737      # If it succeeded, then it was overridden by the user. We will use it
39738      # for the tool.
39739
39740      # First remove it from the list of overridden variables, so we can test
39741      # for unknown variables in the end.
39742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39743
39744      # Check if we try to supply an empty value
39745      if test "x$STRIP" = x; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39747$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39749$as_echo_n "checking for STRIP... " >&6; }
39750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39751$as_echo "disabled" >&6; }
39752      else
39753        # Check if the provided tool contains a complete path.
39754        tool_specified="$STRIP"
39755        tool_basename="${tool_specified##*/}"
39756        if test "x$tool_basename" = "x$tool_specified"; then
39757          # A command without a complete path is provided, search $PATH.
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39759$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39760          # Extract the first word of "$tool_basename", so it can be a program name with args.
39761set dummy $tool_basename; ac_word=$2
39762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39763$as_echo_n "checking for $ac_word... " >&6; }
39764if ${ac_cv_path_STRIP+:} false; then :
39765  $as_echo_n "(cached) " >&6
39766else
39767  case $STRIP in
39768  [\\/]* | ?:[\\/]*)
39769  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39770  ;;
39771  *)
39772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39773for as_dir in $PATH
39774do
39775  IFS=$as_save_IFS
39776  test -z "$as_dir" && as_dir=.
39777    for ac_exec_ext in '' $ac_executable_extensions; do
39778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39779    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39781    break 2
39782  fi
39783done
39784  done
39785IFS=$as_save_IFS
39786
39787  ;;
39788esac
39789fi
39790STRIP=$ac_cv_path_STRIP
39791if test -n "$STRIP"; then
39792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39793$as_echo "$STRIP" >&6; }
39794else
39795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39796$as_echo "no" >&6; }
39797fi
39798
39799
39800          if test "x$STRIP" = x; then
39801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39802          fi
39803        else
39804          # Otherwise we believe it is a complete path. Use it as it is.
39805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39806$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39808$as_echo_n "checking for STRIP... " >&6; }
39809          if test ! -x "$tool_specified"; then
39810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39811$as_echo "not found" >&6; }
39812            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39813          fi
39814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39815$as_echo "$tool_specified" >&6; }
39816        fi
39817      fi
39818    fi
39819
39820  fi
39821
39822
39823
39824  # Only process if variable expands to non-empty
39825
39826  if test "x$STRIP" != x; then
39827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39828
39829  # First separate the path from the arguments. This will split at the first
39830  # space.
39831  complete="$STRIP"
39832  path="${complete%% *}"
39833  tmp="$complete EOL"
39834  arguments="${tmp#* }"
39835
39836  # Input might be given as Windows format, start by converting to
39837  # unix format.
39838  new_path=`$CYGPATH -u "$path"`
39839
39840  # Now try to locate executable using which
39841  new_path=`$WHICH "$new_path" 2> /dev/null`
39842  # bat and cmd files are not always considered executable in cygwin causing which
39843  # to not find them
39844  if test "x$new_path" = x \
39845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39847    new_path=`$CYGPATH -u "$path"`
39848  fi
39849  if test "x$new_path" = x; then
39850    # Oops. Which didn't find the executable.
39851    # The splitting of arguments from the executable at a space might have been incorrect,
39852    # since paths with space are more likely in Windows. Give it another try with the whole
39853    # argument.
39854    path="$complete"
39855    arguments="EOL"
39856    new_path=`$CYGPATH -u "$path"`
39857    new_path=`$WHICH "$new_path" 2> /dev/null`
39858    # bat and cmd files are not always considered executable in cygwin causing which
39859    # to not find them
39860    if test "x$new_path" = x \
39861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39863      new_path=`$CYGPATH -u "$path"`
39864    fi
39865    if test "x$new_path" = x; then
39866      # It's still not found. Now this is an unrecoverable error.
39867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39868$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39869      has_space=`$ECHO "$complete" | $GREP " "`
39870      if test "x$has_space" != x; then
39871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39873      fi
39874      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39875    fi
39876  fi
39877
39878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39881  # "foo.exe" is OK but "foo" is an error.
39882  #
39883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39884  # It is also a way to make sure we got the proper file name for the real test later on.
39885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39886  if test "x$test_shortpath" = x; then
39887    # Short path failed, file does not exist as specified.
39888    # Try adding .exe or .cmd
39889    if test -f "${new_path}.exe"; then
39890      input_to_shortpath="${new_path}.exe"
39891    elif test -f "${new_path}.cmd"; then
39892      input_to_shortpath="${new_path}.cmd"
39893    else
39894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39895$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39898      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39899    fi
39900  else
39901    input_to_shortpath="$new_path"
39902  fi
39903
39904  # Call helper function which possibly converts this using DOS-style short mode.
39905  # If so, the updated path is stored in $new_path.
39906  new_path="$input_to_shortpath"
39907
39908  input_path="$input_to_shortpath"
39909  # Check if we need to convert this using DOS-style short mode. If the path
39910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39911  # take no chances and rewrite it.
39912  # Note: m4 eats our [], so we need to use [ and ] instead.
39913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39914  if test "x$has_forbidden_chars" != x; then
39915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39919      # Going to short mode and back again did indeed matter. Since short mode is
39920      # case insensitive, let's make it lowercase to improve readability.
39921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39922      # Now convert it back to Unix-style (cygpath)
39923      input_path=`$CYGPATH -u "$shortmode_path"`
39924      new_path="$input_path"
39925    fi
39926  fi
39927
39928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39929  if test "x$test_cygdrive_prefix" = x; then
39930    # As a simple fix, exclude /usr/bin since it's not a real path.
39931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39933      # a path prefixed by /cygdrive for fixpath to work.
39934      new_path="$CYGWIN_ROOT_PATH$input_path"
39935    fi
39936  fi
39937
39938  # remove trailing .exe if any
39939  new_path="${new_path/%.exe/}"
39940
39941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942
39943  # First separate the path from the arguments. This will split at the first
39944  # space.
39945  complete="$STRIP"
39946  path="${complete%% *}"
39947  tmp="$complete EOL"
39948  arguments="${tmp#* }"
39949
39950  # Input might be given as Windows format, start by converting to
39951  # unix format.
39952  new_path="$path"
39953
39954  windows_path="$new_path"
39955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39956    unix_path=`$CYGPATH -u "$windows_path"`
39957    new_path="$unix_path"
39958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39960    new_path="$unix_path"
39961  fi
39962
39963
39964  # Now try to locate executable using which
39965  new_path=`$WHICH "$new_path" 2> /dev/null`
39966
39967  if test "x$new_path" = x; then
39968    # Oops. Which didn't find the executable.
39969    # The splitting of arguments from the executable at a space might have been incorrect,
39970    # since paths with space are more likely in Windows. Give it another try with the whole
39971    # argument.
39972    path="$complete"
39973    arguments="EOL"
39974    new_path="$path"
39975
39976  windows_path="$new_path"
39977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978    unix_path=`$CYGPATH -u "$windows_path"`
39979    new_path="$unix_path"
39980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982    new_path="$unix_path"
39983  fi
39984
39985
39986    new_path=`$WHICH "$new_path" 2> /dev/null`
39987    # bat and cmd files are not always considered executable in MSYS causing which
39988    # to not find them
39989    if test "x$new_path" = x \
39990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39992      new_path="$path"
39993
39994  windows_path="$new_path"
39995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39996    unix_path=`$CYGPATH -u "$windows_path"`
39997    new_path="$unix_path"
39998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40000    new_path="$unix_path"
40001  fi
40002
40003    fi
40004
40005    if test "x$new_path" = x; then
40006      # It's still not found. Now this is an unrecoverable error.
40007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40008$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40009      has_space=`$ECHO "$complete" | $GREP " "`
40010      if test "x$has_space" != x; then
40011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40013      fi
40014      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40015    fi
40016  fi
40017
40018  # Now new_path has a complete unix path to the binary
40019  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40020    # Keep paths in /bin as-is, but remove trailing .exe if any
40021    new_path="${new_path/%.exe/}"
40022    # Do not save /bin paths to all_fixpath_prefixes!
40023  else
40024    # Not in mixed or Windows style, start by that.
40025    new_path=`cmd //c echo $new_path`
40026
40027  input_path="$new_path"
40028  # Check if we need to convert this using DOS-style short mode. If the path
40029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40030  # take no chances and rewrite it.
40031  # Note: m4 eats our [], so we need to use [ and ] instead.
40032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40033  if test "x$has_forbidden_chars" != x; then
40034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40036  fi
40037
40038    # Output is in $new_path
40039
40040  windows_path="$new_path"
40041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40042    unix_path=`$CYGPATH -u "$windows_path"`
40043    new_path="$unix_path"
40044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40046    new_path="$unix_path"
40047  fi
40048
40049    # remove trailing .exe if any
40050    new_path="${new_path/%.exe/}"
40051
40052    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40053    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40054  fi
40055
40056    else
40057      # We're on a unix platform. Hooray! :)
40058      # First separate the path from the arguments. This will split at the first
40059      # space.
40060      complete="$STRIP"
40061      path="${complete%% *}"
40062      tmp="$complete EOL"
40063      arguments="${tmp#* }"
40064
40065      # Cannot rely on the command "which" here since it doesn't always work.
40066      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40067      if test -z "$is_absolute_path"; then
40068        # Path to executable is not absolute. Find it.
40069        IFS_save="$IFS"
40070        IFS=:
40071        for p in $PATH; do
40072          if test -f "$p/$path" && test -x "$p/$path"; then
40073            new_path="$p/$path"
40074            break
40075          fi
40076        done
40077        IFS="$IFS_save"
40078      else
40079        # This is an absolute path, we can use it without further modifications.
40080        new_path="$path"
40081      fi
40082
40083      if test "x$new_path" = x; then
40084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40085$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40086        has_space=`$ECHO "$complete" | $GREP " "`
40087        if test "x$has_space" != x; then
40088          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40089$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40090        fi
40091        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40092      fi
40093    fi
40094
40095    # Now join together the path and the arguments once again
40096    if test "x$arguments" != xEOL; then
40097      new_complete="$new_path ${arguments% *}"
40098    else
40099      new_complete="$new_path"
40100    fi
40101
40102    if test "x$complete" != "x$new_complete"; then
40103      STRIP="$new_complete"
40104      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40105$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40106    fi
40107  fi
40108
40109
40110
40111  # Publish this variable in the help.
40112
40113
40114  if [ -z "${NM+x}" ]; then
40115    # The variable is not set by user, try to locate tool using the code snippet
40116    for ac_prog in nm
40117do
40118  # Extract the first word of "$ac_prog", so it can be a program name with args.
40119set dummy $ac_prog; ac_word=$2
40120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40121$as_echo_n "checking for $ac_word... " >&6; }
40122if ${ac_cv_path_NM+:} false; then :
40123  $as_echo_n "(cached) " >&6
40124else
40125  case $NM in
40126  [\\/]* | ?:[\\/]*)
40127  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40128  ;;
40129  *)
40130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40131for as_dir in $PATH
40132do
40133  IFS=$as_save_IFS
40134  test -z "$as_dir" && as_dir=.
40135    for ac_exec_ext in '' $ac_executable_extensions; do
40136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40137    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40139    break 2
40140  fi
40141done
40142  done
40143IFS=$as_save_IFS
40144
40145  ;;
40146esac
40147fi
40148NM=$ac_cv_path_NM
40149if test -n "$NM"; then
40150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40151$as_echo "$NM" >&6; }
40152else
40153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40154$as_echo "no" >&6; }
40155fi
40156
40157
40158  test -n "$NM" && break
40159done
40160
40161  else
40162    # The variable is set, but is it from the command line or the environment?
40163
40164    # Try to remove the string !NM! from our list.
40165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40167      # If it failed, the variable was not from the command line. Ignore it,
40168      # but warn the user (except for BASH, which is always set by the calling BASH).
40169      if test "xNM" != xBASH; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40171$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40172      fi
40173      # Try to locate tool using the code snippet
40174      for ac_prog in nm
40175do
40176  # Extract the first word of "$ac_prog", so it can be a program name with args.
40177set dummy $ac_prog; ac_word=$2
40178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40179$as_echo_n "checking for $ac_word... " >&6; }
40180if ${ac_cv_path_NM+:} false; then :
40181  $as_echo_n "(cached) " >&6
40182else
40183  case $NM in
40184  [\\/]* | ?:[\\/]*)
40185  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40186  ;;
40187  *)
40188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40189for as_dir in $PATH
40190do
40191  IFS=$as_save_IFS
40192  test -z "$as_dir" && as_dir=.
40193    for ac_exec_ext in '' $ac_executable_extensions; do
40194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40195    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40197    break 2
40198  fi
40199done
40200  done
40201IFS=$as_save_IFS
40202
40203  ;;
40204esac
40205fi
40206NM=$ac_cv_path_NM
40207if test -n "$NM"; then
40208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40209$as_echo "$NM" >&6; }
40210else
40211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40212$as_echo "no" >&6; }
40213fi
40214
40215
40216  test -n "$NM" && break
40217done
40218
40219    else
40220      # If it succeeded, then it was overridden by the user. We will use it
40221      # for the tool.
40222
40223      # First remove it from the list of overridden variables, so we can test
40224      # for unknown variables in the end.
40225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40226
40227      # Check if we try to supply an empty value
40228      if test "x$NM" = x; then
40229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40230$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40232$as_echo_n "checking for NM... " >&6; }
40233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40234$as_echo "disabled" >&6; }
40235      else
40236        # Check if the provided tool contains a complete path.
40237        tool_specified="$NM"
40238        tool_basename="${tool_specified##*/}"
40239        if test "x$tool_basename" = "x$tool_specified"; then
40240          # A command without a complete path is provided, search $PATH.
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40242$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40243          # Extract the first word of "$tool_basename", so it can be a program name with args.
40244set dummy $tool_basename; ac_word=$2
40245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40246$as_echo_n "checking for $ac_word... " >&6; }
40247if ${ac_cv_path_NM+:} false; then :
40248  $as_echo_n "(cached) " >&6
40249else
40250  case $NM in
40251  [\\/]* | ?:[\\/]*)
40252  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40253  ;;
40254  *)
40255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40256for as_dir in $PATH
40257do
40258  IFS=$as_save_IFS
40259  test -z "$as_dir" && as_dir=.
40260    for ac_exec_ext in '' $ac_executable_extensions; do
40261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40262    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40264    break 2
40265  fi
40266done
40267  done
40268IFS=$as_save_IFS
40269
40270  ;;
40271esac
40272fi
40273NM=$ac_cv_path_NM
40274if test -n "$NM"; then
40275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40276$as_echo "$NM" >&6; }
40277else
40278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40279$as_echo "no" >&6; }
40280fi
40281
40282
40283          if test "x$NM" = x; then
40284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40285          fi
40286        else
40287          # Otherwise we believe it is a complete path. Use it as it is.
40288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40289$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40291$as_echo_n "checking for NM... " >&6; }
40292          if test ! -x "$tool_specified"; then
40293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40294$as_echo "not found" >&6; }
40295            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40296          fi
40297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40298$as_echo "$tool_specified" >&6; }
40299        fi
40300      fi
40301    fi
40302
40303  fi
40304
40305
40306
40307  # Only process if variable expands to non-empty
40308
40309  if test "x$NM" != x; then
40310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40311
40312  # First separate the path from the arguments. This will split at the first
40313  # space.
40314  complete="$NM"
40315  path="${complete%% *}"
40316  tmp="$complete EOL"
40317  arguments="${tmp#* }"
40318
40319  # Input might be given as Windows format, start by converting to
40320  # unix format.
40321  new_path=`$CYGPATH -u "$path"`
40322
40323  # Now try to locate executable using which
40324  new_path=`$WHICH "$new_path" 2> /dev/null`
40325  # bat and cmd files are not always considered executable in cygwin causing which
40326  # to not find them
40327  if test "x$new_path" = x \
40328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40330    new_path=`$CYGPATH -u "$path"`
40331  fi
40332  if test "x$new_path" = x; then
40333    # Oops. Which didn't find the executable.
40334    # The splitting of arguments from the executable at a space might have been incorrect,
40335    # since paths with space are more likely in Windows. Give it another try with the whole
40336    # argument.
40337    path="$complete"
40338    arguments="EOL"
40339    new_path=`$CYGPATH -u "$path"`
40340    new_path=`$WHICH "$new_path" 2> /dev/null`
40341    # bat and cmd files are not always considered executable in cygwin causing which
40342    # to not find them
40343    if test "x$new_path" = x \
40344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40346      new_path=`$CYGPATH -u "$path"`
40347    fi
40348    if test "x$new_path" = x; then
40349      # It's still not found. Now this is an unrecoverable error.
40350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40351$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40352      has_space=`$ECHO "$complete" | $GREP " "`
40353      if test "x$has_space" != x; then
40354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40356      fi
40357      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40358    fi
40359  fi
40360
40361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40364  # "foo.exe" is OK but "foo" is an error.
40365  #
40366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40367  # It is also a way to make sure we got the proper file name for the real test later on.
40368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40369  if test "x$test_shortpath" = x; then
40370    # Short path failed, file does not exist as specified.
40371    # Try adding .exe or .cmd
40372    if test -f "${new_path}.exe"; then
40373      input_to_shortpath="${new_path}.exe"
40374    elif test -f "${new_path}.cmd"; then
40375      input_to_shortpath="${new_path}.cmd"
40376    else
40377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40378$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40381      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40382    fi
40383  else
40384    input_to_shortpath="$new_path"
40385  fi
40386
40387  # Call helper function which possibly converts this using DOS-style short mode.
40388  # If so, the updated path is stored in $new_path.
40389  new_path="$input_to_shortpath"
40390
40391  input_path="$input_to_shortpath"
40392  # Check if we need to convert this using DOS-style short mode. If the path
40393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40394  # take no chances and rewrite it.
40395  # Note: m4 eats our [], so we need to use [ and ] instead.
40396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40397  if test "x$has_forbidden_chars" != x; then
40398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40402      # Going to short mode and back again did indeed matter. Since short mode is
40403      # case insensitive, let's make it lowercase to improve readability.
40404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40405      # Now convert it back to Unix-style (cygpath)
40406      input_path=`$CYGPATH -u "$shortmode_path"`
40407      new_path="$input_path"
40408    fi
40409  fi
40410
40411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40412  if test "x$test_cygdrive_prefix" = x; then
40413    # As a simple fix, exclude /usr/bin since it's not a real path.
40414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40416      # a path prefixed by /cygdrive for fixpath to work.
40417      new_path="$CYGWIN_ROOT_PATH$input_path"
40418    fi
40419  fi
40420
40421  # remove trailing .exe if any
40422  new_path="${new_path/%.exe/}"
40423
40424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40425
40426  # First separate the path from the arguments. This will split at the first
40427  # space.
40428  complete="$NM"
40429  path="${complete%% *}"
40430  tmp="$complete EOL"
40431  arguments="${tmp#* }"
40432
40433  # Input might be given as Windows format, start by converting to
40434  # unix format.
40435  new_path="$path"
40436
40437  windows_path="$new_path"
40438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40439    unix_path=`$CYGPATH -u "$windows_path"`
40440    new_path="$unix_path"
40441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40443    new_path="$unix_path"
40444  fi
40445
40446
40447  # Now try to locate executable using which
40448  new_path=`$WHICH "$new_path" 2> /dev/null`
40449
40450  if test "x$new_path" = x; then
40451    # Oops. Which didn't find the executable.
40452    # The splitting of arguments from the executable at a space might have been incorrect,
40453    # since paths with space are more likely in Windows. Give it another try with the whole
40454    # argument.
40455    path="$complete"
40456    arguments="EOL"
40457    new_path="$path"
40458
40459  windows_path="$new_path"
40460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40461    unix_path=`$CYGPATH -u "$windows_path"`
40462    new_path="$unix_path"
40463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40465    new_path="$unix_path"
40466  fi
40467
40468
40469    new_path=`$WHICH "$new_path" 2> /dev/null`
40470    # bat and cmd files are not always considered executable in MSYS causing which
40471    # to not find them
40472    if test "x$new_path" = x \
40473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40475      new_path="$path"
40476
40477  windows_path="$new_path"
40478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40479    unix_path=`$CYGPATH -u "$windows_path"`
40480    new_path="$unix_path"
40481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40483    new_path="$unix_path"
40484  fi
40485
40486    fi
40487
40488    if test "x$new_path" = x; then
40489      # It's still not found. Now this is an unrecoverable error.
40490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40492      has_space=`$ECHO "$complete" | $GREP " "`
40493      if test "x$has_space" != x; then
40494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40496      fi
40497      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40498    fi
40499  fi
40500
40501  # Now new_path has a complete unix path to the binary
40502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40503    # Keep paths in /bin as-is, but remove trailing .exe if any
40504    new_path="${new_path/%.exe/}"
40505    # Do not save /bin paths to all_fixpath_prefixes!
40506  else
40507    # Not in mixed or Windows style, start by that.
40508    new_path=`cmd //c echo $new_path`
40509
40510  input_path="$new_path"
40511  # Check if we need to convert this using DOS-style short mode. If the path
40512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40513  # take no chances and rewrite it.
40514  # Note: m4 eats our [], so we need to use [ and ] instead.
40515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40516  if test "x$has_forbidden_chars" != x; then
40517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40519  fi
40520
40521    # Output is in $new_path
40522
40523  windows_path="$new_path"
40524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40525    unix_path=`$CYGPATH -u "$windows_path"`
40526    new_path="$unix_path"
40527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40529    new_path="$unix_path"
40530  fi
40531
40532    # remove trailing .exe if any
40533    new_path="${new_path/%.exe/}"
40534
40535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40537  fi
40538
40539    else
40540      # We're on a unix platform. Hooray! :)
40541      # First separate the path from the arguments. This will split at the first
40542      # space.
40543      complete="$NM"
40544      path="${complete%% *}"
40545      tmp="$complete EOL"
40546      arguments="${tmp#* }"
40547
40548      # Cannot rely on the command "which" here since it doesn't always work.
40549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40550      if test -z "$is_absolute_path"; then
40551        # Path to executable is not absolute. Find it.
40552        IFS_save="$IFS"
40553        IFS=:
40554        for p in $PATH; do
40555          if test -f "$p/$path" && test -x "$p/$path"; then
40556            new_path="$p/$path"
40557            break
40558          fi
40559        done
40560        IFS="$IFS_save"
40561      else
40562        # This is an absolute path, we can use it without further modifications.
40563        new_path="$path"
40564      fi
40565
40566      if test "x$new_path" = x; then
40567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40568$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40569        has_space=`$ECHO "$complete" | $GREP " "`
40570        if test "x$has_space" != x; then
40571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40573        fi
40574        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40575      fi
40576    fi
40577
40578    # Now join together the path and the arguments once again
40579    if test "x$arguments" != xEOL; then
40580      new_complete="$new_path ${arguments% *}"
40581    else
40582      new_complete="$new_path"
40583    fi
40584
40585    if test "x$complete" != "x$new_complete"; then
40586      NM="$new_complete"
40587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40588$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40589    fi
40590  fi
40591
40592
40593
40594  # Publish this variable in the help.
40595
40596
40597  if [ -z "${GNM+x}" ]; then
40598    # The variable is not set by user, try to locate tool using the code snippet
40599    for ac_prog in gnm
40600do
40601  # Extract the first word of "$ac_prog", so it can be a program name with args.
40602set dummy $ac_prog; ac_word=$2
40603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40604$as_echo_n "checking for $ac_word... " >&6; }
40605if ${ac_cv_path_GNM+:} false; then :
40606  $as_echo_n "(cached) " >&6
40607else
40608  case $GNM in
40609  [\\/]* | ?:[\\/]*)
40610  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40611  ;;
40612  *)
40613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40614for as_dir in $PATH
40615do
40616  IFS=$as_save_IFS
40617  test -z "$as_dir" && as_dir=.
40618    for ac_exec_ext in '' $ac_executable_extensions; do
40619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40620    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40622    break 2
40623  fi
40624done
40625  done
40626IFS=$as_save_IFS
40627
40628  ;;
40629esac
40630fi
40631GNM=$ac_cv_path_GNM
40632if test -n "$GNM"; then
40633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40634$as_echo "$GNM" >&6; }
40635else
40636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40637$as_echo "no" >&6; }
40638fi
40639
40640
40641  test -n "$GNM" && break
40642done
40643
40644  else
40645    # The variable is set, but is it from the command line or the environment?
40646
40647    # Try to remove the string !GNM! from our list.
40648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40650      # If it failed, the variable was not from the command line. Ignore it,
40651      # but warn the user (except for BASH, which is always set by the calling BASH).
40652      if test "xGNM" != xBASH; then
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40654$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40655      fi
40656      # Try to locate tool using the code snippet
40657      for ac_prog in gnm
40658do
40659  # Extract the first word of "$ac_prog", so it can be a program name with args.
40660set dummy $ac_prog; ac_word=$2
40661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40662$as_echo_n "checking for $ac_word... " >&6; }
40663if ${ac_cv_path_GNM+:} false; then :
40664  $as_echo_n "(cached) " >&6
40665else
40666  case $GNM in
40667  [\\/]* | ?:[\\/]*)
40668  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40669  ;;
40670  *)
40671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40672for as_dir in $PATH
40673do
40674  IFS=$as_save_IFS
40675  test -z "$as_dir" && as_dir=.
40676    for ac_exec_ext in '' $ac_executable_extensions; do
40677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40678    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40680    break 2
40681  fi
40682done
40683  done
40684IFS=$as_save_IFS
40685
40686  ;;
40687esac
40688fi
40689GNM=$ac_cv_path_GNM
40690if test -n "$GNM"; then
40691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40692$as_echo "$GNM" >&6; }
40693else
40694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40695$as_echo "no" >&6; }
40696fi
40697
40698
40699  test -n "$GNM" && break
40700done
40701
40702    else
40703      # If it succeeded, then it was overridden by the user. We will use it
40704      # for the tool.
40705
40706      # First remove it from the list of overridden variables, so we can test
40707      # for unknown variables in the end.
40708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40709
40710      # Check if we try to supply an empty value
40711      if test "x$GNM" = x; then
40712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40713$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40715$as_echo_n "checking for GNM... " >&6; }
40716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40717$as_echo "disabled" >&6; }
40718      else
40719        # Check if the provided tool contains a complete path.
40720        tool_specified="$GNM"
40721        tool_basename="${tool_specified##*/}"
40722        if test "x$tool_basename" = "x$tool_specified"; then
40723          # A command without a complete path is provided, search $PATH.
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40725$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40726          # Extract the first word of "$tool_basename", so it can be a program name with args.
40727set dummy $tool_basename; ac_word=$2
40728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40729$as_echo_n "checking for $ac_word... " >&6; }
40730if ${ac_cv_path_GNM+:} false; then :
40731  $as_echo_n "(cached) " >&6
40732else
40733  case $GNM in
40734  [\\/]* | ?:[\\/]*)
40735  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40736  ;;
40737  *)
40738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40739for as_dir in $PATH
40740do
40741  IFS=$as_save_IFS
40742  test -z "$as_dir" && as_dir=.
40743    for ac_exec_ext in '' $ac_executable_extensions; do
40744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40745    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40747    break 2
40748  fi
40749done
40750  done
40751IFS=$as_save_IFS
40752
40753  ;;
40754esac
40755fi
40756GNM=$ac_cv_path_GNM
40757if test -n "$GNM"; then
40758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40759$as_echo "$GNM" >&6; }
40760else
40761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40762$as_echo "no" >&6; }
40763fi
40764
40765
40766          if test "x$GNM" = x; then
40767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40768          fi
40769        else
40770          # Otherwise we believe it is a complete path. Use it as it is.
40771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40772$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40774$as_echo_n "checking for GNM... " >&6; }
40775          if test ! -x "$tool_specified"; then
40776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40777$as_echo "not found" >&6; }
40778            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40779          fi
40780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40781$as_echo "$tool_specified" >&6; }
40782        fi
40783      fi
40784    fi
40785
40786  fi
40787
40788
40789
40790  # Only process if variable expands to non-empty
40791
40792  if test "x$GNM" != x; then
40793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40794
40795  # First separate the path from the arguments. This will split at the first
40796  # space.
40797  complete="$GNM"
40798  path="${complete%% *}"
40799  tmp="$complete EOL"
40800  arguments="${tmp#* }"
40801
40802  # Input might be given as Windows format, start by converting to
40803  # unix format.
40804  new_path=`$CYGPATH -u "$path"`
40805
40806  # Now try to locate executable using which
40807  new_path=`$WHICH "$new_path" 2> /dev/null`
40808  # bat and cmd files are not always considered executable in cygwin causing which
40809  # to not find them
40810  if test "x$new_path" = x \
40811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40813    new_path=`$CYGPATH -u "$path"`
40814  fi
40815  if test "x$new_path" = x; then
40816    # Oops. Which didn't find the executable.
40817    # The splitting of arguments from the executable at a space might have been incorrect,
40818    # since paths with space are more likely in Windows. Give it another try with the whole
40819    # argument.
40820    path="$complete"
40821    arguments="EOL"
40822    new_path=`$CYGPATH -u "$path"`
40823    new_path=`$WHICH "$new_path" 2> /dev/null`
40824    # bat and cmd files are not always considered executable in cygwin causing which
40825    # to not find them
40826    if test "x$new_path" = x \
40827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40829      new_path=`$CYGPATH -u "$path"`
40830    fi
40831    if test "x$new_path" = x; then
40832      # It's still not found. Now this is an unrecoverable error.
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40834$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40835      has_space=`$ECHO "$complete" | $GREP " "`
40836      if test "x$has_space" != x; then
40837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40839      fi
40840      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40841    fi
40842  fi
40843
40844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40847  # "foo.exe" is OK but "foo" is an error.
40848  #
40849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40850  # It is also a way to make sure we got the proper file name for the real test later on.
40851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40852  if test "x$test_shortpath" = x; then
40853    # Short path failed, file does not exist as specified.
40854    # Try adding .exe or .cmd
40855    if test -f "${new_path}.exe"; then
40856      input_to_shortpath="${new_path}.exe"
40857    elif test -f "${new_path}.cmd"; then
40858      input_to_shortpath="${new_path}.cmd"
40859    else
40860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40861$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40864      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40865    fi
40866  else
40867    input_to_shortpath="$new_path"
40868  fi
40869
40870  # Call helper function which possibly converts this using DOS-style short mode.
40871  # If so, the updated path is stored in $new_path.
40872  new_path="$input_to_shortpath"
40873
40874  input_path="$input_to_shortpath"
40875  # Check if we need to convert this using DOS-style short mode. If the path
40876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40877  # take no chances and rewrite it.
40878  # Note: m4 eats our [], so we need to use [ and ] instead.
40879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40880  if test "x$has_forbidden_chars" != x; then
40881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40885      # Going to short mode and back again did indeed matter. Since short mode is
40886      # case insensitive, let's make it lowercase to improve readability.
40887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40888      # Now convert it back to Unix-style (cygpath)
40889      input_path=`$CYGPATH -u "$shortmode_path"`
40890      new_path="$input_path"
40891    fi
40892  fi
40893
40894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40895  if test "x$test_cygdrive_prefix" = x; then
40896    # As a simple fix, exclude /usr/bin since it's not a real path.
40897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40899      # a path prefixed by /cygdrive for fixpath to work.
40900      new_path="$CYGWIN_ROOT_PATH$input_path"
40901    fi
40902  fi
40903
40904  # remove trailing .exe if any
40905  new_path="${new_path/%.exe/}"
40906
40907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40908
40909  # First separate the path from the arguments. This will split at the first
40910  # space.
40911  complete="$GNM"
40912  path="${complete%% *}"
40913  tmp="$complete EOL"
40914  arguments="${tmp#* }"
40915
40916  # Input might be given as Windows format, start by converting to
40917  # unix format.
40918  new_path="$path"
40919
40920  windows_path="$new_path"
40921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40922    unix_path=`$CYGPATH -u "$windows_path"`
40923    new_path="$unix_path"
40924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40926    new_path="$unix_path"
40927  fi
40928
40929
40930  # Now try to locate executable using which
40931  new_path=`$WHICH "$new_path" 2> /dev/null`
40932
40933  if test "x$new_path" = x; then
40934    # Oops. Which didn't find the executable.
40935    # The splitting of arguments from the executable at a space might have been incorrect,
40936    # since paths with space are more likely in Windows. Give it another try with the whole
40937    # argument.
40938    path="$complete"
40939    arguments="EOL"
40940    new_path="$path"
40941
40942  windows_path="$new_path"
40943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40944    unix_path=`$CYGPATH -u "$windows_path"`
40945    new_path="$unix_path"
40946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40948    new_path="$unix_path"
40949  fi
40950
40951
40952    new_path=`$WHICH "$new_path" 2> /dev/null`
40953    # bat and cmd files are not always considered executable in MSYS causing which
40954    # to not find them
40955    if test "x$new_path" = x \
40956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40958      new_path="$path"
40959
40960  windows_path="$new_path"
40961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40962    unix_path=`$CYGPATH -u "$windows_path"`
40963    new_path="$unix_path"
40964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40966    new_path="$unix_path"
40967  fi
40968
40969    fi
40970
40971    if test "x$new_path" = x; then
40972      # It's still not found. Now this is an unrecoverable error.
40973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40974$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40975      has_space=`$ECHO "$complete" | $GREP " "`
40976      if test "x$has_space" != x; then
40977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40979      fi
40980      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40981    fi
40982  fi
40983
40984  # Now new_path has a complete unix path to the binary
40985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40986    # Keep paths in /bin as-is, but remove trailing .exe if any
40987    new_path="${new_path/%.exe/}"
40988    # Do not save /bin paths to all_fixpath_prefixes!
40989  else
40990    # Not in mixed or Windows style, start by that.
40991    new_path=`cmd //c echo $new_path`
40992
40993  input_path="$new_path"
40994  # Check if we need to convert this using DOS-style short mode. If the path
40995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40996  # take no chances and rewrite it.
40997  # Note: m4 eats our [], so we need to use [ and ] instead.
40998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40999  if test "x$has_forbidden_chars" != x; then
41000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41002  fi
41003
41004    # Output is in $new_path
41005
41006  windows_path="$new_path"
41007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41008    unix_path=`$CYGPATH -u "$windows_path"`
41009    new_path="$unix_path"
41010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41012    new_path="$unix_path"
41013  fi
41014
41015    # remove trailing .exe if any
41016    new_path="${new_path/%.exe/}"
41017
41018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41020  fi
41021
41022    else
41023      # We're on a unix platform. Hooray! :)
41024      # First separate the path from the arguments. This will split at the first
41025      # space.
41026      complete="$GNM"
41027      path="${complete%% *}"
41028      tmp="$complete EOL"
41029      arguments="${tmp#* }"
41030
41031      # Cannot rely on the command "which" here since it doesn't always work.
41032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41033      if test -z "$is_absolute_path"; then
41034        # Path to executable is not absolute. Find it.
41035        IFS_save="$IFS"
41036        IFS=:
41037        for p in $PATH; do
41038          if test -f "$p/$path" && test -x "$p/$path"; then
41039            new_path="$p/$path"
41040            break
41041          fi
41042        done
41043        IFS="$IFS_save"
41044      else
41045        # This is an absolute path, we can use it without further modifications.
41046        new_path="$path"
41047      fi
41048
41049      if test "x$new_path" = x; then
41050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41051$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41052        has_space=`$ECHO "$complete" | $GREP " "`
41053        if test "x$has_space" != x; then
41054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41056        fi
41057        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41058      fi
41059    fi
41060
41061    # Now join together the path and the arguments once again
41062    if test "x$arguments" != xEOL; then
41063      new_complete="$new_path ${arguments% *}"
41064    else
41065      new_complete="$new_path"
41066    fi
41067
41068    if test "x$complete" != "x$new_complete"; then
41069      GNM="$new_complete"
41070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41071$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41072    fi
41073  fi
41074
41075  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41076    # FIXME: we should unify this with the solaris case above.
41077
41078
41079  # Publish this variable in the help.
41080
41081
41082  if [ -z "${STRIP+x}" ]; then
41083    # The variable is not set by user, try to locate tool using the code snippet
41084    if test -n "$ac_tool_prefix"; then
41085  for ac_prog in strip
41086  do
41087    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41090$as_echo_n "checking for $ac_word... " >&6; }
41091if ${ac_cv_prog_STRIP+:} false; then :
41092  $as_echo_n "(cached) " >&6
41093else
41094  if test -n "$STRIP"; then
41095  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41096else
41097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41098for as_dir in $PATH
41099do
41100  IFS=$as_save_IFS
41101  test -z "$as_dir" && as_dir=.
41102    for ac_exec_ext in '' $ac_executable_extensions; do
41103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41104    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41106    break 2
41107  fi
41108done
41109  done
41110IFS=$as_save_IFS
41111
41112fi
41113fi
41114STRIP=$ac_cv_prog_STRIP
41115if test -n "$STRIP"; then
41116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41117$as_echo "$STRIP" >&6; }
41118else
41119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41120$as_echo "no" >&6; }
41121fi
41122
41123
41124    test -n "$STRIP" && break
41125  done
41126fi
41127if test -z "$STRIP"; then
41128  ac_ct_STRIP=$STRIP
41129  for ac_prog in strip
41130do
41131  # Extract the first word of "$ac_prog", so it can be a program name with args.
41132set dummy $ac_prog; ac_word=$2
41133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41134$as_echo_n "checking for $ac_word... " >&6; }
41135if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41136  $as_echo_n "(cached) " >&6
41137else
41138  if test -n "$ac_ct_STRIP"; then
41139  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41140else
41141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41142for as_dir in $PATH
41143do
41144  IFS=$as_save_IFS
41145  test -z "$as_dir" && as_dir=.
41146    for ac_exec_ext in '' $ac_executable_extensions; do
41147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41148    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41150    break 2
41151  fi
41152done
41153  done
41154IFS=$as_save_IFS
41155
41156fi
41157fi
41158ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41159if test -n "$ac_ct_STRIP"; then
41160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41161$as_echo "$ac_ct_STRIP" >&6; }
41162else
41163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41164$as_echo "no" >&6; }
41165fi
41166
41167
41168  test -n "$ac_ct_STRIP" && break
41169done
41170
41171  if test "x$ac_ct_STRIP" = x; then
41172    STRIP=""
41173  else
41174    case $cross_compiling:$ac_tool_warned in
41175yes:)
41176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41178ac_tool_warned=yes ;;
41179esac
41180    STRIP=$ac_ct_STRIP
41181  fi
41182fi
41183
41184  else
41185    # The variable is set, but is it from the command line or the environment?
41186
41187    # Try to remove the string !STRIP! from our list.
41188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41190      # If it failed, the variable was not from the command line. Ignore it,
41191      # but warn the user (except for BASH, which is always set by the calling BASH).
41192      if test "xSTRIP" != xBASH; then
41193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41194$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41195      fi
41196      # Try to locate tool using the code snippet
41197      if test -n "$ac_tool_prefix"; then
41198  for ac_prog in strip
41199  do
41200    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41203$as_echo_n "checking for $ac_word... " >&6; }
41204if ${ac_cv_prog_STRIP+:} false; then :
41205  $as_echo_n "(cached) " >&6
41206else
41207  if test -n "$STRIP"; then
41208  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41209else
41210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41211for as_dir in $PATH
41212do
41213  IFS=$as_save_IFS
41214  test -z "$as_dir" && as_dir=.
41215    for ac_exec_ext in '' $ac_executable_extensions; do
41216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41217    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41219    break 2
41220  fi
41221done
41222  done
41223IFS=$as_save_IFS
41224
41225fi
41226fi
41227STRIP=$ac_cv_prog_STRIP
41228if test -n "$STRIP"; then
41229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41230$as_echo "$STRIP" >&6; }
41231else
41232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41233$as_echo "no" >&6; }
41234fi
41235
41236
41237    test -n "$STRIP" && break
41238  done
41239fi
41240if test -z "$STRIP"; then
41241  ac_ct_STRIP=$STRIP
41242  for ac_prog in strip
41243do
41244  # Extract the first word of "$ac_prog", so it can be a program name with args.
41245set dummy $ac_prog; ac_word=$2
41246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41247$as_echo_n "checking for $ac_word... " >&6; }
41248if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41249  $as_echo_n "(cached) " >&6
41250else
41251  if test -n "$ac_ct_STRIP"; then
41252  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41253else
41254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41255for as_dir in $PATH
41256do
41257  IFS=$as_save_IFS
41258  test -z "$as_dir" && as_dir=.
41259    for ac_exec_ext in '' $ac_executable_extensions; do
41260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41261    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41263    break 2
41264  fi
41265done
41266  done
41267IFS=$as_save_IFS
41268
41269fi
41270fi
41271ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41272if test -n "$ac_ct_STRIP"; then
41273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41274$as_echo "$ac_ct_STRIP" >&6; }
41275else
41276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41277$as_echo "no" >&6; }
41278fi
41279
41280
41281  test -n "$ac_ct_STRIP" && break
41282done
41283
41284  if test "x$ac_ct_STRIP" = x; then
41285    STRIP=""
41286  else
41287    case $cross_compiling:$ac_tool_warned in
41288yes:)
41289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41291ac_tool_warned=yes ;;
41292esac
41293    STRIP=$ac_ct_STRIP
41294  fi
41295fi
41296
41297    else
41298      # If it succeeded, then it was overridden by the user. We will use it
41299      # for the tool.
41300
41301      # First remove it from the list of overridden variables, so we can test
41302      # for unknown variables in the end.
41303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41304
41305      # Check if we try to supply an empty value
41306      if test "x$STRIP" = x; then
41307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41308$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41310$as_echo_n "checking for STRIP... " >&6; }
41311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41312$as_echo "disabled" >&6; }
41313      else
41314        # Check if the provided tool contains a complete path.
41315        tool_specified="$STRIP"
41316        tool_basename="${tool_specified##*/}"
41317        if test "x$tool_basename" = "x$tool_specified"; then
41318          # A command without a complete path is provided, search $PATH.
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41320$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41321          # Extract the first word of "$tool_basename", so it can be a program name with args.
41322set dummy $tool_basename; ac_word=$2
41323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41324$as_echo_n "checking for $ac_word... " >&6; }
41325if ${ac_cv_path_STRIP+:} false; then :
41326  $as_echo_n "(cached) " >&6
41327else
41328  case $STRIP in
41329  [\\/]* | ?:[\\/]*)
41330  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41331  ;;
41332  *)
41333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41334for as_dir in $PATH
41335do
41336  IFS=$as_save_IFS
41337  test -z "$as_dir" && as_dir=.
41338    for ac_exec_ext in '' $ac_executable_extensions; do
41339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41340    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41342    break 2
41343  fi
41344done
41345  done
41346IFS=$as_save_IFS
41347
41348  ;;
41349esac
41350fi
41351STRIP=$ac_cv_path_STRIP
41352if test -n "$STRIP"; then
41353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41354$as_echo "$STRIP" >&6; }
41355else
41356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41357$as_echo "no" >&6; }
41358fi
41359
41360
41361          if test "x$STRIP" = x; then
41362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41363          fi
41364        else
41365          # Otherwise we believe it is a complete path. Use it as it is.
41366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41367$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41369$as_echo_n "checking for STRIP... " >&6; }
41370          if test ! -x "$tool_specified"; then
41371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41372$as_echo "not found" >&6; }
41373            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41374          fi
41375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41376$as_echo "$tool_specified" >&6; }
41377        fi
41378      fi
41379    fi
41380
41381  fi
41382
41383
41384
41385  # Only process if variable expands to non-empty
41386
41387  if test "x$STRIP" != x; then
41388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41389
41390  # First separate the path from the arguments. This will split at the first
41391  # space.
41392  complete="$STRIP"
41393  path="${complete%% *}"
41394  tmp="$complete EOL"
41395  arguments="${tmp#* }"
41396
41397  # Input might be given as Windows format, start by converting to
41398  # unix format.
41399  new_path=`$CYGPATH -u "$path"`
41400
41401  # Now try to locate executable using which
41402  new_path=`$WHICH "$new_path" 2> /dev/null`
41403  # bat and cmd files are not always considered executable in cygwin causing which
41404  # to not find them
41405  if test "x$new_path" = x \
41406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41408    new_path=`$CYGPATH -u "$path"`
41409  fi
41410  if test "x$new_path" = x; then
41411    # Oops. Which didn't find the executable.
41412    # The splitting of arguments from the executable at a space might have been incorrect,
41413    # since paths with space are more likely in Windows. Give it another try with the whole
41414    # argument.
41415    path="$complete"
41416    arguments="EOL"
41417    new_path=`$CYGPATH -u "$path"`
41418    new_path=`$WHICH "$new_path" 2> /dev/null`
41419    # bat and cmd files are not always considered executable in cygwin causing which
41420    # to not find them
41421    if test "x$new_path" = x \
41422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41424      new_path=`$CYGPATH -u "$path"`
41425    fi
41426    if test "x$new_path" = x; then
41427      # It's still not found. Now this is an unrecoverable error.
41428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41429$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41430      has_space=`$ECHO "$complete" | $GREP " "`
41431      if test "x$has_space" != x; then
41432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41434      fi
41435      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41436    fi
41437  fi
41438
41439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41442  # "foo.exe" is OK but "foo" is an error.
41443  #
41444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41445  # It is also a way to make sure we got the proper file name for the real test later on.
41446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41447  if test "x$test_shortpath" = x; then
41448    # Short path failed, file does not exist as specified.
41449    # Try adding .exe or .cmd
41450    if test -f "${new_path}.exe"; then
41451      input_to_shortpath="${new_path}.exe"
41452    elif test -f "${new_path}.cmd"; then
41453      input_to_shortpath="${new_path}.cmd"
41454    else
41455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41456$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41459      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41460    fi
41461  else
41462    input_to_shortpath="$new_path"
41463  fi
41464
41465  # Call helper function which possibly converts this using DOS-style short mode.
41466  # If so, the updated path is stored in $new_path.
41467  new_path="$input_to_shortpath"
41468
41469  input_path="$input_to_shortpath"
41470  # Check if we need to convert this using DOS-style short mode. If the path
41471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41472  # take no chances and rewrite it.
41473  # Note: m4 eats our [], so we need to use [ and ] instead.
41474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41475  if test "x$has_forbidden_chars" != x; then
41476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41480      # Going to short mode and back again did indeed matter. Since short mode is
41481      # case insensitive, let's make it lowercase to improve readability.
41482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41483      # Now convert it back to Unix-style (cygpath)
41484      input_path=`$CYGPATH -u "$shortmode_path"`
41485      new_path="$input_path"
41486    fi
41487  fi
41488
41489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41490  if test "x$test_cygdrive_prefix" = x; then
41491    # As a simple fix, exclude /usr/bin since it's not a real path.
41492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41494      # a path prefixed by /cygdrive for fixpath to work.
41495      new_path="$CYGWIN_ROOT_PATH$input_path"
41496    fi
41497  fi
41498
41499  # remove trailing .exe if any
41500  new_path="${new_path/%.exe/}"
41501
41502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41503
41504  # First separate the path from the arguments. This will split at the first
41505  # space.
41506  complete="$STRIP"
41507  path="${complete%% *}"
41508  tmp="$complete EOL"
41509  arguments="${tmp#* }"
41510
41511  # Input might be given as Windows format, start by converting to
41512  # unix format.
41513  new_path="$path"
41514
41515  windows_path="$new_path"
41516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41517    unix_path=`$CYGPATH -u "$windows_path"`
41518    new_path="$unix_path"
41519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41521    new_path="$unix_path"
41522  fi
41523
41524
41525  # Now try to locate executable using which
41526  new_path=`$WHICH "$new_path" 2> /dev/null`
41527
41528  if test "x$new_path" = x; then
41529    # Oops. Which didn't find the executable.
41530    # The splitting of arguments from the executable at a space might have been incorrect,
41531    # since paths with space are more likely in Windows. Give it another try with the whole
41532    # argument.
41533    path="$complete"
41534    arguments="EOL"
41535    new_path="$path"
41536
41537  windows_path="$new_path"
41538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41539    unix_path=`$CYGPATH -u "$windows_path"`
41540    new_path="$unix_path"
41541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41543    new_path="$unix_path"
41544  fi
41545
41546
41547    new_path=`$WHICH "$new_path" 2> /dev/null`
41548    # bat and cmd files are not always considered executable in MSYS causing which
41549    # to not find them
41550    if test "x$new_path" = x \
41551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41553      new_path="$path"
41554
41555  windows_path="$new_path"
41556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41557    unix_path=`$CYGPATH -u "$windows_path"`
41558    new_path="$unix_path"
41559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41561    new_path="$unix_path"
41562  fi
41563
41564    fi
41565
41566    if test "x$new_path" = x; then
41567      # It's still not found. Now this is an unrecoverable error.
41568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41569$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41570      has_space=`$ECHO "$complete" | $GREP " "`
41571      if test "x$has_space" != x; then
41572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41574      fi
41575      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41576    fi
41577  fi
41578
41579  # Now new_path has a complete unix path to the binary
41580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41581    # Keep paths in /bin as-is, but remove trailing .exe if any
41582    new_path="${new_path/%.exe/}"
41583    # Do not save /bin paths to all_fixpath_prefixes!
41584  else
41585    # Not in mixed or Windows style, start by that.
41586    new_path=`cmd //c echo $new_path`
41587
41588  input_path="$new_path"
41589  # Check if we need to convert this using DOS-style short mode. If the path
41590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41591  # take no chances and rewrite it.
41592  # Note: m4 eats our [], so we need to use [ and ] instead.
41593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41594  if test "x$has_forbidden_chars" != x; then
41595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41597  fi
41598
41599    # Output is in $new_path
41600
41601  windows_path="$new_path"
41602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41603    unix_path=`$CYGPATH -u "$windows_path"`
41604    new_path="$unix_path"
41605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41607    new_path="$unix_path"
41608  fi
41609
41610    # remove trailing .exe if any
41611    new_path="${new_path/%.exe/}"
41612
41613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41615  fi
41616
41617    else
41618      # We're on a unix platform. Hooray! :)
41619      # First separate the path from the arguments. This will split at the first
41620      # space.
41621      complete="$STRIP"
41622      path="${complete%% *}"
41623      tmp="$complete EOL"
41624      arguments="${tmp#* }"
41625
41626      # Cannot rely on the command "which" here since it doesn't always work.
41627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41628      if test -z "$is_absolute_path"; then
41629        # Path to executable is not absolute. Find it.
41630        IFS_save="$IFS"
41631        IFS=:
41632        for p in $PATH; do
41633          if test -f "$p/$path" && test -x "$p/$path"; then
41634            new_path="$p/$path"
41635            break
41636          fi
41637        done
41638        IFS="$IFS_save"
41639      else
41640        # This is an absolute path, we can use it without further modifications.
41641        new_path="$path"
41642      fi
41643
41644      if test "x$new_path" = x; then
41645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41646$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41647        has_space=`$ECHO "$complete" | $GREP " "`
41648        if test "x$has_space" != x; then
41649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41651        fi
41652        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41653      fi
41654    fi
41655
41656    # Now join together the path and the arguments once again
41657    if test "x$arguments" != xEOL; then
41658      new_complete="$new_path ${arguments% *}"
41659    else
41660      new_complete="$new_path"
41661    fi
41662
41663    if test "x$complete" != "x$new_complete"; then
41664      STRIP="$new_complete"
41665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41666$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41667    fi
41668  fi
41669
41670    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41671
41672
41673  # Publish this variable in the help.
41674
41675
41676  if [ -z "${NM+x}" ]; then
41677    # The variable is not set by user, try to locate tool using the code snippet
41678    if test -n "$ac_tool_prefix"; then
41679  for ac_prog in nm gcc-nm
41680  do
41681    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41682set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41684$as_echo_n "checking for $ac_word... " >&6; }
41685if ${ac_cv_prog_NM+:} false; then :
41686  $as_echo_n "(cached) " >&6
41687else
41688  if test -n "$NM"; then
41689  ac_cv_prog_NM="$NM" # Let the user override the test.
41690else
41691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41692for as_dir in $PATH
41693do
41694  IFS=$as_save_IFS
41695  test -z "$as_dir" && as_dir=.
41696    for ac_exec_ext in '' $ac_executable_extensions; do
41697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41698    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41700    break 2
41701  fi
41702done
41703  done
41704IFS=$as_save_IFS
41705
41706fi
41707fi
41708NM=$ac_cv_prog_NM
41709if test -n "$NM"; then
41710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41711$as_echo "$NM" >&6; }
41712else
41713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41714$as_echo "no" >&6; }
41715fi
41716
41717
41718    test -n "$NM" && break
41719  done
41720fi
41721if test -z "$NM"; then
41722  ac_ct_NM=$NM
41723  for ac_prog in nm gcc-nm
41724do
41725  # Extract the first word of "$ac_prog", so it can be a program name with args.
41726set dummy $ac_prog; ac_word=$2
41727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41728$as_echo_n "checking for $ac_word... " >&6; }
41729if ${ac_cv_prog_ac_ct_NM+:} false; then :
41730  $as_echo_n "(cached) " >&6
41731else
41732  if test -n "$ac_ct_NM"; then
41733  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41734else
41735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41736for as_dir in $PATH
41737do
41738  IFS=$as_save_IFS
41739  test -z "$as_dir" && as_dir=.
41740    for ac_exec_ext in '' $ac_executable_extensions; do
41741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41742    ac_cv_prog_ac_ct_NM="$ac_prog"
41743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41744    break 2
41745  fi
41746done
41747  done
41748IFS=$as_save_IFS
41749
41750fi
41751fi
41752ac_ct_NM=$ac_cv_prog_ac_ct_NM
41753if test -n "$ac_ct_NM"; then
41754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41755$as_echo "$ac_ct_NM" >&6; }
41756else
41757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41758$as_echo "no" >&6; }
41759fi
41760
41761
41762  test -n "$ac_ct_NM" && break
41763done
41764
41765  if test "x$ac_ct_NM" = x; then
41766    NM=""
41767  else
41768    case $cross_compiling:$ac_tool_warned in
41769yes:)
41770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41772ac_tool_warned=yes ;;
41773esac
41774    NM=$ac_ct_NM
41775  fi
41776fi
41777
41778  else
41779    # The variable is set, but is it from the command line or the environment?
41780
41781    # Try to remove the string !NM! from our list.
41782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41784      # If it failed, the variable was not from the command line. Ignore it,
41785      # but warn the user (except for BASH, which is always set by the calling BASH).
41786      if test "xNM" != xBASH; then
41787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41788$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41789      fi
41790      # Try to locate tool using the code snippet
41791      if test -n "$ac_tool_prefix"; then
41792  for ac_prog in nm gcc-nm
41793  do
41794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41797$as_echo_n "checking for $ac_word... " >&6; }
41798if ${ac_cv_prog_NM+:} false; then :
41799  $as_echo_n "(cached) " >&6
41800else
41801  if test -n "$NM"; then
41802  ac_cv_prog_NM="$NM" # Let the user override the test.
41803else
41804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41805for as_dir in $PATH
41806do
41807  IFS=$as_save_IFS
41808  test -z "$as_dir" && as_dir=.
41809    for ac_exec_ext in '' $ac_executable_extensions; do
41810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41811    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41813    break 2
41814  fi
41815done
41816  done
41817IFS=$as_save_IFS
41818
41819fi
41820fi
41821NM=$ac_cv_prog_NM
41822if test -n "$NM"; then
41823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41824$as_echo "$NM" >&6; }
41825else
41826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41827$as_echo "no" >&6; }
41828fi
41829
41830
41831    test -n "$NM" && break
41832  done
41833fi
41834if test -z "$NM"; then
41835  ac_ct_NM=$NM
41836  for ac_prog in nm gcc-nm
41837do
41838  # Extract the first word of "$ac_prog", so it can be a program name with args.
41839set dummy $ac_prog; ac_word=$2
41840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41841$as_echo_n "checking for $ac_word... " >&6; }
41842if ${ac_cv_prog_ac_ct_NM+:} false; then :
41843  $as_echo_n "(cached) " >&6
41844else
41845  if test -n "$ac_ct_NM"; then
41846  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41847else
41848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41849for as_dir in $PATH
41850do
41851  IFS=$as_save_IFS
41852  test -z "$as_dir" && as_dir=.
41853    for ac_exec_ext in '' $ac_executable_extensions; do
41854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41855    ac_cv_prog_ac_ct_NM="$ac_prog"
41856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41857    break 2
41858  fi
41859done
41860  done
41861IFS=$as_save_IFS
41862
41863fi
41864fi
41865ac_ct_NM=$ac_cv_prog_ac_ct_NM
41866if test -n "$ac_ct_NM"; then
41867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41868$as_echo "$ac_ct_NM" >&6; }
41869else
41870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41871$as_echo "no" >&6; }
41872fi
41873
41874
41875  test -n "$ac_ct_NM" && break
41876done
41877
41878  if test "x$ac_ct_NM" = x; then
41879    NM=""
41880  else
41881    case $cross_compiling:$ac_tool_warned in
41882yes:)
41883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41885ac_tool_warned=yes ;;
41886esac
41887    NM=$ac_ct_NM
41888  fi
41889fi
41890
41891    else
41892      # If it succeeded, then it was overridden by the user. We will use it
41893      # for the tool.
41894
41895      # First remove it from the list of overridden variables, so we can test
41896      # for unknown variables in the end.
41897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41898
41899      # Check if we try to supply an empty value
41900      if test "x$NM" = x; then
41901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41902$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41904$as_echo_n "checking for NM... " >&6; }
41905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41906$as_echo "disabled" >&6; }
41907      else
41908        # Check if the provided tool contains a complete path.
41909        tool_specified="$NM"
41910        tool_basename="${tool_specified##*/}"
41911        if test "x$tool_basename" = "x$tool_specified"; then
41912          # A command without a complete path is provided, search $PATH.
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41914$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41915          # Extract the first word of "$tool_basename", so it can be a program name with args.
41916set dummy $tool_basename; ac_word=$2
41917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41918$as_echo_n "checking for $ac_word... " >&6; }
41919if ${ac_cv_path_NM+:} false; then :
41920  $as_echo_n "(cached) " >&6
41921else
41922  case $NM in
41923  [\\/]* | ?:[\\/]*)
41924  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41925  ;;
41926  *)
41927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41928for as_dir in $PATH
41929do
41930  IFS=$as_save_IFS
41931  test -z "$as_dir" && as_dir=.
41932    for ac_exec_ext in '' $ac_executable_extensions; do
41933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41934    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41936    break 2
41937  fi
41938done
41939  done
41940IFS=$as_save_IFS
41941
41942  ;;
41943esac
41944fi
41945NM=$ac_cv_path_NM
41946if test -n "$NM"; then
41947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41948$as_echo "$NM" >&6; }
41949else
41950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41951$as_echo "no" >&6; }
41952fi
41953
41954
41955          if test "x$NM" = x; then
41956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41957          fi
41958        else
41959          # Otherwise we believe it is a complete path. Use it as it is.
41960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41961$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41963$as_echo_n "checking for NM... " >&6; }
41964          if test ! -x "$tool_specified"; then
41965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41966$as_echo "not found" >&6; }
41967            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41968          fi
41969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41970$as_echo "$tool_specified" >&6; }
41971        fi
41972      fi
41973    fi
41974
41975  fi
41976
41977
41978    else
41979
41980
41981  # Publish this variable in the help.
41982
41983
41984  if [ -z "${NM+x}" ]; then
41985    # The variable is not set by user, try to locate tool using the code snippet
41986    if test -n "$ac_tool_prefix"; then
41987  for ac_prog in nm
41988  do
41989    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41990set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41992$as_echo_n "checking for $ac_word... " >&6; }
41993if ${ac_cv_prog_NM+:} false; then :
41994  $as_echo_n "(cached) " >&6
41995else
41996  if test -n "$NM"; then
41997  ac_cv_prog_NM="$NM" # Let the user override the test.
41998else
41999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42000for as_dir in $PATH
42001do
42002  IFS=$as_save_IFS
42003  test -z "$as_dir" && as_dir=.
42004    for ac_exec_ext in '' $ac_executable_extensions; do
42005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42006    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42008    break 2
42009  fi
42010done
42011  done
42012IFS=$as_save_IFS
42013
42014fi
42015fi
42016NM=$ac_cv_prog_NM
42017if test -n "$NM"; then
42018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42019$as_echo "$NM" >&6; }
42020else
42021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42022$as_echo "no" >&6; }
42023fi
42024
42025
42026    test -n "$NM" && break
42027  done
42028fi
42029if test -z "$NM"; then
42030  ac_ct_NM=$NM
42031  for ac_prog in nm
42032do
42033  # Extract the first word of "$ac_prog", so it can be a program name with args.
42034set dummy $ac_prog; ac_word=$2
42035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42036$as_echo_n "checking for $ac_word... " >&6; }
42037if ${ac_cv_prog_ac_ct_NM+:} false; then :
42038  $as_echo_n "(cached) " >&6
42039else
42040  if test -n "$ac_ct_NM"; then
42041  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42042else
42043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42044for as_dir in $PATH
42045do
42046  IFS=$as_save_IFS
42047  test -z "$as_dir" && as_dir=.
42048    for ac_exec_ext in '' $ac_executable_extensions; do
42049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42050    ac_cv_prog_ac_ct_NM="$ac_prog"
42051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42052    break 2
42053  fi
42054done
42055  done
42056IFS=$as_save_IFS
42057
42058fi
42059fi
42060ac_ct_NM=$ac_cv_prog_ac_ct_NM
42061if test -n "$ac_ct_NM"; then
42062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42063$as_echo "$ac_ct_NM" >&6; }
42064else
42065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42066$as_echo "no" >&6; }
42067fi
42068
42069
42070  test -n "$ac_ct_NM" && break
42071done
42072
42073  if test "x$ac_ct_NM" = x; then
42074    NM=""
42075  else
42076    case $cross_compiling:$ac_tool_warned in
42077yes:)
42078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42080ac_tool_warned=yes ;;
42081esac
42082    NM=$ac_ct_NM
42083  fi
42084fi
42085
42086  else
42087    # The variable is set, but is it from the command line or the environment?
42088
42089    # Try to remove the string !NM! from our list.
42090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42092      # If it failed, the variable was not from the command line. Ignore it,
42093      # but warn the user (except for BASH, which is always set by the calling BASH).
42094      if test "xNM" != xBASH; then
42095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42096$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42097      fi
42098      # Try to locate tool using the code snippet
42099      if test -n "$ac_tool_prefix"; then
42100  for ac_prog in nm
42101  do
42102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42105$as_echo_n "checking for $ac_word... " >&6; }
42106if ${ac_cv_prog_NM+:} false; then :
42107  $as_echo_n "(cached) " >&6
42108else
42109  if test -n "$NM"; then
42110  ac_cv_prog_NM="$NM" # Let the user override the test.
42111else
42112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42113for as_dir in $PATH
42114do
42115  IFS=$as_save_IFS
42116  test -z "$as_dir" && as_dir=.
42117    for ac_exec_ext in '' $ac_executable_extensions; do
42118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42119    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42121    break 2
42122  fi
42123done
42124  done
42125IFS=$as_save_IFS
42126
42127fi
42128fi
42129NM=$ac_cv_prog_NM
42130if test -n "$NM"; then
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42132$as_echo "$NM" >&6; }
42133else
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42135$as_echo "no" >&6; }
42136fi
42137
42138
42139    test -n "$NM" && break
42140  done
42141fi
42142if test -z "$NM"; then
42143  ac_ct_NM=$NM
42144  for ac_prog in nm
42145do
42146  # Extract the first word of "$ac_prog", so it can be a program name with args.
42147set dummy $ac_prog; ac_word=$2
42148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42149$as_echo_n "checking for $ac_word... " >&6; }
42150if ${ac_cv_prog_ac_ct_NM+:} false; then :
42151  $as_echo_n "(cached) " >&6
42152else
42153  if test -n "$ac_ct_NM"; then
42154  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42155else
42156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42157for as_dir in $PATH
42158do
42159  IFS=$as_save_IFS
42160  test -z "$as_dir" && as_dir=.
42161    for ac_exec_ext in '' $ac_executable_extensions; do
42162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42163    ac_cv_prog_ac_ct_NM="$ac_prog"
42164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42165    break 2
42166  fi
42167done
42168  done
42169IFS=$as_save_IFS
42170
42171fi
42172fi
42173ac_ct_NM=$ac_cv_prog_ac_ct_NM
42174if test -n "$ac_ct_NM"; then
42175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42176$as_echo "$ac_ct_NM" >&6; }
42177else
42178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42179$as_echo "no" >&6; }
42180fi
42181
42182
42183  test -n "$ac_ct_NM" && break
42184done
42185
42186  if test "x$ac_ct_NM" = x; then
42187    NM=""
42188  else
42189    case $cross_compiling:$ac_tool_warned in
42190yes:)
42191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42193ac_tool_warned=yes ;;
42194esac
42195    NM=$ac_ct_NM
42196  fi
42197fi
42198
42199    else
42200      # If it succeeded, then it was overridden by the user. We will use it
42201      # for the tool.
42202
42203      # First remove it from the list of overridden variables, so we can test
42204      # for unknown variables in the end.
42205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42206
42207      # Check if we try to supply an empty value
42208      if test "x$NM" = x; then
42209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42210$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42212$as_echo_n "checking for NM... " >&6; }
42213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42214$as_echo "disabled" >&6; }
42215      else
42216        # Check if the provided tool contains a complete path.
42217        tool_specified="$NM"
42218        tool_basename="${tool_specified##*/}"
42219        if test "x$tool_basename" = "x$tool_specified"; then
42220          # A command without a complete path is provided, search $PATH.
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42222$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42223          # Extract the first word of "$tool_basename", so it can be a program name with args.
42224set dummy $tool_basename; ac_word=$2
42225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42226$as_echo_n "checking for $ac_word... " >&6; }
42227if ${ac_cv_path_NM+:} false; then :
42228  $as_echo_n "(cached) " >&6
42229else
42230  case $NM in
42231  [\\/]* | ?:[\\/]*)
42232  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42233  ;;
42234  *)
42235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42236for as_dir in $PATH
42237do
42238  IFS=$as_save_IFS
42239  test -z "$as_dir" && as_dir=.
42240    for ac_exec_ext in '' $ac_executable_extensions; do
42241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42242    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42244    break 2
42245  fi
42246done
42247  done
42248IFS=$as_save_IFS
42249
42250  ;;
42251esac
42252fi
42253NM=$ac_cv_path_NM
42254if test -n "$NM"; then
42255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42256$as_echo "$NM" >&6; }
42257else
42258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42259$as_echo "no" >&6; }
42260fi
42261
42262
42263          if test "x$NM" = x; then
42264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42265          fi
42266        else
42267          # Otherwise we believe it is a complete path. Use it as it is.
42268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42269$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42271$as_echo_n "checking for NM... " >&6; }
42272          if test ! -x "$tool_specified"; then
42273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42274$as_echo "not found" >&6; }
42275            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42276          fi
42277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42278$as_echo "$tool_specified" >&6; }
42279        fi
42280      fi
42281    fi
42282
42283  fi
42284
42285
42286    fi
42287
42288  # Only process if variable expands to non-empty
42289
42290  if test "x$NM" != x; then
42291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42292
42293  # First separate the path from the arguments. This will split at the first
42294  # space.
42295  complete="$NM"
42296  path="${complete%% *}"
42297  tmp="$complete EOL"
42298  arguments="${tmp#* }"
42299
42300  # Input might be given as Windows format, start by converting to
42301  # unix format.
42302  new_path=`$CYGPATH -u "$path"`
42303
42304  # Now try to locate executable using which
42305  new_path=`$WHICH "$new_path" 2> /dev/null`
42306  # bat and cmd files are not always considered executable in cygwin causing which
42307  # to not find them
42308  if test "x$new_path" = x \
42309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42311    new_path=`$CYGPATH -u "$path"`
42312  fi
42313  if test "x$new_path" = x; then
42314    # Oops. Which didn't find the executable.
42315    # The splitting of arguments from the executable at a space might have been incorrect,
42316    # since paths with space are more likely in Windows. Give it another try with the whole
42317    # argument.
42318    path="$complete"
42319    arguments="EOL"
42320    new_path=`$CYGPATH -u "$path"`
42321    new_path=`$WHICH "$new_path" 2> /dev/null`
42322    # bat and cmd files are not always considered executable in cygwin causing which
42323    # to not find them
42324    if test "x$new_path" = x \
42325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42327      new_path=`$CYGPATH -u "$path"`
42328    fi
42329    if test "x$new_path" = x; then
42330      # It's still not found. Now this is an unrecoverable error.
42331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42332$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42333      has_space=`$ECHO "$complete" | $GREP " "`
42334      if test "x$has_space" != x; then
42335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42337      fi
42338      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42339    fi
42340  fi
42341
42342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42345  # "foo.exe" is OK but "foo" is an error.
42346  #
42347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42348  # It is also a way to make sure we got the proper file name for the real test later on.
42349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42350  if test "x$test_shortpath" = x; then
42351    # Short path failed, file does not exist as specified.
42352    # Try adding .exe or .cmd
42353    if test -f "${new_path}.exe"; then
42354      input_to_shortpath="${new_path}.exe"
42355    elif test -f "${new_path}.cmd"; then
42356      input_to_shortpath="${new_path}.cmd"
42357    else
42358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42359$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42362      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42363    fi
42364  else
42365    input_to_shortpath="$new_path"
42366  fi
42367
42368  # Call helper function which possibly converts this using DOS-style short mode.
42369  # If so, the updated path is stored in $new_path.
42370  new_path="$input_to_shortpath"
42371
42372  input_path="$input_to_shortpath"
42373  # Check if we need to convert this using DOS-style short mode. If the path
42374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42375  # take no chances and rewrite it.
42376  # Note: m4 eats our [], so we need to use [ and ] instead.
42377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42378  if test "x$has_forbidden_chars" != x; then
42379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42383      # Going to short mode and back again did indeed matter. Since short mode is
42384      # case insensitive, let's make it lowercase to improve readability.
42385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42386      # Now convert it back to Unix-style (cygpath)
42387      input_path=`$CYGPATH -u "$shortmode_path"`
42388      new_path="$input_path"
42389    fi
42390  fi
42391
42392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42393  if test "x$test_cygdrive_prefix" = x; then
42394    # As a simple fix, exclude /usr/bin since it's not a real path.
42395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42397      # a path prefixed by /cygdrive for fixpath to work.
42398      new_path="$CYGWIN_ROOT_PATH$input_path"
42399    fi
42400  fi
42401
42402  # remove trailing .exe if any
42403  new_path="${new_path/%.exe/}"
42404
42405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42406
42407  # First separate the path from the arguments. This will split at the first
42408  # space.
42409  complete="$NM"
42410  path="${complete%% *}"
42411  tmp="$complete EOL"
42412  arguments="${tmp#* }"
42413
42414  # Input might be given as Windows format, start by converting to
42415  # unix format.
42416  new_path="$path"
42417
42418  windows_path="$new_path"
42419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42420    unix_path=`$CYGPATH -u "$windows_path"`
42421    new_path="$unix_path"
42422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42424    new_path="$unix_path"
42425  fi
42426
42427
42428  # Now try to locate executable using which
42429  new_path=`$WHICH "$new_path" 2> /dev/null`
42430
42431  if test "x$new_path" = x; then
42432    # Oops. Which didn't find the executable.
42433    # The splitting of arguments from the executable at a space might have been incorrect,
42434    # since paths with space are more likely in Windows. Give it another try with the whole
42435    # argument.
42436    path="$complete"
42437    arguments="EOL"
42438    new_path="$path"
42439
42440  windows_path="$new_path"
42441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42442    unix_path=`$CYGPATH -u "$windows_path"`
42443    new_path="$unix_path"
42444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42446    new_path="$unix_path"
42447  fi
42448
42449
42450    new_path=`$WHICH "$new_path" 2> /dev/null`
42451    # bat and cmd files are not always considered executable in MSYS causing which
42452    # to not find them
42453    if test "x$new_path" = x \
42454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42456      new_path="$path"
42457
42458  windows_path="$new_path"
42459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42460    unix_path=`$CYGPATH -u "$windows_path"`
42461    new_path="$unix_path"
42462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42464    new_path="$unix_path"
42465  fi
42466
42467    fi
42468
42469    if test "x$new_path" = x; then
42470      # It's still not found. Now this is an unrecoverable error.
42471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42472$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42473      has_space=`$ECHO "$complete" | $GREP " "`
42474      if test "x$has_space" != x; then
42475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42477      fi
42478      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42479    fi
42480  fi
42481
42482  # Now new_path has a complete unix path to the binary
42483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42484    # Keep paths in /bin as-is, but remove trailing .exe if any
42485    new_path="${new_path/%.exe/}"
42486    # Do not save /bin paths to all_fixpath_prefixes!
42487  else
42488    # Not in mixed or Windows style, start by that.
42489    new_path=`cmd //c echo $new_path`
42490
42491  input_path="$new_path"
42492  # Check if we need to convert this using DOS-style short mode. If the path
42493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42494  # take no chances and rewrite it.
42495  # Note: m4 eats our [], so we need to use [ and ] instead.
42496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42497  if test "x$has_forbidden_chars" != x; then
42498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42500  fi
42501
42502    # Output is in $new_path
42503
42504  windows_path="$new_path"
42505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42506    unix_path=`$CYGPATH -u "$windows_path"`
42507    new_path="$unix_path"
42508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42510    new_path="$unix_path"
42511  fi
42512
42513    # remove trailing .exe if any
42514    new_path="${new_path/%.exe/}"
42515
42516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42518  fi
42519
42520    else
42521      # We're on a unix platform. Hooray! :)
42522      # First separate the path from the arguments. This will split at the first
42523      # space.
42524      complete="$NM"
42525      path="${complete%% *}"
42526      tmp="$complete EOL"
42527      arguments="${tmp#* }"
42528
42529      # Cannot rely on the command "which" here since it doesn't always work.
42530      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42531      if test -z "$is_absolute_path"; then
42532        # Path to executable is not absolute. Find it.
42533        IFS_save="$IFS"
42534        IFS=:
42535        for p in $PATH; do
42536          if test -f "$p/$path" && test -x "$p/$path"; then
42537            new_path="$p/$path"
42538            break
42539          fi
42540        done
42541        IFS="$IFS_save"
42542      else
42543        # This is an absolute path, we can use it without further modifications.
42544        new_path="$path"
42545      fi
42546
42547      if test "x$new_path" = x; then
42548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42549$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42550        has_space=`$ECHO "$complete" | $GREP " "`
42551        if test "x$has_space" != x; then
42552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42554        fi
42555        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42556      fi
42557    fi
42558
42559    # Now join together the path and the arguments once again
42560    if test "x$arguments" != xEOL; then
42561      new_complete="$new_path ${arguments% *}"
42562    else
42563      new_complete="$new_path"
42564    fi
42565
42566    if test "x$complete" != "x$new_complete"; then
42567      NM="$new_complete"
42568      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42569$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42570    fi
42571  fi
42572
42573    GNM="$NM"
42574
42575  fi
42576
42577  # objcopy is used for moving debug symbols to separate files when
42578  # full debug symbols are enabled.
42579  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42580
42581
42582  # Publish this variable in the help.
42583
42584
42585  if [ -z "${OBJCOPY+x}" ]; then
42586    # The variable is not set by user, try to locate tool using the code snippet
42587    if test -n "$ac_tool_prefix"; then
42588  for ac_prog in gobjcopy objcopy
42589  do
42590    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42591set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42593$as_echo_n "checking for $ac_word... " >&6; }
42594if ${ac_cv_prog_OBJCOPY+:} false; then :
42595  $as_echo_n "(cached) " >&6
42596else
42597  if test -n "$OBJCOPY"; then
42598  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42599else
42600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42601for as_dir in $PATH
42602do
42603  IFS=$as_save_IFS
42604  test -z "$as_dir" && as_dir=.
42605    for ac_exec_ext in '' $ac_executable_extensions; do
42606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42607    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42609    break 2
42610  fi
42611done
42612  done
42613IFS=$as_save_IFS
42614
42615fi
42616fi
42617OBJCOPY=$ac_cv_prog_OBJCOPY
42618if test -n "$OBJCOPY"; then
42619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42620$as_echo "$OBJCOPY" >&6; }
42621else
42622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42623$as_echo "no" >&6; }
42624fi
42625
42626
42627    test -n "$OBJCOPY" && break
42628  done
42629fi
42630if test -z "$OBJCOPY"; then
42631  ac_ct_OBJCOPY=$OBJCOPY
42632  for ac_prog in gobjcopy objcopy
42633do
42634  # Extract the first word of "$ac_prog", so it can be a program name with args.
42635set dummy $ac_prog; ac_word=$2
42636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42637$as_echo_n "checking for $ac_word... " >&6; }
42638if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42639  $as_echo_n "(cached) " >&6
42640else
42641  if test -n "$ac_ct_OBJCOPY"; then
42642  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42643else
42644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42645for as_dir in $PATH
42646do
42647  IFS=$as_save_IFS
42648  test -z "$as_dir" && as_dir=.
42649    for ac_exec_ext in '' $ac_executable_extensions; do
42650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42651    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42653    break 2
42654  fi
42655done
42656  done
42657IFS=$as_save_IFS
42658
42659fi
42660fi
42661ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42662if test -n "$ac_ct_OBJCOPY"; then
42663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42664$as_echo "$ac_ct_OBJCOPY" >&6; }
42665else
42666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42667$as_echo "no" >&6; }
42668fi
42669
42670
42671  test -n "$ac_ct_OBJCOPY" && break
42672done
42673
42674  if test "x$ac_ct_OBJCOPY" = x; then
42675    OBJCOPY=""
42676  else
42677    case $cross_compiling:$ac_tool_warned in
42678yes:)
42679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42681ac_tool_warned=yes ;;
42682esac
42683    OBJCOPY=$ac_ct_OBJCOPY
42684  fi
42685fi
42686
42687  else
42688    # The variable is set, but is it from the command line or the environment?
42689
42690    # Try to remove the string !OBJCOPY! from our list.
42691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42693      # If it failed, the variable was not from the command line. Ignore it,
42694      # but warn the user (except for BASH, which is always set by the calling BASH).
42695      if test "xOBJCOPY" != xBASH; then
42696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42697$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42698      fi
42699      # Try to locate tool using the code snippet
42700      if test -n "$ac_tool_prefix"; then
42701  for ac_prog in gobjcopy objcopy
42702  do
42703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42706$as_echo_n "checking for $ac_word... " >&6; }
42707if ${ac_cv_prog_OBJCOPY+:} false; then :
42708  $as_echo_n "(cached) " >&6
42709else
42710  if test -n "$OBJCOPY"; then
42711  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42712else
42713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42714for as_dir in $PATH
42715do
42716  IFS=$as_save_IFS
42717  test -z "$as_dir" && as_dir=.
42718    for ac_exec_ext in '' $ac_executable_extensions; do
42719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42720    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42722    break 2
42723  fi
42724done
42725  done
42726IFS=$as_save_IFS
42727
42728fi
42729fi
42730OBJCOPY=$ac_cv_prog_OBJCOPY
42731if test -n "$OBJCOPY"; then
42732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42733$as_echo "$OBJCOPY" >&6; }
42734else
42735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42736$as_echo "no" >&6; }
42737fi
42738
42739
42740    test -n "$OBJCOPY" && break
42741  done
42742fi
42743if test -z "$OBJCOPY"; then
42744  ac_ct_OBJCOPY=$OBJCOPY
42745  for ac_prog in gobjcopy objcopy
42746do
42747  # Extract the first word of "$ac_prog", so it can be a program name with args.
42748set dummy $ac_prog; ac_word=$2
42749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42750$as_echo_n "checking for $ac_word... " >&6; }
42751if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42752  $as_echo_n "(cached) " >&6
42753else
42754  if test -n "$ac_ct_OBJCOPY"; then
42755  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42756else
42757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42758for as_dir in $PATH
42759do
42760  IFS=$as_save_IFS
42761  test -z "$as_dir" && as_dir=.
42762    for ac_exec_ext in '' $ac_executable_extensions; do
42763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42764    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42766    break 2
42767  fi
42768done
42769  done
42770IFS=$as_save_IFS
42771
42772fi
42773fi
42774ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42775if test -n "$ac_ct_OBJCOPY"; then
42776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42777$as_echo "$ac_ct_OBJCOPY" >&6; }
42778else
42779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42780$as_echo "no" >&6; }
42781fi
42782
42783
42784  test -n "$ac_ct_OBJCOPY" && break
42785done
42786
42787  if test "x$ac_ct_OBJCOPY" = x; then
42788    OBJCOPY=""
42789  else
42790    case $cross_compiling:$ac_tool_warned in
42791yes:)
42792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42794ac_tool_warned=yes ;;
42795esac
42796    OBJCOPY=$ac_ct_OBJCOPY
42797  fi
42798fi
42799
42800    else
42801      # If it succeeded, then it was overridden by the user. We will use it
42802      # for the tool.
42803
42804      # First remove it from the list of overridden variables, so we can test
42805      # for unknown variables in the end.
42806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42807
42808      # Check if we try to supply an empty value
42809      if test "x$OBJCOPY" = x; then
42810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42811$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42813$as_echo_n "checking for OBJCOPY... " >&6; }
42814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42815$as_echo "disabled" >&6; }
42816      else
42817        # Check if the provided tool contains a complete path.
42818        tool_specified="$OBJCOPY"
42819        tool_basename="${tool_specified##*/}"
42820        if test "x$tool_basename" = "x$tool_specified"; then
42821          # A command without a complete path is provided, search $PATH.
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42823$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42824          # Extract the first word of "$tool_basename", so it can be a program name with args.
42825set dummy $tool_basename; ac_word=$2
42826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42827$as_echo_n "checking for $ac_word... " >&6; }
42828if ${ac_cv_path_OBJCOPY+:} false; then :
42829  $as_echo_n "(cached) " >&6
42830else
42831  case $OBJCOPY in
42832  [\\/]* | ?:[\\/]*)
42833  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42834  ;;
42835  *)
42836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42837for as_dir in $PATH
42838do
42839  IFS=$as_save_IFS
42840  test -z "$as_dir" && as_dir=.
42841    for ac_exec_ext in '' $ac_executable_extensions; do
42842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42843    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42845    break 2
42846  fi
42847done
42848  done
42849IFS=$as_save_IFS
42850
42851  ;;
42852esac
42853fi
42854OBJCOPY=$ac_cv_path_OBJCOPY
42855if test -n "$OBJCOPY"; then
42856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42857$as_echo "$OBJCOPY" >&6; }
42858else
42859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42860$as_echo "no" >&6; }
42861fi
42862
42863
42864          if test "x$OBJCOPY" = x; then
42865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42866          fi
42867        else
42868          # Otherwise we believe it is a complete path. Use it as it is.
42869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42870$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42872$as_echo_n "checking for OBJCOPY... " >&6; }
42873          if test ! -x "$tool_specified"; then
42874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42875$as_echo "not found" >&6; }
42876            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42877          fi
42878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42879$as_echo "$tool_specified" >&6; }
42880        fi
42881      fi
42882    fi
42883
42884  fi
42885
42886
42887    # Only call fixup if objcopy was found.
42888    if test -n "$OBJCOPY"; then
42889
42890  # Only process if variable expands to non-empty
42891
42892  if test "x$OBJCOPY" != x; then
42893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42894
42895  # First separate the path from the arguments. This will split at the first
42896  # space.
42897  complete="$OBJCOPY"
42898  path="${complete%% *}"
42899  tmp="$complete EOL"
42900  arguments="${tmp#* }"
42901
42902  # Input might be given as Windows format, start by converting to
42903  # unix format.
42904  new_path=`$CYGPATH -u "$path"`
42905
42906  # Now try to locate executable using which
42907  new_path=`$WHICH "$new_path" 2> /dev/null`
42908  # bat and cmd files are not always considered executable in cygwin causing which
42909  # to not find them
42910  if test "x$new_path" = x \
42911      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42912      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42913    new_path=`$CYGPATH -u "$path"`
42914  fi
42915  if test "x$new_path" = x; then
42916    # Oops. Which didn't find the executable.
42917    # The splitting of arguments from the executable at a space might have been incorrect,
42918    # since paths with space are more likely in Windows. Give it another try with the whole
42919    # argument.
42920    path="$complete"
42921    arguments="EOL"
42922    new_path=`$CYGPATH -u "$path"`
42923    new_path=`$WHICH "$new_path" 2> /dev/null`
42924    # bat and cmd files are not always considered executable in cygwin causing which
42925    # to not find them
42926    if test "x$new_path" = x \
42927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42929      new_path=`$CYGPATH -u "$path"`
42930    fi
42931    if test "x$new_path" = x; then
42932      # It's still not found. Now this is an unrecoverable error.
42933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42934$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42935      has_space=`$ECHO "$complete" | $GREP " "`
42936      if test "x$has_space" != x; then
42937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42939      fi
42940      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42941    fi
42942  fi
42943
42944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42947  # "foo.exe" is OK but "foo" is an error.
42948  #
42949  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42950  # It is also a way to make sure we got the proper file name for the real test later on.
42951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42952  if test "x$test_shortpath" = x; then
42953    # Short path failed, file does not exist as specified.
42954    # Try adding .exe or .cmd
42955    if test -f "${new_path}.exe"; then
42956      input_to_shortpath="${new_path}.exe"
42957    elif test -f "${new_path}.cmd"; then
42958      input_to_shortpath="${new_path}.cmd"
42959    else
42960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42961$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42962      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42963$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42964      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42965    fi
42966  else
42967    input_to_shortpath="$new_path"
42968  fi
42969
42970  # Call helper function which possibly converts this using DOS-style short mode.
42971  # If so, the updated path is stored in $new_path.
42972  new_path="$input_to_shortpath"
42973
42974  input_path="$input_to_shortpath"
42975  # Check if we need to convert this using DOS-style short mode. If the path
42976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42977  # take no chances and rewrite it.
42978  # Note: m4 eats our [], so we need to use [ and ] instead.
42979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42980  if test "x$has_forbidden_chars" != x; then
42981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42985      # Going to short mode and back again did indeed matter. Since short mode is
42986      # case insensitive, let's make it lowercase to improve readability.
42987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42988      # Now convert it back to Unix-style (cygpath)
42989      input_path=`$CYGPATH -u "$shortmode_path"`
42990      new_path="$input_path"
42991    fi
42992  fi
42993
42994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42995  if test "x$test_cygdrive_prefix" = x; then
42996    # As a simple fix, exclude /usr/bin since it's not a real path.
42997    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42999      # a path prefixed by /cygdrive for fixpath to work.
43000      new_path="$CYGWIN_ROOT_PATH$input_path"
43001    fi
43002  fi
43003
43004  # remove trailing .exe if any
43005  new_path="${new_path/%.exe/}"
43006
43007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43008
43009  # First separate the path from the arguments. This will split at the first
43010  # space.
43011  complete="$OBJCOPY"
43012  path="${complete%% *}"
43013  tmp="$complete EOL"
43014  arguments="${tmp#* }"
43015
43016  # Input might be given as Windows format, start by converting to
43017  # unix format.
43018  new_path="$path"
43019
43020  windows_path="$new_path"
43021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43022    unix_path=`$CYGPATH -u "$windows_path"`
43023    new_path="$unix_path"
43024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43026    new_path="$unix_path"
43027  fi
43028
43029
43030  # Now try to locate executable using which
43031  new_path=`$WHICH "$new_path" 2> /dev/null`
43032
43033  if test "x$new_path" = x; then
43034    # Oops. Which didn't find the executable.
43035    # The splitting of arguments from the executable at a space might have been incorrect,
43036    # since paths with space are more likely in Windows. Give it another try with the whole
43037    # argument.
43038    path="$complete"
43039    arguments="EOL"
43040    new_path="$path"
43041
43042  windows_path="$new_path"
43043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43044    unix_path=`$CYGPATH -u "$windows_path"`
43045    new_path="$unix_path"
43046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43048    new_path="$unix_path"
43049  fi
43050
43051
43052    new_path=`$WHICH "$new_path" 2> /dev/null`
43053    # bat and cmd files are not always considered executable in MSYS causing which
43054    # to not find them
43055    if test "x$new_path" = x \
43056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43058      new_path="$path"
43059
43060  windows_path="$new_path"
43061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43062    unix_path=`$CYGPATH -u "$windows_path"`
43063    new_path="$unix_path"
43064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43066    new_path="$unix_path"
43067  fi
43068
43069    fi
43070
43071    if test "x$new_path" = x; then
43072      # It's still not found. Now this is an unrecoverable error.
43073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43074$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43075      has_space=`$ECHO "$complete" | $GREP " "`
43076      if test "x$has_space" != x; then
43077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43079      fi
43080      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43081    fi
43082  fi
43083
43084  # Now new_path has a complete unix path to the binary
43085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43086    # Keep paths in /bin as-is, but remove trailing .exe if any
43087    new_path="${new_path/%.exe/}"
43088    # Do not save /bin paths to all_fixpath_prefixes!
43089  else
43090    # Not in mixed or Windows style, start by that.
43091    new_path=`cmd //c echo $new_path`
43092
43093  input_path="$new_path"
43094  # Check if we need to convert this using DOS-style short mode. If the path
43095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43096  # take no chances and rewrite it.
43097  # Note: m4 eats our [], so we need to use [ and ] instead.
43098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43099  if test "x$has_forbidden_chars" != x; then
43100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43102  fi
43103
43104    # Output is in $new_path
43105
43106  windows_path="$new_path"
43107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43108    unix_path=`$CYGPATH -u "$windows_path"`
43109    new_path="$unix_path"
43110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43112    new_path="$unix_path"
43113  fi
43114
43115    # remove trailing .exe if any
43116    new_path="${new_path/%.exe/}"
43117
43118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43120  fi
43121
43122    else
43123      # We're on a unix platform. Hooray! :)
43124      # First separate the path from the arguments. This will split at the first
43125      # space.
43126      complete="$OBJCOPY"
43127      path="${complete%% *}"
43128      tmp="$complete EOL"
43129      arguments="${tmp#* }"
43130
43131      # Cannot rely on the command "which" here since it doesn't always work.
43132      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43133      if test -z "$is_absolute_path"; then
43134        # Path to executable is not absolute. Find it.
43135        IFS_save="$IFS"
43136        IFS=:
43137        for p in $PATH; do
43138          if test -f "$p/$path" && test -x "$p/$path"; then
43139            new_path="$p/$path"
43140            break
43141          fi
43142        done
43143        IFS="$IFS_save"
43144      else
43145        # This is an absolute path, we can use it without further modifications.
43146        new_path="$path"
43147      fi
43148
43149      if test "x$new_path" = x; then
43150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43151$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43152        has_space=`$ECHO "$complete" | $GREP " "`
43153        if test "x$has_space" != x; then
43154          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43156        fi
43157        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43158      fi
43159    fi
43160
43161    # Now join together the path and the arguments once again
43162    if test "x$arguments" != xEOL; then
43163      new_complete="$new_path ${arguments% *}"
43164    else
43165      new_complete="$new_path"
43166    fi
43167
43168    if test "x$complete" != "x$new_complete"; then
43169      OBJCOPY="$new_complete"
43170      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43171$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43172    fi
43173  fi
43174
43175      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43176        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43177        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43178        # - version number is last blank separate word on first line
43179        # - version number formats that have been seen:
43180        #   - <major>.<minor>
43181        #   - <major>.<minor>.<micro>
43182        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43183        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43184         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43185              -e 's/.* //' \
43186              -e '/^[01]\./b bad' \
43187              -e '/^2\./{' \
43188              -e '  s/^2\.//' \
43189              -e '  /^[0-9]$/b bad' \
43190              -e '  /^[0-9]\./b bad' \
43191              -e '  /^1[0-9]$/b bad' \
43192              -e '  /^1[0-9]\./b bad' \
43193              -e '  /^20\./b bad' \
43194              -e '  /^21\.0$/b bad' \
43195              -e '  /^21\.0\./b bad' \
43196              -e '}' \
43197              -e ':good' \
43198              -e 's/.*/VALID_VERSION/p' \
43199              -e 'q' \
43200              -e ':bad' \
43201              -e 's/.*/BAD_VERSION/p' \
43202              -e 'q'`
43203        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43204          OBJCOPY=
43205          { $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
43206$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43207          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43208$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43209          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43210$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43211          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43212$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43213          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43214$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43215        fi
43216      fi
43217    fi
43218  fi
43219
43220
43221
43222  # Publish this variable in the help.
43223
43224
43225  if [ -z "${OBJDUMP+x}" ]; then
43226    # The variable is not set by user, try to locate tool using the code snippet
43227    if test -n "$ac_tool_prefix"; then
43228  for ac_prog in gobjdump objdump
43229  do
43230    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43233$as_echo_n "checking for $ac_word... " >&6; }
43234if ${ac_cv_prog_OBJDUMP+:} false; then :
43235  $as_echo_n "(cached) " >&6
43236else
43237  if test -n "$OBJDUMP"; then
43238  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43239else
43240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43241for as_dir in $PATH
43242do
43243  IFS=$as_save_IFS
43244  test -z "$as_dir" && as_dir=.
43245    for ac_exec_ext in '' $ac_executable_extensions; do
43246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43247    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43249    break 2
43250  fi
43251done
43252  done
43253IFS=$as_save_IFS
43254
43255fi
43256fi
43257OBJDUMP=$ac_cv_prog_OBJDUMP
43258if test -n "$OBJDUMP"; then
43259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43260$as_echo "$OBJDUMP" >&6; }
43261else
43262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43263$as_echo "no" >&6; }
43264fi
43265
43266
43267    test -n "$OBJDUMP" && break
43268  done
43269fi
43270if test -z "$OBJDUMP"; then
43271  ac_ct_OBJDUMP=$OBJDUMP
43272  for ac_prog in gobjdump objdump
43273do
43274  # Extract the first word of "$ac_prog", so it can be a program name with args.
43275set dummy $ac_prog; ac_word=$2
43276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43277$as_echo_n "checking for $ac_word... " >&6; }
43278if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43279  $as_echo_n "(cached) " >&6
43280else
43281  if test -n "$ac_ct_OBJDUMP"; then
43282  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43283else
43284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43285for as_dir in $PATH
43286do
43287  IFS=$as_save_IFS
43288  test -z "$as_dir" && as_dir=.
43289    for ac_exec_ext in '' $ac_executable_extensions; do
43290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43291    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43293    break 2
43294  fi
43295done
43296  done
43297IFS=$as_save_IFS
43298
43299fi
43300fi
43301ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43302if test -n "$ac_ct_OBJDUMP"; then
43303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43304$as_echo "$ac_ct_OBJDUMP" >&6; }
43305else
43306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43307$as_echo "no" >&6; }
43308fi
43309
43310
43311  test -n "$ac_ct_OBJDUMP" && break
43312done
43313
43314  if test "x$ac_ct_OBJDUMP" = x; then
43315    OBJDUMP=""
43316  else
43317    case $cross_compiling:$ac_tool_warned in
43318yes:)
43319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43321ac_tool_warned=yes ;;
43322esac
43323    OBJDUMP=$ac_ct_OBJDUMP
43324  fi
43325fi
43326
43327  else
43328    # The variable is set, but is it from the command line or the environment?
43329
43330    # Try to remove the string !OBJDUMP! from our list.
43331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43333      # If it failed, the variable was not from the command line. Ignore it,
43334      # but warn the user (except for BASH, which is always set by the calling BASH).
43335      if test "xOBJDUMP" != xBASH; then
43336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43337$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43338      fi
43339      # Try to locate tool using the code snippet
43340      if test -n "$ac_tool_prefix"; then
43341  for ac_prog in gobjdump objdump
43342  do
43343    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43344set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43346$as_echo_n "checking for $ac_word... " >&6; }
43347if ${ac_cv_prog_OBJDUMP+:} false; then :
43348  $as_echo_n "(cached) " >&6
43349else
43350  if test -n "$OBJDUMP"; then
43351  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43352else
43353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43354for as_dir in $PATH
43355do
43356  IFS=$as_save_IFS
43357  test -z "$as_dir" && as_dir=.
43358    for ac_exec_ext in '' $ac_executable_extensions; do
43359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43360    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43362    break 2
43363  fi
43364done
43365  done
43366IFS=$as_save_IFS
43367
43368fi
43369fi
43370OBJDUMP=$ac_cv_prog_OBJDUMP
43371if test -n "$OBJDUMP"; then
43372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43373$as_echo "$OBJDUMP" >&6; }
43374else
43375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43376$as_echo "no" >&6; }
43377fi
43378
43379
43380    test -n "$OBJDUMP" && break
43381  done
43382fi
43383if test -z "$OBJDUMP"; then
43384  ac_ct_OBJDUMP=$OBJDUMP
43385  for ac_prog in gobjdump objdump
43386do
43387  # Extract the first word of "$ac_prog", so it can be a program name with args.
43388set dummy $ac_prog; ac_word=$2
43389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43390$as_echo_n "checking for $ac_word... " >&6; }
43391if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43392  $as_echo_n "(cached) " >&6
43393else
43394  if test -n "$ac_ct_OBJDUMP"; then
43395  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43396else
43397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43398for as_dir in $PATH
43399do
43400  IFS=$as_save_IFS
43401  test -z "$as_dir" && as_dir=.
43402    for ac_exec_ext in '' $ac_executable_extensions; do
43403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43404    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43406    break 2
43407  fi
43408done
43409  done
43410IFS=$as_save_IFS
43411
43412fi
43413fi
43414ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43415if test -n "$ac_ct_OBJDUMP"; then
43416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43417$as_echo "$ac_ct_OBJDUMP" >&6; }
43418else
43419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43420$as_echo "no" >&6; }
43421fi
43422
43423
43424  test -n "$ac_ct_OBJDUMP" && break
43425done
43426
43427  if test "x$ac_ct_OBJDUMP" = x; then
43428    OBJDUMP=""
43429  else
43430    case $cross_compiling:$ac_tool_warned in
43431yes:)
43432{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43433$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43434ac_tool_warned=yes ;;
43435esac
43436    OBJDUMP=$ac_ct_OBJDUMP
43437  fi
43438fi
43439
43440    else
43441      # If it succeeded, then it was overridden by the user. We will use it
43442      # for the tool.
43443
43444      # First remove it from the list of overridden variables, so we can test
43445      # for unknown variables in the end.
43446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43447
43448      # Check if we try to supply an empty value
43449      if test "x$OBJDUMP" = x; then
43450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43451$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43453$as_echo_n "checking for OBJDUMP... " >&6; }
43454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43455$as_echo "disabled" >&6; }
43456      else
43457        # Check if the provided tool contains a complete path.
43458        tool_specified="$OBJDUMP"
43459        tool_basename="${tool_specified##*/}"
43460        if test "x$tool_basename" = "x$tool_specified"; then
43461          # A command without a complete path is provided, search $PATH.
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43463$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43464          # Extract the first word of "$tool_basename", so it can be a program name with args.
43465set dummy $tool_basename; ac_word=$2
43466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43467$as_echo_n "checking for $ac_word... " >&6; }
43468if ${ac_cv_path_OBJDUMP+:} false; then :
43469  $as_echo_n "(cached) " >&6
43470else
43471  case $OBJDUMP in
43472  [\\/]* | ?:[\\/]*)
43473  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43474  ;;
43475  *)
43476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43477for as_dir in $PATH
43478do
43479  IFS=$as_save_IFS
43480  test -z "$as_dir" && as_dir=.
43481    for ac_exec_ext in '' $ac_executable_extensions; do
43482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43483    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43485    break 2
43486  fi
43487done
43488  done
43489IFS=$as_save_IFS
43490
43491  ;;
43492esac
43493fi
43494OBJDUMP=$ac_cv_path_OBJDUMP
43495if test -n "$OBJDUMP"; then
43496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43497$as_echo "$OBJDUMP" >&6; }
43498else
43499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43500$as_echo "no" >&6; }
43501fi
43502
43503
43504          if test "x$OBJDUMP" = x; then
43505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43506          fi
43507        else
43508          # Otherwise we believe it is a complete path. Use it as it is.
43509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43510$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43512$as_echo_n "checking for OBJDUMP... " >&6; }
43513          if test ! -x "$tool_specified"; then
43514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43515$as_echo "not found" >&6; }
43516            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43517          fi
43518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43519$as_echo "$tool_specified" >&6; }
43520        fi
43521      fi
43522    fi
43523
43524  fi
43525
43526
43527  if test "x$OBJDUMP" != x; then
43528    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43529    # bails if argument is missing.
43530
43531  # Only process if variable expands to non-empty
43532
43533  if test "x$OBJDUMP" != x; then
43534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43535
43536  # First separate the path from the arguments. This will split at the first
43537  # space.
43538  complete="$OBJDUMP"
43539  path="${complete%% *}"
43540  tmp="$complete EOL"
43541  arguments="${tmp#* }"
43542
43543  # Input might be given as Windows format, start by converting to
43544  # unix format.
43545  new_path=`$CYGPATH -u "$path"`
43546
43547  # Now try to locate executable using which
43548  new_path=`$WHICH "$new_path" 2> /dev/null`
43549  # bat and cmd files are not always considered executable in cygwin causing which
43550  # to not find them
43551  if test "x$new_path" = x \
43552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43554    new_path=`$CYGPATH -u "$path"`
43555  fi
43556  if test "x$new_path" = x; then
43557    # Oops. Which didn't find the executable.
43558    # The splitting of arguments from the executable at a space might have been incorrect,
43559    # since paths with space are more likely in Windows. Give it another try with the whole
43560    # argument.
43561    path="$complete"
43562    arguments="EOL"
43563    new_path=`$CYGPATH -u "$path"`
43564    new_path=`$WHICH "$new_path" 2> /dev/null`
43565    # bat and cmd files are not always considered executable in cygwin causing which
43566    # to not find them
43567    if test "x$new_path" = x \
43568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43570      new_path=`$CYGPATH -u "$path"`
43571    fi
43572    if test "x$new_path" = x; then
43573      # It's still not found. Now this is an unrecoverable error.
43574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43575$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43576      has_space=`$ECHO "$complete" | $GREP " "`
43577      if test "x$has_space" != x; then
43578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43580      fi
43581      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43582    fi
43583  fi
43584
43585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43588  # "foo.exe" is OK but "foo" is an error.
43589  #
43590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43591  # It is also a way to make sure we got the proper file name for the real test later on.
43592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43593  if test "x$test_shortpath" = x; then
43594    # Short path failed, file does not exist as specified.
43595    # Try adding .exe or .cmd
43596    if test -f "${new_path}.exe"; then
43597      input_to_shortpath="${new_path}.exe"
43598    elif test -f "${new_path}.cmd"; then
43599      input_to_shortpath="${new_path}.cmd"
43600    else
43601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43602$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43605      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43606    fi
43607  else
43608    input_to_shortpath="$new_path"
43609  fi
43610
43611  # Call helper function which possibly converts this using DOS-style short mode.
43612  # If so, the updated path is stored in $new_path.
43613  new_path="$input_to_shortpath"
43614
43615  input_path="$input_to_shortpath"
43616  # Check if we need to convert this using DOS-style short mode. If the path
43617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43618  # take no chances and rewrite it.
43619  # Note: m4 eats our [], so we need to use [ and ] instead.
43620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43621  if test "x$has_forbidden_chars" != x; then
43622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43626      # Going to short mode and back again did indeed matter. Since short mode is
43627      # case insensitive, let's make it lowercase to improve readability.
43628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43629      # Now convert it back to Unix-style (cygpath)
43630      input_path=`$CYGPATH -u "$shortmode_path"`
43631      new_path="$input_path"
43632    fi
43633  fi
43634
43635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43636  if test "x$test_cygdrive_prefix" = x; then
43637    # As a simple fix, exclude /usr/bin since it's not a real path.
43638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43640      # a path prefixed by /cygdrive for fixpath to work.
43641      new_path="$CYGWIN_ROOT_PATH$input_path"
43642    fi
43643  fi
43644
43645  # remove trailing .exe if any
43646  new_path="${new_path/%.exe/}"
43647
43648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43649
43650  # First separate the path from the arguments. This will split at the first
43651  # space.
43652  complete="$OBJDUMP"
43653  path="${complete%% *}"
43654  tmp="$complete EOL"
43655  arguments="${tmp#* }"
43656
43657  # Input might be given as Windows format, start by converting to
43658  # unix format.
43659  new_path="$path"
43660
43661  windows_path="$new_path"
43662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43663    unix_path=`$CYGPATH -u "$windows_path"`
43664    new_path="$unix_path"
43665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43667    new_path="$unix_path"
43668  fi
43669
43670
43671  # Now try to locate executable using which
43672  new_path=`$WHICH "$new_path" 2> /dev/null`
43673
43674  if test "x$new_path" = x; then
43675    # Oops. Which didn't find the executable.
43676    # The splitting of arguments from the executable at a space might have been incorrect,
43677    # since paths with space are more likely in Windows. Give it another try with the whole
43678    # argument.
43679    path="$complete"
43680    arguments="EOL"
43681    new_path="$path"
43682
43683  windows_path="$new_path"
43684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43685    unix_path=`$CYGPATH -u "$windows_path"`
43686    new_path="$unix_path"
43687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43689    new_path="$unix_path"
43690  fi
43691
43692
43693    new_path=`$WHICH "$new_path" 2> /dev/null`
43694    # bat and cmd files are not always considered executable in MSYS causing which
43695    # to not find them
43696    if test "x$new_path" = x \
43697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43699      new_path="$path"
43700
43701  windows_path="$new_path"
43702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43703    unix_path=`$CYGPATH -u "$windows_path"`
43704    new_path="$unix_path"
43705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43707    new_path="$unix_path"
43708  fi
43709
43710    fi
43711
43712    if test "x$new_path" = x; then
43713      # It's still not found. Now this is an unrecoverable error.
43714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43715$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43716      has_space=`$ECHO "$complete" | $GREP " "`
43717      if test "x$has_space" != x; then
43718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43720      fi
43721      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43722    fi
43723  fi
43724
43725  # Now new_path has a complete unix path to the binary
43726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43727    # Keep paths in /bin as-is, but remove trailing .exe if any
43728    new_path="${new_path/%.exe/}"
43729    # Do not save /bin paths to all_fixpath_prefixes!
43730  else
43731    # Not in mixed or Windows style, start by that.
43732    new_path=`cmd //c echo $new_path`
43733
43734  input_path="$new_path"
43735  # Check if we need to convert this using DOS-style short mode. If the path
43736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43737  # take no chances and rewrite it.
43738  # Note: m4 eats our [], so we need to use [ and ] instead.
43739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43740  if test "x$has_forbidden_chars" != x; then
43741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43743  fi
43744
43745    # Output is in $new_path
43746
43747  windows_path="$new_path"
43748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43749    unix_path=`$CYGPATH -u "$windows_path"`
43750    new_path="$unix_path"
43751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43753    new_path="$unix_path"
43754  fi
43755
43756    # remove trailing .exe if any
43757    new_path="${new_path/%.exe/}"
43758
43759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43761  fi
43762
43763    else
43764      # We're on a unix platform. Hooray! :)
43765      # First separate the path from the arguments. This will split at the first
43766      # space.
43767      complete="$OBJDUMP"
43768      path="${complete%% *}"
43769      tmp="$complete EOL"
43770      arguments="${tmp#* }"
43771
43772      # Cannot rely on the command "which" here since it doesn't always work.
43773      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43774      if test -z "$is_absolute_path"; then
43775        # Path to executable is not absolute. Find it.
43776        IFS_save="$IFS"
43777        IFS=:
43778        for p in $PATH; do
43779          if test -f "$p/$path" && test -x "$p/$path"; then
43780            new_path="$p/$path"
43781            break
43782          fi
43783        done
43784        IFS="$IFS_save"
43785      else
43786        # This is an absolute path, we can use it without further modifications.
43787        new_path="$path"
43788      fi
43789
43790      if test "x$new_path" = x; then
43791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43792$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43793        has_space=`$ECHO "$complete" | $GREP " "`
43794        if test "x$has_space" != x; then
43795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43797        fi
43798        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43799      fi
43800    fi
43801
43802    # Now join together the path and the arguments once again
43803    if test "x$arguments" != xEOL; then
43804      new_complete="$new_path ${arguments% *}"
43805    else
43806      new_complete="$new_path"
43807    fi
43808
43809    if test "x$complete" != "x$new_complete"; then
43810      OBJDUMP="$new_complete"
43811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43812$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43813    fi
43814  fi
43815
43816  fi
43817
43818
43819  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43820  # to remain in place. Otherwise the compiler will not work in some siutations
43821  # in later configure checks.
43822  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43823    PATH="$OLD_PATH"
43824  fi
43825
43826  # Restore the flags to the user specified values.
43827  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43828  CFLAGS="$ORG_CFLAGS"
43829  CXXFLAGS="$ORG_CXXFLAGS"
43830
43831
43832# Finally do some processing after the detection phase
43833
43834  if test "x$COMPILE_TYPE" = "xcross"; then
43835    # Now we need to find a C/C++ compiler that can build executables for the
43836    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43837    # used once. Also, we need to do this without adding a tools dir to the
43838    # path, otherwise we might pick up cross-compilers which don't use standard
43839    # naming.
43840
43841    OLDPATH="$PATH"
43842
43843
43844# Check whether --with-build-devkit was given.
43845if test "${with_build_devkit+set}" = set; then :
43846  withval=$with_build_devkit;
43847fi
43848
43849    if test "x$with_build_devkit" = "xyes"; then
43850      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43851    elif test -n "$with_build_devkit"; then
43852      if test ! -d "$with_build_devkit"; then
43853        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43854      else
43855
43856  # Only process if variable expands to non-empty
43857
43858  if test "x$with_build_devkit" != x; then
43859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43860
43861  # Input might be given as Windows format, start by converting to
43862  # unix format.
43863  path="$with_build_devkit"
43864  new_path=`$CYGPATH -u "$path"`
43865
43866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43869  # "foo.exe" is OK but "foo" is an error.
43870  #
43871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43872  # It is also a way to make sure we got the proper file name for the real test later on.
43873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43874  if test "x$test_shortpath" = x; then
43875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43876$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43877    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43878  fi
43879
43880  # Call helper function which possibly converts this using DOS-style short mode.
43881  # If so, the updated path is stored in $new_path.
43882
43883  input_path="$new_path"
43884  # Check if we need to convert this using DOS-style short mode. If the path
43885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43886  # take no chances and rewrite it.
43887  # Note: m4 eats our [], so we need to use [ and ] instead.
43888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43889  if test "x$has_forbidden_chars" != x; then
43890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43894      # Going to short mode and back again did indeed matter. Since short mode is
43895      # case insensitive, let's make it lowercase to improve readability.
43896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43897      # Now convert it back to Unix-style (cygpath)
43898      input_path=`$CYGPATH -u "$shortmode_path"`
43899      new_path="$input_path"
43900    fi
43901  fi
43902
43903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43904  if test "x$test_cygdrive_prefix" = x; then
43905    # As a simple fix, exclude /usr/bin since it's not a real path.
43906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43908      # a path prefixed by /cygdrive for fixpath to work.
43909      new_path="$CYGWIN_ROOT_PATH$input_path"
43910    fi
43911  fi
43912
43913
43914  if test "x$path" != "x$new_path"; then
43915    with_build_devkit="$new_path"
43916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43917$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43918  fi
43919
43920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43921
43922  path="$with_build_devkit"
43923  has_colon=`$ECHO $path | $GREP ^.:`
43924  new_path="$path"
43925  if test "x$has_colon" = x; then
43926    # Not in mixed or Windows style, start by that.
43927    new_path=`cmd //c echo $path`
43928  fi
43929
43930
43931  input_path="$new_path"
43932  # Check if we need to convert this using DOS-style short mode. If the path
43933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43934  # take no chances and rewrite it.
43935  # Note: m4 eats our [], so we need to use [ and ] instead.
43936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43937  if test "x$has_forbidden_chars" != x; then
43938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43940  fi
43941
43942
43943  windows_path="$new_path"
43944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43945    unix_path=`$CYGPATH -u "$windows_path"`
43946    new_path="$unix_path"
43947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43949    new_path="$unix_path"
43950  fi
43951
43952  if test "x$path" != "x$new_path"; then
43953    with_build_devkit="$new_path"
43954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43955$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43956  fi
43957
43958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43960
43961    else
43962      # We're on a unix platform. Hooray! :)
43963      path="$with_build_devkit"
43964      has_space=`$ECHO "$path" | $GREP " "`
43965      if test "x$has_space" != x; then
43966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43967$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43969      fi
43970
43971      # Use eval to expand a potential ~
43972      eval path="$path"
43973      if test ! -f "$path" && test ! -d "$path"; then
43974        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43975      fi
43976
43977      if test -d "$path"; then
43978        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43979      else
43980        dir="`$DIRNAME "$path"`"
43981        base="`$BASENAME "$path"`"
43982        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43983      fi
43984    fi
43985  fi
43986
43987        BUILD_DEVKIT_ROOT="$with_build_devkit"
43988        # Check for a meta data info file in the root of the devkit
43989        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43990          # Process devkit.info so that existing devkit variables are not
43991          # modified by this
43992          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43993              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43994              -e "s/\$host/\$build/g" \
43995              $BUILD_DEVKIT_ROOT/devkit.info \
43996              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43997          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43998          # This potentially sets the following:
43999          # A descriptive name of the devkit
44000
44001  if test "x$BUILD_DEVKIT_NAME" = x; then
44002    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44003  fi
44004
44005          # Corresponds to --with-extra-path
44006
44007  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44008    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44009  fi
44010
44011          # Corresponds to --with-toolchain-path
44012
44013  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44014    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44015  fi
44016
44017          # Corresponds to --with-sysroot
44018
44019  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44020    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44021  fi
44022
44023          # Skip the Window specific parts
44024        fi
44025
44026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44027$as_echo_n "checking for build platform devkit... " >&6; }
44028        if test "x$BUILD_DEVKIT_NAME" != x; then
44029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44030$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44031        else
44032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44033$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44034        fi
44035
44036        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44037
44038  if test "x$BUILD_SYSROOT" != "x"; then
44039    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44040      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44041        # Solaris Studio does not have a concept of sysroot. Instead we must
44042        # make sure the default include and lib dirs are appended to each
44043        # compile and link command line. Must also add -I-xbuiltin to enable
44044        # inlining of system functions and intrinsics.
44045        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44046        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44047            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44048      fi
44049    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44050      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44051      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44052    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44053      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44054      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44055    fi
44056    # Propagate the sysroot args to hotspot
44057    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44058    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44059    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44060    # The global CFLAGS and LDFLAGS variables need these for configure to function
44061    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44062    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44063    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44064    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44065  fi
44066
44067  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44068    # We also need -iframework<path>/System/Library/Frameworks
44069    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44070    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44071    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44072    # set this here so it doesn't have to be peppered throughout the forest
44073    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44074    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44075  fi
44076
44077
44078
44079
44080
44081         # Fallback default of just /bin if DEVKIT_PATH is not defined
44082        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44083          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44084        fi
44085        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44086      fi
44087    fi
44088
44089    # FIXME: we should list the discovered compilers as an exclude pattern!
44090    # If we do that, we can do this detection before POST_DETECTION, and still
44091    # find the build compilers in the tools dir, if needed.
44092
44093
44094
44095  # Publish this variable in the help.
44096
44097
44098  if [ -z "${BUILD_CC+x}" ]; then
44099    # The variable is not set by user, try to locate tool using the code snippet
44100    for ac_prog in cl cc gcc
44101do
44102  # Extract the first word of "$ac_prog", so it can be a program name with args.
44103set dummy $ac_prog; ac_word=$2
44104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44105$as_echo_n "checking for $ac_word... " >&6; }
44106if ${ac_cv_path_BUILD_CC+:} false; then :
44107  $as_echo_n "(cached) " >&6
44108else
44109  case $BUILD_CC in
44110  [\\/]* | ?:[\\/]*)
44111  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44112  ;;
44113  *)
44114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44115for as_dir in $PATH
44116do
44117  IFS=$as_save_IFS
44118  test -z "$as_dir" && as_dir=.
44119    for ac_exec_ext in '' $ac_executable_extensions; do
44120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44121    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44123    break 2
44124  fi
44125done
44126  done
44127IFS=$as_save_IFS
44128
44129  ;;
44130esac
44131fi
44132BUILD_CC=$ac_cv_path_BUILD_CC
44133if test -n "$BUILD_CC"; then
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44135$as_echo "$BUILD_CC" >&6; }
44136else
44137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44138$as_echo "no" >&6; }
44139fi
44140
44141
44142  test -n "$BUILD_CC" && break
44143done
44144
44145  else
44146    # The variable is set, but is it from the command line or the environment?
44147
44148    # Try to remove the string !BUILD_CC! from our list.
44149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44151      # If it failed, the variable was not from the command line. Ignore it,
44152      # but warn the user (except for BASH, which is always set by the calling BASH).
44153      if test "xBUILD_CC" != xBASH; then
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44155$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44156      fi
44157      # Try to locate tool using the code snippet
44158      for ac_prog in cl cc gcc
44159do
44160  # Extract the first word of "$ac_prog", so it can be a program name with args.
44161set dummy $ac_prog; ac_word=$2
44162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44163$as_echo_n "checking for $ac_word... " >&6; }
44164if ${ac_cv_path_BUILD_CC+:} false; then :
44165  $as_echo_n "(cached) " >&6
44166else
44167  case $BUILD_CC in
44168  [\\/]* | ?:[\\/]*)
44169  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44170  ;;
44171  *)
44172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44173for as_dir in $PATH
44174do
44175  IFS=$as_save_IFS
44176  test -z "$as_dir" && as_dir=.
44177    for ac_exec_ext in '' $ac_executable_extensions; do
44178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44179    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44181    break 2
44182  fi
44183done
44184  done
44185IFS=$as_save_IFS
44186
44187  ;;
44188esac
44189fi
44190BUILD_CC=$ac_cv_path_BUILD_CC
44191if test -n "$BUILD_CC"; then
44192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44193$as_echo "$BUILD_CC" >&6; }
44194else
44195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44196$as_echo "no" >&6; }
44197fi
44198
44199
44200  test -n "$BUILD_CC" && break
44201done
44202
44203    else
44204      # If it succeeded, then it was overridden by the user. We will use it
44205      # for the tool.
44206
44207      # First remove it from the list of overridden variables, so we can test
44208      # for unknown variables in the end.
44209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44210
44211      # Check if we try to supply an empty value
44212      if test "x$BUILD_CC" = x; then
44213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44214$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44216$as_echo_n "checking for BUILD_CC... " >&6; }
44217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44218$as_echo "disabled" >&6; }
44219      else
44220        # Check if the provided tool contains a complete path.
44221        tool_specified="$BUILD_CC"
44222        tool_basename="${tool_specified##*/}"
44223        if test "x$tool_basename" = "x$tool_specified"; then
44224          # A command without a complete path is provided, search $PATH.
44225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44226$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44227          # Extract the first word of "$tool_basename", so it can be a program name with args.
44228set dummy $tool_basename; ac_word=$2
44229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44230$as_echo_n "checking for $ac_word... " >&6; }
44231if ${ac_cv_path_BUILD_CC+:} false; then :
44232  $as_echo_n "(cached) " >&6
44233else
44234  case $BUILD_CC in
44235  [\\/]* | ?:[\\/]*)
44236  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44237  ;;
44238  *)
44239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44240for as_dir in $PATH
44241do
44242  IFS=$as_save_IFS
44243  test -z "$as_dir" && as_dir=.
44244    for ac_exec_ext in '' $ac_executable_extensions; do
44245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44246    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44248    break 2
44249  fi
44250done
44251  done
44252IFS=$as_save_IFS
44253
44254  ;;
44255esac
44256fi
44257BUILD_CC=$ac_cv_path_BUILD_CC
44258if test -n "$BUILD_CC"; then
44259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44260$as_echo "$BUILD_CC" >&6; }
44261else
44262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44263$as_echo "no" >&6; }
44264fi
44265
44266
44267          if test "x$BUILD_CC" = x; then
44268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44269          fi
44270        else
44271          # Otherwise we believe it is a complete path. Use it as it is.
44272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44273$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44275$as_echo_n "checking for BUILD_CC... " >&6; }
44276          if test ! -x "$tool_specified"; then
44277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44278$as_echo "not found" >&6; }
44279            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44280          fi
44281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44282$as_echo "$tool_specified" >&6; }
44283        fi
44284      fi
44285    fi
44286
44287  fi
44288
44289
44290
44291  if test "x$BUILD_CC" = x; then
44292    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44293  fi
44294
44295
44296
44297  # Only process if variable expands to non-empty
44298
44299  if test "x$BUILD_CC" != x; then
44300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44301
44302  # First separate the path from the arguments. This will split at the first
44303  # space.
44304  complete="$BUILD_CC"
44305  path="${complete%% *}"
44306  tmp="$complete EOL"
44307  arguments="${tmp#* }"
44308
44309  # Input might be given as Windows format, start by converting to
44310  # unix format.
44311  new_path=`$CYGPATH -u "$path"`
44312
44313  # Now try to locate executable using which
44314  new_path=`$WHICH "$new_path" 2> /dev/null`
44315  # bat and cmd files are not always considered executable in cygwin causing which
44316  # to not find them
44317  if test "x$new_path" = x \
44318      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44319      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44320    new_path=`$CYGPATH -u "$path"`
44321  fi
44322  if test "x$new_path" = x; then
44323    # Oops. Which didn't find the executable.
44324    # The splitting of arguments from the executable at a space might have been incorrect,
44325    # since paths with space are more likely in Windows. Give it another try with the whole
44326    # argument.
44327    path="$complete"
44328    arguments="EOL"
44329    new_path=`$CYGPATH -u "$path"`
44330    new_path=`$WHICH "$new_path" 2> /dev/null`
44331    # bat and cmd files are not always considered executable in cygwin causing which
44332    # to not find them
44333    if test "x$new_path" = x \
44334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44336      new_path=`$CYGPATH -u "$path"`
44337    fi
44338    if test "x$new_path" = x; then
44339      # It's still not found. Now this is an unrecoverable error.
44340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44341$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44342      has_space=`$ECHO "$complete" | $GREP " "`
44343      if test "x$has_space" != x; then
44344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44346      fi
44347      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44348    fi
44349  fi
44350
44351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44354  # "foo.exe" is OK but "foo" is an error.
44355  #
44356  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44357  # It is also a way to make sure we got the proper file name for the real test later on.
44358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44359  if test "x$test_shortpath" = x; then
44360    # Short path failed, file does not exist as specified.
44361    # Try adding .exe or .cmd
44362    if test -f "${new_path}.exe"; then
44363      input_to_shortpath="${new_path}.exe"
44364    elif test -f "${new_path}.cmd"; then
44365      input_to_shortpath="${new_path}.cmd"
44366    else
44367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44368$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44371      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44372    fi
44373  else
44374    input_to_shortpath="$new_path"
44375  fi
44376
44377  # Call helper function which possibly converts this using DOS-style short mode.
44378  # If so, the updated path is stored in $new_path.
44379  new_path="$input_to_shortpath"
44380
44381  input_path="$input_to_shortpath"
44382  # Check if we need to convert this using DOS-style short mode. If the path
44383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44384  # take no chances and rewrite it.
44385  # Note: m4 eats our [], so we need to use [ and ] instead.
44386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44387  if test "x$has_forbidden_chars" != x; then
44388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44392      # Going to short mode and back again did indeed matter. Since short mode is
44393      # case insensitive, let's make it lowercase to improve readability.
44394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44395      # Now convert it back to Unix-style (cygpath)
44396      input_path=`$CYGPATH -u "$shortmode_path"`
44397      new_path="$input_path"
44398    fi
44399  fi
44400
44401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44402  if test "x$test_cygdrive_prefix" = x; then
44403    # As a simple fix, exclude /usr/bin since it's not a real path.
44404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44406      # a path prefixed by /cygdrive for fixpath to work.
44407      new_path="$CYGWIN_ROOT_PATH$input_path"
44408    fi
44409  fi
44410
44411  # remove trailing .exe if any
44412  new_path="${new_path/%.exe/}"
44413
44414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44415
44416  # First separate the path from the arguments. This will split at the first
44417  # space.
44418  complete="$BUILD_CC"
44419  path="${complete%% *}"
44420  tmp="$complete EOL"
44421  arguments="${tmp#* }"
44422
44423  # Input might be given as Windows format, start by converting to
44424  # unix format.
44425  new_path="$path"
44426
44427  windows_path="$new_path"
44428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429    unix_path=`$CYGPATH -u "$windows_path"`
44430    new_path="$unix_path"
44431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44433    new_path="$unix_path"
44434  fi
44435
44436
44437  # Now try to locate executable using which
44438  new_path=`$WHICH "$new_path" 2> /dev/null`
44439
44440  if test "x$new_path" = x; then
44441    # Oops. Which didn't find the executable.
44442    # The splitting of arguments from the executable at a space might have been incorrect,
44443    # since paths with space are more likely in Windows. Give it another try with the whole
44444    # argument.
44445    path="$complete"
44446    arguments="EOL"
44447    new_path="$path"
44448
44449  windows_path="$new_path"
44450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44451    unix_path=`$CYGPATH -u "$windows_path"`
44452    new_path="$unix_path"
44453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44455    new_path="$unix_path"
44456  fi
44457
44458
44459    new_path=`$WHICH "$new_path" 2> /dev/null`
44460    # bat and cmd files are not always considered executable in MSYS causing which
44461    # to not find them
44462    if test "x$new_path" = x \
44463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44465      new_path="$path"
44466
44467  windows_path="$new_path"
44468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44469    unix_path=`$CYGPATH -u "$windows_path"`
44470    new_path="$unix_path"
44471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44473    new_path="$unix_path"
44474  fi
44475
44476    fi
44477
44478    if test "x$new_path" = x; then
44479      # It's still not found. Now this is an unrecoverable error.
44480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44481$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44482      has_space=`$ECHO "$complete" | $GREP " "`
44483      if test "x$has_space" != x; then
44484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44486      fi
44487      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44488    fi
44489  fi
44490
44491  # Now new_path has a complete unix path to the binary
44492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44493    # Keep paths in /bin as-is, but remove trailing .exe if any
44494    new_path="${new_path/%.exe/}"
44495    # Do not save /bin paths to all_fixpath_prefixes!
44496  else
44497    # Not in mixed or Windows style, start by that.
44498    new_path=`cmd //c echo $new_path`
44499
44500  input_path="$new_path"
44501  # Check if we need to convert this using DOS-style short mode. If the path
44502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44503  # take no chances and rewrite it.
44504  # Note: m4 eats our [], so we need to use [ and ] instead.
44505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44506  if test "x$has_forbidden_chars" != x; then
44507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44509  fi
44510
44511    # Output is in $new_path
44512
44513  windows_path="$new_path"
44514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44515    unix_path=`$CYGPATH -u "$windows_path"`
44516    new_path="$unix_path"
44517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44519    new_path="$unix_path"
44520  fi
44521
44522    # remove trailing .exe if any
44523    new_path="${new_path/%.exe/}"
44524
44525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44527  fi
44528
44529    else
44530      # We're on a unix platform. Hooray! :)
44531      # First separate the path from the arguments. This will split at the first
44532      # space.
44533      complete="$BUILD_CC"
44534      path="${complete%% *}"
44535      tmp="$complete EOL"
44536      arguments="${tmp#* }"
44537
44538      # Cannot rely on the command "which" here since it doesn't always work.
44539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44540      if test -z "$is_absolute_path"; then
44541        # Path to executable is not absolute. Find it.
44542        IFS_save="$IFS"
44543        IFS=:
44544        for p in $PATH; do
44545          if test -f "$p/$path" && test -x "$p/$path"; then
44546            new_path="$p/$path"
44547            break
44548          fi
44549        done
44550        IFS="$IFS_save"
44551      else
44552        # This is an absolute path, we can use it without further modifications.
44553        new_path="$path"
44554      fi
44555
44556      if test "x$new_path" = x; then
44557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44558$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44559        has_space=`$ECHO "$complete" | $GREP " "`
44560        if test "x$has_space" != x; then
44561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44563        fi
44564        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44565      fi
44566    fi
44567
44568    # Now join together the path and the arguments once again
44569    if test "x$arguments" != xEOL; then
44570      new_complete="$new_path ${arguments% *}"
44571    else
44572      new_complete="$new_path"
44573    fi
44574
44575    if test "x$complete" != "x$new_complete"; then
44576      BUILD_CC="$new_complete"
44577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44578$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44579    fi
44580  fi
44581
44582
44583
44584
44585  # Publish this variable in the help.
44586
44587
44588  if [ -z "${BUILD_CXX+x}" ]; then
44589    # The variable is not set by user, try to locate tool using the code snippet
44590    for ac_prog in cl CC g++
44591do
44592  # Extract the first word of "$ac_prog", so it can be a program name with args.
44593set dummy $ac_prog; ac_word=$2
44594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44595$as_echo_n "checking for $ac_word... " >&6; }
44596if ${ac_cv_path_BUILD_CXX+:} false; then :
44597  $as_echo_n "(cached) " >&6
44598else
44599  case $BUILD_CXX in
44600  [\\/]* | ?:[\\/]*)
44601  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44602  ;;
44603  *)
44604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44605for as_dir in $PATH
44606do
44607  IFS=$as_save_IFS
44608  test -z "$as_dir" && as_dir=.
44609    for ac_exec_ext in '' $ac_executable_extensions; do
44610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44611    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44613    break 2
44614  fi
44615done
44616  done
44617IFS=$as_save_IFS
44618
44619  ;;
44620esac
44621fi
44622BUILD_CXX=$ac_cv_path_BUILD_CXX
44623if test -n "$BUILD_CXX"; then
44624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44625$as_echo "$BUILD_CXX" >&6; }
44626else
44627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44628$as_echo "no" >&6; }
44629fi
44630
44631
44632  test -n "$BUILD_CXX" && break
44633done
44634
44635  else
44636    # The variable is set, but is it from the command line or the environment?
44637
44638    # Try to remove the string !BUILD_CXX! from our list.
44639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44641      # If it failed, the variable was not from the command line. Ignore it,
44642      # but warn the user (except for BASH, which is always set by the calling BASH).
44643      if test "xBUILD_CXX" != xBASH; then
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44645$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44646      fi
44647      # Try to locate tool using the code snippet
44648      for ac_prog in cl CC g++
44649do
44650  # Extract the first word of "$ac_prog", so it can be a program name with args.
44651set dummy $ac_prog; ac_word=$2
44652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44653$as_echo_n "checking for $ac_word... " >&6; }
44654if ${ac_cv_path_BUILD_CXX+:} false; then :
44655  $as_echo_n "(cached) " >&6
44656else
44657  case $BUILD_CXX in
44658  [\\/]* | ?:[\\/]*)
44659  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44660  ;;
44661  *)
44662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44663for as_dir in $PATH
44664do
44665  IFS=$as_save_IFS
44666  test -z "$as_dir" && as_dir=.
44667    for ac_exec_ext in '' $ac_executable_extensions; do
44668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44669    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44671    break 2
44672  fi
44673done
44674  done
44675IFS=$as_save_IFS
44676
44677  ;;
44678esac
44679fi
44680BUILD_CXX=$ac_cv_path_BUILD_CXX
44681if test -n "$BUILD_CXX"; then
44682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44683$as_echo "$BUILD_CXX" >&6; }
44684else
44685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44686$as_echo "no" >&6; }
44687fi
44688
44689
44690  test -n "$BUILD_CXX" && break
44691done
44692
44693    else
44694      # If it succeeded, then it was overridden by the user. We will use it
44695      # for the tool.
44696
44697      # First remove it from the list of overridden variables, so we can test
44698      # for unknown variables in the end.
44699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44700
44701      # Check if we try to supply an empty value
44702      if test "x$BUILD_CXX" = x; then
44703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44704$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44706$as_echo_n "checking for BUILD_CXX... " >&6; }
44707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44708$as_echo "disabled" >&6; }
44709      else
44710        # Check if the provided tool contains a complete path.
44711        tool_specified="$BUILD_CXX"
44712        tool_basename="${tool_specified##*/}"
44713        if test "x$tool_basename" = "x$tool_specified"; then
44714          # A command without a complete path is provided, search $PATH.
44715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44716$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44717          # Extract the first word of "$tool_basename", so it can be a program name with args.
44718set dummy $tool_basename; ac_word=$2
44719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44720$as_echo_n "checking for $ac_word... " >&6; }
44721if ${ac_cv_path_BUILD_CXX+:} false; then :
44722  $as_echo_n "(cached) " >&6
44723else
44724  case $BUILD_CXX in
44725  [\\/]* | ?:[\\/]*)
44726  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44727  ;;
44728  *)
44729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44730for as_dir in $PATH
44731do
44732  IFS=$as_save_IFS
44733  test -z "$as_dir" && as_dir=.
44734    for ac_exec_ext in '' $ac_executable_extensions; do
44735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44736    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44738    break 2
44739  fi
44740done
44741  done
44742IFS=$as_save_IFS
44743
44744  ;;
44745esac
44746fi
44747BUILD_CXX=$ac_cv_path_BUILD_CXX
44748if test -n "$BUILD_CXX"; then
44749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44750$as_echo "$BUILD_CXX" >&6; }
44751else
44752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44753$as_echo "no" >&6; }
44754fi
44755
44756
44757          if test "x$BUILD_CXX" = x; then
44758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44759          fi
44760        else
44761          # Otherwise we believe it is a complete path. Use it as it is.
44762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44763$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44765$as_echo_n "checking for BUILD_CXX... " >&6; }
44766          if test ! -x "$tool_specified"; then
44767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44768$as_echo "not found" >&6; }
44769            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44770          fi
44771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44772$as_echo "$tool_specified" >&6; }
44773        fi
44774      fi
44775    fi
44776
44777  fi
44778
44779
44780
44781  if test "x$BUILD_CXX" = x; then
44782    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44783  fi
44784
44785
44786
44787  # Only process if variable expands to non-empty
44788
44789  if test "x$BUILD_CXX" != x; then
44790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44791
44792  # First separate the path from the arguments. This will split at the first
44793  # space.
44794  complete="$BUILD_CXX"
44795  path="${complete%% *}"
44796  tmp="$complete EOL"
44797  arguments="${tmp#* }"
44798
44799  # Input might be given as Windows format, start by converting to
44800  # unix format.
44801  new_path=`$CYGPATH -u "$path"`
44802
44803  # Now try to locate executable using which
44804  new_path=`$WHICH "$new_path" 2> /dev/null`
44805  # bat and cmd files are not always considered executable in cygwin causing which
44806  # to not find them
44807  if test "x$new_path" = x \
44808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44810    new_path=`$CYGPATH -u "$path"`
44811  fi
44812  if test "x$new_path" = x; then
44813    # Oops. Which didn't find the executable.
44814    # The splitting of arguments from the executable at a space might have been incorrect,
44815    # since paths with space are more likely in Windows. Give it another try with the whole
44816    # argument.
44817    path="$complete"
44818    arguments="EOL"
44819    new_path=`$CYGPATH -u "$path"`
44820    new_path=`$WHICH "$new_path" 2> /dev/null`
44821    # bat and cmd files are not always considered executable in cygwin causing which
44822    # to not find them
44823    if test "x$new_path" = x \
44824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44826      new_path=`$CYGPATH -u "$path"`
44827    fi
44828    if test "x$new_path" = x; then
44829      # It's still not found. Now this is an unrecoverable error.
44830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44831$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44832      has_space=`$ECHO "$complete" | $GREP " "`
44833      if test "x$has_space" != x; then
44834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44836      fi
44837      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44838    fi
44839  fi
44840
44841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44844  # "foo.exe" is OK but "foo" is an error.
44845  #
44846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44847  # It is also a way to make sure we got the proper file name for the real test later on.
44848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44849  if test "x$test_shortpath" = x; then
44850    # Short path failed, file does not exist as specified.
44851    # Try adding .exe or .cmd
44852    if test -f "${new_path}.exe"; then
44853      input_to_shortpath="${new_path}.exe"
44854    elif test -f "${new_path}.cmd"; then
44855      input_to_shortpath="${new_path}.cmd"
44856    else
44857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44858$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44861      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44862    fi
44863  else
44864    input_to_shortpath="$new_path"
44865  fi
44866
44867  # Call helper function which possibly converts this using DOS-style short mode.
44868  # If so, the updated path is stored in $new_path.
44869  new_path="$input_to_shortpath"
44870
44871  input_path="$input_to_shortpath"
44872  # Check if we need to convert this using DOS-style short mode. If the path
44873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44874  # take no chances and rewrite it.
44875  # Note: m4 eats our [], so we need to use [ and ] instead.
44876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44877  if test "x$has_forbidden_chars" != x; then
44878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44882      # Going to short mode and back again did indeed matter. Since short mode is
44883      # case insensitive, let's make it lowercase to improve readability.
44884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44885      # Now convert it back to Unix-style (cygpath)
44886      input_path=`$CYGPATH -u "$shortmode_path"`
44887      new_path="$input_path"
44888    fi
44889  fi
44890
44891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44892  if test "x$test_cygdrive_prefix" = x; then
44893    # As a simple fix, exclude /usr/bin since it's not a real path.
44894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44896      # a path prefixed by /cygdrive for fixpath to work.
44897      new_path="$CYGWIN_ROOT_PATH$input_path"
44898    fi
44899  fi
44900
44901  # remove trailing .exe if any
44902  new_path="${new_path/%.exe/}"
44903
44904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44905
44906  # First separate the path from the arguments. This will split at the first
44907  # space.
44908  complete="$BUILD_CXX"
44909  path="${complete%% *}"
44910  tmp="$complete EOL"
44911  arguments="${tmp#* }"
44912
44913  # Input might be given as Windows format, start by converting to
44914  # unix format.
44915  new_path="$path"
44916
44917  windows_path="$new_path"
44918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919    unix_path=`$CYGPATH -u "$windows_path"`
44920    new_path="$unix_path"
44921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923    new_path="$unix_path"
44924  fi
44925
44926
44927  # Now try to locate executable using which
44928  new_path=`$WHICH "$new_path" 2> /dev/null`
44929
44930  if test "x$new_path" = x; then
44931    # Oops. Which didn't find the executable.
44932    # The splitting of arguments from the executable at a space might have been incorrect,
44933    # since paths with space are more likely in Windows. Give it another try with the whole
44934    # argument.
44935    path="$complete"
44936    arguments="EOL"
44937    new_path="$path"
44938
44939  windows_path="$new_path"
44940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44941    unix_path=`$CYGPATH -u "$windows_path"`
44942    new_path="$unix_path"
44943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44945    new_path="$unix_path"
44946  fi
44947
44948
44949    new_path=`$WHICH "$new_path" 2> /dev/null`
44950    # bat and cmd files are not always considered executable in MSYS causing which
44951    # to not find them
44952    if test "x$new_path" = x \
44953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44955      new_path="$path"
44956
44957  windows_path="$new_path"
44958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44959    unix_path=`$CYGPATH -u "$windows_path"`
44960    new_path="$unix_path"
44961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44963    new_path="$unix_path"
44964  fi
44965
44966    fi
44967
44968    if test "x$new_path" = x; then
44969      # It's still not found. Now this is an unrecoverable error.
44970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44971$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44972      has_space=`$ECHO "$complete" | $GREP " "`
44973      if test "x$has_space" != x; then
44974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44976      fi
44977      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44978    fi
44979  fi
44980
44981  # Now new_path has a complete unix path to the binary
44982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44983    # Keep paths in /bin as-is, but remove trailing .exe if any
44984    new_path="${new_path/%.exe/}"
44985    # Do not save /bin paths to all_fixpath_prefixes!
44986  else
44987    # Not in mixed or Windows style, start by that.
44988    new_path=`cmd //c echo $new_path`
44989
44990  input_path="$new_path"
44991  # Check if we need to convert this using DOS-style short mode. If the path
44992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44993  # take no chances and rewrite it.
44994  # Note: m4 eats our [], so we need to use [ and ] instead.
44995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44996  if test "x$has_forbidden_chars" != x; then
44997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44999  fi
45000
45001    # Output is in $new_path
45002
45003  windows_path="$new_path"
45004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45005    unix_path=`$CYGPATH -u "$windows_path"`
45006    new_path="$unix_path"
45007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45009    new_path="$unix_path"
45010  fi
45011
45012    # remove trailing .exe if any
45013    new_path="${new_path/%.exe/}"
45014
45015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45017  fi
45018
45019    else
45020      # We're on a unix platform. Hooray! :)
45021      # First separate the path from the arguments. This will split at the first
45022      # space.
45023      complete="$BUILD_CXX"
45024      path="${complete%% *}"
45025      tmp="$complete EOL"
45026      arguments="${tmp#* }"
45027
45028      # Cannot rely on the command "which" here since it doesn't always work.
45029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45030      if test -z "$is_absolute_path"; then
45031        # Path to executable is not absolute. Find it.
45032        IFS_save="$IFS"
45033        IFS=:
45034        for p in $PATH; do
45035          if test -f "$p/$path" && test -x "$p/$path"; then
45036            new_path="$p/$path"
45037            break
45038          fi
45039        done
45040        IFS="$IFS_save"
45041      else
45042        # This is an absolute path, we can use it without further modifications.
45043        new_path="$path"
45044      fi
45045
45046      if test "x$new_path" = x; then
45047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45048$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45049        has_space=`$ECHO "$complete" | $GREP " "`
45050        if test "x$has_space" != x; then
45051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45053        fi
45054        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45055      fi
45056    fi
45057
45058    # Now join together the path and the arguments once again
45059    if test "x$arguments" != xEOL; then
45060      new_complete="$new_path ${arguments% *}"
45061    else
45062      new_complete="$new_path"
45063    fi
45064
45065    if test "x$complete" != "x$new_complete"; then
45066      BUILD_CXX="$new_complete"
45067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45068$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45069    fi
45070  fi
45071
45072
45073
45074  # Publish this variable in the help.
45075
45076
45077  if [ -z "${BUILD_NM+x}" ]; then
45078    # The variable is not set by user, try to locate tool using the code snippet
45079    for ac_prog in nm gcc-nm
45080do
45081  # Extract the first word of "$ac_prog", so it can be a program name with args.
45082set dummy $ac_prog; ac_word=$2
45083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45084$as_echo_n "checking for $ac_word... " >&6; }
45085if ${ac_cv_path_BUILD_NM+:} false; then :
45086  $as_echo_n "(cached) " >&6
45087else
45088  case $BUILD_NM in
45089  [\\/]* | ?:[\\/]*)
45090  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45091  ;;
45092  *)
45093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45094for as_dir in $PATH
45095do
45096  IFS=$as_save_IFS
45097  test -z "$as_dir" && as_dir=.
45098    for ac_exec_ext in '' $ac_executable_extensions; do
45099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45100    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45102    break 2
45103  fi
45104done
45105  done
45106IFS=$as_save_IFS
45107
45108  ;;
45109esac
45110fi
45111BUILD_NM=$ac_cv_path_BUILD_NM
45112if test -n "$BUILD_NM"; then
45113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45114$as_echo "$BUILD_NM" >&6; }
45115else
45116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45117$as_echo "no" >&6; }
45118fi
45119
45120
45121  test -n "$BUILD_NM" && break
45122done
45123
45124  else
45125    # The variable is set, but is it from the command line or the environment?
45126
45127    # Try to remove the string !BUILD_NM! from our list.
45128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45130      # If it failed, the variable was not from the command line. Ignore it,
45131      # but warn the user (except for BASH, which is always set by the calling BASH).
45132      if test "xBUILD_NM" != xBASH; then
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45134$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45135      fi
45136      # Try to locate tool using the code snippet
45137      for ac_prog in nm gcc-nm
45138do
45139  # Extract the first word of "$ac_prog", so it can be a program name with args.
45140set dummy $ac_prog; ac_word=$2
45141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45142$as_echo_n "checking for $ac_word... " >&6; }
45143if ${ac_cv_path_BUILD_NM+:} false; then :
45144  $as_echo_n "(cached) " >&6
45145else
45146  case $BUILD_NM in
45147  [\\/]* | ?:[\\/]*)
45148  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45149  ;;
45150  *)
45151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45152for as_dir in $PATH
45153do
45154  IFS=$as_save_IFS
45155  test -z "$as_dir" && as_dir=.
45156    for ac_exec_ext in '' $ac_executable_extensions; do
45157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45158    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45160    break 2
45161  fi
45162done
45163  done
45164IFS=$as_save_IFS
45165
45166  ;;
45167esac
45168fi
45169BUILD_NM=$ac_cv_path_BUILD_NM
45170if test -n "$BUILD_NM"; then
45171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45172$as_echo "$BUILD_NM" >&6; }
45173else
45174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45175$as_echo "no" >&6; }
45176fi
45177
45178
45179  test -n "$BUILD_NM" && break
45180done
45181
45182    else
45183      # If it succeeded, then it was overridden by the user. We will use it
45184      # for the tool.
45185
45186      # First remove it from the list of overridden variables, so we can test
45187      # for unknown variables in the end.
45188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45189
45190      # Check if we try to supply an empty value
45191      if test "x$BUILD_NM" = x; then
45192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45193$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45195$as_echo_n "checking for BUILD_NM... " >&6; }
45196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45197$as_echo "disabled" >&6; }
45198      else
45199        # Check if the provided tool contains a complete path.
45200        tool_specified="$BUILD_NM"
45201        tool_basename="${tool_specified##*/}"
45202        if test "x$tool_basename" = "x$tool_specified"; then
45203          # A command without a complete path is provided, search $PATH.
45204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45205$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45206          # Extract the first word of "$tool_basename", so it can be a program name with args.
45207set dummy $tool_basename; ac_word=$2
45208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45209$as_echo_n "checking for $ac_word... " >&6; }
45210if ${ac_cv_path_BUILD_NM+:} false; then :
45211  $as_echo_n "(cached) " >&6
45212else
45213  case $BUILD_NM in
45214  [\\/]* | ?:[\\/]*)
45215  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45216  ;;
45217  *)
45218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45219for as_dir in $PATH
45220do
45221  IFS=$as_save_IFS
45222  test -z "$as_dir" && as_dir=.
45223    for ac_exec_ext in '' $ac_executable_extensions; do
45224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45225    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45227    break 2
45228  fi
45229done
45230  done
45231IFS=$as_save_IFS
45232
45233  ;;
45234esac
45235fi
45236BUILD_NM=$ac_cv_path_BUILD_NM
45237if test -n "$BUILD_NM"; then
45238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45239$as_echo "$BUILD_NM" >&6; }
45240else
45241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45242$as_echo "no" >&6; }
45243fi
45244
45245
45246          if test "x$BUILD_NM" = x; then
45247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45248          fi
45249        else
45250          # Otherwise we believe it is a complete path. Use it as it is.
45251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45252$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45254$as_echo_n "checking for BUILD_NM... " >&6; }
45255          if test ! -x "$tool_specified"; then
45256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45257$as_echo "not found" >&6; }
45258            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45259          fi
45260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45261$as_echo "$tool_specified" >&6; }
45262        fi
45263      fi
45264    fi
45265
45266  fi
45267
45268
45269
45270  # Only process if variable expands to non-empty
45271
45272  if test "x$BUILD_NM" != x; then
45273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45274
45275  # First separate the path from the arguments. This will split at the first
45276  # space.
45277  complete="$BUILD_NM"
45278  path="${complete%% *}"
45279  tmp="$complete EOL"
45280  arguments="${tmp#* }"
45281
45282  # Input might be given as Windows format, start by converting to
45283  # unix format.
45284  new_path=`$CYGPATH -u "$path"`
45285
45286  # Now try to locate executable using which
45287  new_path=`$WHICH "$new_path" 2> /dev/null`
45288  # bat and cmd files are not always considered executable in cygwin causing which
45289  # to not find them
45290  if test "x$new_path" = x \
45291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45293    new_path=`$CYGPATH -u "$path"`
45294  fi
45295  if test "x$new_path" = x; then
45296    # Oops. Which didn't find the executable.
45297    # The splitting of arguments from the executable at a space might have been incorrect,
45298    # since paths with space are more likely in Windows. Give it another try with the whole
45299    # argument.
45300    path="$complete"
45301    arguments="EOL"
45302    new_path=`$CYGPATH -u "$path"`
45303    new_path=`$WHICH "$new_path" 2> /dev/null`
45304    # bat and cmd files are not always considered executable in cygwin causing which
45305    # to not find them
45306    if test "x$new_path" = x \
45307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45309      new_path=`$CYGPATH -u "$path"`
45310    fi
45311    if test "x$new_path" = x; then
45312      # It's still not found. Now this is an unrecoverable error.
45313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45314$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45315      has_space=`$ECHO "$complete" | $GREP " "`
45316      if test "x$has_space" != x; then
45317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45319      fi
45320      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45321    fi
45322  fi
45323
45324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45327  # "foo.exe" is OK but "foo" is an error.
45328  #
45329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45330  # It is also a way to make sure we got the proper file name for the real test later on.
45331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45332  if test "x$test_shortpath" = x; then
45333    # Short path failed, file does not exist as specified.
45334    # Try adding .exe or .cmd
45335    if test -f "${new_path}.exe"; then
45336      input_to_shortpath="${new_path}.exe"
45337    elif test -f "${new_path}.cmd"; then
45338      input_to_shortpath="${new_path}.cmd"
45339    else
45340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45341$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45344      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45345    fi
45346  else
45347    input_to_shortpath="$new_path"
45348  fi
45349
45350  # Call helper function which possibly converts this using DOS-style short mode.
45351  # If so, the updated path is stored in $new_path.
45352  new_path="$input_to_shortpath"
45353
45354  input_path="$input_to_shortpath"
45355  # Check if we need to convert this using DOS-style short mode. If the path
45356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45357  # take no chances and rewrite it.
45358  # Note: m4 eats our [], so we need to use [ and ] instead.
45359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45360  if test "x$has_forbidden_chars" != x; then
45361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45365      # Going to short mode and back again did indeed matter. Since short mode is
45366      # case insensitive, let's make it lowercase to improve readability.
45367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45368      # Now convert it back to Unix-style (cygpath)
45369      input_path=`$CYGPATH -u "$shortmode_path"`
45370      new_path="$input_path"
45371    fi
45372  fi
45373
45374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45375  if test "x$test_cygdrive_prefix" = x; then
45376    # As a simple fix, exclude /usr/bin since it's not a real path.
45377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45379      # a path prefixed by /cygdrive for fixpath to work.
45380      new_path="$CYGWIN_ROOT_PATH$input_path"
45381    fi
45382  fi
45383
45384  # remove trailing .exe if any
45385  new_path="${new_path/%.exe/}"
45386
45387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45388
45389  # First separate the path from the arguments. This will split at the first
45390  # space.
45391  complete="$BUILD_NM"
45392  path="${complete%% *}"
45393  tmp="$complete EOL"
45394  arguments="${tmp#* }"
45395
45396  # Input might be given as Windows format, start by converting to
45397  # unix format.
45398  new_path="$path"
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409
45410  # Now try to locate executable using which
45411  new_path=`$WHICH "$new_path" 2> /dev/null`
45412
45413  if test "x$new_path" = x; then
45414    # Oops. Which didn't find the executable.
45415    # The splitting of arguments from the executable at a space might have been incorrect,
45416    # since paths with space are more likely in Windows. Give it another try with the whole
45417    # argument.
45418    path="$complete"
45419    arguments="EOL"
45420    new_path="$path"
45421
45422  windows_path="$new_path"
45423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45424    unix_path=`$CYGPATH -u "$windows_path"`
45425    new_path="$unix_path"
45426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45428    new_path="$unix_path"
45429  fi
45430
45431
45432    new_path=`$WHICH "$new_path" 2> /dev/null`
45433    # bat and cmd files are not always considered executable in MSYS causing which
45434    # to not find them
45435    if test "x$new_path" = x \
45436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45438      new_path="$path"
45439
45440  windows_path="$new_path"
45441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45442    unix_path=`$CYGPATH -u "$windows_path"`
45443    new_path="$unix_path"
45444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45446    new_path="$unix_path"
45447  fi
45448
45449    fi
45450
45451    if test "x$new_path" = x; then
45452      # It's still not found. Now this is an unrecoverable error.
45453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45454$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45455      has_space=`$ECHO "$complete" | $GREP " "`
45456      if test "x$has_space" != x; then
45457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45459      fi
45460      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45461    fi
45462  fi
45463
45464  # Now new_path has a complete unix path to the binary
45465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45466    # Keep paths in /bin as-is, but remove trailing .exe if any
45467    new_path="${new_path/%.exe/}"
45468    # Do not save /bin paths to all_fixpath_prefixes!
45469  else
45470    # Not in mixed or Windows style, start by that.
45471    new_path=`cmd //c echo $new_path`
45472
45473  input_path="$new_path"
45474  # Check if we need to convert this using DOS-style short mode. If the path
45475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45476  # take no chances and rewrite it.
45477  # Note: m4 eats our [], so we need to use [ and ] instead.
45478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45479  if test "x$has_forbidden_chars" != x; then
45480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45482  fi
45483
45484    # Output is in $new_path
45485
45486  windows_path="$new_path"
45487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45488    unix_path=`$CYGPATH -u "$windows_path"`
45489    new_path="$unix_path"
45490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45492    new_path="$unix_path"
45493  fi
45494
45495    # remove trailing .exe if any
45496    new_path="${new_path/%.exe/}"
45497
45498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45500  fi
45501
45502    else
45503      # We're on a unix platform. Hooray! :)
45504      # First separate the path from the arguments. This will split at the first
45505      # space.
45506      complete="$BUILD_NM"
45507      path="${complete%% *}"
45508      tmp="$complete EOL"
45509      arguments="${tmp#* }"
45510
45511      # Cannot rely on the command "which" here since it doesn't always work.
45512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45513      if test -z "$is_absolute_path"; then
45514        # Path to executable is not absolute. Find it.
45515        IFS_save="$IFS"
45516        IFS=:
45517        for p in $PATH; do
45518          if test -f "$p/$path" && test -x "$p/$path"; then
45519            new_path="$p/$path"
45520            break
45521          fi
45522        done
45523        IFS="$IFS_save"
45524      else
45525        # This is an absolute path, we can use it without further modifications.
45526        new_path="$path"
45527      fi
45528
45529      if test "x$new_path" = x; then
45530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45531$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45532        has_space=`$ECHO "$complete" | $GREP " "`
45533        if test "x$has_space" != x; then
45534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45536        fi
45537        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45538      fi
45539    fi
45540
45541    # Now join together the path and the arguments once again
45542    if test "x$arguments" != xEOL; then
45543      new_complete="$new_path ${arguments% *}"
45544    else
45545      new_complete="$new_path"
45546    fi
45547
45548    if test "x$complete" != "x$new_complete"; then
45549      BUILD_NM="$new_complete"
45550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45551$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45552    fi
45553  fi
45554
45555
45556
45557  # Publish this variable in the help.
45558
45559
45560  if [ -z "${BUILD_AR+x}" ]; then
45561    # The variable is not set by user, try to locate tool using the code snippet
45562    for ac_prog in ar gcc-ar
45563do
45564  # Extract the first word of "$ac_prog", so it can be a program name with args.
45565set dummy $ac_prog; ac_word=$2
45566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45567$as_echo_n "checking for $ac_word... " >&6; }
45568if ${ac_cv_path_BUILD_AR+:} false; then :
45569  $as_echo_n "(cached) " >&6
45570else
45571  case $BUILD_AR in
45572  [\\/]* | ?:[\\/]*)
45573  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45574  ;;
45575  *)
45576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45577for as_dir in $PATH
45578do
45579  IFS=$as_save_IFS
45580  test -z "$as_dir" && as_dir=.
45581    for ac_exec_ext in '' $ac_executable_extensions; do
45582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45583    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45585    break 2
45586  fi
45587done
45588  done
45589IFS=$as_save_IFS
45590
45591  ;;
45592esac
45593fi
45594BUILD_AR=$ac_cv_path_BUILD_AR
45595if test -n "$BUILD_AR"; then
45596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45597$as_echo "$BUILD_AR" >&6; }
45598else
45599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45600$as_echo "no" >&6; }
45601fi
45602
45603
45604  test -n "$BUILD_AR" && break
45605done
45606
45607  else
45608    # The variable is set, but is it from the command line or the environment?
45609
45610    # Try to remove the string !BUILD_AR! from our list.
45611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45613      # If it failed, the variable was not from the command line. Ignore it,
45614      # but warn the user (except for BASH, which is always set by the calling BASH).
45615      if test "xBUILD_AR" != xBASH; then
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45617$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45618      fi
45619      # Try to locate tool using the code snippet
45620      for ac_prog in ar gcc-ar
45621do
45622  # Extract the first word of "$ac_prog", so it can be a program name with args.
45623set dummy $ac_prog; ac_word=$2
45624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45625$as_echo_n "checking for $ac_word... " >&6; }
45626if ${ac_cv_path_BUILD_AR+:} false; then :
45627  $as_echo_n "(cached) " >&6
45628else
45629  case $BUILD_AR in
45630  [\\/]* | ?:[\\/]*)
45631  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45632  ;;
45633  *)
45634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45635for as_dir in $PATH
45636do
45637  IFS=$as_save_IFS
45638  test -z "$as_dir" && as_dir=.
45639    for ac_exec_ext in '' $ac_executable_extensions; do
45640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45641    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45643    break 2
45644  fi
45645done
45646  done
45647IFS=$as_save_IFS
45648
45649  ;;
45650esac
45651fi
45652BUILD_AR=$ac_cv_path_BUILD_AR
45653if test -n "$BUILD_AR"; then
45654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45655$as_echo "$BUILD_AR" >&6; }
45656else
45657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45658$as_echo "no" >&6; }
45659fi
45660
45661
45662  test -n "$BUILD_AR" && break
45663done
45664
45665    else
45666      # If it succeeded, then it was overridden by the user. We will use it
45667      # for the tool.
45668
45669      # First remove it from the list of overridden variables, so we can test
45670      # for unknown variables in the end.
45671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45672
45673      # Check if we try to supply an empty value
45674      if test "x$BUILD_AR" = x; then
45675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45676$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45678$as_echo_n "checking for BUILD_AR... " >&6; }
45679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45680$as_echo "disabled" >&6; }
45681      else
45682        # Check if the provided tool contains a complete path.
45683        tool_specified="$BUILD_AR"
45684        tool_basename="${tool_specified##*/}"
45685        if test "x$tool_basename" = "x$tool_specified"; then
45686          # A command without a complete path is provided, search $PATH.
45687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45688$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45689          # Extract the first word of "$tool_basename", so it can be a program name with args.
45690set dummy $tool_basename; ac_word=$2
45691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45692$as_echo_n "checking for $ac_word... " >&6; }
45693if ${ac_cv_path_BUILD_AR+:} false; then :
45694  $as_echo_n "(cached) " >&6
45695else
45696  case $BUILD_AR in
45697  [\\/]* | ?:[\\/]*)
45698  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45699  ;;
45700  *)
45701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45702for as_dir in $PATH
45703do
45704  IFS=$as_save_IFS
45705  test -z "$as_dir" && as_dir=.
45706    for ac_exec_ext in '' $ac_executable_extensions; do
45707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45708    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45710    break 2
45711  fi
45712done
45713  done
45714IFS=$as_save_IFS
45715
45716  ;;
45717esac
45718fi
45719BUILD_AR=$ac_cv_path_BUILD_AR
45720if test -n "$BUILD_AR"; then
45721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45722$as_echo "$BUILD_AR" >&6; }
45723else
45724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45725$as_echo "no" >&6; }
45726fi
45727
45728
45729          if test "x$BUILD_AR" = x; then
45730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45731          fi
45732        else
45733          # Otherwise we believe it is a complete path. Use it as it is.
45734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45735$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45737$as_echo_n "checking for BUILD_AR... " >&6; }
45738          if test ! -x "$tool_specified"; then
45739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45740$as_echo "not found" >&6; }
45741            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45742          fi
45743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45744$as_echo "$tool_specified" >&6; }
45745        fi
45746      fi
45747    fi
45748
45749  fi
45750
45751
45752
45753  # Only process if variable expands to non-empty
45754
45755  if test "x$BUILD_AR" != x; then
45756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45757
45758  # First separate the path from the arguments. This will split at the first
45759  # space.
45760  complete="$BUILD_AR"
45761  path="${complete%% *}"
45762  tmp="$complete EOL"
45763  arguments="${tmp#* }"
45764
45765  # Input might be given as Windows format, start by converting to
45766  # unix format.
45767  new_path=`$CYGPATH -u "$path"`
45768
45769  # Now try to locate executable using which
45770  new_path=`$WHICH "$new_path" 2> /dev/null`
45771  # bat and cmd files are not always considered executable in cygwin causing which
45772  # to not find them
45773  if test "x$new_path" = x \
45774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45776    new_path=`$CYGPATH -u "$path"`
45777  fi
45778  if test "x$new_path" = x; then
45779    # Oops. Which didn't find the executable.
45780    # The splitting of arguments from the executable at a space might have been incorrect,
45781    # since paths with space are more likely in Windows. Give it another try with the whole
45782    # argument.
45783    path="$complete"
45784    arguments="EOL"
45785    new_path=`$CYGPATH -u "$path"`
45786    new_path=`$WHICH "$new_path" 2> /dev/null`
45787    # bat and cmd files are not always considered executable in cygwin causing which
45788    # to not find them
45789    if test "x$new_path" = x \
45790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45792      new_path=`$CYGPATH -u "$path"`
45793    fi
45794    if test "x$new_path" = x; then
45795      # It's still not found. Now this is an unrecoverable error.
45796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45797$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45798      has_space=`$ECHO "$complete" | $GREP " "`
45799      if test "x$has_space" != x; then
45800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45802      fi
45803      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45804    fi
45805  fi
45806
45807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45810  # "foo.exe" is OK but "foo" is an error.
45811  #
45812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45813  # It is also a way to make sure we got the proper file name for the real test later on.
45814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45815  if test "x$test_shortpath" = x; then
45816    # Short path failed, file does not exist as specified.
45817    # Try adding .exe or .cmd
45818    if test -f "${new_path}.exe"; then
45819      input_to_shortpath="${new_path}.exe"
45820    elif test -f "${new_path}.cmd"; then
45821      input_to_shortpath="${new_path}.cmd"
45822    else
45823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45824$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45827      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45828    fi
45829  else
45830    input_to_shortpath="$new_path"
45831  fi
45832
45833  # Call helper function which possibly converts this using DOS-style short mode.
45834  # If so, the updated path is stored in $new_path.
45835  new_path="$input_to_shortpath"
45836
45837  input_path="$input_to_shortpath"
45838  # Check if we need to convert this using DOS-style short mode. If the path
45839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45840  # take no chances and rewrite it.
45841  # Note: m4 eats our [], so we need to use [ and ] instead.
45842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45843  if test "x$has_forbidden_chars" != x; then
45844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45848      # Going to short mode and back again did indeed matter. Since short mode is
45849      # case insensitive, let's make it lowercase to improve readability.
45850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45851      # Now convert it back to Unix-style (cygpath)
45852      input_path=`$CYGPATH -u "$shortmode_path"`
45853      new_path="$input_path"
45854    fi
45855  fi
45856
45857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45858  if test "x$test_cygdrive_prefix" = x; then
45859    # As a simple fix, exclude /usr/bin since it's not a real path.
45860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45862      # a path prefixed by /cygdrive for fixpath to work.
45863      new_path="$CYGWIN_ROOT_PATH$input_path"
45864    fi
45865  fi
45866
45867  # remove trailing .exe if any
45868  new_path="${new_path/%.exe/}"
45869
45870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45871
45872  # First separate the path from the arguments. This will split at the first
45873  # space.
45874  complete="$BUILD_AR"
45875  path="${complete%% *}"
45876  tmp="$complete EOL"
45877  arguments="${tmp#* }"
45878
45879  # Input might be given as Windows format, start by converting to
45880  # unix format.
45881  new_path="$path"
45882
45883  windows_path="$new_path"
45884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45885    unix_path=`$CYGPATH -u "$windows_path"`
45886    new_path="$unix_path"
45887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45889    new_path="$unix_path"
45890  fi
45891
45892
45893  # Now try to locate executable using which
45894  new_path=`$WHICH "$new_path" 2> /dev/null`
45895
45896  if test "x$new_path" = x; then
45897    # Oops. Which didn't find the executable.
45898    # The splitting of arguments from the executable at a space might have been incorrect,
45899    # since paths with space are more likely in Windows. Give it another try with the whole
45900    # argument.
45901    path="$complete"
45902    arguments="EOL"
45903    new_path="$path"
45904
45905  windows_path="$new_path"
45906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45907    unix_path=`$CYGPATH -u "$windows_path"`
45908    new_path="$unix_path"
45909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45911    new_path="$unix_path"
45912  fi
45913
45914
45915    new_path=`$WHICH "$new_path" 2> /dev/null`
45916    # bat and cmd files are not always considered executable in MSYS causing which
45917    # to not find them
45918    if test "x$new_path" = x \
45919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45921      new_path="$path"
45922
45923  windows_path="$new_path"
45924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45925    unix_path=`$CYGPATH -u "$windows_path"`
45926    new_path="$unix_path"
45927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45929    new_path="$unix_path"
45930  fi
45931
45932    fi
45933
45934    if test "x$new_path" = x; then
45935      # It's still not found. Now this is an unrecoverable error.
45936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45937$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45938      has_space=`$ECHO "$complete" | $GREP " "`
45939      if test "x$has_space" != x; then
45940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45942      fi
45943      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45944    fi
45945  fi
45946
45947  # Now new_path has a complete unix path to the binary
45948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45949    # Keep paths in /bin as-is, but remove trailing .exe if any
45950    new_path="${new_path/%.exe/}"
45951    # Do not save /bin paths to all_fixpath_prefixes!
45952  else
45953    # Not in mixed or Windows style, start by that.
45954    new_path=`cmd //c echo $new_path`
45955
45956  input_path="$new_path"
45957  # Check if we need to convert this using DOS-style short mode. If the path
45958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45959  # take no chances and rewrite it.
45960  # Note: m4 eats our [], so we need to use [ and ] instead.
45961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45962  if test "x$has_forbidden_chars" != x; then
45963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45965  fi
45966
45967    # Output is in $new_path
45968
45969  windows_path="$new_path"
45970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45971    unix_path=`$CYGPATH -u "$windows_path"`
45972    new_path="$unix_path"
45973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45975    new_path="$unix_path"
45976  fi
45977
45978    # remove trailing .exe if any
45979    new_path="${new_path/%.exe/}"
45980
45981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45983  fi
45984
45985    else
45986      # We're on a unix platform. Hooray! :)
45987      # First separate the path from the arguments. This will split at the first
45988      # space.
45989      complete="$BUILD_AR"
45990      path="${complete%% *}"
45991      tmp="$complete EOL"
45992      arguments="${tmp#* }"
45993
45994      # Cannot rely on the command "which" here since it doesn't always work.
45995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45996      if test -z "$is_absolute_path"; then
45997        # Path to executable is not absolute. Find it.
45998        IFS_save="$IFS"
45999        IFS=:
46000        for p in $PATH; do
46001          if test -f "$p/$path" && test -x "$p/$path"; then
46002            new_path="$p/$path"
46003            break
46004          fi
46005        done
46006        IFS="$IFS_save"
46007      else
46008        # This is an absolute path, we can use it without further modifications.
46009        new_path="$path"
46010      fi
46011
46012      if test "x$new_path" = x; then
46013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46014$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46015        has_space=`$ECHO "$complete" | $GREP " "`
46016        if test "x$has_space" != x; then
46017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46019        fi
46020        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46021      fi
46022    fi
46023
46024    # Now join together the path and the arguments once again
46025    if test "x$arguments" != xEOL; then
46026      new_complete="$new_path ${arguments% *}"
46027    else
46028      new_complete="$new_path"
46029    fi
46030
46031    if test "x$complete" != "x$new_complete"; then
46032      BUILD_AR="$new_complete"
46033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46034$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46035    fi
46036  fi
46037
46038
46039
46040  # Publish this variable in the help.
46041
46042
46043  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46044    # The variable is not set by user, try to locate tool using the code snippet
46045    for ac_prog in objcopy
46046do
46047  # Extract the first word of "$ac_prog", so it can be a program name with args.
46048set dummy $ac_prog; ac_word=$2
46049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46050$as_echo_n "checking for $ac_word... " >&6; }
46051if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46052  $as_echo_n "(cached) " >&6
46053else
46054  case $BUILD_OBJCOPY in
46055  [\\/]* | ?:[\\/]*)
46056  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46057  ;;
46058  *)
46059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46060for as_dir in $PATH
46061do
46062  IFS=$as_save_IFS
46063  test -z "$as_dir" && as_dir=.
46064    for ac_exec_ext in '' $ac_executable_extensions; do
46065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46066    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46068    break 2
46069  fi
46070done
46071  done
46072IFS=$as_save_IFS
46073
46074  ;;
46075esac
46076fi
46077BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46078if test -n "$BUILD_OBJCOPY"; then
46079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46080$as_echo "$BUILD_OBJCOPY" >&6; }
46081else
46082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46083$as_echo "no" >&6; }
46084fi
46085
46086
46087  test -n "$BUILD_OBJCOPY" && break
46088done
46089
46090  else
46091    # The variable is set, but is it from the command line or the environment?
46092
46093    # Try to remove the string !BUILD_OBJCOPY! from our list.
46094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46096      # If it failed, the variable was not from the command line. Ignore it,
46097      # but warn the user (except for BASH, which is always set by the calling BASH).
46098      if test "xBUILD_OBJCOPY" != xBASH; then
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46100$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46101      fi
46102      # Try to locate tool using the code snippet
46103      for ac_prog in objcopy
46104do
46105  # Extract the first word of "$ac_prog", so it can be a program name with args.
46106set dummy $ac_prog; ac_word=$2
46107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46108$as_echo_n "checking for $ac_word... " >&6; }
46109if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46110  $as_echo_n "(cached) " >&6
46111else
46112  case $BUILD_OBJCOPY in
46113  [\\/]* | ?:[\\/]*)
46114  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46115  ;;
46116  *)
46117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46118for as_dir in $PATH
46119do
46120  IFS=$as_save_IFS
46121  test -z "$as_dir" && as_dir=.
46122    for ac_exec_ext in '' $ac_executable_extensions; do
46123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46124    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46126    break 2
46127  fi
46128done
46129  done
46130IFS=$as_save_IFS
46131
46132  ;;
46133esac
46134fi
46135BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46136if test -n "$BUILD_OBJCOPY"; then
46137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46138$as_echo "$BUILD_OBJCOPY" >&6; }
46139else
46140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46141$as_echo "no" >&6; }
46142fi
46143
46144
46145  test -n "$BUILD_OBJCOPY" && break
46146done
46147
46148    else
46149      # If it succeeded, then it was overridden by the user. We will use it
46150      # for the tool.
46151
46152      # First remove it from the list of overridden variables, so we can test
46153      # for unknown variables in the end.
46154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46155
46156      # Check if we try to supply an empty value
46157      if test "x$BUILD_OBJCOPY" = x; then
46158        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46159$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46161$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46163$as_echo "disabled" >&6; }
46164      else
46165        # Check if the provided tool contains a complete path.
46166        tool_specified="$BUILD_OBJCOPY"
46167        tool_basename="${tool_specified##*/}"
46168        if test "x$tool_basename" = "x$tool_specified"; then
46169          # A command without a complete path is provided, search $PATH.
46170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46171$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46172          # Extract the first word of "$tool_basename", so it can be a program name with args.
46173set dummy $tool_basename; ac_word=$2
46174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46175$as_echo_n "checking for $ac_word... " >&6; }
46176if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46177  $as_echo_n "(cached) " >&6
46178else
46179  case $BUILD_OBJCOPY in
46180  [\\/]* | ?:[\\/]*)
46181  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46182  ;;
46183  *)
46184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46185for as_dir in $PATH
46186do
46187  IFS=$as_save_IFS
46188  test -z "$as_dir" && as_dir=.
46189    for ac_exec_ext in '' $ac_executable_extensions; do
46190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46191    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46193    break 2
46194  fi
46195done
46196  done
46197IFS=$as_save_IFS
46198
46199  ;;
46200esac
46201fi
46202BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46203if test -n "$BUILD_OBJCOPY"; then
46204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46205$as_echo "$BUILD_OBJCOPY" >&6; }
46206else
46207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46208$as_echo "no" >&6; }
46209fi
46210
46211
46212          if test "x$BUILD_OBJCOPY" = x; then
46213            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46214          fi
46215        else
46216          # Otherwise we believe it is a complete path. Use it as it is.
46217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46218$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46219          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46220$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46221          if test ! -x "$tool_specified"; then
46222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46223$as_echo "not found" >&6; }
46224            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46225          fi
46226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46227$as_echo "$tool_specified" >&6; }
46228        fi
46229      fi
46230    fi
46231
46232  fi
46233
46234
46235
46236  # Only process if variable expands to non-empty
46237
46238  if test "x$BUILD_OBJCOPY" != x; then
46239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46240
46241  # First separate the path from the arguments. This will split at the first
46242  # space.
46243  complete="$BUILD_OBJCOPY"
46244  path="${complete%% *}"
46245  tmp="$complete EOL"
46246  arguments="${tmp#* }"
46247
46248  # Input might be given as Windows format, start by converting to
46249  # unix format.
46250  new_path=`$CYGPATH -u "$path"`
46251
46252  # Now try to locate executable using which
46253  new_path=`$WHICH "$new_path" 2> /dev/null`
46254  # bat and cmd files are not always considered executable in cygwin causing which
46255  # to not find them
46256  if test "x$new_path" = x \
46257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46259    new_path=`$CYGPATH -u "$path"`
46260  fi
46261  if test "x$new_path" = x; then
46262    # Oops. Which didn't find the executable.
46263    # The splitting of arguments from the executable at a space might have been incorrect,
46264    # since paths with space are more likely in Windows. Give it another try with the whole
46265    # argument.
46266    path="$complete"
46267    arguments="EOL"
46268    new_path=`$CYGPATH -u "$path"`
46269    new_path=`$WHICH "$new_path" 2> /dev/null`
46270    # bat and cmd files are not always considered executable in cygwin causing which
46271    # to not find them
46272    if test "x$new_path" = x \
46273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46275      new_path=`$CYGPATH -u "$path"`
46276    fi
46277    if test "x$new_path" = x; then
46278      # It's still not found. Now this is an unrecoverable error.
46279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46280$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46281      has_space=`$ECHO "$complete" | $GREP " "`
46282      if test "x$has_space" != x; then
46283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46285      fi
46286      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46287    fi
46288  fi
46289
46290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46293  # "foo.exe" is OK but "foo" is an error.
46294  #
46295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46296  # It is also a way to make sure we got the proper file name for the real test later on.
46297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46298  if test "x$test_shortpath" = x; then
46299    # Short path failed, file does not exist as specified.
46300    # Try adding .exe or .cmd
46301    if test -f "${new_path}.exe"; then
46302      input_to_shortpath="${new_path}.exe"
46303    elif test -f "${new_path}.cmd"; then
46304      input_to_shortpath="${new_path}.cmd"
46305    else
46306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46307$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46310      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46311    fi
46312  else
46313    input_to_shortpath="$new_path"
46314  fi
46315
46316  # Call helper function which possibly converts this using DOS-style short mode.
46317  # If so, the updated path is stored in $new_path.
46318  new_path="$input_to_shortpath"
46319
46320  input_path="$input_to_shortpath"
46321  # Check if we need to convert this using DOS-style short mode. If the path
46322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46323  # take no chances and rewrite it.
46324  # Note: m4 eats our [], so we need to use [ and ] instead.
46325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46326  if test "x$has_forbidden_chars" != x; then
46327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46331      # Going to short mode and back again did indeed matter. Since short mode is
46332      # case insensitive, let's make it lowercase to improve readability.
46333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46334      # Now convert it back to Unix-style (cygpath)
46335      input_path=`$CYGPATH -u "$shortmode_path"`
46336      new_path="$input_path"
46337    fi
46338  fi
46339
46340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46341  if test "x$test_cygdrive_prefix" = x; then
46342    # As a simple fix, exclude /usr/bin since it's not a real path.
46343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46345      # a path prefixed by /cygdrive for fixpath to work.
46346      new_path="$CYGWIN_ROOT_PATH$input_path"
46347    fi
46348  fi
46349
46350  # remove trailing .exe if any
46351  new_path="${new_path/%.exe/}"
46352
46353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46354
46355  # First separate the path from the arguments. This will split at the first
46356  # space.
46357  complete="$BUILD_OBJCOPY"
46358  path="${complete%% *}"
46359  tmp="$complete EOL"
46360  arguments="${tmp#* }"
46361
46362  # Input might be given as Windows format, start by converting to
46363  # unix format.
46364  new_path="$path"
46365
46366  windows_path="$new_path"
46367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368    unix_path=`$CYGPATH -u "$windows_path"`
46369    new_path="$unix_path"
46370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46372    new_path="$unix_path"
46373  fi
46374
46375
46376  # Now try to locate executable using which
46377  new_path=`$WHICH "$new_path" 2> /dev/null`
46378
46379  if test "x$new_path" = x; then
46380    # Oops. Which didn't find the executable.
46381    # The splitting of arguments from the executable at a space might have been incorrect,
46382    # since paths with space are more likely in Windows. Give it another try with the whole
46383    # argument.
46384    path="$complete"
46385    arguments="EOL"
46386    new_path="$path"
46387
46388  windows_path="$new_path"
46389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46390    unix_path=`$CYGPATH -u "$windows_path"`
46391    new_path="$unix_path"
46392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46394    new_path="$unix_path"
46395  fi
46396
46397
46398    new_path=`$WHICH "$new_path" 2> /dev/null`
46399    # bat and cmd files are not always considered executable in MSYS causing which
46400    # to not find them
46401    if test "x$new_path" = x \
46402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46404      new_path="$path"
46405
46406  windows_path="$new_path"
46407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46408    unix_path=`$CYGPATH -u "$windows_path"`
46409    new_path="$unix_path"
46410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46412    new_path="$unix_path"
46413  fi
46414
46415    fi
46416
46417    if test "x$new_path" = x; then
46418      # It's still not found. Now this is an unrecoverable error.
46419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46420$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46421      has_space=`$ECHO "$complete" | $GREP " "`
46422      if test "x$has_space" != x; then
46423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46425      fi
46426      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46427    fi
46428  fi
46429
46430  # Now new_path has a complete unix path to the binary
46431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46432    # Keep paths in /bin as-is, but remove trailing .exe if any
46433    new_path="${new_path/%.exe/}"
46434    # Do not save /bin paths to all_fixpath_prefixes!
46435  else
46436    # Not in mixed or Windows style, start by that.
46437    new_path=`cmd //c echo $new_path`
46438
46439  input_path="$new_path"
46440  # Check if we need to convert this using DOS-style short mode. If the path
46441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46442  # take no chances and rewrite it.
46443  # Note: m4 eats our [], so we need to use [ and ] instead.
46444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46445  if test "x$has_forbidden_chars" != x; then
46446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46448  fi
46449
46450    # Output is in $new_path
46451
46452  windows_path="$new_path"
46453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46454    unix_path=`$CYGPATH -u "$windows_path"`
46455    new_path="$unix_path"
46456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46458    new_path="$unix_path"
46459  fi
46460
46461    # remove trailing .exe if any
46462    new_path="${new_path/%.exe/}"
46463
46464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46466  fi
46467
46468    else
46469      # We're on a unix platform. Hooray! :)
46470      # First separate the path from the arguments. This will split at the first
46471      # space.
46472      complete="$BUILD_OBJCOPY"
46473      path="${complete%% *}"
46474      tmp="$complete EOL"
46475      arguments="${tmp#* }"
46476
46477      # Cannot rely on the command "which" here since it doesn't always work.
46478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46479      if test -z "$is_absolute_path"; then
46480        # Path to executable is not absolute. Find it.
46481        IFS_save="$IFS"
46482        IFS=:
46483        for p in $PATH; do
46484          if test -f "$p/$path" && test -x "$p/$path"; then
46485            new_path="$p/$path"
46486            break
46487          fi
46488        done
46489        IFS="$IFS_save"
46490      else
46491        # This is an absolute path, we can use it without further modifications.
46492        new_path="$path"
46493      fi
46494
46495      if test "x$new_path" = x; then
46496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46497$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46498        has_space=`$ECHO "$complete" | $GREP " "`
46499        if test "x$has_space" != x; then
46500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46502        fi
46503        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46504      fi
46505    fi
46506
46507    # Now join together the path and the arguments once again
46508    if test "x$arguments" != xEOL; then
46509      new_complete="$new_path ${arguments% *}"
46510    else
46511      new_complete="$new_path"
46512    fi
46513
46514    if test "x$complete" != "x$new_complete"; then
46515      BUILD_OBJCOPY="$new_complete"
46516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46517$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46518    fi
46519  fi
46520
46521
46522
46523  # Publish this variable in the help.
46524
46525
46526  if [ -z "${BUILD_STRIP+x}" ]; then
46527    # The variable is not set by user, try to locate tool using the code snippet
46528    for ac_prog in strip
46529do
46530  # Extract the first word of "$ac_prog", so it can be a program name with args.
46531set dummy $ac_prog; ac_word=$2
46532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46533$as_echo_n "checking for $ac_word... " >&6; }
46534if ${ac_cv_path_BUILD_STRIP+:} false; then :
46535  $as_echo_n "(cached) " >&6
46536else
46537  case $BUILD_STRIP in
46538  [\\/]* | ?:[\\/]*)
46539  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46540  ;;
46541  *)
46542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46543for as_dir in $PATH
46544do
46545  IFS=$as_save_IFS
46546  test -z "$as_dir" && as_dir=.
46547    for ac_exec_ext in '' $ac_executable_extensions; do
46548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46549    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46551    break 2
46552  fi
46553done
46554  done
46555IFS=$as_save_IFS
46556
46557  ;;
46558esac
46559fi
46560BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46561if test -n "$BUILD_STRIP"; then
46562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46563$as_echo "$BUILD_STRIP" >&6; }
46564else
46565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46566$as_echo "no" >&6; }
46567fi
46568
46569
46570  test -n "$BUILD_STRIP" && break
46571done
46572
46573  else
46574    # The variable is set, but is it from the command line or the environment?
46575
46576    # Try to remove the string !BUILD_STRIP! from our list.
46577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46579      # If it failed, the variable was not from the command line. Ignore it,
46580      # but warn the user (except for BASH, which is always set by the calling BASH).
46581      if test "xBUILD_STRIP" != xBASH; then
46582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46583$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46584      fi
46585      # Try to locate tool using the code snippet
46586      for ac_prog in strip
46587do
46588  # Extract the first word of "$ac_prog", so it can be a program name with args.
46589set dummy $ac_prog; ac_word=$2
46590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46591$as_echo_n "checking for $ac_word... " >&6; }
46592if ${ac_cv_path_BUILD_STRIP+:} false; then :
46593  $as_echo_n "(cached) " >&6
46594else
46595  case $BUILD_STRIP in
46596  [\\/]* | ?:[\\/]*)
46597  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46598  ;;
46599  *)
46600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46601for as_dir in $PATH
46602do
46603  IFS=$as_save_IFS
46604  test -z "$as_dir" && as_dir=.
46605    for ac_exec_ext in '' $ac_executable_extensions; do
46606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46607    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46609    break 2
46610  fi
46611done
46612  done
46613IFS=$as_save_IFS
46614
46615  ;;
46616esac
46617fi
46618BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46619if test -n "$BUILD_STRIP"; then
46620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46621$as_echo "$BUILD_STRIP" >&6; }
46622else
46623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46624$as_echo "no" >&6; }
46625fi
46626
46627
46628  test -n "$BUILD_STRIP" && break
46629done
46630
46631    else
46632      # If it succeeded, then it was overridden by the user. We will use it
46633      # for the tool.
46634
46635      # First remove it from the list of overridden variables, so we can test
46636      # for unknown variables in the end.
46637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46638
46639      # Check if we try to supply an empty value
46640      if test "x$BUILD_STRIP" = x; then
46641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46642$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46644$as_echo_n "checking for BUILD_STRIP... " >&6; }
46645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46646$as_echo "disabled" >&6; }
46647      else
46648        # Check if the provided tool contains a complete path.
46649        tool_specified="$BUILD_STRIP"
46650        tool_basename="${tool_specified##*/}"
46651        if test "x$tool_basename" = "x$tool_specified"; then
46652          # A command without a complete path is provided, search $PATH.
46653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46654$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46655          # Extract the first word of "$tool_basename", so it can be a program name with args.
46656set dummy $tool_basename; ac_word=$2
46657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46658$as_echo_n "checking for $ac_word... " >&6; }
46659if ${ac_cv_path_BUILD_STRIP+:} false; then :
46660  $as_echo_n "(cached) " >&6
46661else
46662  case $BUILD_STRIP in
46663  [\\/]* | ?:[\\/]*)
46664  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46665  ;;
46666  *)
46667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46668for as_dir in $PATH
46669do
46670  IFS=$as_save_IFS
46671  test -z "$as_dir" && as_dir=.
46672    for ac_exec_ext in '' $ac_executable_extensions; do
46673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46674    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46676    break 2
46677  fi
46678done
46679  done
46680IFS=$as_save_IFS
46681
46682  ;;
46683esac
46684fi
46685BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46686if test -n "$BUILD_STRIP"; then
46687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46688$as_echo "$BUILD_STRIP" >&6; }
46689else
46690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46691$as_echo "no" >&6; }
46692fi
46693
46694
46695          if test "x$BUILD_STRIP" = x; then
46696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46697          fi
46698        else
46699          # Otherwise we believe it is a complete path. Use it as it is.
46700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46701$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46703$as_echo_n "checking for BUILD_STRIP... " >&6; }
46704          if test ! -x "$tool_specified"; then
46705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46706$as_echo "not found" >&6; }
46707            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46708          fi
46709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46710$as_echo "$tool_specified" >&6; }
46711        fi
46712      fi
46713    fi
46714
46715  fi
46716
46717
46718
46719  # Only process if variable expands to non-empty
46720
46721  if test "x$BUILD_STRIP" != x; then
46722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46723
46724  # First separate the path from the arguments. This will split at the first
46725  # space.
46726  complete="$BUILD_STRIP"
46727  path="${complete%% *}"
46728  tmp="$complete EOL"
46729  arguments="${tmp#* }"
46730
46731  # Input might be given as Windows format, start by converting to
46732  # unix format.
46733  new_path=`$CYGPATH -u "$path"`
46734
46735  # Now try to locate executable using which
46736  new_path=`$WHICH "$new_path" 2> /dev/null`
46737  # bat and cmd files are not always considered executable in cygwin causing which
46738  # to not find them
46739  if test "x$new_path" = x \
46740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46742    new_path=`$CYGPATH -u "$path"`
46743  fi
46744  if test "x$new_path" = x; then
46745    # Oops. Which didn't find the executable.
46746    # The splitting of arguments from the executable at a space might have been incorrect,
46747    # since paths with space are more likely in Windows. Give it another try with the whole
46748    # argument.
46749    path="$complete"
46750    arguments="EOL"
46751    new_path=`$CYGPATH -u "$path"`
46752    new_path=`$WHICH "$new_path" 2> /dev/null`
46753    # bat and cmd files are not always considered executable in cygwin causing which
46754    # to not find them
46755    if test "x$new_path" = x \
46756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46758      new_path=`$CYGPATH -u "$path"`
46759    fi
46760    if test "x$new_path" = x; then
46761      # It's still not found. Now this is an unrecoverable error.
46762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46763$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46764      has_space=`$ECHO "$complete" | $GREP " "`
46765      if test "x$has_space" != x; then
46766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46768      fi
46769      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46770    fi
46771  fi
46772
46773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46776  # "foo.exe" is OK but "foo" is an error.
46777  #
46778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46779  # It is also a way to make sure we got the proper file name for the real test later on.
46780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46781  if test "x$test_shortpath" = x; then
46782    # Short path failed, file does not exist as specified.
46783    # Try adding .exe or .cmd
46784    if test -f "${new_path}.exe"; then
46785      input_to_shortpath="${new_path}.exe"
46786    elif test -f "${new_path}.cmd"; then
46787      input_to_shortpath="${new_path}.cmd"
46788    else
46789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46790$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46793      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46794    fi
46795  else
46796    input_to_shortpath="$new_path"
46797  fi
46798
46799  # Call helper function which possibly converts this using DOS-style short mode.
46800  # If so, the updated path is stored in $new_path.
46801  new_path="$input_to_shortpath"
46802
46803  input_path="$input_to_shortpath"
46804  # Check if we need to convert this using DOS-style short mode. If the path
46805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46806  # take no chances and rewrite it.
46807  # Note: m4 eats our [], so we need to use [ and ] instead.
46808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46809  if test "x$has_forbidden_chars" != x; then
46810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46814      # Going to short mode and back again did indeed matter. Since short mode is
46815      # case insensitive, let's make it lowercase to improve readability.
46816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46817      # Now convert it back to Unix-style (cygpath)
46818      input_path=`$CYGPATH -u "$shortmode_path"`
46819      new_path="$input_path"
46820    fi
46821  fi
46822
46823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46824  if test "x$test_cygdrive_prefix" = x; then
46825    # As a simple fix, exclude /usr/bin since it's not a real path.
46826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46828      # a path prefixed by /cygdrive for fixpath to work.
46829      new_path="$CYGWIN_ROOT_PATH$input_path"
46830    fi
46831  fi
46832
46833  # remove trailing .exe if any
46834  new_path="${new_path/%.exe/}"
46835
46836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46837
46838  # First separate the path from the arguments. This will split at the first
46839  # space.
46840  complete="$BUILD_STRIP"
46841  path="${complete%% *}"
46842  tmp="$complete EOL"
46843  arguments="${tmp#* }"
46844
46845  # Input might be given as Windows format, start by converting to
46846  # unix format.
46847  new_path="$path"
46848
46849  windows_path="$new_path"
46850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46851    unix_path=`$CYGPATH -u "$windows_path"`
46852    new_path="$unix_path"
46853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46855    new_path="$unix_path"
46856  fi
46857
46858
46859  # Now try to locate executable using which
46860  new_path=`$WHICH "$new_path" 2> /dev/null`
46861
46862  if test "x$new_path" = x; then
46863    # Oops. Which didn't find the executable.
46864    # The splitting of arguments from the executable at a space might have been incorrect,
46865    # since paths with space are more likely in Windows. Give it another try with the whole
46866    # argument.
46867    path="$complete"
46868    arguments="EOL"
46869    new_path="$path"
46870
46871  windows_path="$new_path"
46872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46873    unix_path=`$CYGPATH -u "$windows_path"`
46874    new_path="$unix_path"
46875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46877    new_path="$unix_path"
46878  fi
46879
46880
46881    new_path=`$WHICH "$new_path" 2> /dev/null`
46882    # bat and cmd files are not always considered executable in MSYS causing which
46883    # to not find them
46884    if test "x$new_path" = x \
46885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46887      new_path="$path"
46888
46889  windows_path="$new_path"
46890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46891    unix_path=`$CYGPATH -u "$windows_path"`
46892    new_path="$unix_path"
46893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46895    new_path="$unix_path"
46896  fi
46897
46898    fi
46899
46900    if test "x$new_path" = x; then
46901      # It's still not found. Now this is an unrecoverable error.
46902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46903$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46904      has_space=`$ECHO "$complete" | $GREP " "`
46905      if test "x$has_space" != x; then
46906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46908      fi
46909      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46910    fi
46911  fi
46912
46913  # Now new_path has a complete unix path to the binary
46914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46915    # Keep paths in /bin as-is, but remove trailing .exe if any
46916    new_path="${new_path/%.exe/}"
46917    # Do not save /bin paths to all_fixpath_prefixes!
46918  else
46919    # Not in mixed or Windows style, start by that.
46920    new_path=`cmd //c echo $new_path`
46921
46922  input_path="$new_path"
46923  # Check if we need to convert this using DOS-style short mode. If the path
46924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46925  # take no chances and rewrite it.
46926  # Note: m4 eats our [], so we need to use [ and ] instead.
46927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46928  if test "x$has_forbidden_chars" != x; then
46929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46931  fi
46932
46933    # Output is in $new_path
46934
46935  windows_path="$new_path"
46936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46937    unix_path=`$CYGPATH -u "$windows_path"`
46938    new_path="$unix_path"
46939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46941    new_path="$unix_path"
46942  fi
46943
46944    # remove trailing .exe if any
46945    new_path="${new_path/%.exe/}"
46946
46947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46949  fi
46950
46951    else
46952      # We're on a unix platform. Hooray! :)
46953      # First separate the path from the arguments. This will split at the first
46954      # space.
46955      complete="$BUILD_STRIP"
46956      path="${complete%% *}"
46957      tmp="$complete EOL"
46958      arguments="${tmp#* }"
46959
46960      # Cannot rely on the command "which" here since it doesn't always work.
46961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46962      if test -z "$is_absolute_path"; then
46963        # Path to executable is not absolute. Find it.
46964        IFS_save="$IFS"
46965        IFS=:
46966        for p in $PATH; do
46967          if test -f "$p/$path" && test -x "$p/$path"; then
46968            new_path="$p/$path"
46969            break
46970          fi
46971        done
46972        IFS="$IFS_save"
46973      else
46974        # This is an absolute path, we can use it without further modifications.
46975        new_path="$path"
46976      fi
46977
46978      if test "x$new_path" = x; then
46979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46980$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46981        has_space=`$ECHO "$complete" | $GREP " "`
46982        if test "x$has_space" != x; then
46983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46985        fi
46986        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46987      fi
46988    fi
46989
46990    # Now join together the path and the arguments once again
46991    if test "x$arguments" != xEOL; then
46992      new_complete="$new_path ${arguments% *}"
46993    else
46994      new_complete="$new_path"
46995    fi
46996
46997    if test "x$complete" != "x$new_complete"; then
46998      BUILD_STRIP="$new_complete"
46999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47000$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47001    fi
47002  fi
47003
47004    # Assume the C compiler is the assembler
47005    BUILD_AS="$BUILD_CC -c"
47006    # Just like for the target compiler, use the compiler as linker
47007    BUILD_LD="$BUILD_CC"
47008    BUILD_LDCXX="$BUILD_CXX"
47009
47010    PATH="$OLDPATH"
47011
47012
47013  COMPILER=$BUILD_CC
47014  COMPILER_NAME=BuildC
47015
47016  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47017    # cc -V output typically looks like
47018    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47019    # or
47020    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47021    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47022    # Check that this is likely to be the Solaris Studio cc.
47023    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47024    if test $? -ne 0; then
47025      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47026      { $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
47027$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47028      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47029$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47030      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47031$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47032      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47033    fi
47034    # Remove usage instructions (if present), and
47035    # collapse compiler output into a single line
47036    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47037        $SED -e 's/ *[Uu]sage:.*//'`
47038    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47039        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47040  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47041    # xlc -qversion output typically looks like
47042    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47043    #     Version: 11.01.0000.0015
47044    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47045    # Check that this is likely to be the IBM XL C compiler.
47046    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47047    if test $? -ne 0; then
47048      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47049      { $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
47050$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47052$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47054$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47056    fi
47057    # Collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47061  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47062    # There is no specific version flag, but all output starts with a version string.
47063    # First line typically looks something like:
47064    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47065    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47066    # Check that this is likely to be Microsoft CL.EXE.
47067    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47068    if test $? -ne 0; then
47069      { $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
47070$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47071      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47072$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47073      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47074    fi
47075    # Collapse compiler output into a single line
47076    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47077    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47078        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47079  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47080    # gcc --version output typically looks like
47081    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47082    #     Copyright (C) 2013 Free Software Foundation, Inc.
47083    #     This is free software; see the source for copying conditions.  There is NO
47084    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47085    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47086    # Check that this is likely to be GCC.
47087    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47088    if test $? -ne 0; then
47089      { $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
47090$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47091      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47092$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47093      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47094    fi
47095    # Remove Copyright and legalese from version string, and
47096    # collapse into a single line
47097    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47098        $SED -e 's/ *Copyright .*//'`
47099    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47101  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47102    # clang --version output typically looks like
47103    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47104    #    clang version 3.3 (tags/RELEASE_33/final)
47105    # or
47106    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47107    #    Target: x86_64-pc-linux-gnu
47108    #    Thread model: posix
47109    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47110    # Check that this is likely to be clang
47111    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47112    if test $? -ne 0; then
47113      { $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
47114$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47116$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47117      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47118    fi
47119    # Collapse compiler output into a single line
47120    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47122        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47123  else
47124      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47125  fi
47126  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47127  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47128  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47129  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47130
47131  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47132$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47133
47134
47135  COMPILER=$BUILD_CXX
47136  COMPILER_NAME=BuildC++
47137
47138  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47139    # cc -V output typically looks like
47140    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47141    # or
47142    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47143    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47144    # Check that this is likely to be the Solaris Studio cc.
47145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47146    if test $? -ne 0; then
47147      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47148      { $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
47149$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47150      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47151$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47152      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47153$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47154      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47155    fi
47156    # Remove usage instructions (if present), and
47157    # collapse compiler output into a single line
47158    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47159        $SED -e 's/ *[Uu]sage:.*//'`
47160    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47161        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47162  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47163    # xlc -qversion output typically looks like
47164    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47165    #     Version: 11.01.0000.0015
47166    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47167    # Check that this is likely to be the IBM XL C compiler.
47168    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47169    if test $? -ne 0; then
47170      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47171      { $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
47172$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47173      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47174$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47175      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47176$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47177      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47178    fi
47179    # Collapse compiler output into a single line
47180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47181    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47182        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47183  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47184    # There is no specific version flag, but all output starts with a version string.
47185    # First line typically looks something like:
47186    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47187    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47188    # Check that this is likely to be Microsoft CL.EXE.
47189    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47190    if test $? -ne 0; then
47191      { $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
47192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47194$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47195      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47196    fi
47197    # Collapse compiler output into a single line
47198    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47199    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47200        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47201  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47202    # gcc --version output typically looks like
47203    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47204    #     Copyright (C) 2013 Free Software Foundation, Inc.
47205    #     This is free software; see the source for copying conditions.  There is NO
47206    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47207    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47208    # Check that this is likely to be GCC.
47209    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47210    if test $? -ne 0; then
47211      { $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
47212$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47214$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47215      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47216    fi
47217    # Remove Copyright and legalese from version string, and
47218    # collapse into a single line
47219    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47220        $SED -e 's/ *Copyright .*//'`
47221    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47222        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47223  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47224    # clang --version output typically looks like
47225    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47226    #    clang version 3.3 (tags/RELEASE_33/final)
47227    # or
47228    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47229    #    Target: x86_64-pc-linux-gnu
47230    #    Thread model: posix
47231    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47232    # Check that this is likely to be clang
47233    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47234    if test $? -ne 0; then
47235      { $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
47236$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47237      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47238$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47239      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47240    fi
47241    # Collapse compiler output into a single line
47242    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47243    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47244        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47245  else
47246      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47247  fi
47248  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47249  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47250  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47251  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47252
47253  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47254$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47255
47256
47257  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47258    { $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
47259$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47260    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47261$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47262  fi
47263
47264  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47265  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47266    { $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
47267$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;}
47268  fi
47269
47270  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47271    { $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
47272$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47273  fi
47274
47275  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47276
47277  else
47278    # If we are not cross compiling, use the normal target compilers for
47279    # building the build platform executables.
47280    BUILD_CC="$CC"
47281    BUILD_CXX="$CXX"
47282    BUILD_LD="$LD"
47283    BUILD_LDCXX="$LDCXX"
47284    BUILD_NM="$NM"
47285    BUILD_AS="$AS"
47286    BUILD_OBJCOPY="$OBJCOPY"
47287    BUILD_STRIP="$STRIP"
47288    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47289    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47290    BUILD_AR="$AR"
47291
47292
47293  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47294    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47295$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47296    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47297$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47298  fi
47299
47300  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47301  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47302    { $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
47303$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;}
47304  fi
47305
47306  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47307    { $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
47308$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47309  fi
47310
47311  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47312
47313  fi
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328  # The package path is used only on macosx?
47329  # FIXME: clean this up, and/or move it elsewhere.
47330  PACKAGE_PATH=/opt/local
47331
47332
47333  # Check for extra potential brokenness.
47334  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47335    # On Windows, double-check that we got the right compiler.
47336    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47337    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47338    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47339      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47340        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
47341      fi
47342    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47343      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47344        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47345      fi
47346    fi
47347  fi
47348
47349  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47350    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47351    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47352    # This is later checked when setting flags.
47353
47354    # "-Og" suppported for GCC 4.8 and later
47355    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403    # Execute function body
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452    # Execute function body
47453
47454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47455$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47456  supports=yes
47457
47458  saved_cflags="$CFLAGS"
47459  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47460  ac_ext=c
47461ac_cpp='$CPP $CPPFLAGS'
47462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47464ac_compiler_gnu=$ac_cv_c_compiler_gnu
47465
47466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47467/* end confdefs.h.  */
47468int i;
47469_ACEOF
47470if ac_fn_c_try_compile "$LINENO"; then :
47471
47472else
47473  supports=no
47474fi
47475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47476  ac_ext=cpp
47477ac_cpp='$CXXCPP $CPPFLAGS'
47478ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47479ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47480ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47481
47482  CFLAGS="$saved_cflags"
47483
47484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47485$as_echo "$supports" >&6; }
47486  if test "x$supports" = "xyes" ; then
47487    :
47488    C_COMP_SUPPORTS="yes"
47489  else
47490    :
47491    C_COMP_SUPPORTS="no"
47492  fi
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552    # Execute function body
47553
47554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47555$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47556  supports=yes
47557
47558  saved_cxxflags="$CXXFLAGS"
47559  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47560  ac_ext=cpp
47561ac_cpp='$CXXCPP $CPPFLAGS'
47562ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47563ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47564ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47565
47566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47567/* end confdefs.h.  */
47568int i;
47569_ACEOF
47570if ac_fn_cxx_try_compile "$LINENO"; then :
47571
47572else
47573  supports=no
47574fi
47575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47576  ac_ext=cpp
47577ac_cpp='$CXXCPP $CPPFLAGS'
47578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47581
47582  CXXFLAGS="$saved_cxxflags"
47583
47584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47585$as_echo "$supports" >&6; }
47586  if test "x$supports" = "xyes" ; then
47587    :
47588    CXX_COMP_SUPPORTS="yes"
47589  else
47590    :
47591    CXX_COMP_SUPPORTS="no"
47592  fi
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47607$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47608  supports=no
47609  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47610
47611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47612$as_echo "$supports" >&6; }
47613  if test "x$supports" = "xyes" ; then
47614    :
47615    HAS_CFLAG_OPTIMIZE_DEBUG=true
47616  else
47617    :
47618    HAS_CFLAG_OPTIMIZE_DEBUG=false
47619  fi
47620
47621
47622
47623
47624
47625
47626
47627    # "-z relro" supported in GNU binutils 2.17 and later
47628    LINKER_RELRO_FLAG="-Wl,-z,relro"
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676    # Execute function body
47677
47678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47679$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47680  supports=yes
47681
47682  saved_ldflags="$LDFLAGS"
47683  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47684  ac_ext=c
47685ac_cpp='$CPP $CPPFLAGS'
47686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47688ac_compiler_gnu=$ac_cv_c_compiler_gnu
47689
47690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47691/* end confdefs.h.  */
47692
47693int
47694main ()
47695{
47696
47697  ;
47698  return 0;
47699}
47700_ACEOF
47701if ac_fn_c_try_link "$LINENO"; then :
47702
47703else
47704  supports=no
47705fi
47706rm -f core conftest.err conftest.$ac_objext \
47707    conftest$ac_exeext conftest.$ac_ext
47708  ac_ext=cpp
47709ac_cpp='$CXXCPP $CPPFLAGS'
47710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47713
47714  LDFLAGS="$saved_ldflags"
47715
47716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47717$as_echo "$supports" >&6; }
47718  if test "x$supports" = "xyes" ; then
47719    :
47720    HAS_LINKER_RELRO=true
47721  else
47722    :
47723    HAS_LINKER_RELRO=false
47724  fi
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738    # "-z now" supported in GNU binutils 2.11 and later
47739    LINKER_NOW_FLAG="-Wl,-z,now"
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787    # Execute function body
47788
47789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47790$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47791  supports=yes
47792
47793  saved_ldflags="$LDFLAGS"
47794  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47795  ac_ext=c
47796ac_cpp='$CPP $CPPFLAGS'
47797ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47798ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47799ac_compiler_gnu=$ac_cv_c_compiler_gnu
47800
47801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47802/* end confdefs.h.  */
47803
47804int
47805main ()
47806{
47807
47808  ;
47809  return 0;
47810}
47811_ACEOF
47812if ac_fn_c_try_link "$LINENO"; then :
47813
47814else
47815  supports=no
47816fi
47817rm -f core conftest.err conftest.$ac_objext \
47818    conftest$ac_exeext conftest.$ac_ext
47819  ac_ext=cpp
47820ac_cpp='$CXXCPP $CPPFLAGS'
47821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47824
47825  LDFLAGS="$saved_ldflags"
47826
47827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47828$as_echo "$supports" >&6; }
47829  if test "x$supports" = "xyes" ; then
47830    :
47831    HAS_LINKER_NOW=true
47832  else
47833    :
47834    HAS_LINKER_NOW=false
47835  fi
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848  fi
47849
47850  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47851  # in executable.'
47852  USING_BROKEN_SUSE_LD=no
47853  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47855$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47856    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47857    $ECHO "int main() { }" > main.c
47858    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47860$as_echo "no" >&6; }
47861      USING_BROKEN_SUSE_LD=no
47862    else
47863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47864$as_echo "yes" >&6; }
47865      USING_BROKEN_SUSE_LD=yes
47866    fi
47867    $RM version-script.map main.c a.out
47868  fi
47869
47870
47871  # Setup hotspot lecagy names for toolchains
47872  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47873  if test "x$TOOLCHAIN_TYPE" = xclang; then
47874    HOTSPOT_TOOLCHAIN_TYPE=gcc
47875  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47876    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47877  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47878    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47879  fi
47880
47881
47882
47883# Setup the JTReg Regression Test Harness.
47884
47885
47886# Check whether --with-jtreg was given.
47887if test "${with_jtreg+set}" = set; then :
47888  withval=$with_jtreg;
47889else
47890  with_jtreg=no
47891fi
47892
47893
47894  if test "x$with_jtreg" = xno; then
47895    # jtreg disabled
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47897$as_echo_n "checking for jtreg... " >&6; }
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47899$as_echo "no" >&6; }
47900  else
47901    if test "x$with_jtreg" != xyes; then
47902      # with path specified.
47903      JT_HOME="$with_jtreg"
47904    fi
47905
47906    if test "x$JT_HOME" != x; then
47907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47908$as_echo_n "checking for jtreg... " >&6; }
47909
47910      # use JT_HOME enviroment var.
47911
47912  # Only process if variable expands to non-empty
47913
47914  if test "x$JT_HOME" != x; then
47915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47916
47917  # Input might be given as Windows format, start by converting to
47918  # unix format.
47919  path="$JT_HOME"
47920  new_path=`$CYGPATH -u "$path"`
47921
47922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47925  # "foo.exe" is OK but "foo" is an error.
47926  #
47927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47928  # It is also a way to make sure we got the proper file name for the real test later on.
47929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47930  if test "x$test_shortpath" = x; then
47931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47932$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47933    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47934  fi
47935
47936  # Call helper function which possibly converts this using DOS-style short mode.
47937  # If so, the updated path is stored in $new_path.
47938
47939  input_path="$new_path"
47940  # Check if we need to convert this using DOS-style short mode. If the path
47941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942  # take no chances and rewrite it.
47943  # Note: m4 eats our [], so we need to use [ and ] instead.
47944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47945  if test "x$has_forbidden_chars" != x; then
47946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47950      # Going to short mode and back again did indeed matter. Since short mode is
47951      # case insensitive, let's make it lowercase to improve readability.
47952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47953      # Now convert it back to Unix-style (cygpath)
47954      input_path=`$CYGPATH -u "$shortmode_path"`
47955      new_path="$input_path"
47956    fi
47957  fi
47958
47959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47960  if test "x$test_cygdrive_prefix" = x; then
47961    # As a simple fix, exclude /usr/bin since it's not a real path.
47962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47964      # a path prefixed by /cygdrive for fixpath to work.
47965      new_path="$CYGWIN_ROOT_PATH$input_path"
47966    fi
47967  fi
47968
47969
47970  if test "x$path" != "x$new_path"; then
47971    JT_HOME="$new_path"
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47973$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47974  fi
47975
47976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47977
47978  path="$JT_HOME"
47979  has_colon=`$ECHO $path | $GREP ^.:`
47980  new_path="$path"
47981  if test "x$has_colon" = x; then
47982    # Not in mixed or Windows style, start by that.
47983    new_path=`cmd //c echo $path`
47984  fi
47985
47986
47987  input_path="$new_path"
47988  # Check if we need to convert this using DOS-style short mode. If the path
47989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47990  # take no chances and rewrite it.
47991  # Note: m4 eats our [], so we need to use [ and ] instead.
47992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47993  if test "x$has_forbidden_chars" != x; then
47994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47996  fi
47997
47998
47999  windows_path="$new_path"
48000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48001    unix_path=`$CYGPATH -u "$windows_path"`
48002    new_path="$unix_path"
48003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48005    new_path="$unix_path"
48006  fi
48007
48008  if test "x$path" != "x$new_path"; then
48009    JT_HOME="$new_path"
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48011$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48012  fi
48013
48014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48016
48017    else
48018      # We're on a unix platform. Hooray! :)
48019      path="$JT_HOME"
48020      has_space=`$ECHO "$path" | $GREP " "`
48021      if test "x$has_space" != x; then
48022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48023$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48025      fi
48026
48027      # Use eval to expand a potential ~
48028      eval path="$path"
48029      if test ! -f "$path" && test ! -d "$path"; then
48030        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48031      fi
48032
48033      if test -d "$path"; then
48034        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48035      else
48036        dir="`$DIRNAME "$path"`"
48037        base="`$BASENAME "$path"`"
48038        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48039      fi
48040    fi
48041  fi
48042
48043
48044      # jtreg win32 script works for everybody
48045      JTREGEXE="$JT_HOME/bin/jtreg"
48046
48047      if test ! -f "$JTREGEXE"; then
48048        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48049      fi
48050
48051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48052$as_echo "$JTREGEXE" >&6; }
48053    else
48054      # try to find jtreg on path
48055
48056
48057
48058  # Publish this variable in the help.
48059
48060
48061  if [ -z "${JTREGEXE+x}" ]; then
48062    # The variable is not set by user, try to locate tool using the code snippet
48063    for ac_prog in jtreg
48064do
48065  # Extract the first word of "$ac_prog", so it can be a program name with args.
48066set dummy $ac_prog; ac_word=$2
48067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48068$as_echo_n "checking for $ac_word... " >&6; }
48069if ${ac_cv_path_JTREGEXE+:} false; then :
48070  $as_echo_n "(cached) " >&6
48071else
48072  case $JTREGEXE in
48073  [\\/]* | ?:[\\/]*)
48074  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48075  ;;
48076  *)
48077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48078for as_dir in $PATH
48079do
48080  IFS=$as_save_IFS
48081  test -z "$as_dir" && as_dir=.
48082    for ac_exec_ext in '' $ac_executable_extensions; do
48083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48084    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48086    break 2
48087  fi
48088done
48089  done
48090IFS=$as_save_IFS
48091
48092  ;;
48093esac
48094fi
48095JTREGEXE=$ac_cv_path_JTREGEXE
48096if test -n "$JTREGEXE"; then
48097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48098$as_echo "$JTREGEXE" >&6; }
48099else
48100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48101$as_echo "no" >&6; }
48102fi
48103
48104
48105  test -n "$JTREGEXE" && break
48106done
48107
48108  else
48109    # The variable is set, but is it from the command line or the environment?
48110
48111    # Try to remove the string !JTREGEXE! from our list.
48112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48114      # If it failed, the variable was not from the command line. Ignore it,
48115      # but warn the user (except for BASH, which is always set by the calling BASH).
48116      if test "xJTREGEXE" != xBASH; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48118$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48119      fi
48120      # Try to locate tool using the code snippet
48121      for ac_prog in jtreg
48122do
48123  # Extract the first word of "$ac_prog", so it can be a program name with args.
48124set dummy $ac_prog; ac_word=$2
48125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48126$as_echo_n "checking for $ac_word... " >&6; }
48127if ${ac_cv_path_JTREGEXE+:} false; then :
48128  $as_echo_n "(cached) " >&6
48129else
48130  case $JTREGEXE in
48131  [\\/]* | ?:[\\/]*)
48132  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48133  ;;
48134  *)
48135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48136for as_dir in $PATH
48137do
48138  IFS=$as_save_IFS
48139  test -z "$as_dir" && as_dir=.
48140    for ac_exec_ext in '' $ac_executable_extensions; do
48141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48142    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48144    break 2
48145  fi
48146done
48147  done
48148IFS=$as_save_IFS
48149
48150  ;;
48151esac
48152fi
48153JTREGEXE=$ac_cv_path_JTREGEXE
48154if test -n "$JTREGEXE"; then
48155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48156$as_echo "$JTREGEXE" >&6; }
48157else
48158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48159$as_echo "no" >&6; }
48160fi
48161
48162
48163  test -n "$JTREGEXE" && break
48164done
48165
48166    else
48167      # If it succeeded, then it was overridden by the user. We will use it
48168      # for the tool.
48169
48170      # First remove it from the list of overridden variables, so we can test
48171      # for unknown variables in the end.
48172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48173
48174      # Check if we try to supply an empty value
48175      if test "x$JTREGEXE" = x; then
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48177$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48179$as_echo_n "checking for JTREGEXE... " >&6; }
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48181$as_echo "disabled" >&6; }
48182      else
48183        # Check if the provided tool contains a complete path.
48184        tool_specified="$JTREGEXE"
48185        tool_basename="${tool_specified##*/}"
48186        if test "x$tool_basename" = "x$tool_specified"; then
48187          # A command without a complete path is provided, search $PATH.
48188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48189$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48190          # Extract the first word of "$tool_basename", so it can be a program name with args.
48191set dummy $tool_basename; ac_word=$2
48192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48193$as_echo_n "checking for $ac_word... " >&6; }
48194if ${ac_cv_path_JTREGEXE+:} false; then :
48195  $as_echo_n "(cached) " >&6
48196else
48197  case $JTREGEXE in
48198  [\\/]* | ?:[\\/]*)
48199  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48200  ;;
48201  *)
48202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48203for as_dir in $PATH
48204do
48205  IFS=$as_save_IFS
48206  test -z "$as_dir" && as_dir=.
48207    for ac_exec_ext in '' $ac_executable_extensions; do
48208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48209    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48211    break 2
48212  fi
48213done
48214  done
48215IFS=$as_save_IFS
48216
48217  ;;
48218esac
48219fi
48220JTREGEXE=$ac_cv_path_JTREGEXE
48221if test -n "$JTREGEXE"; then
48222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48223$as_echo "$JTREGEXE" >&6; }
48224else
48225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48226$as_echo "no" >&6; }
48227fi
48228
48229
48230          if test "x$JTREGEXE" = x; then
48231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48232          fi
48233        else
48234          # Otherwise we believe it is a complete path. Use it as it is.
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48236$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48238$as_echo_n "checking for JTREGEXE... " >&6; }
48239          if test ! -x "$tool_specified"; then
48240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48241$as_echo "not found" >&6; }
48242            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48243          fi
48244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48245$as_echo "$tool_specified" >&6; }
48246        fi
48247      fi
48248    fi
48249
48250  fi
48251
48252
48253
48254  if test "x$JTREGEXE" = x; then
48255    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48256  fi
48257
48258
48259      JT_HOME="`$DIRNAME $JTREGEXE`"
48260    fi
48261  fi
48262
48263
48264
48265
48266
48267
48268  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48269  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48270  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48271  #                              commands produced by the link step (currently AIX only)
48272  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48273    COMPILER_TARGET_BITS_FLAG="-q"
48274    COMPILER_COMMAND_FILE_FLAG="-f"
48275    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48276  else
48277    COMPILER_TARGET_BITS_FLAG="-m"
48278    COMPILER_COMMAND_FILE_FLAG="@"
48279    COMPILER_BINDCMD_FILE_FLAG=""
48280
48281    # The solstudio linker does not support @-files.
48282    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48283      COMPILER_COMMAND_FILE_FLAG=
48284    fi
48285
48286    # Check if @file is supported by gcc
48287    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48288      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48289$as_echo_n "checking if @file is supported by gcc... " >&6; }
48290      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48291      $ECHO "" "--version" > command.file
48292      if $CXX @command.file 2>&5 >&5; then
48293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48294$as_echo "yes" >&6; }
48295        COMPILER_COMMAND_FILE_FLAG="@"
48296      else
48297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48298$as_echo "no" >&6; }
48299        COMPILER_COMMAND_FILE_FLAG=
48300      fi
48301      $RM command.file
48302    fi
48303  fi
48304
48305
48306
48307
48308  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48309  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48310    ARFLAGS="-r"
48311  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48312    ARFLAGS="-X64"
48313  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48314    # lib.exe is used as AR to create static libraries.
48315    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48316  else
48317    ARFLAGS=""
48318  fi
48319
48320
48321  ## Setup strip.
48322  # FIXME: should this really be per platform, or should it be per toolchain type?
48323  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48324  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48325  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48326    STRIPFLAGS="-g"
48327  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48328    STRIPFLAGS="-x"
48329  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48330    STRIPFLAGS="-S"
48331  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48332    STRIPFLAGS="-X32_64"
48333  fi
48334
48335
48336
48337  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48338    CC_OUT_OPTION=-Fo
48339    EXE_OUT_OPTION=-out:
48340    LD_OUT_OPTION=-out:
48341    AR_OUT_OPTION=-out:
48342  else
48343    # The option used to specify the target .o,.a or .so file.
48344    # When compiling, how to specify the to be created object file.
48345    CC_OUT_OPTION='-o$(SPACE)'
48346    # When linking, how to specify the to be created executable.
48347    EXE_OUT_OPTION='-o$(SPACE)'
48348    # When linking, how to specify the to be created dynamically linkable library.
48349    LD_OUT_OPTION='-o$(SPACE)'
48350    # When archiving, how to specify the to be create static archive for object files.
48351    AR_OUT_OPTION='rcs$(SPACE)'
48352  fi
48353
48354
48355
48356
48357
48358  # On Windows, we need to set RC flags.
48359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48360    RC_FLAGS="-nologo -l0x409"
48361    JVM_RCFLAGS="-nologo"
48362    if test "x$DEBUG_LEVEL" = xrelease; then
48363      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48364      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48365    fi
48366
48367    # The version variables used to create RC_FLAGS may be overridden
48368    # in a custom configure script, or possibly the command line.
48369    # Let those variables be expanded at make time in spec.gmk.
48370    # The \$ are escaped to the shell, and the $(...) variables
48371    # are evaluated by make.
48372    RC_FLAGS="$RC_FLAGS \
48373        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48374        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48375        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48376        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48377        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48378        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48379        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48380
48381    JVM_RCFLAGS="$JVM_RCFLAGS \
48382        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48383        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48384        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48385        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48386        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48387        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48388        -D\"HS_FNAME=jvm.dll\" \
48389        -D\"HS_INTERNAL_NAME=jvm\""
48390  fi
48391
48392
48393
48394  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48395    # silence copyright notice and other headers.
48396    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48397  fi
48398
48399
48400# Now we can test some aspects on the target using configure macros.
48401
48402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48403$as_echo_n "checking for ANSI C header files... " >&6; }
48404if ${ac_cv_header_stdc+:} false; then :
48405  $as_echo_n "(cached) " >&6
48406else
48407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408/* end confdefs.h.  */
48409#include <stdlib.h>
48410#include <stdarg.h>
48411#include <string.h>
48412#include <float.h>
48413
48414int
48415main ()
48416{
48417
48418  ;
48419  return 0;
48420}
48421_ACEOF
48422if ac_fn_cxx_try_compile "$LINENO"; then :
48423  ac_cv_header_stdc=yes
48424else
48425  ac_cv_header_stdc=no
48426fi
48427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48428
48429if test $ac_cv_header_stdc = yes; then
48430  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48432/* end confdefs.h.  */
48433#include <string.h>
48434
48435_ACEOF
48436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48437  $EGREP "memchr" >/dev/null 2>&1; then :
48438
48439else
48440  ac_cv_header_stdc=no
48441fi
48442rm -f conftest*
48443
48444fi
48445
48446if test $ac_cv_header_stdc = yes; then
48447  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48449/* end confdefs.h.  */
48450#include <stdlib.h>
48451
48452_ACEOF
48453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48454  $EGREP "free" >/dev/null 2>&1; then :
48455
48456else
48457  ac_cv_header_stdc=no
48458fi
48459rm -f conftest*
48460
48461fi
48462
48463if test $ac_cv_header_stdc = yes; then
48464  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48465  if test "$cross_compiling" = yes; then :
48466  :
48467else
48468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48469/* end confdefs.h.  */
48470#include <ctype.h>
48471#include <stdlib.h>
48472#if ((' ' & 0x0FF) == 0x020)
48473# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48474# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48475#else
48476# define ISLOWER(c) \
48477		   (('a' <= (c) && (c) <= 'i') \
48478		     || ('j' <= (c) && (c) <= 'r') \
48479		     || ('s' <= (c) && (c) <= 'z'))
48480# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48481#endif
48482
48483#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48484int
48485main ()
48486{
48487  int i;
48488  for (i = 0; i < 256; i++)
48489    if (XOR (islower (i), ISLOWER (i))
48490	|| toupper (i) != TOUPPER (i))
48491      return 2;
48492  return 0;
48493}
48494_ACEOF
48495if ac_fn_cxx_try_run "$LINENO"; then :
48496
48497else
48498  ac_cv_header_stdc=no
48499fi
48500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48501  conftest.$ac_objext conftest.beam conftest.$ac_ext
48502fi
48503
48504fi
48505fi
48506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48507$as_echo "$ac_cv_header_stdc" >&6; }
48508if test $ac_cv_header_stdc = yes; then
48509
48510$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48511
48512fi
48513
48514# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48515for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48516		  inttypes.h stdint.h unistd.h
48517do :
48518  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48519ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48520"
48521if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48522  cat >>confdefs.h <<_ACEOF
48523#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48524_ACEOF
48525
48526fi
48527
48528done
48529
48530
48531
48532  ###############################################################################
48533  #
48534  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48535  # (The JVM can use 32 or 64 bit Java pointers but that decision
48536  # is made at runtime.)
48537  #
48538
48539  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48540    # Always specify -m flag on Solaris
48541    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48542
48543  # When we add flags to the "official" CFLAGS etc, we need to
48544  # keep track of these additions in ADDED_CFLAGS etc. These
48545  # will later be checked to make sure only controlled additions
48546  # have been made to CFLAGS etc.
48547  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48548  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48549  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550
48551  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48552  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48553  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48554
48555  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48556  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48557  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48558
48559  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48560  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48561  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48562
48563  elif test "x$COMPILE_TYPE" = xreduced; then
48564    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48565      # Specify -m if running reduced on unix platforms
48566
48567  # When we add flags to the "official" CFLAGS etc, we need to
48568  # keep track of these additions in ADDED_CFLAGS etc. These
48569  # will later be checked to make sure only controlled additions
48570  # have been made to CFLAGS etc.
48571  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48573  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48574
48575  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48576  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48577  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48578
48579  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48580  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48581  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48582
48583  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48584  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48585  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48586
48587    fi
48588  fi
48589  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48590    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48591    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48592    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48593  fi
48594
48595  # Make compilation sanity check
48596  for ac_header in stdio.h
48597do :
48598  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48599if test "x$ac_cv_header_stdio_h" = xyes; then :
48600  cat >>confdefs.h <<_ACEOF
48601#define HAVE_STDIO_H 1
48602_ACEOF
48603
48604else
48605
48606    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48607$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48608    if test "x$COMPILE_TYPE" = xreduced; then
48609
48610  # Print a helpful message on how to acquire the necessary build dependency.
48611  # reduced is the help tag: freetype, cups, alsa etc
48612  MISSING_DEPENDENCY=reduced
48613
48614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48615    cygwin_help $MISSING_DEPENDENCY
48616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48617    msys_help $MISSING_DEPENDENCY
48618  else
48619    PKGHANDLER_COMMAND=
48620
48621    case $PKGHANDLER in
48622      apt-get)
48623        apt_help     $MISSING_DEPENDENCY ;;
48624      yum)
48625        yum_help     $MISSING_DEPENDENCY ;;
48626      port)
48627        port_help    $MISSING_DEPENDENCY ;;
48628      pkgutil)
48629        pkgutil_help $MISSING_DEPENDENCY ;;
48630      pkgadd)
48631        pkgadd_help  $MISSING_DEPENDENCY ;;
48632    esac
48633
48634    if test "x$PKGHANDLER_COMMAND" != x; then
48635      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48636    fi
48637  fi
48638
48639      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48640$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48641    elif test "x$COMPILE_TYPE" = xcross; then
48642      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48643$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48644    fi
48645    as_fn_error $? "Cannot continue." "$LINENO" 5
48646
48647fi
48648
48649done
48650
48651
48652  # The cast to long int works around a bug in the HP C Compiler
48653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48655# This bug is HP SR number 8606223364.
48656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48657$as_echo_n "checking size of int *... " >&6; }
48658if ${ac_cv_sizeof_int_p+:} false; then :
48659  $as_echo_n "(cached) " >&6
48660else
48661  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48662
48663else
48664  if test "$ac_cv_type_int_p" = yes; then
48665     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48667as_fn_error 77 "cannot compute sizeof (int *)
48668See \`config.log' for more details" "$LINENO" 5; }
48669   else
48670     ac_cv_sizeof_int_p=0
48671   fi
48672fi
48673
48674fi
48675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48676$as_echo "$ac_cv_sizeof_int_p" >&6; }
48677
48678
48679
48680cat >>confdefs.h <<_ACEOF
48681#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48682_ACEOF
48683
48684
48685
48686  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48687  if test "x$ac_cv_sizeof_int_p" = x; then
48688    # The test failed, lets stick to the assumed value.
48689    { $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
48690$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48691  else
48692    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48693
48694    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48695      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48696      # Let's try to implicitely set the compilers target architecture and retry the test
48697      { $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
48698$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;}
48699      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48700$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48701
48702  # When we add flags to the "official" CFLAGS etc, we need to
48703  # keep track of these additions in ADDED_CFLAGS etc. These
48704  # will later be checked to make sure only controlled additions
48705  # have been made to CFLAGS etc.
48706  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48707  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48708  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48709
48710  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48711  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48712  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48713
48714  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48715  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48716  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48717
48718  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48719  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48720  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48721
48722
48723      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48724      unset ac_cv_sizeof_int_p
48725      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48726      cat >>confdefs.h <<_ACEOF
48727#undef SIZEOF_INT_P
48728_ACEOF
48729
48730      # The cast to long int works around a bug in the HP C Compiler
48731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48733# This bug is HP SR number 8606223364.
48734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48735$as_echo_n "checking size of int *... " >&6; }
48736if ${ac_cv_sizeof_int_p+:} false; then :
48737  $as_echo_n "(cached) " >&6
48738else
48739  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48740
48741else
48742  if test "$ac_cv_type_int_p" = yes; then
48743     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48745as_fn_error 77 "cannot compute sizeof (int *)
48746See \`config.log' for more details" "$LINENO" 5; }
48747   else
48748     ac_cv_sizeof_int_p=0
48749   fi
48750fi
48751
48752fi
48753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48754$as_echo "$ac_cv_sizeof_int_p" >&6; }
48755
48756
48757
48758cat >>confdefs.h <<_ACEOF
48759#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48760_ACEOF
48761
48762
48763
48764      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48765
48766      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48767        { $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
48768$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;}
48769        if test "x$COMPILE_TYPE" = xreduced; then
48770
48771  # Print a helpful message on how to acquire the necessary build dependency.
48772  # reduced is the help tag: freetype, cups, alsa etc
48773  MISSING_DEPENDENCY=reduced
48774
48775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48776    cygwin_help $MISSING_DEPENDENCY
48777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48778    msys_help $MISSING_DEPENDENCY
48779  else
48780    PKGHANDLER_COMMAND=
48781
48782    case $PKGHANDLER in
48783      apt-get)
48784        apt_help     $MISSING_DEPENDENCY ;;
48785      yum)
48786        yum_help     $MISSING_DEPENDENCY ;;
48787      port)
48788        port_help    $MISSING_DEPENDENCY ;;
48789      pkgutil)
48790        pkgutil_help $MISSING_DEPENDENCY ;;
48791      pkgadd)
48792        pkgadd_help  $MISSING_DEPENDENCY ;;
48793    esac
48794
48795    if test "x$PKGHANDLER_COMMAND" != x; then
48796      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48797    fi
48798  fi
48799
48800          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48801$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48802        elif test "x$COMPILE_TYPE" = xcross; then
48803          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48804$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48805        fi
48806        as_fn_error $? "Cannot continue." "$LINENO" 5
48807      fi
48808    fi
48809  fi
48810
48811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48812$as_echo_n "checking for target address size... " >&6; }
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48814$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48815
48816
48817  ###############################################################################
48818  #
48819  # Is the target little of big endian?
48820  #
48821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48822$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48823if ${ac_cv_c_bigendian+:} false; then :
48824  $as_echo_n "(cached) " >&6
48825else
48826  ac_cv_c_bigendian=unknown
48827    # See if we're dealing with a universal compiler.
48828    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48829/* end confdefs.h.  */
48830#ifndef __APPLE_CC__
48831	       not a universal capable compiler
48832	     #endif
48833	     typedef int dummy;
48834
48835_ACEOF
48836if ac_fn_cxx_try_compile "$LINENO"; then :
48837
48838	# Check for potential -arch flags.  It is not universal unless
48839	# there are at least two -arch flags with different values.
48840	ac_arch=
48841	ac_prev=
48842	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48843	 if test -n "$ac_prev"; then
48844	   case $ac_word in
48845	     i?86 | x86_64 | ppc | ppc64)
48846	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48847		 ac_arch=$ac_word
48848	       else
48849		 ac_cv_c_bigendian=universal
48850		 break
48851	       fi
48852	       ;;
48853	   esac
48854	   ac_prev=
48855	 elif test "x$ac_word" = "x-arch"; then
48856	   ac_prev=arch
48857	 fi
48858       done
48859fi
48860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48861    if test $ac_cv_c_bigendian = unknown; then
48862      # See if sys/param.h defines the BYTE_ORDER macro.
48863      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48864/* end confdefs.h.  */
48865#include <sys/types.h>
48866	     #include <sys/param.h>
48867
48868int
48869main ()
48870{
48871#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48872		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48873		     && LITTLE_ENDIAN)
48874	      bogus endian macros
48875	     #endif
48876
48877  ;
48878  return 0;
48879}
48880_ACEOF
48881if ac_fn_cxx_try_compile "$LINENO"; then :
48882  # It does; now see whether it defined to BIG_ENDIAN or not.
48883	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48884/* end confdefs.h.  */
48885#include <sys/types.h>
48886		#include <sys/param.h>
48887
48888int
48889main ()
48890{
48891#if BYTE_ORDER != BIG_ENDIAN
48892		 not big endian
48893		#endif
48894
48895  ;
48896  return 0;
48897}
48898_ACEOF
48899if ac_fn_cxx_try_compile "$LINENO"; then :
48900  ac_cv_c_bigendian=yes
48901else
48902  ac_cv_c_bigendian=no
48903fi
48904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48905fi
48906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48907    fi
48908    if test $ac_cv_c_bigendian = unknown; then
48909      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48910      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48911/* end confdefs.h.  */
48912#include <limits.h>
48913
48914int
48915main ()
48916{
48917#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48918	      bogus endian macros
48919	     #endif
48920
48921  ;
48922  return 0;
48923}
48924_ACEOF
48925if ac_fn_cxx_try_compile "$LINENO"; then :
48926  # It does; now see whether it defined to _BIG_ENDIAN or not.
48927	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48928/* end confdefs.h.  */
48929#include <limits.h>
48930
48931int
48932main ()
48933{
48934#ifndef _BIG_ENDIAN
48935		 not big endian
48936		#endif
48937
48938  ;
48939  return 0;
48940}
48941_ACEOF
48942if ac_fn_cxx_try_compile "$LINENO"; then :
48943  ac_cv_c_bigendian=yes
48944else
48945  ac_cv_c_bigendian=no
48946fi
48947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948fi
48949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48950    fi
48951    if test $ac_cv_c_bigendian = unknown; then
48952      # Compile a test program.
48953      if test "$cross_compiling" = yes; then :
48954  # Try to guess by grepping values from an object file.
48955	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48956/* end confdefs.h.  */
48957short int ascii_mm[] =
48958		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48959		short int ascii_ii[] =
48960		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48961		int use_ascii (int i) {
48962		  return ascii_mm[i] + ascii_ii[i];
48963		}
48964		short int ebcdic_ii[] =
48965		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48966		short int ebcdic_mm[] =
48967		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48968		int use_ebcdic (int i) {
48969		  return ebcdic_mm[i] + ebcdic_ii[i];
48970		}
48971		extern int foo;
48972
48973int
48974main ()
48975{
48976return use_ascii (foo) == use_ebcdic (foo);
48977  ;
48978  return 0;
48979}
48980_ACEOF
48981if ac_fn_cxx_try_compile "$LINENO"; then :
48982  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48983	      ac_cv_c_bigendian=yes
48984	    fi
48985	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48986	      if test "$ac_cv_c_bigendian" = unknown; then
48987		ac_cv_c_bigendian=no
48988	      else
48989		# finding both strings is unlikely to happen, but who knows?
48990		ac_cv_c_bigendian=unknown
48991	      fi
48992	    fi
48993fi
48994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48995else
48996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48997/* end confdefs.h.  */
48998$ac_includes_default
48999int
49000main ()
49001{
49002
49003	     /* Are we little or big endian?  From Harbison&Steele.  */
49004	     union
49005	     {
49006	       long int l;
49007	       char c[sizeof (long int)];
49008	     } u;
49009	     u.l = 1;
49010	     return u.c[sizeof (long int) - 1] == 1;
49011
49012  ;
49013  return 0;
49014}
49015_ACEOF
49016if ac_fn_cxx_try_run "$LINENO"; then :
49017  ac_cv_c_bigendian=no
49018else
49019  ac_cv_c_bigendian=yes
49020fi
49021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49022  conftest.$ac_objext conftest.beam conftest.$ac_ext
49023fi
49024
49025    fi
49026fi
49027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49028$as_echo "$ac_cv_c_bigendian" >&6; }
49029 case $ac_cv_c_bigendian in #(
49030   yes)
49031     ENDIAN="big";; #(
49032   no)
49033     ENDIAN="little" ;; #(
49034   universal)
49035     ENDIAN="universal_endianness"
49036     ;; #(
49037   *)
49038     ENDIAN="unknown" ;;
49039 esac
49040
49041
49042  if test "x$ENDIAN" = xuniversal_endianness; then
49043    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49044  fi
49045  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49046    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
49047  fi
49048
49049
49050# Configure flags for the tools
49051
49052  ###############################################################################
49053  #
49054  # How to compile shared libraries.
49055  #
49056
49057  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49058    PICFLAG="-fPIC"
49059    C_FLAG_REORDER=''
49060    CXX_FLAG_REORDER=''
49061
49062    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49063      # Linking is different on MacOSX
49064      if test "x$STATIC_BUILD" = xtrue; then
49065        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49066      else
49067        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49068        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49069      fi
49070      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49071      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49072      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49073      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49074    else
49075      # Default works for linux, might work on other platforms as well.
49076      SHARED_LIBRARY_FLAGS='-shared'
49077      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49078      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49079      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49080      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49081    fi
49082  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49083    C_FLAG_REORDER=''
49084    CXX_FLAG_REORDER=''
49085
49086    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49087      # Linking is different on MacOSX
49088      PICFLAG=''
49089      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49090      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49091      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49092      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49093      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49094
49095      if test "x$STATIC_BUILD" = xfalse; then
49096        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49097      fi
49098    else
49099      # Default works for linux, might work on other platforms as well.
49100      PICFLAG='-fPIC'
49101      SHARED_LIBRARY_FLAGS='-shared'
49102      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49103      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49104      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49105
49106      # arm specific settings
49107      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49108        # '-Wl,-z,origin' isn't used on arm.
49109        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49110      else
49111        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49112      fi
49113
49114    fi
49115  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49116    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49117      PICFLAG="-xcode=pic32"
49118    else
49119      PICFLAG="-KPIC"
49120    fi
49121    C_FLAG_REORDER='-xF'
49122    CXX_FLAG_REORDER='-xF'
49123    SHARED_LIBRARY_FLAGS="-G"
49124    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49125    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49126    SET_SHARED_LIBRARY_NAME='-h $1'
49127    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49128  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49129    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49130    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49131    # will have to patch this single instruction with a call to some out-of-order code which
49132    # does the load from the TOC. This is of course slow. But in that case we also would have
49133    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49134    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49135    # can be patched directly by the linker and does not require a jump to out-of-order code.
49136    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49137    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49138    # loads for accessing a global variable). But there are rumors that this may be seen as a
49139    # 'performance feature' because of improved code locality of the symbols used in a
49140    # compilation unit.
49141    PICFLAG="-qpic"
49142    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49143    C_FLAG_REORDER=''
49144    CXX_FLAG_REORDER=''
49145    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49146    SET_EXECUTABLE_ORIGIN=""
49147    SET_SHARED_LIBRARY_ORIGIN=''
49148    SET_SHARED_LIBRARY_NAME=''
49149    SET_SHARED_LIBRARY_MAPFILE=''
49150  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49151    PICFLAG=""
49152    C_FLAG_REORDER=''
49153    CXX_FLAG_REORDER=''
49154    SHARED_LIBRARY_FLAGS="-dll"
49155    SET_EXECUTABLE_ORIGIN=''
49156    SET_SHARED_LIBRARY_ORIGIN=''
49157    SET_SHARED_LIBRARY_NAME=''
49158    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49159  fi
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169  # The (cross) compiler is now configured, we can now test capabilities
49170  # of the target platform.
49171
49172
49173
49174  ###############################################################################
49175  #
49176  # Setup the opt flags for different compilers
49177  # and different operating systems.
49178  #
49179
49180  # FIXME: this was indirectly the old default, but just inherited.
49181  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49182  #   C_FLAG_DEPS="-MMD -MF"
49183  # fi
49184
49185  # Generate make dependency files
49186  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49187    C_FLAG_DEPS="-MMD -MF"
49188  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49189    C_FLAG_DEPS="-MMD -MF"
49190  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49191    C_FLAG_DEPS="-xMMD -xMF"
49192  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49193    C_FLAG_DEPS="-qmakedep=gcc -MF"
49194  fi
49195  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49196
49197
49198
49199  # Debug symbols
49200  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49201    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49202      # reduce from default "-g2" option to save space
49203      CFLAGS_DEBUG_SYMBOLS="-g1"
49204      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49205    else
49206      CFLAGS_DEBUG_SYMBOLS="-g"
49207      CXXFLAGS_DEBUG_SYMBOLS="-g"
49208    fi
49209  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49210    CFLAGS_DEBUG_SYMBOLS="-g"
49211    CXXFLAGS_DEBUG_SYMBOLS="-g"
49212  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49213    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49214    # -g0 enables debug symbols without disabling inlining.
49215    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49216  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49217    CFLAGS_DEBUG_SYMBOLS="-g"
49218    CXXFLAGS_DEBUG_SYMBOLS="-g"
49219  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49220    CFLAGS_DEBUG_SYMBOLS="-Zi"
49221    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49222  fi
49223
49224
49225
49226  # Debug symbols for JVM_CFLAGS
49227  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49228    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49229    if test "x$DEBUG_LEVEL" = xslowdebug; then
49230      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49231    else
49232      # -g0 does not disable inlining, which -g does.
49233      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49234    fi
49235  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49236    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49237  else
49238    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49239  fi
49240
49241
49242  # bounds, memory and behavior checking options
49243  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49244    case $DEBUG_LEVEL in
49245    release )
49246      # no adjustment
49247      ;;
49248    fastdebug )
49249      # no adjustment
49250      ;;
49251    slowdebug )
49252      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49253      # get's added conditionally on whether we produce debug symbols or not.
49254      # This is most likely not really correct.
49255
49256      # Add runtime stack smashing and undefined behavior checks.
49257      # Not all versions of gcc support -fstack-protector
49258      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301    # Execute function body
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350    # Execute function body
49351
49352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49353$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49354  supports=yes
49355
49356  saved_cflags="$CFLAGS"
49357  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49358  ac_ext=c
49359ac_cpp='$CPP $CPPFLAGS'
49360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49362ac_compiler_gnu=$ac_cv_c_compiler_gnu
49363
49364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49365/* end confdefs.h.  */
49366int i;
49367_ACEOF
49368if ac_fn_c_try_compile "$LINENO"; then :
49369
49370else
49371  supports=no
49372fi
49373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49374  ac_ext=cpp
49375ac_cpp='$CXXCPP $CPPFLAGS'
49376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49379
49380  CFLAGS="$saved_cflags"
49381
49382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49383$as_echo "$supports" >&6; }
49384  if test "x$supports" = "xyes" ; then
49385    :
49386    C_COMP_SUPPORTS="yes"
49387  else
49388    :
49389    C_COMP_SUPPORTS="no"
49390  fi
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450    # Execute function body
49451
49452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49453$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49454  supports=yes
49455
49456  saved_cxxflags="$CXXFLAGS"
49457  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49458  ac_ext=cpp
49459ac_cpp='$CXXCPP $CPPFLAGS'
49460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49463
49464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49465/* end confdefs.h.  */
49466int i;
49467_ACEOF
49468if ac_fn_cxx_try_compile "$LINENO"; then :
49469
49470else
49471  supports=no
49472fi
49473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49474  ac_ext=cpp
49475ac_cpp='$CXXCPP $CPPFLAGS'
49476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49479
49480  CXXFLAGS="$saved_cxxflags"
49481
49482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49483$as_echo "$supports" >&6; }
49484  if test "x$supports" = "xyes" ; then
49485    :
49486    CXX_COMP_SUPPORTS="yes"
49487  else
49488    :
49489    CXX_COMP_SUPPORTS="no"
49490  fi
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49505$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49506  supports=no
49507  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49508
49509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49510$as_echo "$supports" >&6; }
49511  if test "x$supports" = "xyes" ; then
49512    :
49513
49514  else
49515    :
49516    STACK_PROTECTOR_CFLAG=""
49517  fi
49518
49519
49520
49521
49522
49523
49524
49525      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49526      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49527      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49528        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49529      fi
49530      ;;
49531    esac
49532  fi
49533
49534  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49535    if test "x$DEBUG_LEVEL" != xrelease; then
49536      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49537        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49538      fi
49539    fi
49540  fi
49541
49542  # Optimization levels
49543  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49544    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49545
49546    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49547      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49548      C_O_FLAG_HIGHEST_JVM="-xO4"
49549      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49550      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49551      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49552      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49553      C_O_FLAG_DEBUG_JVM=""
49554      C_O_FLAG_NONE="-xregs=no%frameptr"
49555      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49556      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49557      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49558      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49559      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49560      CXX_O_FLAG_DEBUG_JVM=""
49561      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49562      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49563        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49564        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49565      fi
49566    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49567      C_O_FLAG_HIGHEST_JVM="-xO4"
49568      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49569      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49570      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49571      C_O_FLAG_DEBUG=""
49572      C_O_FLAG_DEBUG_JVM=""
49573      C_O_FLAG_NONE=""
49574      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49575      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49576      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49577      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49578      CXX_O_FLAG_DEBUG=""
49579      CXX_O_FLAG_DEBUG_JVM=""
49580      CXX_O_FLAG_NONE=""
49581    fi
49582  else
49583    # The remaining toolchains share opt flags between CC and CXX;
49584    # setup for C and duplicate afterwards.
49585    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49586      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49587        # On MacOSX we optimize for size, something
49588        # we should do for all platforms?
49589        C_O_FLAG_HIGHEST_JVM="-Os"
49590        C_O_FLAG_HIGHEST="-Os"
49591        C_O_FLAG_HI="-Os"
49592        C_O_FLAG_NORM="-Os"
49593        C_O_FLAG_SIZE="-Os"
49594      else
49595        C_O_FLAG_HIGHEST_JVM="-O3"
49596        C_O_FLAG_HIGHEST="-O3"
49597        C_O_FLAG_HI="-O3"
49598        C_O_FLAG_NORM="-O2"
49599        C_O_FLAG_SIZE="-Os"
49600      fi
49601      C_O_FLAG_DEBUG="-O0"
49602      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49603        C_O_FLAG_DEBUG_JVM=""
49604      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49605        C_O_FLAG_DEBUG_JVM="-O0"
49606      fi
49607      C_O_FLAG_NONE="-O0"
49608    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49609      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49610        # On MacOSX we optimize for size, something
49611        # we should do for all platforms?
49612        C_O_FLAG_HIGHEST_JVM="-Os"
49613        C_O_FLAG_HIGHEST="-Os"
49614        C_O_FLAG_HI="-Os"
49615        C_O_FLAG_NORM="-Os"
49616        C_O_FLAG_SIZE="-Os"
49617      else
49618        C_O_FLAG_HIGHEST_JVM="-O3"
49619        C_O_FLAG_HIGHEST="-O3"
49620        C_O_FLAG_HI="-O3"
49621        C_O_FLAG_NORM="-O2"
49622        C_O_FLAG_SIZE="-Os"
49623      fi
49624      C_O_FLAG_DEBUG="-O0"
49625      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49626        C_O_FLAG_DEBUG_JVM=""
49627      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49628        C_O_FLAG_DEBUG_JVM="-O0"
49629      fi
49630      C_O_FLAG_NONE="-O0"
49631    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49632      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49633      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49634      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49635      C_O_FLAG_NORM="-O2"
49636      C_O_FLAG_DEBUG="-qnoopt"
49637      # FIXME: Value below not verified.
49638      C_O_FLAG_DEBUG_JVM=""
49639      C_O_FLAG_NONE="-qnoopt"
49640    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49641      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49642      C_O_FLAG_HIGHEST="-O2"
49643      C_O_FLAG_HI="-O1"
49644      C_O_FLAG_NORM="-O1"
49645      C_O_FLAG_DEBUG="-Od"
49646      C_O_FLAG_DEBUG_JVM=""
49647      C_O_FLAG_NONE="-Od"
49648      C_O_FLAG_SIZE="-Os"
49649    fi
49650    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49651    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49652    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49653    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49654    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49655    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49656    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49657    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49658  fi
49659
49660  # Adjust optimization flags according to debug level.
49661  case $DEBUG_LEVEL in
49662    release )
49663      # no adjustment
49664      ;;
49665    fastdebug )
49666      # Not quite so much optimization
49667      C_O_FLAG_HI="$C_O_FLAG_NORM"
49668      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49669      ;;
49670    slowdebug )
49671      # Disable optimization
49672      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49673      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49674      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49675      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49676      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49677      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49678      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49679      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49680      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49681      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49682      ;;
49683  esac
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704# Check whether --with-abi-profile was given.
49705if test "${with_abi_profile+set}" = set; then :
49706  withval=$with_abi_profile;
49707fi
49708
49709
49710  if test "x$with_abi_profile" != x; then
49711    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49712        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49713      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49714    fi
49715
49716    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49718$as_echo_n "checking for ABI profle... " >&6; }
49719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49720$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49721
49722    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49723      ARM_FLOAT_TYPE=vfp-sflt
49724      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49725    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49726      ARM_FLOAT_TYPE=vfp-hflt
49727      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49728    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49729      ARM_FLOAT_TYPE=sflt
49730      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49731    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49732      ARM_FLOAT_TYPE=vfp-sflt
49733      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49734    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49735      ARM_FLOAT_TYPE=vfp-hflt
49736      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49737    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49738      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49739      ARM_FLOAT_TYPE=
49740      ARM_ARCH_TYPE_FLAGS=
49741    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49742      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49743      ARM_FLOAT_TYPE=
49744      ARM_ARCH_TYPE_FLAGS=
49745    else
49746      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49747    fi
49748
49749    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49750      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49751    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49752      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49753    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49754      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49755    fi
49756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49757$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49759$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49760
49761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49762$as_echo_n "checking for arch type flags... " >&6; }
49763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49764$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49765
49766    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49767    # autoconf target triplet.
49768     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49769    # Sanity check that it is a known ABI.
49770    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49771        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49772        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49773          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49774$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49775    fi
49776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49777$as_echo_n "checking for ABI property name... " >&6; }
49778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49779$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49780
49781
49782    # Pass these on to the open part of configure as if they were set using
49783    # --with-extra-c[xx]flags.
49784    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49785    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49786    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49787    # FIXME: This should not really be set using extra_cflags.
49788    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49789        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49790        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49791    fi
49792    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49793    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49794    # And pass the architecture flags to the linker as well
49795    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49796  fi
49797
49798  # When building with an abi profile, the name of that profile is appended on the
49799  # bundle platform, which is used in bundle names.
49800  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49801    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49802  fi
49803
49804
49805  # Special extras...
49806  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49807    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49808      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49809      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49810    fi
49811    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49812    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49813  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49814    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49815    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49816  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49817    CXXSTD_CXXFLAG="-std=gnu++98"
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860    # Execute function body
49861
49862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49863$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49864  supports=yes
49865
49866  saved_cxxflags="$CXXFLAGS"
49867  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49868  ac_ext=cpp
49869ac_cpp='$CXXCPP $CPPFLAGS'
49870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49873
49874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49875/* end confdefs.h.  */
49876int i;
49877_ACEOF
49878if ac_fn_cxx_try_compile "$LINENO"; then :
49879
49880else
49881  supports=no
49882fi
49883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49884  ac_ext=cpp
49885ac_cpp='$CXXCPP $CPPFLAGS'
49886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49889
49890  CXXFLAGS="$saved_cxxflags"
49891
49892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49893$as_echo "$supports" >&6; }
49894  if test "x$supports" = "xyes" ; then
49895    :
49896
49897  else
49898    :
49899    CXXSTD_CXXFLAG=""
49900  fi
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49914    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49915
49916  fi
49917  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49918    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49919    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49920  fi
49921
49922  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49923    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49924    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49925  fi
49926
49927  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49928  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49929  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49930
49931  ###############################################################################
49932  #
49933  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49934  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49935  #
49936
49937  # Setup compiler/platform specific flags into
49938  #    CFLAGS_JDK    - C Compiler flags
49939  #    CXXFLAGS_JDK  - C++ Compiler flags
49940  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49941  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49942    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49943    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49944    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49945    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49946      # Force compatibility with i586 on 32 bit intel platforms.
49947      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49948      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49949    fi
49950    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49951        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49952    case $OPENJDK_TARGET_CPU_ARCH in
49953      arm )
49954        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49955        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49956        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49957        ;;
49958      ppc )
49959        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49960        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49961        ;;
49962      s390 )
49963        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49964        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49965        ;;
49966      * )
49967        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49968        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49969        ;;
49970    esac
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025    # Execute function body
50026
50027  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50028  REFERENCE_VERSION=6
50029
50030  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50031    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50032  fi
50033
50034  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50035    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50036  fi
50037
50038  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50039  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50040
50041  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50042    :
50043
50044  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50045  # runs afoul of the more aggressive versions of these optimisations.
50046  # Notably, value range propagation now assumes that the this pointer of C++
50047  # member functions is non-null.
50048  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50049        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50050        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50051$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50052  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50053  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50054
50055  else
50056    :
50057
50058  fi
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50074    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50075
50076    # Restrict the debug information created by Clang to avoid
50077    # too big object files and speed the build up a little bit
50078    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50079    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50080    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50081      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50082        # Force compatibility with i586 on 32 bit intel platforms.
50083        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50084        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50085      fi
50086      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50087      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50088          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50089      case $OPENJDK_TARGET_CPU_ARCH in
50090        ppc )
50091          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50092          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50093          ;;
50094        * )
50095          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50096          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50097          ;;
50098      esac
50099    fi
50100  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50101    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50102    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50103    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50104      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50105    fi
50106
50107    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50108    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50109  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50110    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50111    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50112    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50113  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50114    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50115        -MD -Zc:wchar_t- -W3 -wd4800 \
50116        -DWIN32_LEAN_AND_MEAN \
50117        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50118        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50119        -DWIN32 -DIAL"
50120    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50121      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50122    else
50123      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50124    fi
50125    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50126    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50127    # studio.
50128    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50129      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50130      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50131      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50132    fi
50133  fi
50134
50135  ###############################################################################
50136
50137  # Adjust flags according to debug level.
50138  case $DEBUG_LEVEL in
50139    fastdebug | slowdebug )
50140      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50141      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50142      ;;
50143    release )
50144      ;;
50145    * )
50146      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50147      ;;
50148  esac
50149
50150  # Set some common defines. These works for all compilers, but assume
50151  # -D is universally accepted.
50152
50153  # Setup endianness
50154  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50155    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50156    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50157    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50158    #   Note: -Dmacro         is the same as    #define macro 1
50159    #         -Dmacro=        is the same as    #define macro
50160    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50161      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50162    else
50163      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50164    fi
50165  else
50166    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50167    # are defined in the system?
50168    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50169      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50170    else
50171      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50172    fi
50173  fi
50174
50175  # Setup target OS define. Use OS target name but in upper case.
50176  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50177  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50178
50179  # Setup target CPU
50180  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50181      $OPENJDK_TARGET_ADD_LP64 \
50182      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50183
50184  # Setup debug/release defines
50185  if test "x$DEBUG_LEVEL" = xrelease; then
50186    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50187    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50188      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50189    fi
50190  else
50191    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50192  fi
50193
50194  # Set some additional per-OS defines.
50195  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50196    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50197    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50198        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50199  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50200    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50201    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50202        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50203  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50204    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50205    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50206    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50207    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50208        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50209        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50210        -fno-omit-frame-pointer"
50211  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50212    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50213    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50214    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50215        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50216        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50217  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50218    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50219  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50220    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50221    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50222  fi
50223
50224  # Set some additional per-CPU defines.
50225  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50226    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50227  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50228    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50229  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50230    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50231      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50232      # fixes `relocation truncated to fit' error for gcc 4.1.
50233      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50234      # Use ppc64 instructions, but schedule for power5
50235      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50236    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50237      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50238    fi
50239  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50240    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50241      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50242      # Little endian machine uses ELFv2 ABI.
50243      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50244      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50245      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50246    fi
50247  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50248    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50249      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50250    fi
50251  fi
50252
50253  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50254    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50255  fi
50256
50257  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50258    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50259      # Solaris does not have _LP64=1 in the old build.
50260      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50261      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50262    fi
50263  fi
50264
50265  # Set JVM_CFLAGS warning handling
50266  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50267    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50268        -Wunused-value -Woverloaded-virtual"
50269
50270    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325    # Execute function body
50326
50327  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50328  REFERENCE_VERSION=4.8
50329
50330  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50331    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50332  fi
50333
50334  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50335    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50336  fi
50337
50338  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50339  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50340
50341  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50342    :
50343
50344            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50345            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50346
50347
50348  else
50349    :
50350
50351  fi
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366    fi
50367    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50368      # Non-zero builds have stricter warnings
50369      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50370    else
50371      if test "x$TOOLCHAIN_TYPE" = xclang; then
50372        # Some versions of llvm do not like -Wundef
50373        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50374      fi
50375    fi
50376  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50377    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50378        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50379  fi
50380
50381  # Additional macosx handling
50382  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50383    # Setting these parameters makes it an error to link to macosx APIs that are
50384    # newer than the given OS version and makes the linked binaries compatible
50385    # even if built on a newer version of the OS.
50386    # The expected format is X.Y.Z
50387    MACOSX_VERSION_MIN=10.7.0
50388
50389
50390    # The macro takes the version with no dots, ex: 1070
50391    # Let the flags variables get resolved in make for easier override on make
50392    # command line.
50393    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50394    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50395  fi
50396
50397  # Setup some hard coded includes
50398  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50399      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50400      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50401      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50402      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50403      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50404      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50405
50406  # The shared libraries are compiled using the picflag.
50407  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50408      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50409  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50410      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50411
50412  # Executable flags
50413  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50414  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50415
50416
50417
50418
50419
50420
50421  # Setup LDFLAGS et al.
50422  #
50423
50424  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50425    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50426    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50427    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50428    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50429      LDFLAGS_SAFESH="-safeseh"
50430      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50431      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50432      # NOTE: Old build added -machine. Probably not needed.
50433      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50434    else
50435      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50436    fi
50437  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50438      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50439      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50440        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50441        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50442    fi
50443  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50444    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50445    # We have previously set HAS_GNU_HASH if this is the case
50446    if test -n "$HAS_GNU_HASH"; then
50447      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50448      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50449      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50450    fi
50451      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50452        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50453    fi
50454    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50455      # And since we now know that the linker is gnu, then add -z defs, to forbid
50456      # undefined symbols in object files.
50457      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50458      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50459      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50460      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50461      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50462      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50463        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50464      fi
50465      case $DEBUG_LEVEL in
50466        release )
50467          # tell linker to optimize libraries.
50468          # Should this be supplied to the OSS linker as well?
50469          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50470          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50471          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50472          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50473            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50474          fi
50475          ;;
50476        slowdebug )
50477          # Hotspot always let the linker optimize
50478          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50479          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50480            # do relocations at load
50481            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50482            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50483            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50484          fi
50485          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50486            # mark relocations read only
50487            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50488            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50489            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50490          fi
50491          ;;
50492        fastdebug )
50493          # Hotspot always let the linker optimize
50494          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50495          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50496            # mark relocations read only
50497            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50498            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50499            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50500          fi
50501          ;;
50502        * )
50503          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50504          ;;
50505        esac
50506    fi
50507  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50508    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50509    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50510    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50511    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50512    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50513    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50514      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50515    fi
50516  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50517    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50518    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50519    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50520  fi
50521
50522  # Customize LDFLAGS for executables
50523
50524  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50525
50526  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50527    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50528      LDFLAGS_STACK_SIZE=1048576
50529    else
50530      LDFLAGS_STACK_SIZE=327680
50531    fi
50532    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50533  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50534    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50535  fi
50536
50537  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50538
50539  # Customize LDFLAGS for libs
50540  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50541
50542  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50543  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50544    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50545        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50546    JDKLIB_LIBS=""
50547  else
50548    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50549        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50550
50551    if test "xTARGET" = "xTARGET"; then
50552      # On some platforms (mac) the linker warns about non existing -L dirs.
50553      # For any of the variants server, client or minimal, the dir matches the
50554      # variant name. The "main" variant should be used for linking. For the
50555      # rest, the dir is just server.
50556      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50557          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50558        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50559            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50560      else
50561        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50562            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50563      fi
50564    elif test "xTARGET" = "xBUILD"; then
50565      # When building a buildjdk, it's always only the server variant
50566      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50567          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50568    fi
50569
50570    JDKLIB_LIBS="-ljava -ljvm"
50571    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50572      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50573    fi
50574
50575  fi
50576
50577LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50578
50579  # Set JVM_LIBS (per os)
50580  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50581    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50582  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50583    # FIXME: This hard-coded path is not really proper.
50584    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50585      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50586    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50587      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50588    fi
50589    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50590        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50591  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50592    JVM_LIBS="$JVM_LIBS -lm"
50593  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50594    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50595  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50596    JVM_LIBS="$JVM_LIBS -lm"
50597  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50598    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50599        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50600        wsock32.lib winmm.lib version.lib psapi.lib"
50601    fi
50602
50603  # Set JVM_ASFLAGS
50604  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50605    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50606      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50607    fi
50608  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50609    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50610  fi
50611
50612  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628  # Special extras...
50629  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50630    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50631      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50632      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50633    fi
50634    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50635    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50636  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50637    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50638    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50639  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50640    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683    # Execute function body
50684
50685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50686$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50687  supports=yes
50688
50689  saved_cxxflags="$CXXFLAGS"
50690  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50691  ac_ext=cpp
50692ac_cpp='$CXXCPP $CPPFLAGS'
50693ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50694ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50695ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50696
50697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50698/* end confdefs.h.  */
50699int i;
50700_ACEOF
50701if ac_fn_cxx_try_compile "$LINENO"; then :
50702
50703else
50704  supports=no
50705fi
50706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50707  ac_ext=cpp
50708ac_cpp='$CXXCPP $CPPFLAGS'
50709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50712
50713  CXXFLAGS="$saved_cxxflags"
50714
50715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50716$as_echo "$supports" >&6; }
50717  if test "x$supports" = "xyes" ; then
50718    :
50719
50720  else
50721    :
50722    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50723  fi
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50737    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50738
50739  fi
50740  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50741    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50742    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50743  fi
50744
50745  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50746    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50747    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50748  fi
50749
50750  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50751  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50752  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50753
50754  ###############################################################################
50755  #
50756  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50757  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50758  #
50759
50760  # Setup compiler/platform specific flags into
50761  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50762  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50763  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50764  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50765    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50766    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50767    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50768    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50769      # Force compatibility with i586 on 32 bit intel platforms.
50770      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50771      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50772    fi
50773    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50774        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50775    case $OPENJDK_BUILD_CPU_ARCH in
50776      arm )
50777        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50778        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50779        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50780        ;;
50781      ppc )
50782        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50783        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50784        ;;
50785      s390 )
50786        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50787        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50788        ;;
50789      * )
50790        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50791        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50792        ;;
50793    esac
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848    # Execute function body
50849
50850  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50851  REFERENCE_VERSION=6
50852
50853  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50854    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50855  fi
50856
50857  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50858    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50859  fi
50860
50861  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50862  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50863
50864  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50865    :
50866
50867  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50868  # runs afoul of the more aggressive versions of these optimisations.
50869  # Notably, value range propagation now assumes that the this pointer of C++
50870  # member functions is non-null.
50871  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50872        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50873        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50874$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50875  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50876  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50877
50878  else
50879    :
50880
50881  fi
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50897    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50898
50899    # Restrict the debug information created by Clang to avoid
50900    # too big object files and speed the build up a little bit
50901    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50902    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50903    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50904      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50905        # Force compatibility with i586 on 32 bit intel platforms.
50906        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50907        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50908      fi
50909      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50910      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50911          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50912      case $OPENJDK_BUILD_CPU_ARCH in
50913        ppc )
50914          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50915          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50916          ;;
50917        * )
50918          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50919          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50920          ;;
50921      esac
50922    fi
50923  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50924    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50925    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50926    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50927      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50928    fi
50929
50930    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50931    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50932  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50933    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50934    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50935    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50936  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50937    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50938        -MD -Zc:wchar_t- -W3 -wd4800 \
50939        -DWIN32_LEAN_AND_MEAN \
50940        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50941        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50942        -DWIN32 -DIAL"
50943    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50944      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50945    else
50946      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50947    fi
50948    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50949    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50950    # studio.
50951    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50952      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50953      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50954      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50955    fi
50956  fi
50957
50958  ###############################################################################
50959
50960  # Adjust flags according to debug level.
50961  case $DEBUG_LEVEL in
50962    fastdebug | slowdebug )
50963      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50964      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50965      ;;
50966    release )
50967      ;;
50968    * )
50969      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50970      ;;
50971  esac
50972
50973  # Set some common defines. These works for all compilers, but assume
50974  # -D is universally accepted.
50975
50976  # Setup endianness
50977  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50978    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50979    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50980    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50981    #   Note: -Dmacro         is the same as    #define macro 1
50982    #         -Dmacro=        is the same as    #define macro
50983    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50984      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50985    else
50986      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50987    fi
50988  else
50989    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50990    # are defined in the system?
50991    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50992      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50993    else
50994      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50995    fi
50996  fi
50997
50998  # Setup target OS define. Use OS target name but in upper case.
50999  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51000  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51001
51002  # Setup target CPU
51003  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51004      $OPENJDK_BUILD_ADD_LP64 \
51005      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51006
51007  # Setup debug/release defines
51008  if test "x$DEBUG_LEVEL" = xrelease; then
51009    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51010    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51011      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51012    fi
51013  else
51014    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51015  fi
51016
51017  # Set some additional per-OS defines.
51018  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51019    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51020    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51021        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51022  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51023    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51024    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51025        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51026  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51027    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51028    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51029    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51030    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51031        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51032        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51033        -fno-omit-frame-pointer"
51034  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51035    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51036    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51037    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51038        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51039        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51040  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51041    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51042  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51043    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51044    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51045  fi
51046
51047  # Set some additional per-CPU defines.
51048  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51049    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51050  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51051    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51052  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51053    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51054      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51055      # fixes `relocation truncated to fit' error for gcc 4.1.
51056      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51057      # Use ppc64 instructions, but schedule for power5
51058      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51059    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51060      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51061    fi
51062  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51063    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51064      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51065      # Little endian machine uses ELFv2 ABI.
51066      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51067      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51068      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51069    fi
51070  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51071    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51072      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51073    fi
51074  fi
51075
51076  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51077    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51078  fi
51079
51080  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51081    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51082      # Solaris does not have _LP64=1 in the old build.
51083      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51084      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51085    fi
51086  fi
51087
51088  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51089  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51090    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51091        -Wunused-value -Woverloaded-virtual"
51092
51093    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148    # Execute function body
51149
51150  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51151  REFERENCE_VERSION=4.8
51152
51153  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51154    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51155  fi
51156
51157  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51158    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51159  fi
51160
51161  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51162  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51163
51164  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51165    :
51166
51167            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51168            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51169
51170
51171  else
51172    :
51173
51174  fi
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189    fi
51190    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51191      # Non-zero builds have stricter warnings
51192      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51193    else
51194      if test "x$TOOLCHAIN_TYPE" = xclang; then
51195        # Some versions of llvm do not like -Wundef
51196        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51197      fi
51198    fi
51199  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51200    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51201        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51202  fi
51203
51204  # Additional macosx handling
51205  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51206    # Setting these parameters makes it an error to link to macosx APIs that are
51207    # newer than the given OS version and makes the linked binaries compatible
51208    # even if built on a newer version of the OS.
51209    # The expected format is X.Y.Z
51210    MACOSX_VERSION_MIN=10.7.0
51211
51212
51213    # The macro takes the version with no dots, ex: 1070
51214    # Let the flags variables get resolved in make for easier override on make
51215    # command line.
51216    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)"
51217    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51218  fi
51219
51220  # Setup some hard coded includes
51221  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51222      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51223      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51224      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51225      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51226      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51227      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51228
51229  # The shared libraries are compiled using the picflag.
51230  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51231      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51232  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51233      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51234
51235  # Executable flags
51236  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51237  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51238
51239
51240
51241
51242
51243
51244  # Setup LDFLAGS et al.
51245  #
51246
51247  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51248    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51249    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51250    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51251    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51252      LDFLAGS_SAFESH="-safeseh"
51253      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51254      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51255      # NOTE: Old build added -machine. Probably not needed.
51256      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51257    else
51258      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51259    fi
51260  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51261      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51262      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51263        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51264        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51265    fi
51266  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51267    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51268    # We have previously set HAS_GNU_HASH if this is the case
51269    if test -n "$HAS_GNU_HASH"; then
51270      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51271      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51272      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51273    fi
51274      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51275        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51276    fi
51277    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51278      # And since we now know that the linker is gnu, then add -z defs, to forbid
51279      # undefined symbols in object files.
51280      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51281      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51282      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51283      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51284      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51285      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51286        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51287      fi
51288      case $DEBUG_LEVEL in
51289        release )
51290          # tell linker to optimize libraries.
51291          # Should this be supplied to the OSS linker as well?
51292          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51293          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51294          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51295          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51296            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51297          fi
51298          ;;
51299        slowdebug )
51300          # Hotspot always let the linker optimize
51301          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51302          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51303            # do relocations at load
51304            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51305            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51306            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51307          fi
51308          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51309            # mark relocations read only
51310            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51311            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51312            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51313          fi
51314          ;;
51315        fastdebug )
51316          # Hotspot always let the linker optimize
51317          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51318          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51319            # mark relocations read only
51320            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51321            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51322            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51323          fi
51324          ;;
51325        * )
51326          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51327          ;;
51328        esac
51329    fi
51330  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51331    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51332    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51333    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51334    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51335    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51336    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51337      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51338    fi
51339  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51340    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51341    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51342    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51343  fi
51344
51345  # Customize LDFLAGS for executables
51346
51347  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51348
51349  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51350    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51351      LDFLAGS_STACK_SIZE=1048576
51352    else
51353      LDFLAGS_STACK_SIZE=327680
51354    fi
51355    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51356  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51357    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51358  fi
51359
51360  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51361
51362  # Customize LDFLAGS for libs
51363  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51364
51365  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51366  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51367    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51368        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51369    OPENJDK_BUILD_JDKLIB_LIBS=""
51370  else
51371    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51372        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51373
51374    if test "xBUILD" = "xTARGET"; then
51375      # On some platforms (mac) the linker warns about non existing -L dirs.
51376      # For any of the variants server, client or minimal, the dir matches the
51377      # variant name. The "main" variant should be used for linking. For the
51378      # rest, the dir is just server.
51379      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51380          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51381        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51382            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51383      else
51384        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51385            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51386      fi
51387    elif test "xBUILD" = "xBUILD"; then
51388      # When building a buildjdk, it's always only the server variant
51389      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51390          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51391    fi
51392
51393    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51394    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51395      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51396    fi
51397
51398  fi
51399
51400OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51401
51402  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51403  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51404    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51405  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51406    # FIXME: This hard-coded path is not really proper.
51407    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51408      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51409    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51410      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51411    fi
51412    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51413        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51414  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51415    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51416  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51417    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51418  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51419    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51420  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51421    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51422        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51423        wsock32.lib winmm.lib version.lib psapi.lib"
51424    fi
51425
51426  # Set OPENJDK_BUILD_JVM_ASFLAGS
51427  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51428    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51429      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51430    fi
51431  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51432    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51433  fi
51434
51435  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451  # Tests are only ever compiled for TARGET
51452  # Flags for compiling test libraries
51453  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51454  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51455
51456  # Flags for compiling test executables
51457  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51458  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51459
51460
51461
51462
51463
51464
51465  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51466  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51467
51468
51469
51470
51471
51472
51473  # Some Zero and Shark settings.
51474  # ZERO_ARCHFLAG tells the compiler which mode to build for
51475  case "${OPENJDK_TARGET_CPU}" in
51476    s390)
51477      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51478      ;;
51479    *)
51480      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51481  esac
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524    # Execute function body
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573    # Execute function body
51574
51575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51576$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51577  supports=yes
51578
51579  saved_cflags="$CFLAGS"
51580  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51581  ac_ext=c
51582ac_cpp='$CPP $CPPFLAGS'
51583ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51584ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51585ac_compiler_gnu=$ac_cv_c_compiler_gnu
51586
51587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51588/* end confdefs.h.  */
51589int i;
51590_ACEOF
51591if ac_fn_c_try_compile "$LINENO"; then :
51592
51593else
51594  supports=no
51595fi
51596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51597  ac_ext=cpp
51598ac_cpp='$CXXCPP $CPPFLAGS'
51599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51602
51603  CFLAGS="$saved_cflags"
51604
51605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51606$as_echo "$supports" >&6; }
51607  if test "x$supports" = "xyes" ; then
51608    :
51609    C_COMP_SUPPORTS="yes"
51610  else
51611    :
51612    C_COMP_SUPPORTS="no"
51613  fi
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673    # Execute function body
51674
51675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51676$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51677  supports=yes
51678
51679  saved_cxxflags="$CXXFLAGS"
51680  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51681  ac_ext=cpp
51682ac_cpp='$CXXCPP $CPPFLAGS'
51683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51686
51687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51688/* end confdefs.h.  */
51689int i;
51690_ACEOF
51691if ac_fn_cxx_try_compile "$LINENO"; then :
51692
51693else
51694  supports=no
51695fi
51696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51697  ac_ext=cpp
51698ac_cpp='$CXXCPP $CPPFLAGS'
51699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51702
51703  CXXFLAGS="$saved_cxxflags"
51704
51705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51706$as_echo "$supports" >&6; }
51707  if test "x$supports" = "xyes" ; then
51708    :
51709    CXX_COMP_SUPPORTS="yes"
51710  else
51711    :
51712    CXX_COMP_SUPPORTS="no"
51713  fi
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51728$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51729  supports=no
51730  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51731
51732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51733$as_echo "$supports" >&6; }
51734  if test "x$supports" = "xyes" ; then
51735    :
51736
51737  else
51738    :
51739    ZERO_ARCHFLAG=""
51740  fi
51741
51742
51743
51744
51745
51746
51747
51748
51749  # Check that the compiler supports -mX (or -qX on AIX) flags
51750  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798    # Execute function body
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847    # Execute function body
51848
51849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51850$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51851  supports=yes
51852
51853  saved_cflags="$CFLAGS"
51854  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51855  ac_ext=c
51856ac_cpp='$CPP $CPPFLAGS'
51857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51859ac_compiler_gnu=$ac_cv_c_compiler_gnu
51860
51861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51862/* end confdefs.h.  */
51863int i;
51864_ACEOF
51865if ac_fn_c_try_compile "$LINENO"; then :
51866
51867else
51868  supports=no
51869fi
51870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51871  ac_ext=cpp
51872ac_cpp='$CXXCPP $CPPFLAGS'
51873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51876
51877  CFLAGS="$saved_cflags"
51878
51879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51880$as_echo "$supports" >&6; }
51881  if test "x$supports" = "xyes" ; then
51882    :
51883    C_COMP_SUPPORTS="yes"
51884  else
51885    :
51886    C_COMP_SUPPORTS="no"
51887  fi
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947    # Execute function body
51948
51949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51950$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51951  supports=yes
51952
51953  saved_cxxflags="$CXXFLAGS"
51954  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51955  ac_ext=cpp
51956ac_cpp='$CXXCPP $CPPFLAGS'
51957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51960
51961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51962/* end confdefs.h.  */
51963int i;
51964_ACEOF
51965if ac_fn_cxx_try_compile "$LINENO"; then :
51966
51967else
51968  supports=no
51969fi
51970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51971  ac_ext=cpp
51972ac_cpp='$CXXCPP $CPPFLAGS'
51973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51976
51977  CXXFLAGS="$saved_cxxflags"
51978
51979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51980$as_echo "$supports" >&6; }
51981  if test "x$supports" = "xyes" ; then
51982    :
51983    CXX_COMP_SUPPORTS="yes"
51984  else
51985    :
51986    CXX_COMP_SUPPORTS="no"
51987  fi
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52002$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52003  supports=no
52004  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52005
52006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52007$as_echo "$supports" >&6; }
52008  if test "x$supports" = "xyes" ; then
52009    :
52010    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52011  else
52012    :
52013    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52014  fi
52015
52016
52017
52018
52019
52020
52021
52022
52023  # Check whether --enable-warnings-as-errors was given.
52024if test "${enable_warnings_as_errors+set}" = set; then :
52025  enableval=$enable_warnings_as_errors;
52026fi
52027
52028
52029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52030$as_echo_n "checking if native warnings are errors... " >&6; }
52031  if test "x$enable_warnings_as_errors" = "xyes"; then
52032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52033$as_echo "yes (explicitly set)" >&6; }
52034    WARNINGS_AS_ERRORS=true
52035  elif test "x$enable_warnings_as_errors" = "xno"; then
52036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52037$as_echo "no" >&6; }
52038    WARNINGS_AS_ERRORS=false
52039  elif test "x$enable_warnings_as_errors" = "x"; then
52040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52041$as_echo "yes (default)" >&6; }
52042    WARNINGS_AS_ERRORS=true
52043  else
52044    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52045  fi
52046
52047  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52048    # Set legacy hotspot variable
52049    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52050  else
52051    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52052  fi
52053
52054
52055
52056
52057  case "${TOOLCHAIN_TYPE}" in
52058    microsoft)
52059      DISABLE_WARNING_PREFIX="-wd"
52060      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52061      ;;
52062    solstudio)
52063      DISABLE_WARNING_PREFIX="-erroff="
52064      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52065      ;;
52066    gcc)
52067      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
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    # Execute function body
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164    # Execute function body
52165
52166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52167$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52168  supports=yes
52169
52170  saved_cflags="$CFLAGS"
52171  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52172  ac_ext=c
52173ac_cpp='$CPP $CPPFLAGS'
52174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52176ac_compiler_gnu=$ac_cv_c_compiler_gnu
52177
52178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52179/* end confdefs.h.  */
52180int i;
52181_ACEOF
52182if ac_fn_c_try_compile "$LINENO"; then :
52183
52184else
52185  supports=no
52186fi
52187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52188  ac_ext=cpp
52189ac_cpp='$CXXCPP $CPPFLAGS'
52190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52193
52194  CFLAGS="$saved_cflags"
52195
52196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52197$as_echo "$supports" >&6; }
52198  if test "x$supports" = "xyes" ; then
52199    :
52200    C_COMP_SUPPORTS="yes"
52201  else
52202    :
52203    C_COMP_SUPPORTS="no"
52204  fi
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264    # Execute function body
52265
52266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52267$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52268  supports=yes
52269
52270  saved_cxxflags="$CXXFLAGS"
52271  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52272  ac_ext=cpp
52273ac_cpp='$CXXCPP $CPPFLAGS'
52274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52277
52278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52279/* end confdefs.h.  */
52280int i;
52281_ACEOF
52282if ac_fn_cxx_try_compile "$LINENO"; then :
52283
52284else
52285  supports=no
52286fi
52287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52288  ac_ext=cpp
52289ac_cpp='$CXXCPP $CPPFLAGS'
52290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52293
52294  CXXFLAGS="$saved_cxxflags"
52295
52296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52297$as_echo "$supports" >&6; }
52298  if test "x$supports" = "xyes" ; then
52299    :
52300    CXX_COMP_SUPPORTS="yes"
52301  else
52302    :
52303    CXX_COMP_SUPPORTS="no"
52304  fi
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52319$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52320  supports=no
52321  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52322
52323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52324$as_echo "$supports" >&6; }
52325  if test "x$supports" = "xyes" ; then
52326    :
52327    GCC_CAN_DISABLE_WARNINGS=true
52328  else
52329    :
52330    GCC_CAN_DISABLE_WARNINGS=false
52331
52332  fi
52333
52334
52335
52336
52337
52338
52339      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52340        DISABLE_WARNING_PREFIX="-Wno-"
52341      else
52342        DISABLE_WARNING_PREFIX=
52343      fi
52344      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52345      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52346      # CFLAGS since any target specific flags will likely not work with the
52347      # build compiler
52348      CC_OLD="$CC"
52349      CXX_OLD="$CXX"
52350      CC="$BUILD_CC"
52351      CXX="$BUILD_CXX"
52352      CFLAGS_OLD="$CFLAGS"
52353      CFLAGS=""
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401    # Execute function body
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
52444
52445
52446
52447
52448
52449
52450    # Execute function body
52451
52452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52453$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52454  supports=yes
52455
52456  saved_cflags="$CFLAGS"
52457  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52458  ac_ext=c
52459ac_cpp='$CPP $CPPFLAGS'
52460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52462ac_compiler_gnu=$ac_cv_c_compiler_gnu
52463
52464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52465/* end confdefs.h.  */
52466int i;
52467_ACEOF
52468if ac_fn_c_try_compile "$LINENO"; then :
52469
52470else
52471  supports=no
52472fi
52473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52474  ac_ext=cpp
52475ac_cpp='$CXXCPP $CPPFLAGS'
52476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52479
52480  CFLAGS="$saved_cflags"
52481
52482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52483$as_echo "$supports" >&6; }
52484  if test "x$supports" = "xyes" ; then
52485    :
52486    C_COMP_SUPPORTS="yes"
52487  else
52488    :
52489    C_COMP_SUPPORTS="no"
52490  fi
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550    # Execute function body
52551
52552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52553$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52554  supports=yes
52555
52556  saved_cxxflags="$CXXFLAGS"
52557  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52558  ac_ext=cpp
52559ac_cpp='$CXXCPP $CPPFLAGS'
52560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52563
52564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52565/* end confdefs.h.  */
52566int i;
52567_ACEOF
52568if ac_fn_cxx_try_compile "$LINENO"; then :
52569
52570else
52571  supports=no
52572fi
52573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52574  ac_ext=cpp
52575ac_cpp='$CXXCPP $CPPFLAGS'
52576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52579
52580  CXXFLAGS="$saved_cxxflags"
52581
52582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52583$as_echo "$supports" >&6; }
52584  if test "x$supports" = "xyes" ; then
52585    :
52586    CXX_COMP_SUPPORTS="yes"
52587  else
52588    :
52589    CXX_COMP_SUPPORTS="no"
52590  fi
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52605$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52606  supports=no
52607  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52608
52609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52610$as_echo "$supports" >&6; }
52611  if test "x$supports" = "xyes" ; then
52612    :
52613    BUILD_CC_CAN_DISABLE_WARNINGS=true
52614  else
52615    :
52616    BUILD_CC_CAN_DISABLE_WARNINGS=false
52617
52618  fi
52619
52620
52621
52622
52623
52624
52625      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52626        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52627      else
52628        BUILD_CC_DISABLE_WARNING_PREFIX=
52629      fi
52630      CC="$CC_OLD"
52631      CXX="$CXX_OLD"
52632      CFLAGS="$CFLAGS_OLD"
52633      ;;
52634    clang)
52635      DISABLE_WARNING_PREFIX="-Wno-"
52636      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52637      ;;
52638    xlc)
52639      DISABLE_WARNING_PREFIX="-qsuppress="
52640      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52641      ;;
52642  esac
52643
52644
52645
52646
52647
52648# Setup debug symbols (need objcopy from the toolchain for that)
52649
52650  #
52651  # NATIVE_DEBUG_SYMBOLS
52652  # This must be done after the toolchain is setup, since we're looking at objcopy.
52653  #
52654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52655$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52656
52657# Check whether --with-native-debug-symbols was given.
52658if test "${with_native_debug_symbols+set}" = set; then :
52659  withval=$with_native_debug_symbols;
52660        if test "x$OPENJDK_TARGET_OS" = xaix; then
52661          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52662            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52663          fi
52664        fi
52665
52666else
52667
52668        if test "x$OPENJDK_TARGET_OS" = xaix; then
52669          # AIX doesn't support 'zipped' so use 'internal' as default
52670          with_native_debug_symbols="internal"
52671        else
52672          if test "x$STATIC_BUILD" = xtrue; then
52673            with_native_debug_symbols="none"
52674          else
52675            with_native_debug_symbols="zipped"
52676          fi
52677        fi
52678
52679fi
52680
52681  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52683$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52684
52685  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52686
52687    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52688      if test "x$OBJCOPY" = x; then
52689        # enabling of enable-debug-symbols and can't find objcopy
52690        # this is an error
52691        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52692      fi
52693    fi
52694
52695    COMPILE_WITH_DEBUG_SYMBOLS=true
52696    COPY_DEBUG_SYMBOLS=true
52697    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52698  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52699    COMPILE_WITH_DEBUG_SYMBOLS=false
52700    COPY_DEBUG_SYMBOLS=false
52701    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52702  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52703    COMPILE_WITH_DEBUG_SYMBOLS=true
52704    COPY_DEBUG_SYMBOLS=false
52705    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52706  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52707
52708    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52709      if test "x$OBJCOPY" = x; then
52710        # enabling of enable-debug-symbols and can't find objcopy
52711        # this is an error
52712        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52713      fi
52714    fi
52715
52716    COMPILE_WITH_DEBUG_SYMBOLS=true
52717    COPY_DEBUG_SYMBOLS=true
52718    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52719  else
52720    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52721  fi
52722
52723  # --enable-debug-symbols is deprecated.
52724  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52725
52726  # Check whether --enable-debug-symbols was given.
52727if test "${enable_debug_symbols+set}" = set; then :
52728  enableval=$enable_debug_symbols;
52729fi
52730
52731  if test "x$enable_debug_symbols" != x; then
52732    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52733$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52734
52735    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52736      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52737$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52738    fi
52739
52740  fi
52741
52742
52743  # --enable-zip-debug-info is deprecated.
52744  # Please use --with-native-debug-symbols=zipped .
52745
52746  # Check whether --enable-zip-debug-info was given.
52747if test "${enable_zip_debug_info+set}" = set; then :
52748  enableval=$enable_zip_debug_info;
52749fi
52750
52751  if test "x$enable_zip_debug_info" != x; then
52752    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52753$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52754
52755    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52756      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52757$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52758    fi
52759
52760  fi
52761
52762
52763
52764
52765
52766
52767
52768  # Check whether --enable-native-coverage was given.
52769if test "${enable_native_coverage+set}" = set; then :
52770  enableval=$enable_native_coverage;
52771fi
52772
52773  GCOV_ENABLED="false"
52774  if test "x$enable_native_coverage" = "xyes"; then
52775    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52777$as_echo_n "checking if native coverage is enabled... " >&6; }
52778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52779$as_echo "yes" >&6; }
52780      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52781      GCOV_LDFLAGS="-fprofile-arcs"
52782      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52783      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52784      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52785      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52786      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52787      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52788      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52789      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52790      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52791      GCOV_ENABLED="true"
52792    else
52793      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52794    fi
52795  elif test "x$enable_native_coverage" = "xno"; then
52796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52797$as_echo_n "checking if native coverage is enabled... " >&6; }
52798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52799$as_echo "no" >&6; }
52800  elif test "x$enable_native_coverage" != "x"; then
52801    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52802  fi
52803
52804
52805
52806
52807# Need toolchain to setup dtrace
52808
52809  # Test for dtrace dependencies
52810  # Check whether --enable-dtrace was given.
52811if test "${enable_dtrace+set}" = set; then :
52812  enableval=$enable_dtrace;
52813fi
52814
52815
52816  DTRACE_DEP_MISSING=false
52817
52818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52819$as_echo_n "checking for dtrace tool... " >&6; }
52820  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52822$as_echo "$DTRACE" >&6; }
52823  else
52824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52825$as_echo "not found, cannot build dtrace" >&6; }
52826    DTRACE_DEP_MISSING=true
52827  fi
52828
52829  for ac_header in sys/sdt.h
52830do :
52831  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52832if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52833  cat >>confdefs.h <<_ACEOF
52834#define HAVE_SYS_SDT_H 1
52835_ACEOF
52836 DTRACE_HEADERS_OK=yes
52837else
52838  DTRACE_HEADERS_OK=no
52839fi
52840
52841done
52842
52843  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52844    DTRACE_DEP_MISSING=true
52845  fi
52846
52847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52848$as_echo_n "checking if dtrace should be built... " >&6; }
52849  if test "x$enable_dtrace" = "xyes"; then
52850    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52852$as_echo "no, missing dependencies" >&6; }
52853
52854  # Print a helpful message on how to acquire the necessary build dependency.
52855  # dtrace is the help tag: freetype, cups, alsa etc
52856  MISSING_DEPENDENCY=dtrace
52857
52858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52859    cygwin_help $MISSING_DEPENDENCY
52860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52861    msys_help $MISSING_DEPENDENCY
52862  else
52863    PKGHANDLER_COMMAND=
52864
52865    case $PKGHANDLER in
52866      apt-get)
52867        apt_help     $MISSING_DEPENDENCY ;;
52868      yum)
52869        yum_help     $MISSING_DEPENDENCY ;;
52870      port)
52871        port_help    $MISSING_DEPENDENCY ;;
52872      pkgutil)
52873        pkgutil_help $MISSING_DEPENDENCY ;;
52874      pkgadd)
52875        pkgadd_help  $MISSING_DEPENDENCY ;;
52876    esac
52877
52878    if test "x$PKGHANDLER_COMMAND" != x; then
52879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52880    fi
52881  fi
52882
52883      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52884    else
52885      INCLUDE_DTRACE=true
52886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52887$as_echo "yes, forced" >&6; }
52888    fi
52889  elif test "x$enable_dtrace" = "xno"; then
52890    INCLUDE_DTRACE=false
52891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52892$as_echo "no, forced" >&6; }
52893  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52894    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52895      INCLUDE_DTRACE=false
52896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52897$as_echo "no, missing dependencies" >&6; }
52898    else
52899      INCLUDE_DTRACE=true
52900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52901$as_echo "yes, dependencies present" >&6; }
52902    fi
52903  else
52904    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52905  fi
52906
52907
52908
52909  # Check whether --enable-aot was given.
52910if test "${enable_aot+set}" = set; then :
52911  enableval=$enable_aot;
52912fi
52913
52914
52915  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52916    ENABLE_AOT="true"
52917  elif test "x$enable_aot" = "xyes"; then
52918    ENABLE_AOT="true"
52919  elif test "x$enable_aot" = "xno"; then
52920    ENABLE_AOT="false"
52921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52922$as_echo_n "checking if aot should be enabled... " >&6; }
52923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52924$as_echo "no, forced" >&6; }
52925  else
52926    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52927  fi
52928
52929  if test "x$ENABLE_AOT" = "xtrue"; then
52930    # Only enable AOT on linux-X64.
52931    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52932      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52933        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52934          ENABLE_AOT="true"
52935        else
52936          ENABLE_AOT="false"
52937          if test "x$enable_aot" = "xyes"; then
52938            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52939          fi
52940        fi
52941      else
52942        ENABLE_AOT="false"
52943        if test "x$enable_aot" = "xyes"; then
52944          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52945        fi
52946      fi
52947    else
52948      ENABLE_AOT="false"
52949      if test "x$enable_aot" = "xyes"; then
52950        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52951      fi
52952    fi
52953  fi
52954
52955
52956
52957
52958  # Check whether --enable-hotspot-gtest was given.
52959if test "${enable_hotspot_gtest+set}" = set; then :
52960  enableval=$enable_hotspot_gtest;
52961fi
52962
52963
52964  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52965    GTEST_DIR_EXISTS="true"
52966  else
52967    GTEST_DIR_EXISTS="false"
52968  fi
52969
52970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52971$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52972  if test "x$enable_hotspot_gtest" = "xyes"; then
52973    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52975$as_echo "yes, forced" >&6; }
52976      BUILD_GTEST="true"
52977    else
52978      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52979    fi
52980  elif test "x$enable_hotspot_gtest" = "xno"; then
52981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52982$as_echo "no, forced" >&6; }
52983    BUILD_GTEST="false"
52984  elif test "x$enable_hotspot_gtest" = "x"; then
52985    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52987$as_echo "yes" >&6; }
52988      BUILD_GTEST="true"
52989    else
52990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52991$as_echo "no" >&6; }
52992      BUILD_GTEST="false"
52993    fi
52994  else
52995    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52996  fi
52997
52998
52999
53000
53001###############################################################################
53002#
53003# Check dependencies for external and internal libraries.
53004#
53005###############################################################################
53006
53007# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53008
53009  # When using cygwin or msys, we need a wrapper binary that renames
53010  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53011  # @files and rewrites these too! This wrapper binary is
53012  # called fixpath.
53013  FIXPATH=
53014  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53016$as_echo_n "checking if fixpath can be created... " >&6; }
53017    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53018    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53019    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53020    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53021      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53022      FIXPATH="$FIXPATH_BIN -c"
53023    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53024      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53025      # @ was chosen as separator to minimize risk of other tools messing around with it
53026      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53027          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53028      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53029      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53030    fi
53031    FIXPATH_SRC_W="$FIXPATH_SRC"
53032    FIXPATH_BIN_W="$FIXPATH_BIN"
53033
53034  unix_path="$FIXPATH_SRC_W"
53035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53036    windows_path=`$CYGPATH -m "$unix_path"`
53037    FIXPATH_SRC_W="$windows_path"
53038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53039    windows_path=`cmd //c echo $unix_path`
53040    FIXPATH_SRC_W="$windows_path"
53041  fi
53042
53043
53044  unix_path="$FIXPATH_BIN_W"
53045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53046    windows_path=`$CYGPATH -m "$unix_path"`
53047    FIXPATH_BIN_W="$windows_path"
53048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53049    windows_path=`cmd //c echo $unix_path`
53050    FIXPATH_BIN_W="$windows_path"
53051  fi
53052
53053    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53054    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53055    cd $FIXPATH_DIR
53056    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53057    cd $CURDIR
53058
53059    if test ! -x $FIXPATH_BIN; then
53060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53061$as_echo "no" >&6; }
53062      cat $FIXPATH_DIR/fixpath1.log
53063      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53064    fi
53065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53066$as_echo "yes" >&6; }
53067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53068$as_echo_n "checking if fixpath.exe works... " >&6; }
53069    cd $FIXPATH_DIR
53070    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53071        > $FIXPATH_DIR/fixpath2.log 2>&1
53072    cd $CURDIR
53073    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53075$as_echo "no" >&6; }
53076      cat $FIXPATH_DIR/fixpath2.log
53077      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53078    fi
53079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53080$as_echo "yes" >&6; }
53081
53082    FIXPATH_DETACH_FLAG="--detach"
53083  fi
53084
53085
53086
53087
53088
53089
53090  # Check if X11 is needed
53091  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53092    # No X11 support on windows or macosx
53093    NEEDS_LIB_X11=false
53094  else
53095    # All other instances need X11, even if building headless only, libawt still
53096    # needs X11 headers.
53097    NEEDS_LIB_X11=true
53098  fi
53099
53100  # Check if cups is needed
53101  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53102    # Windows have a separate print system
53103    NEEDS_LIB_CUPS=false
53104  else
53105    NEEDS_LIB_CUPS=true
53106  fi
53107
53108  # A custom hook may have set this already
53109  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53110    NEEDS_LIB_FREETYPE=true
53111  fi
53112
53113  # Check if alsa is needed
53114  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53115    NEEDS_LIB_ALSA=true
53116  else
53117    NEEDS_LIB_ALSA=false
53118  fi
53119
53120  # Check if ffi is needed
53121  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53122    NEEDS_LIB_FFI=true
53123  else
53124    NEEDS_LIB_FFI=false
53125  fi
53126
53127
53128  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53129  # dynamic build is configured on command line.
53130
53131# Check whether --with-stdc++lib was given.
53132if test "${with_stdc__lib+set}" = set; then :
53133  withval=$with_stdc__lib;
53134        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53135                && test "x$with_stdc__lib" != xdefault; then
53136          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53137        fi
53138
53139else
53140  with_stdc__lib=default
53141
53142fi
53143
53144
53145  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53146    # Test if stdc++ can be linked statically.
53147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53148$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53149    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53150    ac_ext=cpp
53151ac_cpp='$CXXCPP $CPPFLAGS'
53152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53155
53156    OLD_LIBS="$LIBS"
53157    LIBS="$STATIC_STDCXX_FLAGS"
53158    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53159/* end confdefs.h.  */
53160
53161int
53162main ()
53163{
53164return 0;
53165  ;
53166  return 0;
53167}
53168_ACEOF
53169if ac_fn_cxx_try_link "$LINENO"; then :
53170  has_static_libstdcxx=yes
53171else
53172  has_static_libstdcxx=no
53173fi
53174rm -f core conftest.err conftest.$ac_objext \
53175    conftest$ac_exeext conftest.$ac_ext
53176    LIBS="$OLD_LIBS"
53177    ac_ext=cpp
53178ac_cpp='$CXXCPP $CPPFLAGS'
53179ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53180ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53181ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53182
53183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53184$as_echo "$has_static_libstdcxx" >&6; }
53185
53186    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53187      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53188    fi
53189
53190    # If dynamic was requested, it's available since it would fail above otherwise.
53191    # If dynamic wasn't requested, go with static unless it isn't available.
53192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53193$as_echo_n "checking how to link with libstdc++... " >&6; }
53194    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53195        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53197$as_echo "dynamic" >&6; }
53198    else
53199      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53200      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53201      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53202      # just use the same setting as for the TARGET toolchain.
53203      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53205$as_echo "static" >&6; }
53206    fi
53207  fi
53208
53209  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53210  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53211    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53212  fi
53213
53214
53215
53216  # Setup Windows runtime dlls
53217  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53218
53219
53220# Check whether --with-msvcr-dll was given.
53221if test "${with_msvcr_dll+set}" = set; then :
53222  withval=$with_msvcr_dll;
53223fi
53224
53225
53226  if test "x$with_msvcr_dll" != x; then
53227    # If given explicitly by user, do not probe. If not present, fail directly.
53228
53229  DLL_NAME="$MSVCR_NAME"
53230  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53231  METHOD="--with-msvcr-dll"
53232  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53233    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53234$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53235
53236    # Need to check if the found msvcr is correct architecture
53237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53238$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53239    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53241      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53242      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53243      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53244        CORRECT_MSVCR_ARCH="PE32 executable"
53245      else
53246        CORRECT_MSVCR_ARCH="PE32+ executable"
53247      fi
53248    else
53249      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53250        CORRECT_MSVCR_ARCH=386
53251      else
53252        CORRECT_MSVCR_ARCH=x86-64
53253      fi
53254    fi
53255    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53257$as_echo "ok" >&6; }
53258      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53259
53260  # Only process if variable expands to non-empty
53261
53262  if test "x$MSVC_DLL" != x; then
53263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53264
53265  # Input might be given as Windows format, start by converting to
53266  # unix format.
53267  path="$MSVC_DLL"
53268  new_path=`$CYGPATH -u "$path"`
53269
53270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53273  # "foo.exe" is OK but "foo" is an error.
53274  #
53275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53276  # It is also a way to make sure we got the proper file name for the real test later on.
53277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53278  if test "x$test_shortpath" = x; then
53279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53281    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53282  fi
53283
53284  # Call helper function which possibly converts this using DOS-style short mode.
53285  # If so, the updated path is stored in $new_path.
53286
53287  input_path="$new_path"
53288  # Check if we need to convert this using DOS-style short mode. If the path
53289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53290  # take no chances and rewrite it.
53291  # Note: m4 eats our [], so we need to use [ and ] instead.
53292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53293  if test "x$has_forbidden_chars" != x; then
53294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53298      # Going to short mode and back again did indeed matter. Since short mode is
53299      # case insensitive, let's make it lowercase to improve readability.
53300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53301      # Now convert it back to Unix-style (cygpath)
53302      input_path=`$CYGPATH -u "$shortmode_path"`
53303      new_path="$input_path"
53304    fi
53305  fi
53306
53307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53308  if test "x$test_cygdrive_prefix" = x; then
53309    # As a simple fix, exclude /usr/bin since it's not a real path.
53310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53312      # a path prefixed by /cygdrive for fixpath to work.
53313      new_path="$CYGWIN_ROOT_PATH$input_path"
53314    fi
53315  fi
53316
53317
53318  if test "x$path" != "x$new_path"; then
53319    MSVC_DLL="$new_path"
53320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53321$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53322  fi
53323
53324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53325
53326  path="$MSVC_DLL"
53327  has_colon=`$ECHO $path | $GREP ^.:`
53328  new_path="$path"
53329  if test "x$has_colon" = x; then
53330    # Not in mixed or Windows style, start by that.
53331    new_path=`cmd //c echo $path`
53332  fi
53333
53334
53335  input_path="$new_path"
53336  # Check if we need to convert this using DOS-style short mode. If the path
53337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53338  # take no chances and rewrite it.
53339  # Note: m4 eats our [], so we need to use [ and ] instead.
53340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53341  if test "x$has_forbidden_chars" != x; then
53342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53344  fi
53345
53346
53347  windows_path="$new_path"
53348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53349    unix_path=`$CYGPATH -u "$windows_path"`
53350    new_path="$unix_path"
53351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53353    new_path="$unix_path"
53354  fi
53355
53356  if test "x$path" != "x$new_path"; then
53357    MSVC_DLL="$new_path"
53358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53359$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53360  fi
53361
53362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53364
53365    else
53366      # We're on a unix platform. Hooray! :)
53367      path="$MSVC_DLL"
53368      has_space=`$ECHO "$path" | $GREP " "`
53369      if test "x$has_space" != x; then
53370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53371$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53373      fi
53374
53375      # Use eval to expand a potential ~
53376      eval path="$path"
53377      if test ! -f "$path" && test ! -d "$path"; then
53378        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53379      fi
53380
53381      if test -d "$path"; then
53382        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53383      else
53384        dir="`$DIRNAME "$path"`"
53385        base="`$BASENAME "$path"`"
53386        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53387      fi
53388    fi
53389  fi
53390
53391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53392$as_echo_n "checking for $DLL_NAME... " >&6; }
53393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53394$as_echo "$MSVC_DLL" >&6; }
53395    else
53396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53397$as_echo "incorrect, ignoring" >&6; }
53398      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53399$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53400    fi
53401  fi
53402
53403    if test "x$MSVC_DLL" = x; then
53404      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53405    fi
53406    MSVCR_DLL="$MSVC_DLL"
53407  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53408
53409  DLL_NAME="$MSVCR_NAME"
53410  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53411  METHOD="devkit"
53412  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53413    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53414$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53415
53416    # Need to check if the found msvcr is correct architecture
53417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53418$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53419    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53421      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53422      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53423      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53424        CORRECT_MSVCR_ARCH="PE32 executable"
53425      else
53426        CORRECT_MSVCR_ARCH="PE32+ executable"
53427      fi
53428    else
53429      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53430        CORRECT_MSVCR_ARCH=386
53431      else
53432        CORRECT_MSVCR_ARCH=x86-64
53433      fi
53434    fi
53435    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53437$as_echo "ok" >&6; }
53438      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53439
53440  # Only process if variable expands to non-empty
53441
53442  if test "x$MSVC_DLL" != x; then
53443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53444
53445  # Input might be given as Windows format, start by converting to
53446  # unix format.
53447  path="$MSVC_DLL"
53448  new_path=`$CYGPATH -u "$path"`
53449
53450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53453  # "foo.exe" is OK but "foo" is an error.
53454  #
53455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53456  # It is also a way to make sure we got the proper file name for the real test later on.
53457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53458  if test "x$test_shortpath" = x; then
53459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53460$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53461    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53462  fi
53463
53464  # Call helper function which possibly converts this using DOS-style short mode.
53465  # If so, the updated path is stored in $new_path.
53466
53467  input_path="$new_path"
53468  # Check if we need to convert this using DOS-style short mode. If the path
53469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53470  # take no chances and rewrite it.
53471  # Note: m4 eats our [], so we need to use [ and ] instead.
53472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53473  if test "x$has_forbidden_chars" != x; then
53474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53478      # Going to short mode and back again did indeed matter. Since short mode is
53479      # case insensitive, let's make it lowercase to improve readability.
53480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53481      # Now convert it back to Unix-style (cygpath)
53482      input_path=`$CYGPATH -u "$shortmode_path"`
53483      new_path="$input_path"
53484    fi
53485  fi
53486
53487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53488  if test "x$test_cygdrive_prefix" = x; then
53489    # As a simple fix, exclude /usr/bin since it's not a real path.
53490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53492      # a path prefixed by /cygdrive for fixpath to work.
53493      new_path="$CYGWIN_ROOT_PATH$input_path"
53494    fi
53495  fi
53496
53497
53498  if test "x$path" != "x$new_path"; then
53499    MSVC_DLL="$new_path"
53500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53501$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53502  fi
53503
53504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53505
53506  path="$MSVC_DLL"
53507  has_colon=`$ECHO $path | $GREP ^.:`
53508  new_path="$path"
53509  if test "x$has_colon" = x; then
53510    # Not in mixed or Windows style, start by that.
53511    new_path=`cmd //c echo $path`
53512  fi
53513
53514
53515  input_path="$new_path"
53516  # Check if we need to convert this using DOS-style short mode. If the path
53517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53518  # take no chances and rewrite it.
53519  # Note: m4 eats our [], so we need to use [ and ] instead.
53520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53521  if test "x$has_forbidden_chars" != x; then
53522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53524  fi
53525
53526
53527  windows_path="$new_path"
53528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53529    unix_path=`$CYGPATH -u "$windows_path"`
53530    new_path="$unix_path"
53531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53533    new_path="$unix_path"
53534  fi
53535
53536  if test "x$path" != "x$new_path"; then
53537    MSVC_DLL="$new_path"
53538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53539$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53540  fi
53541
53542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53544
53545    else
53546      # We're on a unix platform. Hooray! :)
53547      path="$MSVC_DLL"
53548      has_space=`$ECHO "$path" | $GREP " "`
53549      if test "x$has_space" != x; then
53550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53551$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53553      fi
53554
53555      # Use eval to expand a potential ~
53556      eval path="$path"
53557      if test ! -f "$path" && test ! -d "$path"; then
53558        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53559      fi
53560
53561      if test -d "$path"; then
53562        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53563      else
53564        dir="`$DIRNAME "$path"`"
53565        base="`$BASENAME "$path"`"
53566        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53567      fi
53568    fi
53569  fi
53570
53571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53572$as_echo_n "checking for $DLL_NAME... " >&6; }
53573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53574$as_echo "$MSVC_DLL" >&6; }
53575    else
53576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53577$as_echo "incorrect, ignoring" >&6; }
53578      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53579$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53580    fi
53581  fi
53582
53583    if test "x$MSVC_DLL" = x; then
53584      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53585    fi
53586    MSVCR_DLL="$MSVC_DLL"
53587  else
53588
53589  DLL_NAME="${MSVCR_NAME}"
53590  MSVC_DLL=
53591
53592  if test "x$MSVC_DLL" = x; then
53593    # Probe: Using well-known location from Visual Studio 10.0
53594    if test "x$VCINSTALLDIR" != x; then
53595      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53596
53597  windows_path="$CYGWIN_VC_INSTALL_DIR"
53598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53599    unix_path=`$CYGPATH -u "$windows_path"`
53600    CYGWIN_VC_INSTALL_DIR="$unix_path"
53601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53603    CYGWIN_VC_INSTALL_DIR="$unix_path"
53604  fi
53605
53606      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53607        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53608      else
53609        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53610      fi
53611      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53612
53613  DLL_NAME="$DLL_NAME"
53614  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53615  METHOD="well-known location in VCINSTALLDIR"
53616  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53618$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53619
53620    # Need to check if the found msvcr is correct architecture
53621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53622$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53623    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53625      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53626      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53627      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53628        CORRECT_MSVCR_ARCH="PE32 executable"
53629      else
53630        CORRECT_MSVCR_ARCH="PE32+ executable"
53631      fi
53632    else
53633      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53634        CORRECT_MSVCR_ARCH=386
53635      else
53636        CORRECT_MSVCR_ARCH=x86-64
53637      fi
53638    fi
53639    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53641$as_echo "ok" >&6; }
53642      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53643
53644  # Only process if variable expands to non-empty
53645
53646  if test "x$MSVC_DLL" != x; then
53647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53648
53649  # Input might be given as Windows format, start by converting to
53650  # unix format.
53651  path="$MSVC_DLL"
53652  new_path=`$CYGPATH -u "$path"`
53653
53654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53657  # "foo.exe" is OK but "foo" is an error.
53658  #
53659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53660  # It is also a way to make sure we got the proper file name for the real test later on.
53661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53662  if test "x$test_shortpath" = x; then
53663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53664$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53665    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53666  fi
53667
53668  # Call helper function which possibly converts this using DOS-style short mode.
53669  # If so, the updated path is stored in $new_path.
53670
53671  input_path="$new_path"
53672  # Check if we need to convert this using DOS-style short mode. If the path
53673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53674  # take no chances and rewrite it.
53675  # Note: m4 eats our [], so we need to use [ and ] instead.
53676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53677  if test "x$has_forbidden_chars" != x; then
53678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53682      # Going to short mode and back again did indeed matter. Since short mode is
53683      # case insensitive, let's make it lowercase to improve readability.
53684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53685      # Now convert it back to Unix-style (cygpath)
53686      input_path=`$CYGPATH -u "$shortmode_path"`
53687      new_path="$input_path"
53688    fi
53689  fi
53690
53691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53692  if test "x$test_cygdrive_prefix" = x; then
53693    # As a simple fix, exclude /usr/bin since it's not a real path.
53694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53696      # a path prefixed by /cygdrive for fixpath to work.
53697      new_path="$CYGWIN_ROOT_PATH$input_path"
53698    fi
53699  fi
53700
53701
53702  if test "x$path" != "x$new_path"; then
53703    MSVC_DLL="$new_path"
53704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53705$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53706  fi
53707
53708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53709
53710  path="$MSVC_DLL"
53711  has_colon=`$ECHO $path | $GREP ^.:`
53712  new_path="$path"
53713  if test "x$has_colon" = x; then
53714    # Not in mixed or Windows style, start by that.
53715    new_path=`cmd //c echo $path`
53716  fi
53717
53718
53719  input_path="$new_path"
53720  # Check if we need to convert this using DOS-style short mode. If the path
53721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53722  # take no chances and rewrite it.
53723  # Note: m4 eats our [], so we need to use [ and ] instead.
53724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53725  if test "x$has_forbidden_chars" != x; then
53726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53728  fi
53729
53730
53731  windows_path="$new_path"
53732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53733    unix_path=`$CYGPATH -u "$windows_path"`
53734    new_path="$unix_path"
53735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53737    new_path="$unix_path"
53738  fi
53739
53740  if test "x$path" != "x$new_path"; then
53741    MSVC_DLL="$new_path"
53742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53743$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53744  fi
53745
53746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53748
53749    else
53750      # We're on a unix platform. Hooray! :)
53751      path="$MSVC_DLL"
53752      has_space=`$ECHO "$path" | $GREP " "`
53753      if test "x$has_space" != x; then
53754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53755$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53757      fi
53758
53759      # Use eval to expand a potential ~
53760      eval path="$path"
53761      if test ! -f "$path" && test ! -d "$path"; then
53762        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53763      fi
53764
53765      if test -d "$path"; then
53766        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53767      else
53768        dir="`$DIRNAME "$path"`"
53769        base="`$BASENAME "$path"`"
53770        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53771      fi
53772    fi
53773  fi
53774
53775      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53776$as_echo_n "checking for $DLL_NAME... " >&6; }
53777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53778$as_echo "$MSVC_DLL" >&6; }
53779    else
53780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53781$as_echo "incorrect, ignoring" >&6; }
53782      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53783$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53784    fi
53785  fi
53786
53787    fi
53788  fi
53789
53790  if test "x$MSVC_DLL" = x; then
53791    # Probe: Check in the Boot JDK directory.
53792    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53793
53794  DLL_NAME="$DLL_NAME"
53795  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53796  METHOD="well-known location in Boot JDK"
53797  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53799$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53800
53801    # Need to check if the found msvcr is correct architecture
53802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53803$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53804    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53806      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53807      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53809        CORRECT_MSVCR_ARCH="PE32 executable"
53810      else
53811        CORRECT_MSVCR_ARCH="PE32+ executable"
53812      fi
53813    else
53814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53815        CORRECT_MSVCR_ARCH=386
53816      else
53817        CORRECT_MSVCR_ARCH=x86-64
53818      fi
53819    fi
53820    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53822$as_echo "ok" >&6; }
53823      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53824
53825  # Only process if variable expands to non-empty
53826
53827  if test "x$MSVC_DLL" != x; then
53828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53829
53830  # Input might be given as Windows format, start by converting to
53831  # unix format.
53832  path="$MSVC_DLL"
53833  new_path=`$CYGPATH -u "$path"`
53834
53835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53838  # "foo.exe" is OK but "foo" is an error.
53839  #
53840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53841  # It is also a way to make sure we got the proper file name for the real test later on.
53842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53843  if test "x$test_shortpath" = x; then
53844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53845$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53846    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53847  fi
53848
53849  # Call helper function which possibly converts this using DOS-style short mode.
53850  # If so, the updated path is stored in $new_path.
53851
53852  input_path="$new_path"
53853  # Check if we need to convert this using DOS-style short mode. If the path
53854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53855  # take no chances and rewrite it.
53856  # Note: m4 eats our [], so we need to use [ and ] instead.
53857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53858  if test "x$has_forbidden_chars" != x; then
53859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53863      # Going to short mode and back again did indeed matter. Since short mode is
53864      # case insensitive, let's make it lowercase to improve readability.
53865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53866      # Now convert it back to Unix-style (cygpath)
53867      input_path=`$CYGPATH -u "$shortmode_path"`
53868      new_path="$input_path"
53869    fi
53870  fi
53871
53872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53873  if test "x$test_cygdrive_prefix" = x; then
53874    # As a simple fix, exclude /usr/bin since it's not a real path.
53875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53877      # a path prefixed by /cygdrive for fixpath to work.
53878      new_path="$CYGWIN_ROOT_PATH$input_path"
53879    fi
53880  fi
53881
53882
53883  if test "x$path" != "x$new_path"; then
53884    MSVC_DLL="$new_path"
53885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53886$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53887  fi
53888
53889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53890
53891  path="$MSVC_DLL"
53892  has_colon=`$ECHO $path | $GREP ^.:`
53893  new_path="$path"
53894  if test "x$has_colon" = x; then
53895    # Not in mixed or Windows style, start by that.
53896    new_path=`cmd //c echo $path`
53897  fi
53898
53899
53900  input_path="$new_path"
53901  # Check if we need to convert this using DOS-style short mode. If the path
53902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53903  # take no chances and rewrite it.
53904  # Note: m4 eats our [], so we need to use [ and ] instead.
53905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53906  if test "x$has_forbidden_chars" != x; then
53907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53909  fi
53910
53911
53912  windows_path="$new_path"
53913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53914    unix_path=`$CYGPATH -u "$windows_path"`
53915    new_path="$unix_path"
53916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53918    new_path="$unix_path"
53919  fi
53920
53921  if test "x$path" != "x$new_path"; then
53922    MSVC_DLL="$new_path"
53923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53924$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53925  fi
53926
53927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53929
53930    else
53931      # We're on a unix platform. Hooray! :)
53932      path="$MSVC_DLL"
53933      has_space=`$ECHO "$path" | $GREP " "`
53934      if test "x$has_space" != x; then
53935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53936$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53938      fi
53939
53940      # Use eval to expand a potential ~
53941      eval path="$path"
53942      if test ! -f "$path" && test ! -d "$path"; then
53943        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53944      fi
53945
53946      if test -d "$path"; then
53947        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53948      else
53949        dir="`$DIRNAME "$path"`"
53950        base="`$BASENAME "$path"`"
53951        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53952      fi
53953    fi
53954  fi
53955
53956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53957$as_echo_n "checking for $DLL_NAME... " >&6; }
53958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53959$as_echo "$MSVC_DLL" >&6; }
53960    else
53961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53962$as_echo "incorrect, ignoring" >&6; }
53963      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53964$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53965    fi
53966  fi
53967
53968  fi
53969
53970  if test "x$MSVC_DLL" = x; then
53971    # Probe: Look in the Windows system32 directory
53972    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53973
53974  windows_path="$CYGWIN_SYSTEMROOT"
53975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53976    unix_path=`$CYGPATH -u "$windows_path"`
53977    CYGWIN_SYSTEMROOT="$unix_path"
53978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53980    CYGWIN_SYSTEMROOT="$unix_path"
53981  fi
53982
53983    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53984
53985  DLL_NAME="$DLL_NAME"
53986  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53987  METHOD="well-known location in SYSTEMROOT"
53988  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53990$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53991
53992    # Need to check if the found msvcr is correct architecture
53993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53994$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53995    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53997      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53998      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54000        CORRECT_MSVCR_ARCH="PE32 executable"
54001      else
54002        CORRECT_MSVCR_ARCH="PE32+ executable"
54003      fi
54004    else
54005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54006        CORRECT_MSVCR_ARCH=386
54007      else
54008        CORRECT_MSVCR_ARCH=x86-64
54009      fi
54010    fi
54011    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54013$as_echo "ok" >&6; }
54014      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54015
54016  # Only process if variable expands to non-empty
54017
54018  if test "x$MSVC_DLL" != x; then
54019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54020
54021  # Input might be given as Windows format, start by converting to
54022  # unix format.
54023  path="$MSVC_DLL"
54024  new_path=`$CYGPATH -u "$path"`
54025
54026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54029  # "foo.exe" is OK but "foo" is an error.
54030  #
54031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54032  # It is also a way to make sure we got the proper file name for the real test later on.
54033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54034  if test "x$test_shortpath" = x; then
54035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54037    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54038  fi
54039
54040  # Call helper function which possibly converts this using DOS-style short mode.
54041  # If so, the updated path is stored in $new_path.
54042
54043  input_path="$new_path"
54044  # Check if we need to convert this using DOS-style short mode. If the path
54045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54046  # take no chances and rewrite it.
54047  # Note: m4 eats our [], so we need to use [ and ] instead.
54048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54049  if test "x$has_forbidden_chars" != x; then
54050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54054      # Going to short mode and back again did indeed matter. Since short mode is
54055      # case insensitive, let's make it lowercase to improve readability.
54056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54057      # Now convert it back to Unix-style (cygpath)
54058      input_path=`$CYGPATH -u "$shortmode_path"`
54059      new_path="$input_path"
54060    fi
54061  fi
54062
54063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54064  if test "x$test_cygdrive_prefix" = x; then
54065    # As a simple fix, exclude /usr/bin since it's not a real path.
54066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54068      # a path prefixed by /cygdrive for fixpath to work.
54069      new_path="$CYGWIN_ROOT_PATH$input_path"
54070    fi
54071  fi
54072
54073
54074  if test "x$path" != "x$new_path"; then
54075    MSVC_DLL="$new_path"
54076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54078  fi
54079
54080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54081
54082  path="$MSVC_DLL"
54083  has_colon=`$ECHO $path | $GREP ^.:`
54084  new_path="$path"
54085  if test "x$has_colon" = x; then
54086    # Not in mixed or Windows style, start by that.
54087    new_path=`cmd //c echo $path`
54088  fi
54089
54090
54091  input_path="$new_path"
54092  # Check if we need to convert this using DOS-style short mode. If the path
54093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54094  # take no chances and rewrite it.
54095  # Note: m4 eats our [], so we need to use [ and ] instead.
54096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54097  if test "x$has_forbidden_chars" != x; then
54098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54100  fi
54101
54102
54103  windows_path="$new_path"
54104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54105    unix_path=`$CYGPATH -u "$windows_path"`
54106    new_path="$unix_path"
54107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54109    new_path="$unix_path"
54110  fi
54111
54112  if test "x$path" != "x$new_path"; then
54113    MSVC_DLL="$new_path"
54114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54116  fi
54117
54118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54120
54121    else
54122      # We're on a unix platform. Hooray! :)
54123      path="$MSVC_DLL"
54124      has_space=`$ECHO "$path" | $GREP " "`
54125      if test "x$has_space" != x; then
54126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54127$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54129      fi
54130
54131      # Use eval to expand a potential ~
54132      eval path="$path"
54133      if test ! -f "$path" && test ! -d "$path"; then
54134        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54135      fi
54136
54137      if test -d "$path"; then
54138        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54139      else
54140        dir="`$DIRNAME "$path"`"
54141        base="`$BASENAME "$path"`"
54142        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54143      fi
54144    fi
54145  fi
54146
54147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54148$as_echo_n "checking for $DLL_NAME... " >&6; }
54149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54150$as_echo "$MSVC_DLL" >&6; }
54151    else
54152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54153$as_echo "incorrect, ignoring" >&6; }
54154      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54155$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54156    fi
54157  fi
54158
54159  fi
54160
54161  if test "x$MSVC_DLL" = x; then
54162    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54163    if test "x$VS100COMNTOOLS" != x; then
54164      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54165
54166  windows_path="$CYGWIN_VS_TOOLS_DIR"
54167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54168    unix_path=`$CYGPATH -u "$windows_path"`
54169    CYGWIN_VS_TOOLS_DIR="$unix_path"
54170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54172    CYGWIN_VS_TOOLS_DIR="$unix_path"
54173  fi
54174
54175      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54176        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54177	    | $GREP -i /x64/ | $HEAD --lines 1`
54178      else
54179        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54180	    | $GREP -i /x86/ | $HEAD --lines 1`
54181      fi
54182
54183  DLL_NAME="$DLL_NAME"
54184  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54185  METHOD="search of VS100COMNTOOLS"
54186  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54187    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54188$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54189
54190    # Need to check if the found msvcr is correct architecture
54191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54192$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54193    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54195      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54196      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54197      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54198        CORRECT_MSVCR_ARCH="PE32 executable"
54199      else
54200        CORRECT_MSVCR_ARCH="PE32+ executable"
54201      fi
54202    else
54203      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54204        CORRECT_MSVCR_ARCH=386
54205      else
54206        CORRECT_MSVCR_ARCH=x86-64
54207      fi
54208    fi
54209    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54211$as_echo "ok" >&6; }
54212      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54213
54214  # Only process if variable expands to non-empty
54215
54216  if test "x$MSVC_DLL" != x; then
54217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54218
54219  # Input might be given as Windows format, start by converting to
54220  # unix format.
54221  path="$MSVC_DLL"
54222  new_path=`$CYGPATH -u "$path"`
54223
54224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54227  # "foo.exe" is OK but "foo" is an error.
54228  #
54229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54230  # It is also a way to make sure we got the proper file name for the real test later on.
54231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54232  if test "x$test_shortpath" = x; then
54233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54234$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54235    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54236  fi
54237
54238  # Call helper function which possibly converts this using DOS-style short mode.
54239  # If so, the updated path is stored in $new_path.
54240
54241  input_path="$new_path"
54242  # Check if we need to convert this using DOS-style short mode. If the path
54243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54244  # take no chances and rewrite it.
54245  # Note: m4 eats our [], so we need to use [ and ] instead.
54246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54247  if test "x$has_forbidden_chars" != x; then
54248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54252      # Going to short mode and back again did indeed matter. Since short mode is
54253      # case insensitive, let's make it lowercase to improve readability.
54254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54255      # Now convert it back to Unix-style (cygpath)
54256      input_path=`$CYGPATH -u "$shortmode_path"`
54257      new_path="$input_path"
54258    fi
54259  fi
54260
54261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54262  if test "x$test_cygdrive_prefix" = x; then
54263    # As a simple fix, exclude /usr/bin since it's not a real path.
54264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54266      # a path prefixed by /cygdrive for fixpath to work.
54267      new_path="$CYGWIN_ROOT_PATH$input_path"
54268    fi
54269  fi
54270
54271
54272  if test "x$path" != "x$new_path"; then
54273    MSVC_DLL="$new_path"
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54275$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54276  fi
54277
54278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54279
54280  path="$MSVC_DLL"
54281  has_colon=`$ECHO $path | $GREP ^.:`
54282  new_path="$path"
54283  if test "x$has_colon" = x; then
54284    # Not in mixed or Windows style, start by that.
54285    new_path=`cmd //c echo $path`
54286  fi
54287
54288
54289  input_path="$new_path"
54290  # Check if we need to convert this using DOS-style short mode. If the path
54291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54292  # take no chances and rewrite it.
54293  # Note: m4 eats our [], so we need to use [ and ] instead.
54294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54295  if test "x$has_forbidden_chars" != x; then
54296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54298  fi
54299
54300
54301  windows_path="$new_path"
54302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54303    unix_path=`$CYGPATH -u "$windows_path"`
54304    new_path="$unix_path"
54305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54307    new_path="$unix_path"
54308  fi
54309
54310  if test "x$path" != "x$new_path"; then
54311    MSVC_DLL="$new_path"
54312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54313$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54314  fi
54315
54316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54318
54319    else
54320      # We're on a unix platform. Hooray! :)
54321      path="$MSVC_DLL"
54322      has_space=`$ECHO "$path" | $GREP " "`
54323      if test "x$has_space" != x; then
54324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54325$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54327      fi
54328
54329      # Use eval to expand a potential ~
54330      eval path="$path"
54331      if test ! -f "$path" && test ! -d "$path"; then
54332        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54333      fi
54334
54335      if test -d "$path"; then
54336        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54337      else
54338        dir="`$DIRNAME "$path"`"
54339        base="`$BASENAME "$path"`"
54340        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54341      fi
54342    fi
54343  fi
54344
54345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54346$as_echo_n "checking for $DLL_NAME... " >&6; }
54347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54348$as_echo "$MSVC_DLL" >&6; }
54349    else
54350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54351$as_echo "incorrect, ignoring" >&6; }
54352      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54353$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54354    fi
54355  fi
54356
54357    fi
54358  fi
54359
54360  if test "x$MSVC_DLL" = x; then
54361    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54362    # (This was the original behaviour; kept since it might turn something up)
54363    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54364      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54365        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54366	    | $GREP x64 | $HEAD --lines 1`
54367      else
54368        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54369	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54370        if test "x$POSSIBLE_MSVC_DLL" = x; then
54371          # We're grasping at straws now...
54372          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54373	      | $HEAD --lines 1`
54374        fi
54375      fi
54376
54377
54378  DLL_NAME="$DLL_NAME"
54379  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54380  METHOD="search of VCINSTALLDIR"
54381  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54382    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54383$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54384
54385    # Need to check if the found msvcr is correct architecture
54386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54387$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54388    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54390      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54391      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54392      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54393        CORRECT_MSVCR_ARCH="PE32 executable"
54394      else
54395        CORRECT_MSVCR_ARCH="PE32+ executable"
54396      fi
54397    else
54398      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54399        CORRECT_MSVCR_ARCH=386
54400      else
54401        CORRECT_MSVCR_ARCH=x86-64
54402      fi
54403    fi
54404    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54406$as_echo "ok" >&6; }
54407      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54408
54409  # Only process if variable expands to non-empty
54410
54411  if test "x$MSVC_DLL" != x; then
54412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54413
54414  # Input might be given as Windows format, start by converting to
54415  # unix format.
54416  path="$MSVC_DLL"
54417  new_path=`$CYGPATH -u "$path"`
54418
54419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54422  # "foo.exe" is OK but "foo" is an error.
54423  #
54424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54425  # It is also a way to make sure we got the proper file name for the real test later on.
54426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54427  if test "x$test_shortpath" = x; then
54428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54429$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54430    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54431  fi
54432
54433  # Call helper function which possibly converts this using DOS-style short mode.
54434  # If so, the updated path is stored in $new_path.
54435
54436  input_path="$new_path"
54437  # Check if we need to convert this using DOS-style short mode. If the path
54438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54439  # take no chances and rewrite it.
54440  # Note: m4 eats our [], so we need to use [ and ] instead.
54441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54442  if test "x$has_forbidden_chars" != x; then
54443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54447      # Going to short mode and back again did indeed matter. Since short mode is
54448      # case insensitive, let's make it lowercase to improve readability.
54449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54450      # Now convert it back to Unix-style (cygpath)
54451      input_path=`$CYGPATH -u "$shortmode_path"`
54452      new_path="$input_path"
54453    fi
54454  fi
54455
54456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54457  if test "x$test_cygdrive_prefix" = x; then
54458    # As a simple fix, exclude /usr/bin since it's not a real path.
54459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54461      # a path prefixed by /cygdrive for fixpath to work.
54462      new_path="$CYGWIN_ROOT_PATH$input_path"
54463    fi
54464  fi
54465
54466
54467  if test "x$path" != "x$new_path"; then
54468    MSVC_DLL="$new_path"
54469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54470$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54471  fi
54472
54473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54474
54475  path="$MSVC_DLL"
54476  has_colon=`$ECHO $path | $GREP ^.:`
54477  new_path="$path"
54478  if test "x$has_colon" = x; then
54479    # Not in mixed or Windows style, start by that.
54480    new_path=`cmd //c echo $path`
54481  fi
54482
54483
54484  input_path="$new_path"
54485  # Check if we need to convert this using DOS-style short mode. If the path
54486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54487  # take no chances and rewrite it.
54488  # Note: m4 eats our [], so we need to use [ and ] instead.
54489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54490  if test "x$has_forbidden_chars" != x; then
54491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54493  fi
54494
54495
54496  windows_path="$new_path"
54497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54498    unix_path=`$CYGPATH -u "$windows_path"`
54499    new_path="$unix_path"
54500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54502    new_path="$unix_path"
54503  fi
54504
54505  if test "x$path" != "x$new_path"; then
54506    MSVC_DLL="$new_path"
54507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54508$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54509  fi
54510
54511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54513
54514    else
54515      # We're on a unix platform. Hooray! :)
54516      path="$MSVC_DLL"
54517      has_space=`$ECHO "$path" | $GREP " "`
54518      if test "x$has_space" != x; then
54519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54521        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54522      fi
54523
54524      # Use eval to expand a potential ~
54525      eval path="$path"
54526      if test ! -f "$path" && test ! -d "$path"; then
54527        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54528      fi
54529
54530      if test -d "$path"; then
54531        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54532      else
54533        dir="`$DIRNAME "$path"`"
54534        base="`$BASENAME "$path"`"
54535        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54536      fi
54537    fi
54538  fi
54539
54540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54541$as_echo_n "checking for $DLL_NAME... " >&6; }
54542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54543$as_echo "$MSVC_DLL" >&6; }
54544    else
54545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54546$as_echo "incorrect, ignoring" >&6; }
54547      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54548$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54549    fi
54550  fi
54551
54552    fi
54553  fi
54554
54555  if test "x$MSVC_DLL" = x; then
54556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54557$as_echo_n "checking for $DLL_NAME... " >&6; }
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54559$as_echo "no" >&6; }
54560    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54561  fi
54562
54563    MSVCR_DLL="$MSVC_DLL"
54564  fi
54565
54566
54567
54568# Check whether --with-msvcp-dll was given.
54569if test "${with_msvcp_dll+set}" = set; then :
54570  withval=$with_msvcp_dll;
54571fi
54572
54573
54574  if test "x$MSVCP_NAME" != "x"; then
54575    if test "x$with_msvcp_dll" != x; then
54576      # If given explicitly by user, do not probe. If not present, fail directly.
54577
54578  DLL_NAME="$MSVCP_NAME"
54579  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54580  METHOD="--with-msvcp-dll"
54581  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54582    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54583$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54584
54585    # Need to check if the found msvcr is correct architecture
54586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54587$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54588    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54591      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54592      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54593        CORRECT_MSVCR_ARCH="PE32 executable"
54594      else
54595        CORRECT_MSVCR_ARCH="PE32+ executable"
54596      fi
54597    else
54598      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54599        CORRECT_MSVCR_ARCH=386
54600      else
54601        CORRECT_MSVCR_ARCH=x86-64
54602      fi
54603    fi
54604    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54606$as_echo "ok" >&6; }
54607      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54608
54609  # Only process if variable expands to non-empty
54610
54611  if test "x$MSVC_DLL" != x; then
54612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54613
54614  # Input might be given as Windows format, start by converting to
54615  # unix format.
54616  path="$MSVC_DLL"
54617  new_path=`$CYGPATH -u "$path"`
54618
54619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54622  # "foo.exe" is OK but "foo" is an error.
54623  #
54624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54625  # It is also a way to make sure we got the proper file name for the real test later on.
54626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54627  if test "x$test_shortpath" = x; then
54628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54630    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54631  fi
54632
54633  # Call helper function which possibly converts this using DOS-style short mode.
54634  # If so, the updated path is stored in $new_path.
54635
54636  input_path="$new_path"
54637  # Check if we need to convert this using DOS-style short mode. If the path
54638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54639  # take no chances and rewrite it.
54640  # Note: m4 eats our [], so we need to use [ and ] instead.
54641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54642  if test "x$has_forbidden_chars" != x; then
54643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54647      # Going to short mode and back again did indeed matter. Since short mode is
54648      # case insensitive, let's make it lowercase to improve readability.
54649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54650      # Now convert it back to Unix-style (cygpath)
54651      input_path=`$CYGPATH -u "$shortmode_path"`
54652      new_path="$input_path"
54653    fi
54654  fi
54655
54656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54657  if test "x$test_cygdrive_prefix" = x; then
54658    # As a simple fix, exclude /usr/bin since it's not a real path.
54659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54661      # a path prefixed by /cygdrive for fixpath to work.
54662      new_path="$CYGWIN_ROOT_PATH$input_path"
54663    fi
54664  fi
54665
54666
54667  if test "x$path" != "x$new_path"; then
54668    MSVC_DLL="$new_path"
54669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54670$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54671  fi
54672
54673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54674
54675  path="$MSVC_DLL"
54676  has_colon=`$ECHO $path | $GREP ^.:`
54677  new_path="$path"
54678  if test "x$has_colon" = x; then
54679    # Not in mixed or Windows style, start by that.
54680    new_path=`cmd //c echo $path`
54681  fi
54682
54683
54684  input_path="$new_path"
54685  # Check if we need to convert this using DOS-style short mode. If the path
54686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54687  # take no chances and rewrite it.
54688  # Note: m4 eats our [], so we need to use [ and ] instead.
54689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54690  if test "x$has_forbidden_chars" != x; then
54691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54693  fi
54694
54695
54696  windows_path="$new_path"
54697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54698    unix_path=`$CYGPATH -u "$windows_path"`
54699    new_path="$unix_path"
54700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54702    new_path="$unix_path"
54703  fi
54704
54705  if test "x$path" != "x$new_path"; then
54706    MSVC_DLL="$new_path"
54707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54708$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54709  fi
54710
54711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54713
54714    else
54715      # We're on a unix platform. Hooray! :)
54716      path="$MSVC_DLL"
54717      has_space=`$ECHO "$path" | $GREP " "`
54718      if test "x$has_space" != x; then
54719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54720$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54721        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54722      fi
54723
54724      # Use eval to expand a potential ~
54725      eval path="$path"
54726      if test ! -f "$path" && test ! -d "$path"; then
54727        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54728      fi
54729
54730      if test -d "$path"; then
54731        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54732      else
54733        dir="`$DIRNAME "$path"`"
54734        base="`$BASENAME "$path"`"
54735        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54736      fi
54737    fi
54738  fi
54739
54740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54741$as_echo_n "checking for $DLL_NAME... " >&6; }
54742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54743$as_echo "$MSVC_DLL" >&6; }
54744    else
54745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54746$as_echo "incorrect, ignoring" >&6; }
54747      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54748$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54749    fi
54750  fi
54751
54752      if test "x$MSVC_DLL" = x; then
54753        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54754      fi
54755      MSVCP_DLL="$MSVC_DLL"
54756    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54757
54758  DLL_NAME="$MSVCP_NAME"
54759  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54760  METHOD="devkit"
54761  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54762    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54763$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54764
54765    # Need to check if the found msvcr is correct architecture
54766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54767$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54768    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54770      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54771      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54772      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54773        CORRECT_MSVCR_ARCH="PE32 executable"
54774      else
54775        CORRECT_MSVCR_ARCH="PE32+ executable"
54776      fi
54777    else
54778      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54779        CORRECT_MSVCR_ARCH=386
54780      else
54781        CORRECT_MSVCR_ARCH=x86-64
54782      fi
54783    fi
54784    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54786$as_echo "ok" >&6; }
54787      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54788
54789  # Only process if variable expands to non-empty
54790
54791  if test "x$MSVC_DLL" != x; then
54792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54793
54794  # Input might be given as Windows format, start by converting to
54795  # unix format.
54796  path="$MSVC_DLL"
54797  new_path=`$CYGPATH -u "$path"`
54798
54799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54802  # "foo.exe" is OK but "foo" is an error.
54803  #
54804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54805  # It is also a way to make sure we got the proper file name for the real test later on.
54806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54807  if test "x$test_shortpath" = x; then
54808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54809$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54810    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54811  fi
54812
54813  # Call helper function which possibly converts this using DOS-style short mode.
54814  # If so, the updated path is stored in $new_path.
54815
54816  input_path="$new_path"
54817  # Check if we need to convert this using DOS-style short mode. If the path
54818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54819  # take no chances and rewrite it.
54820  # Note: m4 eats our [], so we need to use [ and ] instead.
54821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54822  if test "x$has_forbidden_chars" != x; then
54823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54827      # Going to short mode and back again did indeed matter. Since short mode is
54828      # case insensitive, let's make it lowercase to improve readability.
54829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54830      # Now convert it back to Unix-style (cygpath)
54831      input_path=`$CYGPATH -u "$shortmode_path"`
54832      new_path="$input_path"
54833    fi
54834  fi
54835
54836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54837  if test "x$test_cygdrive_prefix" = x; then
54838    # As a simple fix, exclude /usr/bin since it's not a real path.
54839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54841      # a path prefixed by /cygdrive for fixpath to work.
54842      new_path="$CYGWIN_ROOT_PATH$input_path"
54843    fi
54844  fi
54845
54846
54847  if test "x$path" != "x$new_path"; then
54848    MSVC_DLL="$new_path"
54849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54850$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54851  fi
54852
54853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54854
54855  path="$MSVC_DLL"
54856  has_colon=`$ECHO $path | $GREP ^.:`
54857  new_path="$path"
54858  if test "x$has_colon" = x; then
54859    # Not in mixed or Windows style, start by that.
54860    new_path=`cmd //c echo $path`
54861  fi
54862
54863
54864  input_path="$new_path"
54865  # Check if we need to convert this using DOS-style short mode. If the path
54866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54867  # take no chances and rewrite it.
54868  # Note: m4 eats our [], so we need to use [ and ] instead.
54869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54870  if test "x$has_forbidden_chars" != x; then
54871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54873  fi
54874
54875
54876  windows_path="$new_path"
54877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54878    unix_path=`$CYGPATH -u "$windows_path"`
54879    new_path="$unix_path"
54880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54882    new_path="$unix_path"
54883  fi
54884
54885  if test "x$path" != "x$new_path"; then
54886    MSVC_DLL="$new_path"
54887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54888$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54889  fi
54890
54891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54893
54894    else
54895      # We're on a unix platform. Hooray! :)
54896      path="$MSVC_DLL"
54897      has_space=`$ECHO "$path" | $GREP " "`
54898      if test "x$has_space" != x; then
54899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54900$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54902      fi
54903
54904      # Use eval to expand a potential ~
54905      eval path="$path"
54906      if test ! -f "$path" && test ! -d "$path"; then
54907        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54908      fi
54909
54910      if test -d "$path"; then
54911        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54912      else
54913        dir="`$DIRNAME "$path"`"
54914        base="`$BASENAME "$path"`"
54915        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54916      fi
54917    fi
54918  fi
54919
54920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54921$as_echo_n "checking for $DLL_NAME... " >&6; }
54922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54923$as_echo "$MSVC_DLL" >&6; }
54924    else
54925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54926$as_echo "incorrect, ignoring" >&6; }
54927      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54928$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54929    fi
54930  fi
54931
54932      if test "x$MSVC_DLL" = x; then
54933        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54934      fi
54935      MSVCP_DLL="$MSVC_DLL"
54936    else
54937
54938  DLL_NAME="${MSVCP_NAME}"
54939  MSVC_DLL=
54940
54941  if test "x$MSVC_DLL" = x; then
54942    # Probe: Using well-known location from Visual Studio 10.0
54943    if test "x$VCINSTALLDIR" != x; then
54944      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54945
54946  windows_path="$CYGWIN_VC_INSTALL_DIR"
54947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54948    unix_path=`$CYGPATH -u "$windows_path"`
54949    CYGWIN_VC_INSTALL_DIR="$unix_path"
54950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54952    CYGWIN_VC_INSTALL_DIR="$unix_path"
54953  fi
54954
54955      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54956        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54957      else
54958        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54959      fi
54960      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54961
54962  DLL_NAME="$DLL_NAME"
54963  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54964  METHOD="well-known location in VCINSTALLDIR"
54965  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54967$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54968
54969    # Need to check if the found msvcr is correct architecture
54970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54971$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54972    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54975      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54976      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54977        CORRECT_MSVCR_ARCH="PE32 executable"
54978      else
54979        CORRECT_MSVCR_ARCH="PE32+ executable"
54980      fi
54981    else
54982      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54983        CORRECT_MSVCR_ARCH=386
54984      else
54985        CORRECT_MSVCR_ARCH=x86-64
54986      fi
54987    fi
54988    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54990$as_echo "ok" >&6; }
54991      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54992
54993  # Only process if variable expands to non-empty
54994
54995  if test "x$MSVC_DLL" != x; then
54996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54997
54998  # Input might be given as Windows format, start by converting to
54999  # unix format.
55000  path="$MSVC_DLL"
55001  new_path=`$CYGPATH -u "$path"`
55002
55003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55006  # "foo.exe" is OK but "foo" is an error.
55007  #
55008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55009  # It is also a way to make sure we got the proper file name for the real test later on.
55010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55011  if test "x$test_shortpath" = x; then
55012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55013$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55014    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55015  fi
55016
55017  # Call helper function which possibly converts this using DOS-style short mode.
55018  # If so, the updated path is stored in $new_path.
55019
55020  input_path="$new_path"
55021  # Check if we need to convert this using DOS-style short mode. If the path
55022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55023  # take no chances and rewrite it.
55024  # Note: m4 eats our [], so we need to use [ and ] instead.
55025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55026  if test "x$has_forbidden_chars" != x; then
55027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55031      # Going to short mode and back again did indeed matter. Since short mode is
55032      # case insensitive, let's make it lowercase to improve readability.
55033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55034      # Now convert it back to Unix-style (cygpath)
55035      input_path=`$CYGPATH -u "$shortmode_path"`
55036      new_path="$input_path"
55037    fi
55038  fi
55039
55040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55041  if test "x$test_cygdrive_prefix" = x; then
55042    # As a simple fix, exclude /usr/bin since it's not a real path.
55043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55045      # a path prefixed by /cygdrive for fixpath to work.
55046      new_path="$CYGWIN_ROOT_PATH$input_path"
55047    fi
55048  fi
55049
55050
55051  if test "x$path" != "x$new_path"; then
55052    MSVC_DLL="$new_path"
55053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55054$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55055  fi
55056
55057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55058
55059  path="$MSVC_DLL"
55060  has_colon=`$ECHO $path | $GREP ^.:`
55061  new_path="$path"
55062  if test "x$has_colon" = x; then
55063    # Not in mixed or Windows style, start by that.
55064    new_path=`cmd //c echo $path`
55065  fi
55066
55067
55068  input_path="$new_path"
55069  # Check if we need to convert this using DOS-style short mode. If the path
55070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55071  # take no chances and rewrite it.
55072  # Note: m4 eats our [], so we need to use [ and ] instead.
55073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55074  if test "x$has_forbidden_chars" != x; then
55075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55077  fi
55078
55079
55080  windows_path="$new_path"
55081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55082    unix_path=`$CYGPATH -u "$windows_path"`
55083    new_path="$unix_path"
55084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55086    new_path="$unix_path"
55087  fi
55088
55089  if test "x$path" != "x$new_path"; then
55090    MSVC_DLL="$new_path"
55091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55092$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55093  fi
55094
55095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55097
55098    else
55099      # We're on a unix platform. Hooray! :)
55100      path="$MSVC_DLL"
55101      has_space=`$ECHO "$path" | $GREP " "`
55102      if test "x$has_space" != x; then
55103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55104$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55106      fi
55107
55108      # Use eval to expand a potential ~
55109      eval path="$path"
55110      if test ! -f "$path" && test ! -d "$path"; then
55111        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55112      fi
55113
55114      if test -d "$path"; then
55115        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55116      else
55117        dir="`$DIRNAME "$path"`"
55118        base="`$BASENAME "$path"`"
55119        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55120      fi
55121    fi
55122  fi
55123
55124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55125$as_echo_n "checking for $DLL_NAME... " >&6; }
55126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55127$as_echo "$MSVC_DLL" >&6; }
55128    else
55129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55130$as_echo "incorrect, ignoring" >&6; }
55131      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55132$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55133    fi
55134  fi
55135
55136    fi
55137  fi
55138
55139  if test "x$MSVC_DLL" = x; then
55140    # Probe: Check in the Boot JDK directory.
55141    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55142
55143  DLL_NAME="$DLL_NAME"
55144  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55145  METHOD="well-known location in Boot JDK"
55146  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55148$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55149
55150    # Need to check if the found msvcr is correct architecture
55151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55152$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55153    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55155      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55156      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55158        CORRECT_MSVCR_ARCH="PE32 executable"
55159      else
55160        CORRECT_MSVCR_ARCH="PE32+ executable"
55161      fi
55162    else
55163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55164        CORRECT_MSVCR_ARCH=386
55165      else
55166        CORRECT_MSVCR_ARCH=x86-64
55167      fi
55168    fi
55169    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55171$as_echo "ok" >&6; }
55172      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55173
55174  # Only process if variable expands to non-empty
55175
55176  if test "x$MSVC_DLL" != x; then
55177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55178
55179  # Input might be given as Windows format, start by converting to
55180  # unix format.
55181  path="$MSVC_DLL"
55182  new_path=`$CYGPATH -u "$path"`
55183
55184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55187  # "foo.exe" is OK but "foo" is an error.
55188  #
55189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55190  # It is also a way to make sure we got the proper file name for the real test later on.
55191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55192  if test "x$test_shortpath" = x; then
55193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55195    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55196  fi
55197
55198  # Call helper function which possibly converts this using DOS-style short mode.
55199  # If so, the updated path is stored in $new_path.
55200
55201  input_path="$new_path"
55202  # Check if we need to convert this using DOS-style short mode. If the path
55203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55204  # take no chances and rewrite it.
55205  # Note: m4 eats our [], so we need to use [ and ] instead.
55206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55207  if test "x$has_forbidden_chars" != x; then
55208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55212      # Going to short mode and back again did indeed matter. Since short mode is
55213      # case insensitive, let's make it lowercase to improve readability.
55214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55215      # Now convert it back to Unix-style (cygpath)
55216      input_path=`$CYGPATH -u "$shortmode_path"`
55217      new_path="$input_path"
55218    fi
55219  fi
55220
55221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55222  if test "x$test_cygdrive_prefix" = x; then
55223    # As a simple fix, exclude /usr/bin since it's not a real path.
55224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55226      # a path prefixed by /cygdrive for fixpath to work.
55227      new_path="$CYGWIN_ROOT_PATH$input_path"
55228    fi
55229  fi
55230
55231
55232  if test "x$path" != "x$new_path"; then
55233    MSVC_DLL="$new_path"
55234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55236  fi
55237
55238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55239
55240  path="$MSVC_DLL"
55241  has_colon=`$ECHO $path | $GREP ^.:`
55242  new_path="$path"
55243  if test "x$has_colon" = x; then
55244    # Not in mixed or Windows style, start by that.
55245    new_path=`cmd //c echo $path`
55246  fi
55247
55248
55249  input_path="$new_path"
55250  # Check if we need to convert this using DOS-style short mode. If the path
55251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55252  # take no chances and rewrite it.
55253  # Note: m4 eats our [], so we need to use [ and ] instead.
55254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55255  if test "x$has_forbidden_chars" != x; then
55256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55258  fi
55259
55260
55261  windows_path="$new_path"
55262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55263    unix_path=`$CYGPATH -u "$windows_path"`
55264    new_path="$unix_path"
55265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55267    new_path="$unix_path"
55268  fi
55269
55270  if test "x$path" != "x$new_path"; then
55271    MSVC_DLL="$new_path"
55272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55274  fi
55275
55276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55278
55279    else
55280      # We're on a unix platform. Hooray! :)
55281      path="$MSVC_DLL"
55282      has_space=`$ECHO "$path" | $GREP " "`
55283      if test "x$has_space" != x; then
55284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55287      fi
55288
55289      # Use eval to expand a potential ~
55290      eval path="$path"
55291      if test ! -f "$path" && test ! -d "$path"; then
55292        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55293      fi
55294
55295      if test -d "$path"; then
55296        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55297      else
55298        dir="`$DIRNAME "$path"`"
55299        base="`$BASENAME "$path"`"
55300        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55301      fi
55302    fi
55303  fi
55304
55305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55306$as_echo_n "checking for $DLL_NAME... " >&6; }
55307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55308$as_echo "$MSVC_DLL" >&6; }
55309    else
55310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55311$as_echo "incorrect, ignoring" >&6; }
55312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55314    fi
55315  fi
55316
55317  fi
55318
55319  if test "x$MSVC_DLL" = x; then
55320    # Probe: Look in the Windows system32 directory
55321    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55322
55323  windows_path="$CYGWIN_SYSTEMROOT"
55324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55325    unix_path=`$CYGPATH -u "$windows_path"`
55326    CYGWIN_SYSTEMROOT="$unix_path"
55327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55329    CYGWIN_SYSTEMROOT="$unix_path"
55330  fi
55331
55332    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55333
55334  DLL_NAME="$DLL_NAME"
55335  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55336  METHOD="well-known location in SYSTEMROOT"
55337  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55338    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55339$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55340
55341    # Need to check if the found msvcr is correct architecture
55342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55343$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55344    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55346      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55347      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55348      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55349        CORRECT_MSVCR_ARCH="PE32 executable"
55350      else
55351        CORRECT_MSVCR_ARCH="PE32+ executable"
55352      fi
55353    else
55354      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55355        CORRECT_MSVCR_ARCH=386
55356      else
55357        CORRECT_MSVCR_ARCH=x86-64
55358      fi
55359    fi
55360    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55362$as_echo "ok" >&6; }
55363      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55364
55365  # Only process if variable expands to non-empty
55366
55367  if test "x$MSVC_DLL" != x; then
55368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55369
55370  # Input might be given as Windows format, start by converting to
55371  # unix format.
55372  path="$MSVC_DLL"
55373  new_path=`$CYGPATH -u "$path"`
55374
55375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55378  # "foo.exe" is OK but "foo" is an error.
55379  #
55380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55381  # It is also a way to make sure we got the proper file name for the real test later on.
55382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55383  if test "x$test_shortpath" = x; then
55384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55385$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55386    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55387  fi
55388
55389  # Call helper function which possibly converts this using DOS-style short mode.
55390  # If so, the updated path is stored in $new_path.
55391
55392  input_path="$new_path"
55393  # Check if we need to convert this using DOS-style short mode. If the path
55394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55395  # take no chances and rewrite it.
55396  # Note: m4 eats our [], so we need to use [ and ] instead.
55397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55398  if test "x$has_forbidden_chars" != x; then
55399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55403      # Going to short mode and back again did indeed matter. Since short mode is
55404      # case insensitive, let's make it lowercase to improve readability.
55405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55406      # Now convert it back to Unix-style (cygpath)
55407      input_path=`$CYGPATH -u "$shortmode_path"`
55408      new_path="$input_path"
55409    fi
55410  fi
55411
55412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55413  if test "x$test_cygdrive_prefix" = x; then
55414    # As a simple fix, exclude /usr/bin since it's not a real path.
55415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55417      # a path prefixed by /cygdrive for fixpath to work.
55418      new_path="$CYGWIN_ROOT_PATH$input_path"
55419    fi
55420  fi
55421
55422
55423  if test "x$path" != "x$new_path"; then
55424    MSVC_DLL="$new_path"
55425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55426$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55427  fi
55428
55429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55430
55431  path="$MSVC_DLL"
55432  has_colon=`$ECHO $path | $GREP ^.:`
55433  new_path="$path"
55434  if test "x$has_colon" = x; then
55435    # Not in mixed or Windows style, start by that.
55436    new_path=`cmd //c echo $path`
55437  fi
55438
55439
55440  input_path="$new_path"
55441  # Check if we need to convert this using DOS-style short mode. If the path
55442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55443  # take no chances and rewrite it.
55444  # Note: m4 eats our [], so we need to use [ and ] instead.
55445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55446  if test "x$has_forbidden_chars" != x; then
55447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55449  fi
55450
55451
55452  windows_path="$new_path"
55453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55454    unix_path=`$CYGPATH -u "$windows_path"`
55455    new_path="$unix_path"
55456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55458    new_path="$unix_path"
55459  fi
55460
55461  if test "x$path" != "x$new_path"; then
55462    MSVC_DLL="$new_path"
55463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55464$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55465  fi
55466
55467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55469
55470    else
55471      # We're on a unix platform. Hooray! :)
55472      path="$MSVC_DLL"
55473      has_space=`$ECHO "$path" | $GREP " "`
55474      if test "x$has_space" != x; then
55475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55476$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55478      fi
55479
55480      # Use eval to expand a potential ~
55481      eval path="$path"
55482      if test ! -f "$path" && test ! -d "$path"; then
55483        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55484      fi
55485
55486      if test -d "$path"; then
55487        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55488      else
55489        dir="`$DIRNAME "$path"`"
55490        base="`$BASENAME "$path"`"
55491        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55492      fi
55493    fi
55494  fi
55495
55496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55497$as_echo_n "checking for $DLL_NAME... " >&6; }
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55499$as_echo "$MSVC_DLL" >&6; }
55500    else
55501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55502$as_echo "incorrect, ignoring" >&6; }
55503      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55504$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55505    fi
55506  fi
55507
55508  fi
55509
55510  if test "x$MSVC_DLL" = x; then
55511    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55512    if test "x$VS100COMNTOOLS" != x; then
55513      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55514
55515  windows_path="$CYGWIN_VS_TOOLS_DIR"
55516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55517    unix_path=`$CYGPATH -u "$windows_path"`
55518    CYGWIN_VS_TOOLS_DIR="$unix_path"
55519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55521    CYGWIN_VS_TOOLS_DIR="$unix_path"
55522  fi
55523
55524      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55525        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55526	    | $GREP -i /x64/ | $HEAD --lines 1`
55527      else
55528        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55529	    | $GREP -i /x86/ | $HEAD --lines 1`
55530      fi
55531
55532  DLL_NAME="$DLL_NAME"
55533  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55534  METHOD="search of VS100COMNTOOLS"
55535  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55536    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55537$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55538
55539    # Need to check if the found msvcr is correct architecture
55540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55541$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55542    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55544      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55545      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55546      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55547        CORRECT_MSVCR_ARCH="PE32 executable"
55548      else
55549        CORRECT_MSVCR_ARCH="PE32+ executable"
55550      fi
55551    else
55552      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55553        CORRECT_MSVCR_ARCH=386
55554      else
55555        CORRECT_MSVCR_ARCH=x86-64
55556      fi
55557    fi
55558    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55560$as_echo "ok" >&6; }
55561      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55562
55563  # Only process if variable expands to non-empty
55564
55565  if test "x$MSVC_DLL" != x; then
55566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55567
55568  # Input might be given as Windows format, start by converting to
55569  # unix format.
55570  path="$MSVC_DLL"
55571  new_path=`$CYGPATH -u "$path"`
55572
55573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55576  # "foo.exe" is OK but "foo" is an error.
55577  #
55578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55579  # It is also a way to make sure we got the proper file name for the real test later on.
55580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55581  if test "x$test_shortpath" = x; then
55582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55583$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55584    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55585  fi
55586
55587  # Call helper function which possibly converts this using DOS-style short mode.
55588  # If so, the updated path is stored in $new_path.
55589
55590  input_path="$new_path"
55591  # Check if we need to convert this using DOS-style short mode. If the path
55592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55593  # take no chances and rewrite it.
55594  # Note: m4 eats our [], so we need to use [ and ] instead.
55595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55596  if test "x$has_forbidden_chars" != x; then
55597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55601      # Going to short mode and back again did indeed matter. Since short mode is
55602      # case insensitive, let's make it lowercase to improve readability.
55603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55604      # Now convert it back to Unix-style (cygpath)
55605      input_path=`$CYGPATH -u "$shortmode_path"`
55606      new_path="$input_path"
55607    fi
55608  fi
55609
55610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55611  if test "x$test_cygdrive_prefix" = x; then
55612    # As a simple fix, exclude /usr/bin since it's not a real path.
55613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55615      # a path prefixed by /cygdrive for fixpath to work.
55616      new_path="$CYGWIN_ROOT_PATH$input_path"
55617    fi
55618  fi
55619
55620
55621  if test "x$path" != "x$new_path"; then
55622    MSVC_DLL="$new_path"
55623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55624$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55625  fi
55626
55627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55628
55629  path="$MSVC_DLL"
55630  has_colon=`$ECHO $path | $GREP ^.:`
55631  new_path="$path"
55632  if test "x$has_colon" = x; then
55633    # Not in mixed or Windows style, start by that.
55634    new_path=`cmd //c echo $path`
55635  fi
55636
55637
55638  input_path="$new_path"
55639  # Check if we need to convert this using DOS-style short mode. If the path
55640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55641  # take no chances and rewrite it.
55642  # Note: m4 eats our [], so we need to use [ and ] instead.
55643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55644  if test "x$has_forbidden_chars" != x; then
55645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55647  fi
55648
55649
55650  windows_path="$new_path"
55651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55652    unix_path=`$CYGPATH -u "$windows_path"`
55653    new_path="$unix_path"
55654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55656    new_path="$unix_path"
55657  fi
55658
55659  if test "x$path" != "x$new_path"; then
55660    MSVC_DLL="$new_path"
55661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55662$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55663  fi
55664
55665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55667
55668    else
55669      # We're on a unix platform. Hooray! :)
55670      path="$MSVC_DLL"
55671      has_space=`$ECHO "$path" | $GREP " "`
55672      if test "x$has_space" != x; then
55673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55674$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55676      fi
55677
55678      # Use eval to expand a potential ~
55679      eval path="$path"
55680      if test ! -f "$path" && test ! -d "$path"; then
55681        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55682      fi
55683
55684      if test -d "$path"; then
55685        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55686      else
55687        dir="`$DIRNAME "$path"`"
55688        base="`$BASENAME "$path"`"
55689        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55690      fi
55691    fi
55692  fi
55693
55694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55695$as_echo_n "checking for $DLL_NAME... " >&6; }
55696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55697$as_echo "$MSVC_DLL" >&6; }
55698    else
55699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55700$as_echo "incorrect, ignoring" >&6; }
55701      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55702$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55703    fi
55704  fi
55705
55706    fi
55707  fi
55708
55709  if test "x$MSVC_DLL" = x; then
55710    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55711    # (This was the original behaviour; kept since it might turn something up)
55712    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55713      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55714        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55715	    | $GREP x64 | $HEAD --lines 1`
55716      else
55717        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55718	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55719        if test "x$POSSIBLE_MSVC_DLL" = x; then
55720          # We're grasping at straws now...
55721          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55722	      | $HEAD --lines 1`
55723        fi
55724      fi
55725
55726
55727  DLL_NAME="$DLL_NAME"
55728  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55729  METHOD="search of VCINSTALLDIR"
55730  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55731    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55732$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55733
55734    # Need to check if the found msvcr is correct architecture
55735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55736$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55737    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55739      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55740      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55741      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55742        CORRECT_MSVCR_ARCH="PE32 executable"
55743      else
55744        CORRECT_MSVCR_ARCH="PE32+ executable"
55745      fi
55746    else
55747      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55748        CORRECT_MSVCR_ARCH=386
55749      else
55750        CORRECT_MSVCR_ARCH=x86-64
55751      fi
55752    fi
55753    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55755$as_echo "ok" >&6; }
55756      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55757
55758  # Only process if variable expands to non-empty
55759
55760  if test "x$MSVC_DLL" != x; then
55761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55762
55763  # Input might be given as Windows format, start by converting to
55764  # unix format.
55765  path="$MSVC_DLL"
55766  new_path=`$CYGPATH -u "$path"`
55767
55768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55771  # "foo.exe" is OK but "foo" is an error.
55772  #
55773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55774  # It is also a way to make sure we got the proper file name for the real test later on.
55775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55776  if test "x$test_shortpath" = x; then
55777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55778$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55779    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55780  fi
55781
55782  # Call helper function which possibly converts this using DOS-style short mode.
55783  # If so, the updated path is stored in $new_path.
55784
55785  input_path="$new_path"
55786  # Check if we need to convert this using DOS-style short mode. If the path
55787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55788  # take no chances and rewrite it.
55789  # Note: m4 eats our [], so we need to use [ and ] instead.
55790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55791  if test "x$has_forbidden_chars" != x; then
55792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55796      # Going to short mode and back again did indeed matter. Since short mode is
55797      # case insensitive, let's make it lowercase to improve readability.
55798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55799      # Now convert it back to Unix-style (cygpath)
55800      input_path=`$CYGPATH -u "$shortmode_path"`
55801      new_path="$input_path"
55802    fi
55803  fi
55804
55805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55806  if test "x$test_cygdrive_prefix" = x; then
55807    # As a simple fix, exclude /usr/bin since it's not a real path.
55808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55810      # a path prefixed by /cygdrive for fixpath to work.
55811      new_path="$CYGWIN_ROOT_PATH$input_path"
55812    fi
55813  fi
55814
55815
55816  if test "x$path" != "x$new_path"; then
55817    MSVC_DLL="$new_path"
55818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55819$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55820  fi
55821
55822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55823
55824  path="$MSVC_DLL"
55825  has_colon=`$ECHO $path | $GREP ^.:`
55826  new_path="$path"
55827  if test "x$has_colon" = x; then
55828    # Not in mixed or Windows style, start by that.
55829    new_path=`cmd //c echo $path`
55830  fi
55831
55832
55833  input_path="$new_path"
55834  # Check if we need to convert this using DOS-style short mode. If the path
55835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55836  # take no chances and rewrite it.
55837  # Note: m4 eats our [], so we need to use [ and ] instead.
55838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55839  if test "x$has_forbidden_chars" != x; then
55840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55842  fi
55843
55844
55845  windows_path="$new_path"
55846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55847    unix_path=`$CYGPATH -u "$windows_path"`
55848    new_path="$unix_path"
55849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55851    new_path="$unix_path"
55852  fi
55853
55854  if test "x$path" != "x$new_path"; then
55855    MSVC_DLL="$new_path"
55856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55857$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55858  fi
55859
55860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55862
55863    else
55864      # We're on a unix platform. Hooray! :)
55865      path="$MSVC_DLL"
55866      has_space=`$ECHO "$path" | $GREP " "`
55867      if test "x$has_space" != x; then
55868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55871      fi
55872
55873      # Use eval to expand a potential ~
55874      eval path="$path"
55875      if test ! -f "$path" && test ! -d "$path"; then
55876        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55877      fi
55878
55879      if test -d "$path"; then
55880        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55881      else
55882        dir="`$DIRNAME "$path"`"
55883        base="`$BASENAME "$path"`"
55884        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55885      fi
55886    fi
55887  fi
55888
55889      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55890$as_echo_n "checking for $DLL_NAME... " >&6; }
55891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55892$as_echo "$MSVC_DLL" >&6; }
55893    else
55894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55895$as_echo "incorrect, ignoring" >&6; }
55896      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55897$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55898    fi
55899  fi
55900
55901    fi
55902  fi
55903
55904  if test "x$MSVC_DLL" = x; then
55905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55906$as_echo_n "checking for $DLL_NAME... " >&6; }
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55908$as_echo "no" >&6; }
55909    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55910  fi
55911
55912      MSVCP_DLL="$MSVC_DLL"
55913    fi
55914
55915  fi
55916
55917  fi
55918
55919
55920  if test "x$NEEDS_LIB_X11" = xfalse; then
55921    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55923$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55924    fi
55925    X_CFLAGS=
55926    X_LIBS=
55927  else
55928
55929    if test "x${with_x}" = xno; then
55930      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55931    fi
55932
55933    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55934      # The user has specified a X11 base directory. Use it for includes and
55935      # libraries, unless explicitly overridden.
55936      if test "x$x_includes" = xNONE; then
55937        x_includes="${with_x}/include"
55938      fi
55939      if test "x$x_libraries" = xNONE; then
55940        x_libraries="${with_x}/lib"
55941      fi
55942    else
55943      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55944      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55945      # --x-libraries for the sysroot, if that seems to be correct.
55946      if test "x$SYSROOT" != "x"; then
55947        if test "x$x_includes" = xNONE; then
55948          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55949            x_includes="$SYSROOT/usr/X11R6/include"
55950          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55951            x_includes="$SYSROOT/usr/include"
55952          fi
55953        fi
55954        if test "x$x_libraries" = xNONE; then
55955          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55956            x_libraries="$SYSROOT/usr/X11R6/lib"
55957          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55958            x_libraries="$SYSROOT/usr/lib64"
55959          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55960            x_libraries="$SYSROOT/usr/lib"
55961          fi
55962        fi
55963      fi
55964    fi
55965
55966    # Now let autoconf do it's magic
55967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55968$as_echo_n "checking for X... " >&6; }
55969
55970
55971# Check whether --with-x was given.
55972if test "${with_x+set}" = set; then :
55973  withval=$with_x;
55974fi
55975
55976# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55977if test "x$with_x" = xno; then
55978  # The user explicitly disabled X.
55979  have_x=disabled
55980else
55981  case $x_includes,$x_libraries in #(
55982    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55983    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55984  $as_echo_n "(cached) " >&6
55985else
55986  # One or both of the vars are not set, and there is no cached value.
55987ac_x_includes=no ac_x_libraries=no
55988rm -f -r conftest.dir
55989if mkdir conftest.dir; then
55990  cd conftest.dir
55991  cat >Imakefile <<'_ACEOF'
55992incroot:
55993	@echo incroot='${INCROOT}'
55994usrlibdir:
55995	@echo usrlibdir='${USRLIBDIR}'
55996libdir:
55997	@echo libdir='${LIBDIR}'
55998_ACEOF
55999  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56000    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56001    for ac_var in incroot usrlibdir libdir; do
56002      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56003    done
56004    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56005    for ac_extension in a so sl dylib la dll; do
56006      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56007	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56008	ac_im_usrlibdir=$ac_im_libdir; break
56009      fi
56010    done
56011    # Screen out bogus values from the imake configuration.  They are
56012    # bogus both because they are the default anyway, and because
56013    # using them would break gcc on systems where it needs fixed includes.
56014    case $ac_im_incroot in
56015	/usr/include) ac_x_includes= ;;
56016	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56017    esac
56018    case $ac_im_usrlibdir in
56019	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56020	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56021    esac
56022  fi
56023  cd ..
56024  rm -f -r conftest.dir
56025fi
56026
56027# Standard set of common directories for X headers.
56028# Check X11 before X11Rn because it is often a symlink to the current release.
56029ac_x_header_dirs='
56030/usr/X11/include
56031/usr/X11R7/include
56032/usr/X11R6/include
56033/usr/X11R5/include
56034/usr/X11R4/include
56035
56036/usr/include/X11
56037/usr/include/X11R7
56038/usr/include/X11R6
56039/usr/include/X11R5
56040/usr/include/X11R4
56041
56042/usr/local/X11/include
56043/usr/local/X11R7/include
56044/usr/local/X11R6/include
56045/usr/local/X11R5/include
56046/usr/local/X11R4/include
56047
56048/usr/local/include/X11
56049/usr/local/include/X11R7
56050/usr/local/include/X11R6
56051/usr/local/include/X11R5
56052/usr/local/include/X11R4
56053
56054/usr/X386/include
56055/usr/x386/include
56056/usr/XFree86/include/X11
56057
56058/usr/include
56059/usr/local/include
56060/usr/unsupported/include
56061/usr/athena/include
56062/usr/local/x11r5/include
56063/usr/lpp/Xamples/include
56064
56065/usr/openwin/include
56066/usr/openwin/share/include'
56067
56068if test "$ac_x_includes" = no; then
56069  # Guess where to find include files, by looking for Xlib.h.
56070  # First, try using that file with no special directory specified.
56071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56072/* end confdefs.h.  */
56073#include <X11/Xlib.h>
56074_ACEOF
56075if ac_fn_cxx_try_cpp "$LINENO"; then :
56076  # We can compile using X headers with no special include directory.
56077ac_x_includes=
56078else
56079  for ac_dir in $ac_x_header_dirs; do
56080  if test -r "$ac_dir/X11/Xlib.h"; then
56081    ac_x_includes=$ac_dir
56082    break
56083  fi
56084done
56085fi
56086rm -f conftest.err conftest.i conftest.$ac_ext
56087fi # $ac_x_includes = no
56088
56089if test "$ac_x_libraries" = no; then
56090  # Check for the libraries.
56091  # See if we find them without any special options.
56092  # Don't add to $LIBS permanently.
56093  ac_save_LIBS=$LIBS
56094  LIBS="-lX11 $LIBS"
56095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56096/* end confdefs.h.  */
56097#include <X11/Xlib.h>
56098int
56099main ()
56100{
56101XrmInitialize ()
56102  ;
56103  return 0;
56104}
56105_ACEOF
56106if ac_fn_cxx_try_link "$LINENO"; then :
56107  LIBS=$ac_save_LIBS
56108# We can link X programs with no special library path.
56109ac_x_libraries=
56110else
56111  LIBS=$ac_save_LIBS
56112for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56113do
56114  # Don't even attempt the hair of trying to link an X program!
56115  for ac_extension in a so sl dylib la dll; do
56116    if test -r "$ac_dir/libX11.$ac_extension"; then
56117      ac_x_libraries=$ac_dir
56118      break 2
56119    fi
56120  done
56121done
56122fi
56123rm -f core conftest.err conftest.$ac_objext \
56124    conftest$ac_exeext conftest.$ac_ext
56125fi # $ac_x_libraries = no
56126
56127case $ac_x_includes,$ac_x_libraries in #(
56128  no,* | *,no | *\'*)
56129    # Didn't find X, or a directory has "'" in its name.
56130    ac_cv_have_x="have_x=no";; #(
56131  *)
56132    # Record where we found X for the cache.
56133    ac_cv_have_x="have_x=yes\
56134	ac_x_includes='$ac_x_includes'\
56135	ac_x_libraries='$ac_x_libraries'"
56136esac
56137fi
56138;; #(
56139    *) have_x=yes;;
56140  esac
56141  eval "$ac_cv_have_x"
56142fi # $with_x != no
56143
56144if test "$have_x" != yes; then
56145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56146$as_echo "$have_x" >&6; }
56147  no_x=yes
56148else
56149  # If each of the values was on the command line, it overrides each guess.
56150  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56151  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56152  # Update the cache value to reflect the command line values.
56153  ac_cv_have_x="have_x=yes\
56154	ac_x_includes='$x_includes'\
56155	ac_x_libraries='$x_libraries'"
56156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56157$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56158fi
56159
56160    if test "$no_x" = yes; then
56161  # Not all programs may use this symbol, but it does not hurt to define it.
56162
56163$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56164
56165  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56166else
56167  if test -n "$x_includes"; then
56168    X_CFLAGS="$X_CFLAGS -I$x_includes"
56169  fi
56170
56171  # It would also be nice to do this for all -L options, not just this one.
56172  if test -n "$x_libraries"; then
56173    X_LIBS="$X_LIBS -L$x_libraries"
56174    # For Solaris; some versions of Sun CC require a space after -R and
56175    # others require no space.  Words are not sufficient . . . .
56176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56177$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56178    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56179    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56180    ac_cxx_werror_flag=yes
56181    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56182/* end confdefs.h.  */
56183
56184int
56185main ()
56186{
56187
56188  ;
56189  return 0;
56190}
56191_ACEOF
56192if ac_fn_cxx_try_link "$LINENO"; then :
56193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56194$as_echo "no" >&6; }
56195       X_LIBS="$X_LIBS -R$x_libraries"
56196else
56197  LIBS="$ac_xsave_LIBS -R $x_libraries"
56198       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56199/* end confdefs.h.  */
56200
56201int
56202main ()
56203{
56204
56205  ;
56206  return 0;
56207}
56208_ACEOF
56209if ac_fn_cxx_try_link "$LINENO"; then :
56210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56211$as_echo "yes" >&6; }
56212	  X_LIBS="$X_LIBS -R $x_libraries"
56213else
56214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56215$as_echo "neither works" >&6; }
56216fi
56217rm -f core conftest.err conftest.$ac_objext \
56218    conftest$ac_exeext conftest.$ac_ext
56219fi
56220rm -f core conftest.err conftest.$ac_objext \
56221    conftest$ac_exeext conftest.$ac_ext
56222    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56223    LIBS=$ac_xsave_LIBS
56224  fi
56225
56226  # Check for system-dependent libraries X programs must link with.
56227  # Do this before checking for the system-independent R6 libraries
56228  # (-lICE), since we may need -lsocket or whatever for X linking.
56229
56230  if test "$ISC" = yes; then
56231    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56232  else
56233    # Martyn Johnson says this is needed for Ultrix, if the X
56234    # libraries were built with DECnet support.  And Karl Berry says
56235    # the Alpha needs dnet_stub (dnet does not exist).
56236    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56237    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56238/* end confdefs.h.  */
56239
56240/* Override any GCC internal prototype to avoid an error.
56241   Use char because int might match the return type of a GCC
56242   builtin and then its argument prototype would still apply.  */
56243#ifdef __cplusplus
56244extern "C"
56245#endif
56246char XOpenDisplay ();
56247int
56248main ()
56249{
56250return XOpenDisplay ();
56251  ;
56252  return 0;
56253}
56254_ACEOF
56255if ac_fn_cxx_try_link "$LINENO"; then :
56256
56257else
56258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56259$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56260if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56261  $as_echo_n "(cached) " >&6
56262else
56263  ac_check_lib_save_LIBS=$LIBS
56264LIBS="-ldnet  $LIBS"
56265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56266/* end confdefs.h.  */
56267
56268/* Override any GCC internal prototype to avoid an error.
56269   Use char because int might match the return type of a GCC
56270   builtin and then its argument prototype would still apply.  */
56271#ifdef __cplusplus
56272extern "C"
56273#endif
56274char dnet_ntoa ();
56275int
56276main ()
56277{
56278return dnet_ntoa ();
56279  ;
56280  return 0;
56281}
56282_ACEOF
56283if ac_fn_cxx_try_link "$LINENO"; then :
56284  ac_cv_lib_dnet_dnet_ntoa=yes
56285else
56286  ac_cv_lib_dnet_dnet_ntoa=no
56287fi
56288rm -f core conftest.err conftest.$ac_objext \
56289    conftest$ac_exeext conftest.$ac_ext
56290LIBS=$ac_check_lib_save_LIBS
56291fi
56292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56293$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56294if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56295  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56296fi
56297
56298    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56300$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56301if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56302  $as_echo_n "(cached) " >&6
56303else
56304  ac_check_lib_save_LIBS=$LIBS
56305LIBS="-ldnet_stub  $LIBS"
56306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56307/* end confdefs.h.  */
56308
56309/* Override any GCC internal prototype to avoid an error.
56310   Use char because int might match the return type of a GCC
56311   builtin and then its argument prototype would still apply.  */
56312#ifdef __cplusplus
56313extern "C"
56314#endif
56315char dnet_ntoa ();
56316int
56317main ()
56318{
56319return dnet_ntoa ();
56320  ;
56321  return 0;
56322}
56323_ACEOF
56324if ac_fn_cxx_try_link "$LINENO"; then :
56325  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56326else
56327  ac_cv_lib_dnet_stub_dnet_ntoa=no
56328fi
56329rm -f core conftest.err conftest.$ac_objext \
56330    conftest$ac_exeext conftest.$ac_ext
56331LIBS=$ac_check_lib_save_LIBS
56332fi
56333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56334$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56335if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56336  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56337fi
56338
56339    fi
56340fi
56341rm -f core conftest.err conftest.$ac_objext \
56342    conftest$ac_exeext conftest.$ac_ext
56343    LIBS="$ac_xsave_LIBS"
56344
56345    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56346    # to get the SysV transport functions.
56347    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56348    # needs -lnsl.
56349    # The nsl library prevents programs from opening the X display
56350    # on Irix 5.2, according to T.E. Dickey.
56351    # The functions gethostbyname, getservbyname, and inet_addr are
56352    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56353    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56354if test "x$ac_cv_func_gethostbyname" = xyes; then :
56355
56356fi
56357
56358    if test $ac_cv_func_gethostbyname = no; then
56359      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56360$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56361if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56362  $as_echo_n "(cached) " >&6
56363else
56364  ac_check_lib_save_LIBS=$LIBS
56365LIBS="-lnsl  $LIBS"
56366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56367/* end confdefs.h.  */
56368
56369/* Override any GCC internal prototype to avoid an error.
56370   Use char because int might match the return type of a GCC
56371   builtin and then its argument prototype would still apply.  */
56372#ifdef __cplusplus
56373extern "C"
56374#endif
56375char gethostbyname ();
56376int
56377main ()
56378{
56379return gethostbyname ();
56380  ;
56381  return 0;
56382}
56383_ACEOF
56384if ac_fn_cxx_try_link "$LINENO"; then :
56385  ac_cv_lib_nsl_gethostbyname=yes
56386else
56387  ac_cv_lib_nsl_gethostbyname=no
56388fi
56389rm -f core conftest.err conftest.$ac_objext \
56390    conftest$ac_exeext conftest.$ac_ext
56391LIBS=$ac_check_lib_save_LIBS
56392fi
56393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56394$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56395if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56396  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56397fi
56398
56399      if test $ac_cv_lib_nsl_gethostbyname = no; then
56400	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56401$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56402if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56403  $as_echo_n "(cached) " >&6
56404else
56405  ac_check_lib_save_LIBS=$LIBS
56406LIBS="-lbsd  $LIBS"
56407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56408/* end confdefs.h.  */
56409
56410/* Override any GCC internal prototype to avoid an error.
56411   Use char because int might match the return type of a GCC
56412   builtin and then its argument prototype would still apply.  */
56413#ifdef __cplusplus
56414extern "C"
56415#endif
56416char gethostbyname ();
56417int
56418main ()
56419{
56420return gethostbyname ();
56421  ;
56422  return 0;
56423}
56424_ACEOF
56425if ac_fn_cxx_try_link "$LINENO"; then :
56426  ac_cv_lib_bsd_gethostbyname=yes
56427else
56428  ac_cv_lib_bsd_gethostbyname=no
56429fi
56430rm -f core conftest.err conftest.$ac_objext \
56431    conftest$ac_exeext conftest.$ac_ext
56432LIBS=$ac_check_lib_save_LIBS
56433fi
56434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56435$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56436if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56437  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56438fi
56439
56440      fi
56441    fi
56442
56443    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56444    # socket/setsockopt and other routines are undefined under SCO ODT
56445    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56446    # on later versions), says Simon Leinen: it contains gethostby*
56447    # variants that don't use the name server (or something).  -lsocket
56448    # must be given before -lnsl if both are needed.  We assume that
56449    # if connect needs -lnsl, so does gethostbyname.
56450    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56451if test "x$ac_cv_func_connect" = xyes; then :
56452
56453fi
56454
56455    if test $ac_cv_func_connect = no; then
56456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56457$as_echo_n "checking for connect in -lsocket... " >&6; }
56458if ${ac_cv_lib_socket_connect+:} false; then :
56459  $as_echo_n "(cached) " >&6
56460else
56461  ac_check_lib_save_LIBS=$LIBS
56462LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56464/* end confdefs.h.  */
56465
56466/* Override any GCC internal prototype to avoid an error.
56467   Use char because int might match the return type of a GCC
56468   builtin and then its argument prototype would still apply.  */
56469#ifdef __cplusplus
56470extern "C"
56471#endif
56472char connect ();
56473int
56474main ()
56475{
56476return connect ();
56477  ;
56478  return 0;
56479}
56480_ACEOF
56481if ac_fn_cxx_try_link "$LINENO"; then :
56482  ac_cv_lib_socket_connect=yes
56483else
56484  ac_cv_lib_socket_connect=no
56485fi
56486rm -f core conftest.err conftest.$ac_objext \
56487    conftest$ac_exeext conftest.$ac_ext
56488LIBS=$ac_check_lib_save_LIBS
56489fi
56490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56491$as_echo "$ac_cv_lib_socket_connect" >&6; }
56492if test "x$ac_cv_lib_socket_connect" = xyes; then :
56493  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56494fi
56495
56496    fi
56497
56498    # Guillermo Gomez says -lposix is necessary on A/UX.
56499    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56500if test "x$ac_cv_func_remove" = xyes; then :
56501
56502fi
56503
56504    if test $ac_cv_func_remove = no; then
56505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56506$as_echo_n "checking for remove in -lposix... " >&6; }
56507if ${ac_cv_lib_posix_remove+:} false; then :
56508  $as_echo_n "(cached) " >&6
56509else
56510  ac_check_lib_save_LIBS=$LIBS
56511LIBS="-lposix  $LIBS"
56512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56513/* end confdefs.h.  */
56514
56515/* Override any GCC internal prototype to avoid an error.
56516   Use char because int might match the return type of a GCC
56517   builtin and then its argument prototype would still apply.  */
56518#ifdef __cplusplus
56519extern "C"
56520#endif
56521char remove ();
56522int
56523main ()
56524{
56525return remove ();
56526  ;
56527  return 0;
56528}
56529_ACEOF
56530if ac_fn_cxx_try_link "$LINENO"; then :
56531  ac_cv_lib_posix_remove=yes
56532else
56533  ac_cv_lib_posix_remove=no
56534fi
56535rm -f core conftest.err conftest.$ac_objext \
56536    conftest$ac_exeext conftest.$ac_ext
56537LIBS=$ac_check_lib_save_LIBS
56538fi
56539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56540$as_echo "$ac_cv_lib_posix_remove" >&6; }
56541if test "x$ac_cv_lib_posix_remove" = xyes; then :
56542  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56543fi
56544
56545    fi
56546
56547    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56548    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56549if test "x$ac_cv_func_shmat" = xyes; then :
56550
56551fi
56552
56553    if test $ac_cv_func_shmat = no; then
56554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56555$as_echo_n "checking for shmat in -lipc... " >&6; }
56556if ${ac_cv_lib_ipc_shmat+:} false; then :
56557  $as_echo_n "(cached) " >&6
56558else
56559  ac_check_lib_save_LIBS=$LIBS
56560LIBS="-lipc  $LIBS"
56561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56562/* end confdefs.h.  */
56563
56564/* Override any GCC internal prototype to avoid an error.
56565   Use char because int might match the return type of a GCC
56566   builtin and then its argument prototype would still apply.  */
56567#ifdef __cplusplus
56568extern "C"
56569#endif
56570char shmat ();
56571int
56572main ()
56573{
56574return shmat ();
56575  ;
56576  return 0;
56577}
56578_ACEOF
56579if ac_fn_cxx_try_link "$LINENO"; then :
56580  ac_cv_lib_ipc_shmat=yes
56581else
56582  ac_cv_lib_ipc_shmat=no
56583fi
56584rm -f core conftest.err conftest.$ac_objext \
56585    conftest$ac_exeext conftest.$ac_ext
56586LIBS=$ac_check_lib_save_LIBS
56587fi
56588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56589$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56590if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56591  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56592fi
56593
56594    fi
56595  fi
56596
56597  # Check for libraries that X11R6 Xt/Xaw programs need.
56598  ac_save_LDFLAGS=$LDFLAGS
56599  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56600  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56601  # check for ICE first), but we must link in the order -lSM -lICE or
56602  # we get undefined symbols.  So assume we have SM if we have ICE.
56603  # These have to be linked with before -lX11, unlike the other
56604  # libraries we check for below, so use a different variable.
56605  # John Interrante, Karl Berry
56606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56607$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56608if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56609  $as_echo_n "(cached) " >&6
56610else
56611  ac_check_lib_save_LIBS=$LIBS
56612LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56614/* end confdefs.h.  */
56615
56616/* Override any GCC internal prototype to avoid an error.
56617   Use char because int might match the return type of a GCC
56618   builtin and then its argument prototype would still apply.  */
56619#ifdef __cplusplus
56620extern "C"
56621#endif
56622char IceConnectionNumber ();
56623int
56624main ()
56625{
56626return IceConnectionNumber ();
56627  ;
56628  return 0;
56629}
56630_ACEOF
56631if ac_fn_cxx_try_link "$LINENO"; then :
56632  ac_cv_lib_ICE_IceConnectionNumber=yes
56633else
56634  ac_cv_lib_ICE_IceConnectionNumber=no
56635fi
56636rm -f core conftest.err conftest.$ac_objext \
56637    conftest$ac_exeext conftest.$ac_ext
56638LIBS=$ac_check_lib_save_LIBS
56639fi
56640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56641$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56642if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56643  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56644fi
56645
56646  LDFLAGS=$ac_save_LDFLAGS
56647
56648fi
56649
56650
56651    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56652    # this doesn't make sense so we remove it.
56653    if test "x$COMPILE_TYPE" = xcross; then
56654      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56655    fi
56656
56657    if test "x$no_x" = xyes; then
56658
56659  # Print a helpful message on how to acquire the necessary build dependency.
56660  # x11 is the help tag: freetype, cups, alsa etc
56661  MISSING_DEPENDENCY=x11
56662
56663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56664    cygwin_help $MISSING_DEPENDENCY
56665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56666    msys_help $MISSING_DEPENDENCY
56667  else
56668    PKGHANDLER_COMMAND=
56669
56670    case $PKGHANDLER in
56671      apt-get)
56672        apt_help     $MISSING_DEPENDENCY ;;
56673      yum)
56674        yum_help     $MISSING_DEPENDENCY ;;
56675      port)
56676        port_help    $MISSING_DEPENDENCY ;;
56677      pkgutil)
56678        pkgutil_help $MISSING_DEPENDENCY ;;
56679      pkgadd)
56680        pkgadd_help  $MISSING_DEPENDENCY ;;
56681    esac
56682
56683    if test "x$PKGHANDLER_COMMAND" != x; then
56684      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56685    fi
56686  fi
56687
56688      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56689    fi
56690
56691    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56692      OPENWIN_HOME="/usr/openwin"
56693      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56694      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56695          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56696    fi
56697
56698    ac_ext=c
56699ac_cpp='$CPP $CPPFLAGS'
56700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56702ac_compiler_gnu=$ac_cv_c_compiler_gnu
56703
56704    OLD_CFLAGS="$CFLAGS"
56705    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56706
56707    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56708    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56709do :
56710  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56711ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56712          # include <X11/Xlib.h>
56713          # include <X11/Xutil.h>
56714
56715
56716"
56717if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56718  cat >>confdefs.h <<_ACEOF
56719#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56720_ACEOF
56721 X11_HEADERS_OK=yes
56722else
56723  X11_HEADERS_OK=no; break
56724fi
56725
56726done
56727
56728
56729    if test "x$X11_HEADERS_OK" = xno; then
56730
56731  # Print a helpful message on how to acquire the necessary build dependency.
56732  # x11 is the help tag: freetype, cups, alsa etc
56733  MISSING_DEPENDENCY=x11
56734
56735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56736    cygwin_help $MISSING_DEPENDENCY
56737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56738    msys_help $MISSING_DEPENDENCY
56739  else
56740    PKGHANDLER_COMMAND=
56741
56742    case $PKGHANDLER in
56743      apt-get)
56744        apt_help     $MISSING_DEPENDENCY ;;
56745      yum)
56746        yum_help     $MISSING_DEPENDENCY ;;
56747      port)
56748        port_help    $MISSING_DEPENDENCY ;;
56749      pkgutil)
56750        pkgutil_help $MISSING_DEPENDENCY ;;
56751      pkgadd)
56752        pkgadd_help  $MISSING_DEPENDENCY ;;
56753    esac
56754
56755    if test "x$PKGHANDLER_COMMAND" != x; then
56756      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56757    fi
56758  fi
56759
56760      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56761    fi
56762
56763    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56764    # defined in libawt_xawt.
56765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56766$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56768/* end confdefs.h.  */
56769#include <X11/extensions/Xrender.h>
56770int
56771main ()
56772{
56773XLinearGradient x;
56774  ;
56775  return 0;
56776}
56777_ACEOF
56778if ac_fn_c_try_compile "$LINENO"; then :
56779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56780$as_echo "yes" >&6; }
56781else
56782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56783$as_echo "no" >&6; }
56784         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56785fi
56786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56787
56788    CFLAGS="$OLD_CFLAGS"
56789    ac_ext=cpp
56790ac_cpp='$CXXCPP $CPPFLAGS'
56791ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56792ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56793ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56794
56795  fi # NEEDS_LIB_X11
56796
56797
56798
56799
56800
56801
56802# Check whether --with-cups was given.
56803if test "${with_cups+set}" = set; then :
56804  withval=$with_cups;
56805fi
56806
56807
56808# Check whether --with-cups-include was given.
56809if test "${with_cups_include+set}" = set; then :
56810  withval=$with_cups_include;
56811fi
56812
56813
56814  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56815    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56816        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56817      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56818$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56819    fi
56820    CUPS_CFLAGS=
56821  else
56822    CUPS_FOUND=no
56823
56824    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56825      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56826    fi
56827
56828    if test "x${with_cups}" != x; then
56829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56830$as_echo_n "checking for cups headers... " >&6; }
56831      if test -s "${with_cups}/include/cups/cups.h"; then
56832        CUPS_CFLAGS="-I${with_cups}/include"
56833        CUPS_FOUND=yes
56834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56835$as_echo "$CUPS_FOUND" >&6; }
56836      else
56837        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56838      fi
56839    fi
56840    if test "x${with_cups_include}" != x; then
56841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56842$as_echo_n "checking for cups headers... " >&6; }
56843      if test -s "${with_cups_include}/cups/cups.h"; then
56844        CUPS_CFLAGS="-I${with_cups_include}"
56845        CUPS_FOUND=yes
56846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56847$as_echo "$CUPS_FOUND" >&6; }
56848      else
56849        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56850      fi
56851    fi
56852    if test "x$CUPS_FOUND" = xno; then
56853      # Are the cups headers installed in the default /usr/include location?
56854      for ac_header in cups/cups.h cups/ppd.h
56855do :
56856  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56857ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56858if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56859  cat >>confdefs.h <<_ACEOF
56860#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56861_ACEOF
56862
56863          CUPS_FOUND=yes
56864          CUPS_CFLAGS=
56865          DEFAULT_CUPS=yes
56866
56867fi
56868
56869done
56870
56871    fi
56872    if test "x$CUPS_FOUND" = xno; then
56873
56874  # Print a helpful message on how to acquire the necessary build dependency.
56875  # cups is the help tag: freetype, cups, alsa etc
56876  MISSING_DEPENDENCY=cups
56877
56878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56879    cygwin_help $MISSING_DEPENDENCY
56880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56881    msys_help $MISSING_DEPENDENCY
56882  else
56883    PKGHANDLER_COMMAND=
56884
56885    case $PKGHANDLER in
56886      apt-get)
56887        apt_help     $MISSING_DEPENDENCY ;;
56888      yum)
56889        yum_help     $MISSING_DEPENDENCY ;;
56890      port)
56891        port_help    $MISSING_DEPENDENCY ;;
56892      pkgutil)
56893        pkgutil_help $MISSING_DEPENDENCY ;;
56894      pkgadd)
56895        pkgadd_help  $MISSING_DEPENDENCY ;;
56896    esac
56897
56898    if test "x$PKGHANDLER_COMMAND" != x; then
56899      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56900    fi
56901  fi
56902
56903      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56904    fi
56905  fi
56906
56907
56908
56909
56910
56911# Check whether --with-freetype was given.
56912if test "${with_freetype+set}" = set; then :
56913  withval=$with_freetype;
56914fi
56915
56916
56917# Check whether --with-freetype-include was given.
56918if test "${with_freetype_include+set}" = set; then :
56919  withval=$with_freetype_include;
56920fi
56921
56922
56923# Check whether --with-freetype-lib was given.
56924if test "${with_freetype_lib+set}" = set; then :
56925  withval=$with_freetype_lib;
56926fi
56927
56928
56929# Check whether --with-freetype-src was given.
56930if test "${with_freetype_src+set}" = set; then :
56931  withval=$with_freetype_src;
56932fi
56933
56934  # Check whether --enable-freetype-bundling was given.
56935if test "${enable_freetype_bundling+set}" = set; then :
56936  enableval=$enable_freetype_bundling;
56937fi
56938
56939
56940  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56941  FREETYPE_BASE_NAME=freetype
56942  FREETYPE_CFLAGS=
56943  FREETYPE_LIBS=
56944  FREETYPE_BUNDLE_LIB_PATH=
56945
56946  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56947    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56948        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56949        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56950        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56951      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56952$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56953    fi
56954    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56955      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56956$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56957    fi
56958  else
56959    # freetype is needed to build; go get it!
56960
56961    BUNDLE_FREETYPE="$enable_freetype_bundling"
56962
56963    if  test "x$with_freetype_src" != x; then
56964      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56965        # Try to build freetype if --with-freetype-src was given on Windows
56966
56967  FREETYPE_SRC_PATH="$with_freetype_src"
56968  BUILD_FREETYPE=yes
56969
56970  # Check if the freetype sources are acessible..
56971  if ! test -d $FREETYPE_SRC_PATH; then
56972    { $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
56973$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56974    BUILD_FREETYPE=no
56975  fi
56976  # ..and contain a vc2010 project file
56977  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56978  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56979    { $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
56980$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56981    BUILD_FREETYPE=no
56982  fi
56983  # Now check if configure found a version of 'msbuild.exe'
56984  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56985    { $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
56986$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;}
56987    BUILD_FREETYPE=no
56988  fi
56989
56990  # Ready to go..
56991  if test "x$BUILD_FREETYPE" = xyes; then
56992    # msbuild requires trailing slashes for output directories
56993    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56994    freetype_lib_path_unix="$freetype_lib_path"
56995    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56996
56997  unix_path="$vcxproj_path"
56998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56999    windows_path=`$CYGPATH -m "$unix_path"`
57000    vcxproj_path="$windows_path"
57001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57002    windows_path=`cmd //c echo $unix_path`
57003    vcxproj_path="$windows_path"
57004  fi
57005
57006
57007  unix_path="$freetype_lib_path"
57008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57009    windows_path=`$CYGPATH -m "$unix_path"`
57010    freetype_lib_path="$windows_path"
57011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57012    windows_path=`cmd //c echo $unix_path`
57013    freetype_lib_path="$windows_path"
57014  fi
57015
57016
57017  unix_path="$freetype_obj_path"
57018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57019    windows_path=`$CYGPATH -m "$unix_path"`
57020    freetype_obj_path="$windows_path"
57021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57022    windows_path=`cmd //c echo $unix_path`
57023    freetype_obj_path="$windows_path"
57024  fi
57025
57026    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57027      freetype_platform=x64
57028    else
57029      freetype_platform=win32
57030    fi
57031
57032    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57033    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57034    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57035    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57036    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57037$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57038
57039    # First we try to build the freetype.dll
57040    $ECHO -e "@echo off\n"\
57041        "$MSBUILD $vcxproj_path "\
57042        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57043        "/p:Configuration=\"Release Multithreaded\" "\
57044        "/p:Platform=$freetype_platform "\
57045        "/p:ConfigurationType=DynamicLibrary "\
57046        "/p:TargetName=freetype "\
57047        "/p:OutDir=\"$freetype_lib_path\" "\
57048        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57049    cmd /c freetype.bat
57050
57051    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57052      # If that succeeds we also build freetype.lib
57053      $ECHO -e "@echo off\n"\
57054          "$MSBUILD $vcxproj_path "\
57055          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57056          "/p:Configuration=\"Release Multithreaded\" "\
57057          "/p:Platform=$freetype_platform "\
57058          "/p:ConfigurationType=StaticLibrary "\
57059          "/p:TargetName=freetype "\
57060          "/p:OutDir=\"$freetype_lib_path\" "\
57061          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57062      cmd /c freetype.bat
57063
57064      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57065        # Once we build both, lib and dll, set freetype lib and include path appropriately
57066        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57067        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57068        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57069$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57070      else
57071        BUILD_FREETYPE=no
57072      fi
57073    else
57074      BUILD_FREETYPE=no
57075    fi
57076  fi
57077
57078        if test "x$BUILD_FREETYPE" = xyes; then
57079          # Okay, we built it. Check that it works.
57080
57081  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57082  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57083  METHOD="--with-freetype-src"
57084
57085  # Let's start with an optimistic view of the world :-)
57086  FOUND_FREETYPE=yes
57087
57088  # First look for the canonical freetype main include file ft2build.h.
57089  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57090    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57091    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57092    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57093      # Fail.
57094      FOUND_FREETYPE=no
57095    fi
57096  fi
57097
57098  if test "x$FOUND_FREETYPE" = xyes; then
57099    # Include file found, let's continue the sanity check.
57100    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57101$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57102
57103    # Reset to default value
57104    FREETYPE_BASE_NAME=freetype
57105    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57106    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57107      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57108          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57109        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57110        # for the .6 version explicitly.
57111        FREETYPE_BASE_NAME=freetype.6
57112        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57113        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57114$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57115      else
57116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57117$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57118        FOUND_FREETYPE=no
57119      fi
57120    else
57121      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57122        # On Windows, we will need both .lib and .dll file.
57123        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57124          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57126          FOUND_FREETYPE=no
57127        fi
57128      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57130        # Found lib in isa dir, use that instead.
57131        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57132        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57133$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57134      fi
57135    fi
57136  fi
57137
57138  if test "x$FOUND_FREETYPE" = xyes; then
57139
57140  # Only process if variable expands to non-empty
57141
57142  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57144
57145  # Input might be given as Windows format, start by converting to
57146  # unix format.
57147  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57148  new_path=`$CYGPATH -u "$path"`
57149
57150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57153  # "foo.exe" is OK but "foo" is an error.
57154  #
57155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57156  # It is also a way to make sure we got the proper file name for the real test later on.
57157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57158  if test "x$test_shortpath" = x; then
57159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57162  fi
57163
57164  # Call helper function which possibly converts this using DOS-style short mode.
57165  # If so, the updated path is stored in $new_path.
57166
57167  input_path="$new_path"
57168  # Check if we need to convert this using DOS-style short mode. If the path
57169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57170  # take no chances and rewrite it.
57171  # Note: m4 eats our [], so we need to use [ and ] instead.
57172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57173  if test "x$has_forbidden_chars" != x; then
57174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57178      # Going to short mode and back again did indeed matter. Since short mode is
57179      # case insensitive, let's make it lowercase to improve readability.
57180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57181      # Now convert it back to Unix-style (cygpath)
57182      input_path=`$CYGPATH -u "$shortmode_path"`
57183      new_path="$input_path"
57184    fi
57185  fi
57186
57187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57188  if test "x$test_cygdrive_prefix" = x; then
57189    # As a simple fix, exclude /usr/bin since it's not a real path.
57190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57192      # a path prefixed by /cygdrive for fixpath to work.
57193      new_path="$CYGWIN_ROOT_PATH$input_path"
57194    fi
57195  fi
57196
57197
57198  if test "x$path" != "x$new_path"; then
57199    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57202  fi
57203
57204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57205
57206  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57207  has_colon=`$ECHO $path | $GREP ^.:`
57208  new_path="$path"
57209  if test "x$has_colon" = x; then
57210    # Not in mixed or Windows style, start by that.
57211    new_path=`cmd //c echo $path`
57212  fi
57213
57214
57215  input_path="$new_path"
57216  # Check if we need to convert this using DOS-style short mode. If the path
57217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57218  # take no chances and rewrite it.
57219  # Note: m4 eats our [], so we need to use [ and ] instead.
57220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57221  if test "x$has_forbidden_chars" != x; then
57222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57224  fi
57225
57226
57227  windows_path="$new_path"
57228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57229    unix_path=`$CYGPATH -u "$windows_path"`
57230    new_path="$unix_path"
57231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57233    new_path="$unix_path"
57234  fi
57235
57236  if test "x$path" != "x$new_path"; then
57237    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57240  fi
57241
57242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57244
57245    else
57246      # We're on a unix platform. Hooray! :)
57247      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57248      has_space=`$ECHO "$path" | $GREP " "`
57249      if test "x$has_space" != x; then
57250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57253      fi
57254
57255      # Use eval to expand a potential ~
57256      eval path="$path"
57257      if test ! -f "$path" && test ! -d "$path"; then
57258        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57259      fi
57260
57261      if test -d "$path"; then
57262        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57263      else
57264        dir="`$DIRNAME "$path"`"
57265        base="`$BASENAME "$path"`"
57266        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57267      fi
57268    fi
57269  fi
57270
57271
57272  # Only process if variable expands to non-empty
57273
57274  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57276
57277  # Input might be given as Windows format, start by converting to
57278  # unix format.
57279  path="$POTENTIAL_FREETYPE_LIB_PATH"
57280  new_path=`$CYGPATH -u "$path"`
57281
57282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57285  # "foo.exe" is OK but "foo" is an error.
57286  #
57287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57288  # It is also a way to make sure we got the proper file name for the real test later on.
57289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57290  if test "x$test_shortpath" = x; then
57291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57293    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57294  fi
57295
57296  # Call helper function which possibly converts this using DOS-style short mode.
57297  # If so, the updated path is stored in $new_path.
57298
57299  input_path="$new_path"
57300  # Check if we need to convert this using DOS-style short mode. If the path
57301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57302  # take no chances and rewrite it.
57303  # Note: m4 eats our [], so we need to use [ and ] instead.
57304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57305  if test "x$has_forbidden_chars" != x; then
57306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57310      # Going to short mode and back again did indeed matter. Since short mode is
57311      # case insensitive, let's make it lowercase to improve readability.
57312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57313      # Now convert it back to Unix-style (cygpath)
57314      input_path=`$CYGPATH -u "$shortmode_path"`
57315      new_path="$input_path"
57316    fi
57317  fi
57318
57319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57320  if test "x$test_cygdrive_prefix" = x; then
57321    # As a simple fix, exclude /usr/bin since it's not a real path.
57322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57324      # a path prefixed by /cygdrive for fixpath to work.
57325      new_path="$CYGWIN_ROOT_PATH$input_path"
57326    fi
57327  fi
57328
57329
57330  if test "x$path" != "x$new_path"; then
57331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57334  fi
57335
57336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57337
57338  path="$POTENTIAL_FREETYPE_LIB_PATH"
57339  has_colon=`$ECHO $path | $GREP ^.:`
57340  new_path="$path"
57341  if test "x$has_colon" = x; then
57342    # Not in mixed or Windows style, start by that.
57343    new_path=`cmd //c echo $path`
57344  fi
57345
57346
57347  input_path="$new_path"
57348  # Check if we need to convert this using DOS-style short mode. If the path
57349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57350  # take no chances and rewrite it.
57351  # Note: m4 eats our [], so we need to use [ and ] instead.
57352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57353  if test "x$has_forbidden_chars" != x; then
57354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57356  fi
57357
57358
57359  windows_path="$new_path"
57360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57361    unix_path=`$CYGPATH -u "$windows_path"`
57362    new_path="$unix_path"
57363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57365    new_path="$unix_path"
57366  fi
57367
57368  if test "x$path" != "x$new_path"; then
57369    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57372  fi
57373
57374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57376
57377    else
57378      # We're on a unix platform. Hooray! :)
57379      path="$POTENTIAL_FREETYPE_LIB_PATH"
57380      has_space=`$ECHO "$path" | $GREP " "`
57381      if test "x$has_space" != x; then
57382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57385      fi
57386
57387      # Use eval to expand a potential ~
57388      eval path="$path"
57389      if test ! -f "$path" && test ! -d "$path"; then
57390        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57391      fi
57392
57393      if test -d "$path"; then
57394        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57395      else
57396        dir="`$DIRNAME "$path"`"
57397        base="`$BASENAME "$path"`"
57398        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57399      fi
57400    fi
57401  fi
57402
57403
57404    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57406$as_echo_n "checking for freetype includes... " >&6; }
57407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57408$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57409    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57411$as_echo_n "checking for freetype libraries... " >&6; }
57412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57413$as_echo "$FREETYPE_LIB_PATH" >&6; }
57414  fi
57415
57416          if test "x$FOUND_FREETYPE" != xyes; then
57417            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57418          fi
57419        else
57420          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57421$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57422          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57423        fi
57424      else
57425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57426$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57427      fi
57428    fi
57429
57430    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57431      # User has specified settings
57432
57433      if test "x$BUNDLE_FREETYPE" = x; then
57434        # If not specified, default is to bundle freetype
57435        BUNDLE_FREETYPE=yes
57436      fi
57437
57438      if test "x$with_freetype" != x; then
57439        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57440        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57441      fi
57442
57443      # Allow --with-freetype-lib and --with-freetype-include to override
57444      if test "x$with_freetype_include" != x; then
57445        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57446      fi
57447      if test "x$with_freetype_lib" != x; then
57448        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57449      fi
57450
57451      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57452        # Okay, we got it. Check that it works.
57453
57454  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57455  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57456  METHOD="--with-freetype"
57457
57458  # Let's start with an optimistic view of the world :-)
57459  FOUND_FREETYPE=yes
57460
57461  # First look for the canonical freetype main include file ft2build.h.
57462  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57463    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57464    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57465    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57466      # Fail.
57467      FOUND_FREETYPE=no
57468    fi
57469  fi
57470
57471  if test "x$FOUND_FREETYPE" = xyes; then
57472    # Include file found, let's continue the sanity check.
57473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57474$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57475
57476    # Reset to default value
57477    FREETYPE_BASE_NAME=freetype
57478    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57479    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57480      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57481          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57482        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57483        # for the .6 version explicitly.
57484        FREETYPE_BASE_NAME=freetype.6
57485        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57486        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57487$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57488      else
57489        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57491        FOUND_FREETYPE=no
57492      fi
57493    else
57494      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57495        # On Windows, we will need both .lib and .dll file.
57496        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57497          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57499          FOUND_FREETYPE=no
57500        fi
57501      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57503        # Found lib in isa dir, use that instead.
57504        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57505        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57506$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57507      fi
57508    fi
57509  fi
57510
57511  if test "x$FOUND_FREETYPE" = xyes; then
57512
57513  # Only process if variable expands to non-empty
57514
57515  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57517
57518  # Input might be given as Windows format, start by converting to
57519  # unix format.
57520  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57521  new_path=`$CYGPATH -u "$path"`
57522
57523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57526  # "foo.exe" is OK but "foo" is an error.
57527  #
57528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57529  # It is also a way to make sure we got the proper file name for the real test later on.
57530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57531  if test "x$test_shortpath" = x; then
57532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57534    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57535  fi
57536
57537  # Call helper function which possibly converts this using DOS-style short mode.
57538  # If so, the updated path is stored in $new_path.
57539
57540  input_path="$new_path"
57541  # Check if we need to convert this using DOS-style short mode. If the path
57542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57543  # take no chances and rewrite it.
57544  # Note: m4 eats our [], so we need to use [ and ] instead.
57545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57546  if test "x$has_forbidden_chars" != x; then
57547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57551      # Going to short mode and back again did indeed matter. Since short mode is
57552      # case insensitive, let's make it lowercase to improve readability.
57553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57554      # Now convert it back to Unix-style (cygpath)
57555      input_path=`$CYGPATH -u "$shortmode_path"`
57556      new_path="$input_path"
57557    fi
57558  fi
57559
57560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57561  if test "x$test_cygdrive_prefix" = x; then
57562    # As a simple fix, exclude /usr/bin since it's not a real path.
57563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57565      # a path prefixed by /cygdrive for fixpath to work.
57566      new_path="$CYGWIN_ROOT_PATH$input_path"
57567    fi
57568  fi
57569
57570
57571  if test "x$path" != "x$new_path"; then
57572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57575  fi
57576
57577    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57578
57579  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57580  has_colon=`$ECHO $path | $GREP ^.:`
57581  new_path="$path"
57582  if test "x$has_colon" = x; then
57583    # Not in mixed or Windows style, start by that.
57584    new_path=`cmd //c echo $path`
57585  fi
57586
57587
57588  input_path="$new_path"
57589  # Check if we need to convert this using DOS-style short mode. If the path
57590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57591  # take no chances and rewrite it.
57592  # Note: m4 eats our [], so we need to use [ and ] instead.
57593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57594  if test "x$has_forbidden_chars" != x; then
57595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57597  fi
57598
57599
57600  windows_path="$new_path"
57601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57602    unix_path=`$CYGPATH -u "$windows_path"`
57603    new_path="$unix_path"
57604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57606    new_path="$unix_path"
57607  fi
57608
57609  if test "x$path" != "x$new_path"; then
57610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57613  fi
57614
57615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57617
57618    else
57619      # We're on a unix platform. Hooray! :)
57620      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57621      has_space=`$ECHO "$path" | $GREP " "`
57622      if test "x$has_space" != x; then
57623        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57625        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57626      fi
57627
57628      # Use eval to expand a potential ~
57629      eval path="$path"
57630      if test ! -f "$path" && test ! -d "$path"; then
57631        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57632      fi
57633
57634      if test -d "$path"; then
57635        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57636      else
57637        dir="`$DIRNAME "$path"`"
57638        base="`$BASENAME "$path"`"
57639        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57640      fi
57641    fi
57642  fi
57643
57644
57645  # Only process if variable expands to non-empty
57646
57647  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57649
57650  # Input might be given as Windows format, start by converting to
57651  # unix format.
57652  path="$POTENTIAL_FREETYPE_LIB_PATH"
57653  new_path=`$CYGPATH -u "$path"`
57654
57655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57658  # "foo.exe" is OK but "foo" is an error.
57659  #
57660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57661  # It is also a way to make sure we got the proper file name for the real test later on.
57662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57663  if test "x$test_shortpath" = x; then
57664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57666    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57667  fi
57668
57669  # Call helper function which possibly converts this using DOS-style short mode.
57670  # If so, the updated path is stored in $new_path.
57671
57672  input_path="$new_path"
57673  # Check if we need to convert this using DOS-style short mode. If the path
57674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57675  # take no chances and rewrite it.
57676  # Note: m4 eats our [], so we need to use [ and ] instead.
57677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57678  if test "x$has_forbidden_chars" != x; then
57679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57683      # Going to short mode and back again did indeed matter. Since short mode is
57684      # case insensitive, let's make it lowercase to improve readability.
57685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57686      # Now convert it back to Unix-style (cygpath)
57687      input_path=`$CYGPATH -u "$shortmode_path"`
57688      new_path="$input_path"
57689    fi
57690  fi
57691
57692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57693  if test "x$test_cygdrive_prefix" = x; then
57694    # As a simple fix, exclude /usr/bin since it's not a real path.
57695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57697      # a path prefixed by /cygdrive for fixpath to work.
57698      new_path="$CYGWIN_ROOT_PATH$input_path"
57699    fi
57700  fi
57701
57702
57703  if test "x$path" != "x$new_path"; then
57704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57707  fi
57708
57709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57710
57711  path="$POTENTIAL_FREETYPE_LIB_PATH"
57712  has_colon=`$ECHO $path | $GREP ^.:`
57713  new_path="$path"
57714  if test "x$has_colon" = x; then
57715    # Not in mixed or Windows style, start by that.
57716    new_path=`cmd //c echo $path`
57717  fi
57718
57719
57720  input_path="$new_path"
57721  # Check if we need to convert this using DOS-style short mode. If the path
57722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57723  # take no chances and rewrite it.
57724  # Note: m4 eats our [], so we need to use [ and ] instead.
57725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57726  if test "x$has_forbidden_chars" != x; then
57727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57729  fi
57730
57731
57732  windows_path="$new_path"
57733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57734    unix_path=`$CYGPATH -u "$windows_path"`
57735    new_path="$unix_path"
57736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57738    new_path="$unix_path"
57739  fi
57740
57741  if test "x$path" != "x$new_path"; then
57742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57745  fi
57746
57747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57749
57750    else
57751      # We're on a unix platform. Hooray! :)
57752      path="$POTENTIAL_FREETYPE_LIB_PATH"
57753      has_space=`$ECHO "$path" | $GREP " "`
57754      if test "x$has_space" != x; then
57755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57758      fi
57759
57760      # Use eval to expand a potential ~
57761      eval path="$path"
57762      if test ! -f "$path" && test ! -d "$path"; then
57763        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57764      fi
57765
57766      if test -d "$path"; then
57767        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57768      else
57769        dir="`$DIRNAME "$path"`"
57770        base="`$BASENAME "$path"`"
57771        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57772      fi
57773    fi
57774  fi
57775
57776
57777    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57779$as_echo_n "checking for freetype includes... " >&6; }
57780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57781$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57782    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57784$as_echo_n "checking for freetype libraries... " >&6; }
57785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57786$as_echo "$FREETYPE_LIB_PATH" >&6; }
57787  fi
57788
57789        if test "x$FOUND_FREETYPE" != xyes; then
57790          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57791        fi
57792      else
57793        # User specified only one of lib or include. This is an error.
57794        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57795          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57796$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57797          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57798        else
57799          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57800$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57801          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57802        fi
57803      fi
57804    else
57805      # User did not specify settings, but we need freetype. Try to locate it.
57806
57807      if test "x$BUNDLE_FREETYPE" = x; then
57808        # If not specified, default is to bundle freetype only on windows
57809        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57810          BUNDLE_FREETYPE=yes
57811        else
57812          BUNDLE_FREETYPE=no
57813        fi
57814      fi
57815
57816      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57817      if test "x$SYSROOT" = x; then
57818        if test "x$FOUND_FREETYPE" != xyes; then
57819          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57820          if test "x$PKG_CONFIG" != x; then
57821
57822pkg_failed=no
57823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57824$as_echo_n "checking for FREETYPE... " >&6; }
57825
57826if test -n "$FREETYPE_CFLAGS"; then
57827    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57828 elif test -n "$PKG_CONFIG"; then
57829    if test -n "$PKG_CONFIG" && \
57830    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57831  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57832  ac_status=$?
57833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57834  test $ac_status = 0; }; then
57835  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57836else
57837  pkg_failed=yes
57838fi
57839 else
57840    pkg_failed=untried
57841fi
57842if test -n "$FREETYPE_LIBS"; then
57843    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57844 elif test -n "$PKG_CONFIG"; then
57845    if test -n "$PKG_CONFIG" && \
57846    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57847  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57848  ac_status=$?
57849  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57850  test $ac_status = 0; }; then
57851  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57852else
57853  pkg_failed=yes
57854fi
57855 else
57856    pkg_failed=untried
57857fi
57858
57859
57860
57861if test $pkg_failed = yes; then
57862
57863if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57864        _pkg_short_errors_supported=yes
57865else
57866        _pkg_short_errors_supported=no
57867fi
57868        if test $_pkg_short_errors_supported = yes; then
57869	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57870        else
57871	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57872        fi
57873	# Put the nasty error message in config.log where it belongs
57874	echo "$FREETYPE_PKG_ERRORS" >&5
57875
57876	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57877$as_echo "no" >&6; }
57878                FOUND_FREETYPE=no
57879elif test $pkg_failed = untried; then
57880	FOUND_FREETYPE=no
57881else
57882	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57883	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57885$as_echo "yes" >&6; }
57886	FOUND_FREETYPE=yes
57887fi
57888            if test "x$FOUND_FREETYPE" = xyes; then
57889              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57890              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57891              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57892              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57893                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57894              fi
57895              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57896              if test "x$BUNDLE_FREETYPE" = xyes; then
57897                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57898$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57899                FOUND_FREETYPE=no
57900              else
57901                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57902$as_echo_n "checking for freetype... " >&6; }
57903                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57904$as_echo "yes (using pkg-config)" >&6; }
57905              fi
57906            fi
57907          fi
57908        fi
57909      fi
57910
57911      if test "x$FOUND_FREETYPE" != xyes; then
57912        # Check in well-known locations
57913        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57914          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57915
57916  windows_path="$FREETYPE_BASE_DIR"
57917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57918    unix_path=`$CYGPATH -u "$windows_path"`
57919    FREETYPE_BASE_DIR="$unix_path"
57920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57922    FREETYPE_BASE_DIR="$unix_path"
57923  fi
57924
57925
57926  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57927  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57928  METHOD="well-known location"
57929
57930  # Let's start with an optimistic view of the world :-)
57931  FOUND_FREETYPE=yes
57932
57933  # First look for the canonical freetype main include file ft2build.h.
57934  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57935    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57936    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57937    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57938      # Fail.
57939      FOUND_FREETYPE=no
57940    fi
57941  fi
57942
57943  if test "x$FOUND_FREETYPE" = xyes; then
57944    # Include file found, let's continue the sanity check.
57945    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57946$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57947
57948    # Reset to default value
57949    FREETYPE_BASE_NAME=freetype
57950    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57951    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57952      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57953          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57954        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57955        # for the .6 version explicitly.
57956        FREETYPE_BASE_NAME=freetype.6
57957        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57958        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57959$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57960      else
57961        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57962$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57963        FOUND_FREETYPE=no
57964      fi
57965    else
57966      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57967        # On Windows, we will need both .lib and .dll file.
57968        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57969          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57971          FOUND_FREETYPE=no
57972        fi
57973      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57974          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57975        # Found lib in isa dir, use that instead.
57976        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57977        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57978$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57979      fi
57980    fi
57981  fi
57982
57983  if test "x$FOUND_FREETYPE" = xyes; then
57984
57985  # Only process if variable expands to non-empty
57986
57987  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57989
57990  # Input might be given as Windows format, start by converting to
57991  # unix format.
57992  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57993  new_path=`$CYGPATH -u "$path"`
57994
57995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57998  # "foo.exe" is OK but "foo" is an error.
57999  #
58000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58001  # It is also a way to make sure we got the proper file name for the real test later on.
58002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58003  if test "x$test_shortpath" = x; then
58004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58006    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58007  fi
58008
58009  # Call helper function which possibly converts this using DOS-style short mode.
58010  # If so, the updated path is stored in $new_path.
58011
58012  input_path="$new_path"
58013  # Check if we need to convert this using DOS-style short mode. If the path
58014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58015  # take no chances and rewrite it.
58016  # Note: m4 eats our [], so we need to use [ and ] instead.
58017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58018  if test "x$has_forbidden_chars" != x; then
58019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58023      # Going to short mode and back again did indeed matter. Since short mode is
58024      # case insensitive, let's make it lowercase to improve readability.
58025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58026      # Now convert it back to Unix-style (cygpath)
58027      input_path=`$CYGPATH -u "$shortmode_path"`
58028      new_path="$input_path"
58029    fi
58030  fi
58031
58032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58033  if test "x$test_cygdrive_prefix" = x; then
58034    # As a simple fix, exclude /usr/bin since it's not a real path.
58035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58037      # a path prefixed by /cygdrive for fixpath to work.
58038      new_path="$CYGWIN_ROOT_PATH$input_path"
58039    fi
58040  fi
58041
58042
58043  if test "x$path" != "x$new_path"; then
58044    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58047  fi
58048
58049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58050
58051  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58052  has_colon=`$ECHO $path | $GREP ^.:`
58053  new_path="$path"
58054  if test "x$has_colon" = x; then
58055    # Not in mixed or Windows style, start by that.
58056    new_path=`cmd //c echo $path`
58057  fi
58058
58059
58060  input_path="$new_path"
58061  # Check if we need to convert this using DOS-style short mode. If the path
58062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58063  # take no chances and rewrite it.
58064  # Note: m4 eats our [], so we need to use [ and ] instead.
58065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58066  if test "x$has_forbidden_chars" != x; then
58067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58069  fi
58070
58071
58072  windows_path="$new_path"
58073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58074    unix_path=`$CYGPATH -u "$windows_path"`
58075    new_path="$unix_path"
58076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58078    new_path="$unix_path"
58079  fi
58080
58081  if test "x$path" != "x$new_path"; then
58082    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58085  fi
58086
58087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58089
58090    else
58091      # We're on a unix platform. Hooray! :)
58092      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58093      has_space=`$ECHO "$path" | $GREP " "`
58094      if test "x$has_space" != x; then
58095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58098      fi
58099
58100      # Use eval to expand a potential ~
58101      eval path="$path"
58102      if test ! -f "$path" && test ! -d "$path"; then
58103        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58104      fi
58105
58106      if test -d "$path"; then
58107        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58108      else
58109        dir="`$DIRNAME "$path"`"
58110        base="`$BASENAME "$path"`"
58111        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58112      fi
58113    fi
58114  fi
58115
58116
58117  # Only process if variable expands to non-empty
58118
58119  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58121
58122  # Input might be given as Windows format, start by converting to
58123  # unix format.
58124  path="$POTENTIAL_FREETYPE_LIB_PATH"
58125  new_path=`$CYGPATH -u "$path"`
58126
58127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58130  # "foo.exe" is OK but "foo" is an error.
58131  #
58132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58133  # It is also a way to make sure we got the proper file name for the real test later on.
58134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58135  if test "x$test_shortpath" = x; then
58136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58139  fi
58140
58141  # Call helper function which possibly converts this using DOS-style short mode.
58142  # If so, the updated path is stored in $new_path.
58143
58144  input_path="$new_path"
58145  # Check if we need to convert this using DOS-style short mode. If the path
58146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58147  # take no chances and rewrite it.
58148  # Note: m4 eats our [], so we need to use [ and ] instead.
58149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58150  if test "x$has_forbidden_chars" != x; then
58151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58155      # Going to short mode and back again did indeed matter. Since short mode is
58156      # case insensitive, let's make it lowercase to improve readability.
58157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58158      # Now convert it back to Unix-style (cygpath)
58159      input_path=`$CYGPATH -u "$shortmode_path"`
58160      new_path="$input_path"
58161    fi
58162  fi
58163
58164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58165  if test "x$test_cygdrive_prefix" = x; then
58166    # As a simple fix, exclude /usr/bin since it's not a real path.
58167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58169      # a path prefixed by /cygdrive for fixpath to work.
58170      new_path="$CYGWIN_ROOT_PATH$input_path"
58171    fi
58172  fi
58173
58174
58175  if test "x$path" != "x$new_path"; then
58176    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58179  fi
58180
58181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58182
58183  path="$POTENTIAL_FREETYPE_LIB_PATH"
58184  has_colon=`$ECHO $path | $GREP ^.:`
58185  new_path="$path"
58186  if test "x$has_colon" = x; then
58187    # Not in mixed or Windows style, start by that.
58188    new_path=`cmd //c echo $path`
58189  fi
58190
58191
58192  input_path="$new_path"
58193  # Check if we need to convert this using DOS-style short mode. If the path
58194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58195  # take no chances and rewrite it.
58196  # Note: m4 eats our [], so we need to use [ and ] instead.
58197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58198  if test "x$has_forbidden_chars" != x; then
58199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58201  fi
58202
58203
58204  windows_path="$new_path"
58205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58206    unix_path=`$CYGPATH -u "$windows_path"`
58207    new_path="$unix_path"
58208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58210    new_path="$unix_path"
58211  fi
58212
58213  if test "x$path" != "x$new_path"; then
58214    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58217  fi
58218
58219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58221
58222    else
58223      # We're on a unix platform. Hooray! :)
58224      path="$POTENTIAL_FREETYPE_LIB_PATH"
58225      has_space=`$ECHO "$path" | $GREP " "`
58226      if test "x$has_space" != x; then
58227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58230      fi
58231
58232      # Use eval to expand a potential ~
58233      eval path="$path"
58234      if test ! -f "$path" && test ! -d "$path"; then
58235        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58236      fi
58237
58238      if test -d "$path"; then
58239        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58240      else
58241        dir="`$DIRNAME "$path"`"
58242        base="`$BASENAME "$path"`"
58243        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58244      fi
58245    fi
58246  fi
58247
58248
58249    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58251$as_echo_n "checking for freetype includes... " >&6; }
58252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58253$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58254    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58256$as_echo_n "checking for freetype libraries... " >&6; }
58257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58258$as_echo "$FREETYPE_LIB_PATH" >&6; }
58259  fi
58260
58261          if test "x$FOUND_FREETYPE" != xyes; then
58262            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58263
58264  windows_path="$FREETYPE_BASE_DIR"
58265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58266    unix_path=`$CYGPATH -u "$windows_path"`
58267    FREETYPE_BASE_DIR="$unix_path"
58268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58270    FREETYPE_BASE_DIR="$unix_path"
58271  fi
58272
58273
58274  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58275  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58276  METHOD="well-known location"
58277
58278  # Let's start with an optimistic view of the world :-)
58279  FOUND_FREETYPE=yes
58280
58281  # First look for the canonical freetype main include file ft2build.h.
58282  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58283    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58284    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58285    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58286      # Fail.
58287      FOUND_FREETYPE=no
58288    fi
58289  fi
58290
58291  if test "x$FOUND_FREETYPE" = xyes; then
58292    # Include file found, let's continue the sanity check.
58293    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58294$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58295
58296    # Reset to default value
58297    FREETYPE_BASE_NAME=freetype
58298    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58299    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58300      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58301          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58302        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58303        # for the .6 version explicitly.
58304        FREETYPE_BASE_NAME=freetype.6
58305        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58306        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58307$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58308      else
58309        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58311        FOUND_FREETYPE=no
58312      fi
58313    else
58314      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58315        # On Windows, we will need both .lib and .dll file.
58316        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58317          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58318$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58319          FOUND_FREETYPE=no
58320        fi
58321      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58322          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58323        # Found lib in isa dir, use that instead.
58324        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58325        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58326$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58327      fi
58328    fi
58329  fi
58330
58331  if test "x$FOUND_FREETYPE" = xyes; then
58332
58333  # Only process if variable expands to non-empty
58334
58335  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58337
58338  # Input might be given as Windows format, start by converting to
58339  # unix format.
58340  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58341  new_path=`$CYGPATH -u "$path"`
58342
58343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58346  # "foo.exe" is OK but "foo" is an error.
58347  #
58348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58349  # It is also a way to make sure we got the proper file name for the real test later on.
58350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58351  if test "x$test_shortpath" = x; then
58352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58355  fi
58356
58357  # Call helper function which possibly converts this using DOS-style short mode.
58358  # If so, the updated path is stored in $new_path.
58359
58360  input_path="$new_path"
58361  # Check if we need to convert this using DOS-style short mode. If the path
58362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58363  # take no chances and rewrite it.
58364  # Note: m4 eats our [], so we need to use [ and ] instead.
58365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58366  if test "x$has_forbidden_chars" != x; then
58367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58371      # Going to short mode and back again did indeed matter. Since short mode is
58372      # case insensitive, let's make it lowercase to improve readability.
58373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58374      # Now convert it back to Unix-style (cygpath)
58375      input_path=`$CYGPATH -u "$shortmode_path"`
58376      new_path="$input_path"
58377    fi
58378  fi
58379
58380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58381  if test "x$test_cygdrive_prefix" = x; then
58382    # As a simple fix, exclude /usr/bin since it's not a real path.
58383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58385      # a path prefixed by /cygdrive for fixpath to work.
58386      new_path="$CYGWIN_ROOT_PATH$input_path"
58387    fi
58388  fi
58389
58390
58391  if test "x$path" != "x$new_path"; then
58392    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58395  fi
58396
58397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58398
58399  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58400  has_colon=`$ECHO $path | $GREP ^.:`
58401  new_path="$path"
58402  if test "x$has_colon" = x; then
58403    # Not in mixed or Windows style, start by that.
58404    new_path=`cmd //c echo $path`
58405  fi
58406
58407
58408  input_path="$new_path"
58409  # Check if we need to convert this using DOS-style short mode. If the path
58410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58411  # take no chances and rewrite it.
58412  # Note: m4 eats our [], so we need to use [ and ] instead.
58413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58414  if test "x$has_forbidden_chars" != x; then
58415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58417  fi
58418
58419
58420  windows_path="$new_path"
58421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58422    unix_path=`$CYGPATH -u "$windows_path"`
58423    new_path="$unix_path"
58424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58426    new_path="$unix_path"
58427  fi
58428
58429  if test "x$path" != "x$new_path"; then
58430    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58433  fi
58434
58435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58437
58438    else
58439      # We're on a unix platform. Hooray! :)
58440      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58441      has_space=`$ECHO "$path" | $GREP " "`
58442      if test "x$has_space" != x; then
58443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58446      fi
58447
58448      # Use eval to expand a potential ~
58449      eval path="$path"
58450      if test ! -f "$path" && test ! -d "$path"; then
58451        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58452      fi
58453
58454      if test -d "$path"; then
58455        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58456      else
58457        dir="`$DIRNAME "$path"`"
58458        base="`$BASENAME "$path"`"
58459        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58460      fi
58461    fi
58462  fi
58463
58464
58465  # Only process if variable expands to non-empty
58466
58467  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58469
58470  # Input might be given as Windows format, start by converting to
58471  # unix format.
58472  path="$POTENTIAL_FREETYPE_LIB_PATH"
58473  new_path=`$CYGPATH -u "$path"`
58474
58475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58478  # "foo.exe" is OK but "foo" is an error.
58479  #
58480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58481  # It is also a way to make sure we got the proper file name for the real test later on.
58482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58483  if test "x$test_shortpath" = x; then
58484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58485$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58486    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58487  fi
58488
58489  # Call helper function which possibly converts this using DOS-style short mode.
58490  # If so, the updated path is stored in $new_path.
58491
58492  input_path="$new_path"
58493  # Check if we need to convert this using DOS-style short mode. If the path
58494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58495  # take no chances and rewrite it.
58496  # Note: m4 eats our [], so we need to use [ and ] instead.
58497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58498  if test "x$has_forbidden_chars" != x; then
58499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58503      # Going to short mode and back again did indeed matter. Since short mode is
58504      # case insensitive, let's make it lowercase to improve readability.
58505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58506      # Now convert it back to Unix-style (cygpath)
58507      input_path=`$CYGPATH -u "$shortmode_path"`
58508      new_path="$input_path"
58509    fi
58510  fi
58511
58512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58513  if test "x$test_cygdrive_prefix" = x; then
58514    # As a simple fix, exclude /usr/bin since it's not a real path.
58515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58517      # a path prefixed by /cygdrive for fixpath to work.
58518      new_path="$CYGWIN_ROOT_PATH$input_path"
58519    fi
58520  fi
58521
58522
58523  if test "x$path" != "x$new_path"; then
58524    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58527  fi
58528
58529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58530
58531  path="$POTENTIAL_FREETYPE_LIB_PATH"
58532  has_colon=`$ECHO $path | $GREP ^.:`
58533  new_path="$path"
58534  if test "x$has_colon" = x; then
58535    # Not in mixed or Windows style, start by that.
58536    new_path=`cmd //c echo $path`
58537  fi
58538
58539
58540  input_path="$new_path"
58541  # Check if we need to convert this using DOS-style short mode. If the path
58542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58543  # take no chances and rewrite it.
58544  # Note: m4 eats our [], so we need to use [ and ] instead.
58545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58546  if test "x$has_forbidden_chars" != x; then
58547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58549  fi
58550
58551
58552  windows_path="$new_path"
58553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58554    unix_path=`$CYGPATH -u "$windows_path"`
58555    new_path="$unix_path"
58556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58558    new_path="$unix_path"
58559  fi
58560
58561  if test "x$path" != "x$new_path"; then
58562    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58565  fi
58566
58567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58569
58570    else
58571      # We're on a unix platform. Hooray! :)
58572      path="$POTENTIAL_FREETYPE_LIB_PATH"
58573      has_space=`$ECHO "$path" | $GREP " "`
58574      if test "x$has_space" != x; then
58575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58576$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58577        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58578      fi
58579
58580      # Use eval to expand a potential ~
58581      eval path="$path"
58582      if test ! -f "$path" && test ! -d "$path"; then
58583        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58584      fi
58585
58586      if test -d "$path"; then
58587        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58588      else
58589        dir="`$DIRNAME "$path"`"
58590        base="`$BASENAME "$path"`"
58591        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58592      fi
58593    fi
58594  fi
58595
58596
58597    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58599$as_echo_n "checking for freetype includes... " >&6; }
58600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58601$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58602    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58604$as_echo_n "checking for freetype libraries... " >&6; }
58605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58606$as_echo "$FREETYPE_LIB_PATH" >&6; }
58607  fi
58608
58609          fi
58610          if test "x$FOUND_FREETYPE" != xyes; then
58611            FREETYPE_BASE_DIR="$HOME/freetype"
58612
58613  windows_path="$FREETYPE_BASE_DIR"
58614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58615    unix_path=`$CYGPATH -u "$windows_path"`
58616    FREETYPE_BASE_DIR="$unix_path"
58617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58619    FREETYPE_BASE_DIR="$unix_path"
58620  fi
58621
58622            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58623
58624  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58625  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58626  METHOD="well-known location"
58627
58628  # Let's start with an optimistic view of the world :-)
58629  FOUND_FREETYPE=yes
58630
58631  # First look for the canonical freetype main include file ft2build.h.
58632  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58633    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58634    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58635    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58636      # Fail.
58637      FOUND_FREETYPE=no
58638    fi
58639  fi
58640
58641  if test "x$FOUND_FREETYPE" = xyes; then
58642    # Include file found, let's continue the sanity check.
58643    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58644$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58645
58646    # Reset to default value
58647    FREETYPE_BASE_NAME=freetype
58648    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58649    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58650      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58652        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58653        # for the .6 version explicitly.
58654        FREETYPE_BASE_NAME=freetype.6
58655        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58656        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58657$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58658      else
58659        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58660$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58661        FOUND_FREETYPE=no
58662      fi
58663    else
58664      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58665        # On Windows, we will need both .lib and .dll file.
58666        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58667          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58669          FOUND_FREETYPE=no
58670        fi
58671      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58673        # Found lib in isa dir, use that instead.
58674        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58675        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58676$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58677      fi
58678    fi
58679  fi
58680
58681  if test "x$FOUND_FREETYPE" = xyes; then
58682
58683  # Only process if variable expands to non-empty
58684
58685  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58687
58688  # Input might be given as Windows format, start by converting to
58689  # unix format.
58690  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58691  new_path=`$CYGPATH -u "$path"`
58692
58693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58696  # "foo.exe" is OK but "foo" is an error.
58697  #
58698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58699  # It is also a way to make sure we got the proper file name for the real test later on.
58700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58701  if test "x$test_shortpath" = x; then
58702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58705  fi
58706
58707  # Call helper function which possibly converts this using DOS-style short mode.
58708  # If so, the updated path is stored in $new_path.
58709
58710  input_path="$new_path"
58711  # Check if we need to convert this using DOS-style short mode. If the path
58712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58713  # take no chances and rewrite it.
58714  # Note: m4 eats our [], so we need to use [ and ] instead.
58715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58716  if test "x$has_forbidden_chars" != x; then
58717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58721      # Going to short mode and back again did indeed matter. Since short mode is
58722      # case insensitive, let's make it lowercase to improve readability.
58723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58724      # Now convert it back to Unix-style (cygpath)
58725      input_path=`$CYGPATH -u "$shortmode_path"`
58726      new_path="$input_path"
58727    fi
58728  fi
58729
58730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58731  if test "x$test_cygdrive_prefix" = x; then
58732    # As a simple fix, exclude /usr/bin since it's not a real path.
58733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58735      # a path prefixed by /cygdrive for fixpath to work.
58736      new_path="$CYGWIN_ROOT_PATH$input_path"
58737    fi
58738  fi
58739
58740
58741  if test "x$path" != "x$new_path"; then
58742    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58745  fi
58746
58747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58748
58749  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58750  has_colon=`$ECHO $path | $GREP ^.:`
58751  new_path="$path"
58752  if test "x$has_colon" = x; then
58753    # Not in mixed or Windows style, start by that.
58754    new_path=`cmd //c echo $path`
58755  fi
58756
58757
58758  input_path="$new_path"
58759  # Check if we need to convert this using DOS-style short mode. If the path
58760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58761  # take no chances and rewrite it.
58762  # Note: m4 eats our [], so we need to use [ and ] instead.
58763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58764  if test "x$has_forbidden_chars" != x; then
58765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58767  fi
58768
58769
58770  windows_path="$new_path"
58771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58772    unix_path=`$CYGPATH -u "$windows_path"`
58773    new_path="$unix_path"
58774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58776    new_path="$unix_path"
58777  fi
58778
58779  if test "x$path" != "x$new_path"; then
58780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58783  fi
58784
58785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58787
58788    else
58789      # We're on a unix platform. Hooray! :)
58790      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58791      has_space=`$ECHO "$path" | $GREP " "`
58792      if test "x$has_space" != x; then
58793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58796      fi
58797
58798      # Use eval to expand a potential ~
58799      eval path="$path"
58800      if test ! -f "$path" && test ! -d "$path"; then
58801        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58802      fi
58803
58804      if test -d "$path"; then
58805        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58806      else
58807        dir="`$DIRNAME "$path"`"
58808        base="`$BASENAME "$path"`"
58809        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58810      fi
58811    fi
58812  fi
58813
58814
58815  # Only process if variable expands to non-empty
58816
58817  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58819
58820  # Input might be given as Windows format, start by converting to
58821  # unix format.
58822  path="$POTENTIAL_FREETYPE_LIB_PATH"
58823  new_path=`$CYGPATH -u "$path"`
58824
58825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58828  # "foo.exe" is OK but "foo" is an error.
58829  #
58830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58831  # It is also a way to make sure we got the proper file name for the real test later on.
58832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58833  if test "x$test_shortpath" = x; then
58834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58837  fi
58838
58839  # Call helper function which possibly converts this using DOS-style short mode.
58840  # If so, the updated path is stored in $new_path.
58841
58842  input_path="$new_path"
58843  # Check if we need to convert this using DOS-style short mode. If the path
58844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58845  # take no chances and rewrite it.
58846  # Note: m4 eats our [], so we need to use [ and ] instead.
58847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58848  if test "x$has_forbidden_chars" != x; then
58849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58853      # Going to short mode and back again did indeed matter. Since short mode is
58854      # case insensitive, let's make it lowercase to improve readability.
58855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58856      # Now convert it back to Unix-style (cygpath)
58857      input_path=`$CYGPATH -u "$shortmode_path"`
58858      new_path="$input_path"
58859    fi
58860  fi
58861
58862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58863  if test "x$test_cygdrive_prefix" = x; then
58864    # As a simple fix, exclude /usr/bin since it's not a real path.
58865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58867      # a path prefixed by /cygdrive for fixpath to work.
58868      new_path="$CYGWIN_ROOT_PATH$input_path"
58869    fi
58870  fi
58871
58872
58873  if test "x$path" != "x$new_path"; then
58874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58877  fi
58878
58879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58880
58881  path="$POTENTIAL_FREETYPE_LIB_PATH"
58882  has_colon=`$ECHO $path | $GREP ^.:`
58883  new_path="$path"
58884  if test "x$has_colon" = x; then
58885    # Not in mixed or Windows style, start by that.
58886    new_path=`cmd //c echo $path`
58887  fi
58888
58889
58890  input_path="$new_path"
58891  # Check if we need to convert this using DOS-style short mode. If the path
58892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58893  # take no chances and rewrite it.
58894  # Note: m4 eats our [], so we need to use [ and ] instead.
58895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58896  if test "x$has_forbidden_chars" != x; then
58897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58899  fi
58900
58901
58902  windows_path="$new_path"
58903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58904    unix_path=`$CYGPATH -u "$windows_path"`
58905    new_path="$unix_path"
58906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58908    new_path="$unix_path"
58909  fi
58910
58911  if test "x$path" != "x$new_path"; then
58912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58915  fi
58916
58917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58919
58920    else
58921      # We're on a unix platform. Hooray! :)
58922      path="$POTENTIAL_FREETYPE_LIB_PATH"
58923      has_space=`$ECHO "$path" | $GREP " "`
58924      if test "x$has_space" != x; then
58925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58928      fi
58929
58930      # Use eval to expand a potential ~
58931      eval path="$path"
58932      if test ! -f "$path" && test ! -d "$path"; then
58933        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58934      fi
58935
58936      if test -d "$path"; then
58937        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58938      else
58939        dir="`$DIRNAME "$path"`"
58940        base="`$BASENAME "$path"`"
58941        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58942      fi
58943    fi
58944  fi
58945
58946
58947    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58949$as_echo_n "checking for freetype includes... " >&6; }
58950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58951$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58952    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58954$as_echo_n "checking for freetype libraries... " >&6; }
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58956$as_echo "$FREETYPE_LIB_PATH" >&6; }
58957  fi
58958
58959            else
58960
58961  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58962  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58963  METHOD="well-known location"
58964
58965  # Let's start with an optimistic view of the world :-)
58966  FOUND_FREETYPE=yes
58967
58968  # First look for the canonical freetype main include file ft2build.h.
58969  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58970    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58971    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58972    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58973      # Fail.
58974      FOUND_FREETYPE=no
58975    fi
58976  fi
58977
58978  if test "x$FOUND_FREETYPE" = xyes; then
58979    # Include file found, let's continue the sanity check.
58980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58981$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58982
58983    # Reset to default value
58984    FREETYPE_BASE_NAME=freetype
58985    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58986    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58987      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58988          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58989        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58990        # for the .6 version explicitly.
58991        FREETYPE_BASE_NAME=freetype.6
58992        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58993        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58994$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58995      else
58996        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58997$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58998        FOUND_FREETYPE=no
58999      fi
59000    else
59001      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59002        # On Windows, we will need both .lib and .dll file.
59003        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59004          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59005$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59006          FOUND_FREETYPE=no
59007        fi
59008      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59009          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59010        # Found lib in isa dir, use that instead.
59011        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59012        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59013$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59014      fi
59015    fi
59016  fi
59017
59018  if test "x$FOUND_FREETYPE" = xyes; then
59019
59020  # Only process if variable expands to non-empty
59021
59022  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59024
59025  # Input might be given as Windows format, start by converting to
59026  # unix format.
59027  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59028  new_path=`$CYGPATH -u "$path"`
59029
59030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59033  # "foo.exe" is OK but "foo" is an error.
59034  #
59035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59036  # It is also a way to make sure we got the proper file name for the real test later on.
59037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59038  if test "x$test_shortpath" = x; then
59039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59041    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59042  fi
59043
59044  # Call helper function which possibly converts this using DOS-style short mode.
59045  # If so, the updated path is stored in $new_path.
59046
59047  input_path="$new_path"
59048  # Check if we need to convert this using DOS-style short mode. If the path
59049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59050  # take no chances and rewrite it.
59051  # Note: m4 eats our [], so we need to use [ and ] instead.
59052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59053  if test "x$has_forbidden_chars" != x; then
59054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59058      # Going to short mode and back again did indeed matter. Since short mode is
59059      # case insensitive, let's make it lowercase to improve readability.
59060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59061      # Now convert it back to Unix-style (cygpath)
59062      input_path=`$CYGPATH -u "$shortmode_path"`
59063      new_path="$input_path"
59064    fi
59065  fi
59066
59067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59068  if test "x$test_cygdrive_prefix" = x; then
59069    # As a simple fix, exclude /usr/bin since it's not a real path.
59070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59072      # a path prefixed by /cygdrive for fixpath to work.
59073      new_path="$CYGWIN_ROOT_PATH$input_path"
59074    fi
59075  fi
59076
59077
59078  if test "x$path" != "x$new_path"; then
59079    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59082  fi
59083
59084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59085
59086  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59087  has_colon=`$ECHO $path | $GREP ^.:`
59088  new_path="$path"
59089  if test "x$has_colon" = x; then
59090    # Not in mixed or Windows style, start by that.
59091    new_path=`cmd //c echo $path`
59092  fi
59093
59094
59095  input_path="$new_path"
59096  # Check if we need to convert this using DOS-style short mode. If the path
59097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59098  # take no chances and rewrite it.
59099  # Note: m4 eats our [], so we need to use [ and ] instead.
59100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59101  if test "x$has_forbidden_chars" != x; then
59102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59104  fi
59105
59106
59107  windows_path="$new_path"
59108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59109    unix_path=`$CYGPATH -u "$windows_path"`
59110    new_path="$unix_path"
59111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59113    new_path="$unix_path"
59114  fi
59115
59116  if test "x$path" != "x$new_path"; then
59117    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59120  fi
59121
59122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59124
59125    else
59126      # We're on a unix platform. Hooray! :)
59127      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59128      has_space=`$ECHO "$path" | $GREP " "`
59129      if test "x$has_space" != x; then
59130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59133      fi
59134
59135      # Use eval to expand a potential ~
59136      eval path="$path"
59137      if test ! -f "$path" && test ! -d "$path"; then
59138        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59139      fi
59140
59141      if test -d "$path"; then
59142        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59143      else
59144        dir="`$DIRNAME "$path"`"
59145        base="`$BASENAME "$path"`"
59146        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59147      fi
59148    fi
59149  fi
59150
59151
59152  # Only process if variable expands to non-empty
59153
59154  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59156
59157  # Input might be given as Windows format, start by converting to
59158  # unix format.
59159  path="$POTENTIAL_FREETYPE_LIB_PATH"
59160  new_path=`$CYGPATH -u "$path"`
59161
59162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59165  # "foo.exe" is OK but "foo" is an error.
59166  #
59167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59168  # It is also a way to make sure we got the proper file name for the real test later on.
59169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59170  if test "x$test_shortpath" = x; then
59171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59173    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59174  fi
59175
59176  # Call helper function which possibly converts this using DOS-style short mode.
59177  # If so, the updated path is stored in $new_path.
59178
59179  input_path="$new_path"
59180  # Check if we need to convert this using DOS-style short mode. If the path
59181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59182  # take no chances and rewrite it.
59183  # Note: m4 eats our [], so we need to use [ and ] instead.
59184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59185  if test "x$has_forbidden_chars" != x; then
59186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59190      # Going to short mode and back again did indeed matter. Since short mode is
59191      # case insensitive, let's make it lowercase to improve readability.
59192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59193      # Now convert it back to Unix-style (cygpath)
59194      input_path=`$CYGPATH -u "$shortmode_path"`
59195      new_path="$input_path"
59196    fi
59197  fi
59198
59199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59200  if test "x$test_cygdrive_prefix" = x; then
59201    # As a simple fix, exclude /usr/bin since it's not a real path.
59202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59204      # a path prefixed by /cygdrive for fixpath to work.
59205      new_path="$CYGWIN_ROOT_PATH$input_path"
59206    fi
59207  fi
59208
59209
59210  if test "x$path" != "x$new_path"; then
59211    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59213$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59214  fi
59215
59216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59217
59218  path="$POTENTIAL_FREETYPE_LIB_PATH"
59219  has_colon=`$ECHO $path | $GREP ^.:`
59220  new_path="$path"
59221  if test "x$has_colon" = x; then
59222    # Not in mixed or Windows style, start by that.
59223    new_path=`cmd //c echo $path`
59224  fi
59225
59226
59227  input_path="$new_path"
59228  # Check if we need to convert this using DOS-style short mode. If the path
59229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59230  # take no chances and rewrite it.
59231  # Note: m4 eats our [], so we need to use [ and ] instead.
59232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59233  if test "x$has_forbidden_chars" != x; then
59234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59236  fi
59237
59238
59239  windows_path="$new_path"
59240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59241    unix_path=`$CYGPATH -u "$windows_path"`
59242    new_path="$unix_path"
59243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59245    new_path="$unix_path"
59246  fi
59247
59248  if test "x$path" != "x$new_path"; then
59249    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59251$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59252  fi
59253
59254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59256
59257    else
59258      # We're on a unix platform. Hooray! :)
59259      path="$POTENTIAL_FREETYPE_LIB_PATH"
59260      has_space=`$ECHO "$path" | $GREP " "`
59261      if test "x$has_space" != x; then
59262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59265      fi
59266
59267      # Use eval to expand a potential ~
59268      eval path="$path"
59269      if test ! -f "$path" && test ! -d "$path"; then
59270        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59271      fi
59272
59273      if test -d "$path"; then
59274        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59275      else
59276        dir="`$DIRNAME "$path"`"
59277        base="`$BASENAME "$path"`"
59278        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59279      fi
59280    fi
59281  fi
59282
59283
59284    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59286$as_echo_n "checking for freetype includes... " >&6; }
59287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59288$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59289    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59291$as_echo_n "checking for freetype libraries... " >&6; }
59292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59293$as_echo "$FREETYPE_LIB_PATH" >&6; }
59294  fi
59295
59296            fi
59297            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59298                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59299              # Source is available, as a last resort try to build freetype in default location
59300
59301  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59302  BUILD_FREETYPE=yes
59303
59304  # Check if the freetype sources are acessible..
59305  if ! test -d $FREETYPE_SRC_PATH; then
59306    { $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
59307$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59308    BUILD_FREETYPE=no
59309  fi
59310  # ..and contain a vc2010 project file
59311  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59312  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59313    { $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
59314$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59315    BUILD_FREETYPE=no
59316  fi
59317  # Now check if configure found a version of 'msbuild.exe'
59318  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59319    { $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
59320$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;}
59321    BUILD_FREETYPE=no
59322  fi
59323
59324  # Ready to go..
59325  if test "x$BUILD_FREETYPE" = xyes; then
59326    # msbuild requires trailing slashes for output directories
59327    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59328    freetype_lib_path_unix="$freetype_lib_path"
59329    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59330
59331  unix_path="$vcxproj_path"
59332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59333    windows_path=`$CYGPATH -m "$unix_path"`
59334    vcxproj_path="$windows_path"
59335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59336    windows_path=`cmd //c echo $unix_path`
59337    vcxproj_path="$windows_path"
59338  fi
59339
59340
59341  unix_path="$freetype_lib_path"
59342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59343    windows_path=`$CYGPATH -m "$unix_path"`
59344    freetype_lib_path="$windows_path"
59345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59346    windows_path=`cmd //c echo $unix_path`
59347    freetype_lib_path="$windows_path"
59348  fi
59349
59350
59351  unix_path="$freetype_obj_path"
59352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59353    windows_path=`$CYGPATH -m "$unix_path"`
59354    freetype_obj_path="$windows_path"
59355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59356    windows_path=`cmd //c echo $unix_path`
59357    freetype_obj_path="$windows_path"
59358  fi
59359
59360    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59361      freetype_platform=x64
59362    else
59363      freetype_platform=win32
59364    fi
59365
59366    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59367    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59368    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59369    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59370    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59371$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59372
59373    # First we try to build the freetype.dll
59374    $ECHO -e "@echo off\n"\
59375        "$MSBUILD $vcxproj_path "\
59376        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59377        "/p:Configuration=\"Release Multithreaded\" "\
59378        "/p:Platform=$freetype_platform "\
59379        "/p:ConfigurationType=DynamicLibrary "\
59380        "/p:TargetName=freetype "\
59381        "/p:OutDir=\"$freetype_lib_path\" "\
59382        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59383    cmd /c freetype.bat
59384
59385    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59386      # If that succeeds we also build freetype.lib
59387      $ECHO -e "@echo off\n"\
59388          "$MSBUILD $vcxproj_path "\
59389          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59390          "/p:Configuration=\"Release Multithreaded\" "\
59391          "/p:Platform=$freetype_platform "\
59392          "/p:ConfigurationType=StaticLibrary "\
59393          "/p:TargetName=freetype "\
59394          "/p:OutDir=\"$freetype_lib_path\" "\
59395          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59396      cmd /c freetype.bat
59397
59398      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59399        # Once we build both, lib and dll, set freetype lib and include path appropriately
59400        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59401        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59402        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59403$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59404      else
59405        BUILD_FREETYPE=no
59406      fi
59407    else
59408      BUILD_FREETYPE=no
59409    fi
59410  fi
59411
59412              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59413
59414  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59415  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59416  METHOD="well-known location"
59417
59418  # Let's start with an optimistic view of the world :-)
59419  FOUND_FREETYPE=yes
59420
59421  # First look for the canonical freetype main include file ft2build.h.
59422  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59423    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59424    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59425    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59426      # Fail.
59427      FOUND_FREETYPE=no
59428    fi
59429  fi
59430
59431  if test "x$FOUND_FREETYPE" = xyes; then
59432    # Include file found, let's continue the sanity check.
59433    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59434$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59435
59436    # Reset to default value
59437    FREETYPE_BASE_NAME=freetype
59438    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59439    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59440      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59441          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59442        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59443        # for the .6 version explicitly.
59444        FREETYPE_BASE_NAME=freetype.6
59445        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59446        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59447$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59448      else
59449        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59450$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59451        FOUND_FREETYPE=no
59452      fi
59453    else
59454      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59455        # On Windows, we will need both .lib and .dll file.
59456        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59457          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59459          FOUND_FREETYPE=no
59460        fi
59461      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59462          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59463        # Found lib in isa dir, use that instead.
59464        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59465        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59466$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59467      fi
59468    fi
59469  fi
59470
59471  if test "x$FOUND_FREETYPE" = xyes; then
59472
59473  # Only process if variable expands to non-empty
59474
59475  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59477
59478  # Input might be given as Windows format, start by converting to
59479  # unix format.
59480  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59481  new_path=`$CYGPATH -u "$path"`
59482
59483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59486  # "foo.exe" is OK but "foo" is an error.
59487  #
59488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59489  # It is also a way to make sure we got the proper file name for the real test later on.
59490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59491  if test "x$test_shortpath" = x; then
59492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59494    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59495  fi
59496
59497  # Call helper function which possibly converts this using DOS-style short mode.
59498  # If so, the updated path is stored in $new_path.
59499
59500  input_path="$new_path"
59501  # Check if we need to convert this using DOS-style short mode. If the path
59502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59503  # take no chances and rewrite it.
59504  # Note: m4 eats our [], so we need to use [ and ] instead.
59505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59506  if test "x$has_forbidden_chars" != x; then
59507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59511      # Going to short mode and back again did indeed matter. Since short mode is
59512      # case insensitive, let's make it lowercase to improve readability.
59513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59514      # Now convert it back to Unix-style (cygpath)
59515      input_path=`$CYGPATH -u "$shortmode_path"`
59516      new_path="$input_path"
59517    fi
59518  fi
59519
59520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59521  if test "x$test_cygdrive_prefix" = x; then
59522    # As a simple fix, exclude /usr/bin since it's not a real path.
59523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59525      # a path prefixed by /cygdrive for fixpath to work.
59526      new_path="$CYGWIN_ROOT_PATH$input_path"
59527    fi
59528  fi
59529
59530
59531  if test "x$path" != "x$new_path"; then
59532    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59535  fi
59536
59537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59538
59539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59540  has_colon=`$ECHO $path | $GREP ^.:`
59541  new_path="$path"
59542  if test "x$has_colon" = x; then
59543    # Not in mixed or Windows style, start by that.
59544    new_path=`cmd //c echo $path`
59545  fi
59546
59547
59548  input_path="$new_path"
59549  # Check if we need to convert this using DOS-style short mode. If the path
59550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59551  # take no chances and rewrite it.
59552  # Note: m4 eats our [], so we need to use [ and ] instead.
59553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59554  if test "x$has_forbidden_chars" != x; then
59555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59557  fi
59558
59559
59560  windows_path="$new_path"
59561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59562    unix_path=`$CYGPATH -u "$windows_path"`
59563    new_path="$unix_path"
59564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59566    new_path="$unix_path"
59567  fi
59568
59569  if test "x$path" != "x$new_path"; then
59570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59573  fi
59574
59575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59577
59578    else
59579      # We're on a unix platform. Hooray! :)
59580      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59581      has_space=`$ECHO "$path" | $GREP " "`
59582      if test "x$has_space" != x; then
59583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59586      fi
59587
59588      # Use eval to expand a potential ~
59589      eval path="$path"
59590      if test ! -f "$path" && test ! -d "$path"; then
59591        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59592      fi
59593
59594      if test -d "$path"; then
59595        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59596      else
59597        dir="`$DIRNAME "$path"`"
59598        base="`$BASENAME "$path"`"
59599        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59600      fi
59601    fi
59602  fi
59603
59604
59605  # Only process if variable expands to non-empty
59606
59607  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59609
59610  # Input might be given as Windows format, start by converting to
59611  # unix format.
59612  path="$POTENTIAL_FREETYPE_LIB_PATH"
59613  new_path=`$CYGPATH -u "$path"`
59614
59615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59618  # "foo.exe" is OK but "foo" is an error.
59619  #
59620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59621  # It is also a way to make sure we got the proper file name for the real test later on.
59622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59623  if test "x$test_shortpath" = x; then
59624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59627  fi
59628
59629  # Call helper function which possibly converts this using DOS-style short mode.
59630  # If so, the updated path is stored in $new_path.
59631
59632  input_path="$new_path"
59633  # Check if we need to convert this using DOS-style short mode. If the path
59634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59635  # take no chances and rewrite it.
59636  # Note: m4 eats our [], so we need to use [ and ] instead.
59637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59638  if test "x$has_forbidden_chars" != x; then
59639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59643      # Going to short mode and back again did indeed matter. Since short mode is
59644      # case insensitive, let's make it lowercase to improve readability.
59645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59646      # Now convert it back to Unix-style (cygpath)
59647      input_path=`$CYGPATH -u "$shortmode_path"`
59648      new_path="$input_path"
59649    fi
59650  fi
59651
59652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59653  if test "x$test_cygdrive_prefix" = x; then
59654    # As a simple fix, exclude /usr/bin since it's not a real path.
59655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59657      # a path prefixed by /cygdrive for fixpath to work.
59658      new_path="$CYGWIN_ROOT_PATH$input_path"
59659    fi
59660  fi
59661
59662
59663  if test "x$path" != "x$new_path"; then
59664    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59667  fi
59668
59669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59670
59671  path="$POTENTIAL_FREETYPE_LIB_PATH"
59672  has_colon=`$ECHO $path | $GREP ^.:`
59673  new_path="$path"
59674  if test "x$has_colon" = x; then
59675    # Not in mixed or Windows style, start by that.
59676    new_path=`cmd //c echo $path`
59677  fi
59678
59679
59680  input_path="$new_path"
59681  # Check if we need to convert this using DOS-style short mode. If the path
59682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59683  # take no chances and rewrite it.
59684  # Note: m4 eats our [], so we need to use [ and ] instead.
59685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59686  if test "x$has_forbidden_chars" != x; then
59687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59689  fi
59690
59691
59692  windows_path="$new_path"
59693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59694    unix_path=`$CYGPATH -u "$windows_path"`
59695    new_path="$unix_path"
59696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59698    new_path="$unix_path"
59699  fi
59700
59701  if test "x$path" != "x$new_path"; then
59702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59705  fi
59706
59707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59709
59710    else
59711      # We're on a unix platform. Hooray! :)
59712      path="$POTENTIAL_FREETYPE_LIB_PATH"
59713      has_space=`$ECHO "$path" | $GREP " "`
59714      if test "x$has_space" != x; then
59715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59718      fi
59719
59720      # Use eval to expand a potential ~
59721      eval path="$path"
59722      if test ! -f "$path" && test ! -d "$path"; then
59723        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59724      fi
59725
59726      if test -d "$path"; then
59727        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59728      else
59729        dir="`$DIRNAME "$path"`"
59730        base="`$BASENAME "$path"`"
59731        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59732      fi
59733    fi
59734  fi
59735
59736
59737    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59739$as_echo_n "checking for freetype includes... " >&6; }
59740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59741$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59742    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59744$as_echo_n "checking for freetype libraries... " >&6; }
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59746$as_echo "$FREETYPE_LIB_PATH" >&6; }
59747  fi
59748
59749              else
59750
59751  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59752  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59753  METHOD="well-known location"
59754
59755  # Let's start with an optimistic view of the world :-)
59756  FOUND_FREETYPE=yes
59757
59758  # First look for the canonical freetype main include file ft2build.h.
59759  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59760    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59761    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59762    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59763      # Fail.
59764      FOUND_FREETYPE=no
59765    fi
59766  fi
59767
59768  if test "x$FOUND_FREETYPE" = xyes; then
59769    # Include file found, let's continue the sanity check.
59770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59771$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59772
59773    # Reset to default value
59774    FREETYPE_BASE_NAME=freetype
59775    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59776    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59777      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59779        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59780        # for the .6 version explicitly.
59781        FREETYPE_BASE_NAME=freetype.6
59782        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59783        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59784$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59785      else
59786        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59787$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59788        FOUND_FREETYPE=no
59789      fi
59790    else
59791      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59792        # On Windows, we will need both .lib and .dll file.
59793        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59794          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59795$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59796          FOUND_FREETYPE=no
59797        fi
59798      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59799          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59800        # Found lib in isa dir, use that instead.
59801        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59802        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59803$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59804      fi
59805    fi
59806  fi
59807
59808  if test "x$FOUND_FREETYPE" = xyes; then
59809
59810  # Only process if variable expands to non-empty
59811
59812  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59814
59815  # Input might be given as Windows format, start by converting to
59816  # unix format.
59817  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59818  new_path=`$CYGPATH -u "$path"`
59819
59820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59823  # "foo.exe" is OK but "foo" is an error.
59824  #
59825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59826  # It is also a way to make sure we got the proper file name for the real test later on.
59827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59828  if test "x$test_shortpath" = x; then
59829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59832  fi
59833
59834  # Call helper function which possibly converts this using DOS-style short mode.
59835  # If so, the updated path is stored in $new_path.
59836
59837  input_path="$new_path"
59838  # Check if we need to convert this using DOS-style short mode. If the path
59839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59840  # take no chances and rewrite it.
59841  # Note: m4 eats our [], so we need to use [ and ] instead.
59842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59843  if test "x$has_forbidden_chars" != x; then
59844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59848      # Going to short mode and back again did indeed matter. Since short mode is
59849      # case insensitive, let's make it lowercase to improve readability.
59850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59851      # Now convert it back to Unix-style (cygpath)
59852      input_path=`$CYGPATH -u "$shortmode_path"`
59853      new_path="$input_path"
59854    fi
59855  fi
59856
59857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59858  if test "x$test_cygdrive_prefix" = x; then
59859    # As a simple fix, exclude /usr/bin since it's not a real path.
59860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59862      # a path prefixed by /cygdrive for fixpath to work.
59863      new_path="$CYGWIN_ROOT_PATH$input_path"
59864    fi
59865  fi
59866
59867
59868  if test "x$path" != "x$new_path"; then
59869    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59872  fi
59873
59874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59875
59876  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59877  has_colon=`$ECHO $path | $GREP ^.:`
59878  new_path="$path"
59879  if test "x$has_colon" = x; then
59880    # Not in mixed or Windows style, start by that.
59881    new_path=`cmd //c echo $path`
59882  fi
59883
59884
59885  input_path="$new_path"
59886  # Check if we need to convert this using DOS-style short mode. If the path
59887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59888  # take no chances and rewrite it.
59889  # Note: m4 eats our [], so we need to use [ and ] instead.
59890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59891  if test "x$has_forbidden_chars" != x; then
59892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59894  fi
59895
59896
59897  windows_path="$new_path"
59898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59899    unix_path=`$CYGPATH -u "$windows_path"`
59900    new_path="$unix_path"
59901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59903    new_path="$unix_path"
59904  fi
59905
59906  if test "x$path" != "x$new_path"; then
59907    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59910  fi
59911
59912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59914
59915    else
59916      # We're on a unix platform. Hooray! :)
59917      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59918      has_space=`$ECHO "$path" | $GREP " "`
59919      if test "x$has_space" != x; then
59920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59923      fi
59924
59925      # Use eval to expand a potential ~
59926      eval path="$path"
59927      if test ! -f "$path" && test ! -d "$path"; then
59928        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59929      fi
59930
59931      if test -d "$path"; then
59932        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59933      else
59934        dir="`$DIRNAME "$path"`"
59935        base="`$BASENAME "$path"`"
59936        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59937      fi
59938    fi
59939  fi
59940
59941
59942  # Only process if variable expands to non-empty
59943
59944  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59946
59947  # Input might be given as Windows format, start by converting to
59948  # unix format.
59949  path="$POTENTIAL_FREETYPE_LIB_PATH"
59950  new_path=`$CYGPATH -u "$path"`
59951
59952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59955  # "foo.exe" is OK but "foo" is an error.
59956  #
59957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59958  # It is also a way to make sure we got the proper file name for the real test later on.
59959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59960  if test "x$test_shortpath" = x; then
59961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59962$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59963    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59964  fi
59965
59966  # Call helper function which possibly converts this using DOS-style short mode.
59967  # If so, the updated path is stored in $new_path.
59968
59969  input_path="$new_path"
59970  # Check if we need to convert this using DOS-style short mode. If the path
59971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59972  # take no chances and rewrite it.
59973  # Note: m4 eats our [], so we need to use [ and ] instead.
59974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59975  if test "x$has_forbidden_chars" != x; then
59976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59980      # Going to short mode and back again did indeed matter. Since short mode is
59981      # case insensitive, let's make it lowercase to improve readability.
59982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59983      # Now convert it back to Unix-style (cygpath)
59984      input_path=`$CYGPATH -u "$shortmode_path"`
59985      new_path="$input_path"
59986    fi
59987  fi
59988
59989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59990  if test "x$test_cygdrive_prefix" = x; then
59991    # As a simple fix, exclude /usr/bin since it's not a real path.
59992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59994      # a path prefixed by /cygdrive for fixpath to work.
59995      new_path="$CYGWIN_ROOT_PATH$input_path"
59996    fi
59997  fi
59998
59999
60000  if test "x$path" != "x$new_path"; then
60001    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60003$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60004  fi
60005
60006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60007
60008  path="$POTENTIAL_FREETYPE_LIB_PATH"
60009  has_colon=`$ECHO $path | $GREP ^.:`
60010  new_path="$path"
60011  if test "x$has_colon" = x; then
60012    # Not in mixed or Windows style, start by that.
60013    new_path=`cmd //c echo $path`
60014  fi
60015
60016
60017  input_path="$new_path"
60018  # Check if we need to convert this using DOS-style short mode. If the path
60019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60020  # take no chances and rewrite it.
60021  # Note: m4 eats our [], so we need to use [ and ] instead.
60022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60023  if test "x$has_forbidden_chars" != x; then
60024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60026  fi
60027
60028
60029  windows_path="$new_path"
60030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60031    unix_path=`$CYGPATH -u "$windows_path"`
60032    new_path="$unix_path"
60033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60035    new_path="$unix_path"
60036  fi
60037
60038  if test "x$path" != "x$new_path"; then
60039    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60042  fi
60043
60044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60046
60047    else
60048      # We're on a unix platform. Hooray! :)
60049      path="$POTENTIAL_FREETYPE_LIB_PATH"
60050      has_space=`$ECHO "$path" | $GREP " "`
60051      if test "x$has_space" != x; then
60052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60055      fi
60056
60057      # Use eval to expand a potential ~
60058      eval path="$path"
60059      if test ! -f "$path" && test ! -d "$path"; then
60060        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60061      fi
60062
60063      if test -d "$path"; then
60064        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60065      else
60066        dir="`$DIRNAME "$path"`"
60067        base="`$BASENAME "$path"`"
60068        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60069      fi
60070    fi
60071  fi
60072
60073
60074    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60076$as_echo_n "checking for freetype includes... " >&6; }
60077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60078$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60079    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60081$as_echo_n "checking for freetype libraries... " >&6; }
60082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60083$as_echo "$FREETYPE_LIB_PATH" >&6; }
60084  fi
60085
60086              fi
60087            fi
60088          fi
60089        else
60090          FREETYPE_BASE_DIR="$SYSROOT/usr"
60091
60092  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60093  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60094  METHOD="well-known location"
60095
60096  # Let's start with an optimistic view of the world :-)
60097  FOUND_FREETYPE=yes
60098
60099  # First look for the canonical freetype main include file ft2build.h.
60100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60104      # Fail.
60105      FOUND_FREETYPE=no
60106    fi
60107  fi
60108
60109  if test "x$FOUND_FREETYPE" = xyes; then
60110    # Include file found, let's continue the sanity check.
60111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60113
60114    # Reset to default value
60115    FREETYPE_BASE_NAME=freetype
60116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60121        # for the .6 version explicitly.
60122        FREETYPE_BASE_NAME=freetype.6
60123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60126      else
60127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60129        FOUND_FREETYPE=no
60130      fi
60131    else
60132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60133        # On Windows, we will need both .lib and .dll file.
60134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60137          FOUND_FREETYPE=no
60138        fi
60139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60141        # Found lib in isa dir, use that instead.
60142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60145      fi
60146    fi
60147  fi
60148
60149  if test "x$FOUND_FREETYPE" = xyes; then
60150
60151  # Only process if variable expands to non-empty
60152
60153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60155
60156  # Input might be given as Windows format, start by converting to
60157  # unix format.
60158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60159  new_path=`$CYGPATH -u "$path"`
60160
60161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60164  # "foo.exe" is OK but "foo" is an error.
60165  #
60166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60167  # It is also a way to make sure we got the proper file name for the real test later on.
60168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60169  if test "x$test_shortpath" = x; then
60170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60173  fi
60174
60175  # Call helper function which possibly converts this using DOS-style short mode.
60176  # If so, the updated path is stored in $new_path.
60177
60178  input_path="$new_path"
60179  # Check if we need to convert this using DOS-style short mode. If the path
60180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60181  # take no chances and rewrite it.
60182  # Note: m4 eats our [], so we need to use [ and ] instead.
60183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60184  if test "x$has_forbidden_chars" != x; then
60185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60189      # Going to short mode and back again did indeed matter. Since short mode is
60190      # case insensitive, let's make it lowercase to improve readability.
60191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60192      # Now convert it back to Unix-style (cygpath)
60193      input_path=`$CYGPATH -u "$shortmode_path"`
60194      new_path="$input_path"
60195    fi
60196  fi
60197
60198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60199  if test "x$test_cygdrive_prefix" = x; then
60200    # As a simple fix, exclude /usr/bin since it's not a real path.
60201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60203      # a path prefixed by /cygdrive for fixpath to work.
60204      new_path="$CYGWIN_ROOT_PATH$input_path"
60205    fi
60206  fi
60207
60208
60209  if test "x$path" != "x$new_path"; then
60210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60213  fi
60214
60215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60216
60217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60218  has_colon=`$ECHO $path | $GREP ^.:`
60219  new_path="$path"
60220  if test "x$has_colon" = x; then
60221    # Not in mixed or Windows style, start by that.
60222    new_path=`cmd //c echo $path`
60223  fi
60224
60225
60226  input_path="$new_path"
60227  # Check if we need to convert this using DOS-style short mode. If the path
60228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60229  # take no chances and rewrite it.
60230  # Note: m4 eats our [], so we need to use [ and ] instead.
60231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60232  if test "x$has_forbidden_chars" != x; then
60233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60235  fi
60236
60237
60238  windows_path="$new_path"
60239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60240    unix_path=`$CYGPATH -u "$windows_path"`
60241    new_path="$unix_path"
60242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60244    new_path="$unix_path"
60245  fi
60246
60247  if test "x$path" != "x$new_path"; then
60248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60251  fi
60252
60253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60255
60256    else
60257      # We're on a unix platform. Hooray! :)
60258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60259      has_space=`$ECHO "$path" | $GREP " "`
60260      if test "x$has_space" != x; then
60261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60264      fi
60265
60266      # Use eval to expand a potential ~
60267      eval path="$path"
60268      if test ! -f "$path" && test ! -d "$path"; then
60269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60270      fi
60271
60272      if test -d "$path"; then
60273        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60274      else
60275        dir="`$DIRNAME "$path"`"
60276        base="`$BASENAME "$path"`"
60277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60278      fi
60279    fi
60280  fi
60281
60282
60283  # Only process if variable expands to non-empty
60284
60285  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60287
60288  # Input might be given as Windows format, start by converting to
60289  # unix format.
60290  path="$POTENTIAL_FREETYPE_LIB_PATH"
60291  new_path=`$CYGPATH -u "$path"`
60292
60293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60296  # "foo.exe" is OK but "foo" is an error.
60297  #
60298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60299  # It is also a way to make sure we got the proper file name for the real test later on.
60300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60301  if test "x$test_shortpath" = x; then
60302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60304    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60305  fi
60306
60307  # Call helper function which possibly converts this using DOS-style short mode.
60308  # If so, the updated path is stored in $new_path.
60309
60310  input_path="$new_path"
60311  # Check if we need to convert this using DOS-style short mode. If the path
60312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60313  # take no chances and rewrite it.
60314  # Note: m4 eats our [], so we need to use [ and ] instead.
60315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60316  if test "x$has_forbidden_chars" != x; then
60317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60321      # Going to short mode and back again did indeed matter. Since short mode is
60322      # case insensitive, let's make it lowercase to improve readability.
60323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60324      # Now convert it back to Unix-style (cygpath)
60325      input_path=`$CYGPATH -u "$shortmode_path"`
60326      new_path="$input_path"
60327    fi
60328  fi
60329
60330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60331  if test "x$test_cygdrive_prefix" = x; then
60332    # As a simple fix, exclude /usr/bin since it's not a real path.
60333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60335      # a path prefixed by /cygdrive for fixpath to work.
60336      new_path="$CYGWIN_ROOT_PATH$input_path"
60337    fi
60338  fi
60339
60340
60341  if test "x$path" != "x$new_path"; then
60342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60345  fi
60346
60347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60348
60349  path="$POTENTIAL_FREETYPE_LIB_PATH"
60350  has_colon=`$ECHO $path | $GREP ^.:`
60351  new_path="$path"
60352  if test "x$has_colon" = x; then
60353    # Not in mixed or Windows style, start by that.
60354    new_path=`cmd //c echo $path`
60355  fi
60356
60357
60358  input_path="$new_path"
60359  # Check if we need to convert this using DOS-style short mode. If the path
60360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60361  # take no chances and rewrite it.
60362  # Note: m4 eats our [], so we need to use [ and ] instead.
60363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60364  if test "x$has_forbidden_chars" != x; then
60365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60367  fi
60368
60369
60370  windows_path="$new_path"
60371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60372    unix_path=`$CYGPATH -u "$windows_path"`
60373    new_path="$unix_path"
60374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60376    new_path="$unix_path"
60377  fi
60378
60379  if test "x$path" != "x$new_path"; then
60380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60383  fi
60384
60385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60387
60388    else
60389      # We're on a unix platform. Hooray! :)
60390      path="$POTENTIAL_FREETYPE_LIB_PATH"
60391      has_space=`$ECHO "$path" | $GREP " "`
60392      if test "x$has_space" != x; then
60393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60396      fi
60397
60398      # Use eval to expand a potential ~
60399      eval path="$path"
60400      if test ! -f "$path" && test ! -d "$path"; then
60401        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60402      fi
60403
60404      if test -d "$path"; then
60405        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60406      else
60407        dir="`$DIRNAME "$path"`"
60408        base="`$BASENAME "$path"`"
60409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60410      fi
60411    fi
60412  fi
60413
60414
60415    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60417$as_echo_n "checking for freetype includes... " >&6; }
60418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60419$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60420    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60422$as_echo_n "checking for freetype libraries... " >&6; }
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60424$as_echo "$FREETYPE_LIB_PATH" >&6; }
60425  fi
60426
60427
60428          if test "x$FOUND_FREETYPE" != xyes; then
60429            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60430
60431  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60432  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60433  METHOD="well-known location"
60434
60435  # Let's start with an optimistic view of the world :-)
60436  FOUND_FREETYPE=yes
60437
60438  # First look for the canonical freetype main include file ft2build.h.
60439  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60440    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60441    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60442    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60443      # Fail.
60444      FOUND_FREETYPE=no
60445    fi
60446  fi
60447
60448  if test "x$FOUND_FREETYPE" = xyes; then
60449    # Include file found, let's continue the sanity check.
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60451$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60452
60453    # Reset to default value
60454    FREETYPE_BASE_NAME=freetype
60455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60457      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60459        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60460        # for the .6 version explicitly.
60461        FREETYPE_BASE_NAME=freetype.6
60462        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60463        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60464$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60465      else
60466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60468        FOUND_FREETYPE=no
60469      fi
60470    else
60471      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60472        # On Windows, we will need both .lib and .dll file.
60473        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60474          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60476          FOUND_FREETYPE=no
60477        fi
60478      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60480        # Found lib in isa dir, use that instead.
60481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60482        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60483$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60484      fi
60485    fi
60486  fi
60487
60488  if test "x$FOUND_FREETYPE" = xyes; then
60489
60490  # Only process if variable expands to non-empty
60491
60492  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60494
60495  # Input might be given as Windows format, start by converting to
60496  # unix format.
60497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60498  new_path=`$CYGPATH -u "$path"`
60499
60500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60503  # "foo.exe" is OK but "foo" is an error.
60504  #
60505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60506  # It is also a way to make sure we got the proper file name for the real test later on.
60507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60508  if test "x$test_shortpath" = x; then
60509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60512  fi
60513
60514  # Call helper function which possibly converts this using DOS-style short mode.
60515  # If so, the updated path is stored in $new_path.
60516
60517  input_path="$new_path"
60518  # Check if we need to convert this using DOS-style short mode. If the path
60519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60520  # take no chances and rewrite it.
60521  # Note: m4 eats our [], so we need to use [ and ] instead.
60522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60523  if test "x$has_forbidden_chars" != x; then
60524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60528      # Going to short mode and back again did indeed matter. Since short mode is
60529      # case insensitive, let's make it lowercase to improve readability.
60530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60531      # Now convert it back to Unix-style (cygpath)
60532      input_path=`$CYGPATH -u "$shortmode_path"`
60533      new_path="$input_path"
60534    fi
60535  fi
60536
60537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60538  if test "x$test_cygdrive_prefix" = x; then
60539    # As a simple fix, exclude /usr/bin since it's not a real path.
60540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60542      # a path prefixed by /cygdrive for fixpath to work.
60543      new_path="$CYGWIN_ROOT_PATH$input_path"
60544    fi
60545  fi
60546
60547
60548  if test "x$path" != "x$new_path"; then
60549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60552  fi
60553
60554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60555
60556  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60557  has_colon=`$ECHO $path | $GREP ^.:`
60558  new_path="$path"
60559  if test "x$has_colon" = x; then
60560    # Not in mixed or Windows style, start by that.
60561    new_path=`cmd //c echo $path`
60562  fi
60563
60564
60565  input_path="$new_path"
60566  # Check if we need to convert this using DOS-style short mode. If the path
60567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60568  # take no chances and rewrite it.
60569  # Note: m4 eats our [], so we need to use [ and ] instead.
60570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60571  if test "x$has_forbidden_chars" != x; then
60572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60574  fi
60575
60576
60577  windows_path="$new_path"
60578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60579    unix_path=`$CYGPATH -u "$windows_path"`
60580    new_path="$unix_path"
60581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60583    new_path="$unix_path"
60584  fi
60585
60586  if test "x$path" != "x$new_path"; then
60587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60590  fi
60591
60592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60594
60595    else
60596      # We're on a unix platform. Hooray! :)
60597      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60598      has_space=`$ECHO "$path" | $GREP " "`
60599      if test "x$has_space" != x; then
60600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60603      fi
60604
60605      # Use eval to expand a potential ~
60606      eval path="$path"
60607      if test ! -f "$path" && test ! -d "$path"; then
60608        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60609      fi
60610
60611      if test -d "$path"; then
60612        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60613      else
60614        dir="`$DIRNAME "$path"`"
60615        base="`$BASENAME "$path"`"
60616        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60617      fi
60618    fi
60619  fi
60620
60621
60622  # Only process if variable expands to non-empty
60623
60624  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60626
60627  # Input might be given as Windows format, start by converting to
60628  # unix format.
60629  path="$POTENTIAL_FREETYPE_LIB_PATH"
60630  new_path=`$CYGPATH -u "$path"`
60631
60632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60635  # "foo.exe" is OK but "foo" is an error.
60636  #
60637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60638  # It is also a way to make sure we got the proper file name for the real test later on.
60639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60640  if test "x$test_shortpath" = x; then
60641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60643    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60644  fi
60645
60646  # Call helper function which possibly converts this using DOS-style short mode.
60647  # If so, the updated path is stored in $new_path.
60648
60649  input_path="$new_path"
60650  # Check if we need to convert this using DOS-style short mode. If the path
60651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60652  # take no chances and rewrite it.
60653  # Note: m4 eats our [], so we need to use [ and ] instead.
60654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60655  if test "x$has_forbidden_chars" != x; then
60656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60660      # Going to short mode and back again did indeed matter. Since short mode is
60661      # case insensitive, let's make it lowercase to improve readability.
60662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60663      # Now convert it back to Unix-style (cygpath)
60664      input_path=`$CYGPATH -u "$shortmode_path"`
60665      new_path="$input_path"
60666    fi
60667  fi
60668
60669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60670  if test "x$test_cygdrive_prefix" = x; then
60671    # As a simple fix, exclude /usr/bin since it's not a real path.
60672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60674      # a path prefixed by /cygdrive for fixpath to work.
60675      new_path="$CYGWIN_ROOT_PATH$input_path"
60676    fi
60677  fi
60678
60679
60680  if test "x$path" != "x$new_path"; then
60681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60684  fi
60685
60686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60687
60688  path="$POTENTIAL_FREETYPE_LIB_PATH"
60689  has_colon=`$ECHO $path | $GREP ^.:`
60690  new_path="$path"
60691  if test "x$has_colon" = x; then
60692    # Not in mixed or Windows style, start by that.
60693    new_path=`cmd //c echo $path`
60694  fi
60695
60696
60697  input_path="$new_path"
60698  # Check if we need to convert this using DOS-style short mode. If the path
60699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60700  # take no chances and rewrite it.
60701  # Note: m4 eats our [], so we need to use [ and ] instead.
60702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60703  if test "x$has_forbidden_chars" != x; then
60704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60706  fi
60707
60708
60709  windows_path="$new_path"
60710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60711    unix_path=`$CYGPATH -u "$windows_path"`
60712    new_path="$unix_path"
60713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60715    new_path="$unix_path"
60716  fi
60717
60718  if test "x$path" != "x$new_path"; then
60719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60722  fi
60723
60724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60726
60727    else
60728      # We're on a unix platform. Hooray! :)
60729      path="$POTENTIAL_FREETYPE_LIB_PATH"
60730      has_space=`$ECHO "$path" | $GREP " "`
60731      if test "x$has_space" != x; then
60732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60735      fi
60736
60737      # Use eval to expand a potential ~
60738      eval path="$path"
60739      if test ! -f "$path" && test ! -d "$path"; then
60740        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60741      fi
60742
60743      if test -d "$path"; then
60744        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60745      else
60746        dir="`$DIRNAME "$path"`"
60747        base="`$BASENAME "$path"`"
60748        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60749      fi
60750    fi
60751  fi
60752
60753
60754    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60756$as_echo_n "checking for freetype includes... " >&6; }
60757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60758$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60759    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60761$as_echo_n "checking for freetype libraries... " >&6; }
60762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60763$as_echo "$FREETYPE_LIB_PATH" >&6; }
60764  fi
60765
60766          fi
60767
60768          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60769            if test "x$FOUND_FREETYPE" != xyes; then
60770              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60771              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60772
60773  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60774  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60775  METHOD="well-known location"
60776
60777  # Let's start with an optimistic view of the world :-)
60778  FOUND_FREETYPE=yes
60779
60780  # First look for the canonical freetype main include file ft2build.h.
60781  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60782    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60783    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60784    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60785      # Fail.
60786      FOUND_FREETYPE=no
60787    fi
60788  fi
60789
60790  if test "x$FOUND_FREETYPE" = xyes; then
60791    # Include file found, let's continue the sanity check.
60792    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60793$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60794
60795    # Reset to default value
60796    FREETYPE_BASE_NAME=freetype
60797    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60798    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60799      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60800          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60801        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60802        # for the .6 version explicitly.
60803        FREETYPE_BASE_NAME=freetype.6
60804        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60805        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60806$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60807      else
60808        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60809$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60810        FOUND_FREETYPE=no
60811      fi
60812    else
60813      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60814        # On Windows, we will need both .lib and .dll file.
60815        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60816          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60817$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60818          FOUND_FREETYPE=no
60819        fi
60820      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60821          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60822        # Found lib in isa dir, use that instead.
60823        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60824        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60825$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60826      fi
60827    fi
60828  fi
60829
60830  if test "x$FOUND_FREETYPE" = xyes; then
60831
60832  # Only process if variable expands to non-empty
60833
60834  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60836
60837  # Input might be given as Windows format, start by converting to
60838  # unix format.
60839  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60840  new_path=`$CYGPATH -u "$path"`
60841
60842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60845  # "foo.exe" is OK but "foo" is an error.
60846  #
60847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60848  # It is also a way to make sure we got the proper file name for the real test later on.
60849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60850  if test "x$test_shortpath" = x; then
60851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60853    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60854  fi
60855
60856  # Call helper function which possibly converts this using DOS-style short mode.
60857  # If so, the updated path is stored in $new_path.
60858
60859  input_path="$new_path"
60860  # Check if we need to convert this using DOS-style short mode. If the path
60861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60862  # take no chances and rewrite it.
60863  # Note: m4 eats our [], so we need to use [ and ] instead.
60864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60865  if test "x$has_forbidden_chars" != x; then
60866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60870      # Going to short mode and back again did indeed matter. Since short mode is
60871      # case insensitive, let's make it lowercase to improve readability.
60872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60873      # Now convert it back to Unix-style (cygpath)
60874      input_path=`$CYGPATH -u "$shortmode_path"`
60875      new_path="$input_path"
60876    fi
60877  fi
60878
60879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60880  if test "x$test_cygdrive_prefix" = x; then
60881    # As a simple fix, exclude /usr/bin since it's not a real path.
60882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60884      # a path prefixed by /cygdrive for fixpath to work.
60885      new_path="$CYGWIN_ROOT_PATH$input_path"
60886    fi
60887  fi
60888
60889
60890  if test "x$path" != "x$new_path"; then
60891    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60894  fi
60895
60896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60897
60898  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60899  has_colon=`$ECHO $path | $GREP ^.:`
60900  new_path="$path"
60901  if test "x$has_colon" = x; then
60902    # Not in mixed or Windows style, start by that.
60903    new_path=`cmd //c echo $path`
60904  fi
60905
60906
60907  input_path="$new_path"
60908  # Check if we need to convert this using DOS-style short mode. If the path
60909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60910  # take no chances and rewrite it.
60911  # Note: m4 eats our [], so we need to use [ and ] instead.
60912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60913  if test "x$has_forbidden_chars" != x; then
60914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60916  fi
60917
60918
60919  windows_path="$new_path"
60920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60921    unix_path=`$CYGPATH -u "$windows_path"`
60922    new_path="$unix_path"
60923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60925    new_path="$unix_path"
60926  fi
60927
60928  if test "x$path" != "x$new_path"; then
60929    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60932  fi
60933
60934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60936
60937    else
60938      # We're on a unix platform. Hooray! :)
60939      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60940      has_space=`$ECHO "$path" | $GREP " "`
60941      if test "x$has_space" != x; then
60942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60945      fi
60946
60947      # Use eval to expand a potential ~
60948      eval path="$path"
60949      if test ! -f "$path" && test ! -d "$path"; then
60950        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60951      fi
60952
60953      if test -d "$path"; then
60954        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60955      else
60956        dir="`$DIRNAME "$path"`"
60957        base="`$BASENAME "$path"`"
60958        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60959      fi
60960    fi
60961  fi
60962
60963
60964  # Only process if variable expands to non-empty
60965
60966  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60968
60969  # Input might be given as Windows format, start by converting to
60970  # unix format.
60971  path="$POTENTIAL_FREETYPE_LIB_PATH"
60972  new_path=`$CYGPATH -u "$path"`
60973
60974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60977  # "foo.exe" is OK but "foo" is an error.
60978  #
60979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60980  # It is also a way to make sure we got the proper file name for the real test later on.
60981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60982  if test "x$test_shortpath" = x; then
60983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60985    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60986  fi
60987
60988  # Call helper function which possibly converts this using DOS-style short mode.
60989  # If so, the updated path is stored in $new_path.
60990
60991  input_path="$new_path"
60992  # Check if we need to convert this using DOS-style short mode. If the path
60993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60994  # take no chances and rewrite it.
60995  # Note: m4 eats our [], so we need to use [ and ] instead.
60996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60997  if test "x$has_forbidden_chars" != x; then
60998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61002      # Going to short mode and back again did indeed matter. Since short mode is
61003      # case insensitive, let's make it lowercase to improve readability.
61004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61005      # Now convert it back to Unix-style (cygpath)
61006      input_path=`$CYGPATH -u "$shortmode_path"`
61007      new_path="$input_path"
61008    fi
61009  fi
61010
61011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61012  if test "x$test_cygdrive_prefix" = x; then
61013    # As a simple fix, exclude /usr/bin since it's not a real path.
61014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61016      # a path prefixed by /cygdrive for fixpath to work.
61017      new_path="$CYGWIN_ROOT_PATH$input_path"
61018    fi
61019  fi
61020
61021
61022  if test "x$path" != "x$new_path"; then
61023    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61026  fi
61027
61028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61029
61030  path="$POTENTIAL_FREETYPE_LIB_PATH"
61031  has_colon=`$ECHO $path | $GREP ^.:`
61032  new_path="$path"
61033  if test "x$has_colon" = x; then
61034    # Not in mixed or Windows style, start by that.
61035    new_path=`cmd //c echo $path`
61036  fi
61037
61038
61039  input_path="$new_path"
61040  # Check if we need to convert this using DOS-style short mode. If the path
61041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61042  # take no chances and rewrite it.
61043  # Note: m4 eats our [], so we need to use [ and ] instead.
61044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61045  if test "x$has_forbidden_chars" != x; then
61046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61048  fi
61049
61050
61051  windows_path="$new_path"
61052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61053    unix_path=`$CYGPATH -u "$windows_path"`
61054    new_path="$unix_path"
61055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61057    new_path="$unix_path"
61058  fi
61059
61060  if test "x$path" != "x$new_path"; then
61061    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61064  fi
61065
61066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61068
61069    else
61070      # We're on a unix platform. Hooray! :)
61071      path="$POTENTIAL_FREETYPE_LIB_PATH"
61072      has_space=`$ECHO "$path" | $GREP " "`
61073      if test "x$has_space" != x; then
61074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61077      fi
61078
61079      # Use eval to expand a potential ~
61080      eval path="$path"
61081      if test ! -f "$path" && test ! -d "$path"; then
61082        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61083      fi
61084
61085      if test -d "$path"; then
61086        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61087      else
61088        dir="`$DIRNAME "$path"`"
61089        base="`$BASENAME "$path"`"
61090        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61091      fi
61092    fi
61093  fi
61094
61095
61096    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61098$as_echo_n "checking for freetype includes... " >&6; }
61099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61100$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61101    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61103$as_echo_n "checking for freetype libraries... " >&6; }
61104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61105$as_echo "$FREETYPE_LIB_PATH" >&6; }
61106  fi
61107
61108            fi
61109          fi
61110
61111          if test "x$FOUND_FREETYPE" != xyes; then
61112            FREETYPE_BASE_DIR="$SYSROOT/usr"
61113            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61114
61115  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61116  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61117  METHOD="well-known location"
61118
61119  # Let's start with an optimistic view of the world :-)
61120  FOUND_FREETYPE=yes
61121
61122  # First look for the canonical freetype main include file ft2build.h.
61123  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61124    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61125    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61126    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61127      # Fail.
61128      FOUND_FREETYPE=no
61129    fi
61130  fi
61131
61132  if test "x$FOUND_FREETYPE" = xyes; then
61133    # Include file found, let's continue the sanity check.
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61135$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61136
61137    # Reset to default value
61138    FREETYPE_BASE_NAME=freetype
61139    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61140    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61141      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61143        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61144        # for the .6 version explicitly.
61145        FREETYPE_BASE_NAME=freetype.6
61146        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61147        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61148$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61149      else
61150        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61151$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61152        FOUND_FREETYPE=no
61153      fi
61154    else
61155      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61156        # On Windows, we will need both .lib and .dll file.
61157        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61158          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61159$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61160          FOUND_FREETYPE=no
61161        fi
61162      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61163          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61164        # Found lib in isa dir, use that instead.
61165        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61166        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61167$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61168      fi
61169    fi
61170  fi
61171
61172  if test "x$FOUND_FREETYPE" = xyes; then
61173
61174  # Only process if variable expands to non-empty
61175
61176  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61178
61179  # Input might be given as Windows format, start by converting to
61180  # unix format.
61181  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61182  new_path=`$CYGPATH -u "$path"`
61183
61184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61187  # "foo.exe" is OK but "foo" is an error.
61188  #
61189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61190  # It is also a way to make sure we got the proper file name for the real test later on.
61191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61192  if test "x$test_shortpath" = x; then
61193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61196  fi
61197
61198  # Call helper function which possibly converts this using DOS-style short mode.
61199  # If so, the updated path is stored in $new_path.
61200
61201  input_path="$new_path"
61202  # Check if we need to convert this using DOS-style short mode. If the path
61203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61204  # take no chances and rewrite it.
61205  # Note: m4 eats our [], so we need to use [ and ] instead.
61206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61207  if test "x$has_forbidden_chars" != x; then
61208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61212      # Going to short mode and back again did indeed matter. Since short mode is
61213      # case insensitive, let's make it lowercase to improve readability.
61214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61215      # Now convert it back to Unix-style (cygpath)
61216      input_path=`$CYGPATH -u "$shortmode_path"`
61217      new_path="$input_path"
61218    fi
61219  fi
61220
61221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61222  if test "x$test_cygdrive_prefix" = x; then
61223    # As a simple fix, exclude /usr/bin since it's not a real path.
61224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61226      # a path prefixed by /cygdrive for fixpath to work.
61227      new_path="$CYGWIN_ROOT_PATH$input_path"
61228    fi
61229  fi
61230
61231
61232  if test "x$path" != "x$new_path"; then
61233    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61236  fi
61237
61238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61239
61240  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61241  has_colon=`$ECHO $path | $GREP ^.:`
61242  new_path="$path"
61243  if test "x$has_colon" = x; then
61244    # Not in mixed or Windows style, start by that.
61245    new_path=`cmd //c echo $path`
61246  fi
61247
61248
61249  input_path="$new_path"
61250  # Check if we need to convert this using DOS-style short mode. If the path
61251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61252  # take no chances and rewrite it.
61253  # Note: m4 eats our [], so we need to use [ and ] instead.
61254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61255  if test "x$has_forbidden_chars" != x; then
61256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61258  fi
61259
61260
61261  windows_path="$new_path"
61262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61263    unix_path=`$CYGPATH -u "$windows_path"`
61264    new_path="$unix_path"
61265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61267    new_path="$unix_path"
61268  fi
61269
61270  if test "x$path" != "x$new_path"; then
61271    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61274  fi
61275
61276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61278
61279    else
61280      # We're on a unix platform. Hooray! :)
61281      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61282      has_space=`$ECHO "$path" | $GREP " "`
61283      if test "x$has_space" != x; then
61284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61287      fi
61288
61289      # Use eval to expand a potential ~
61290      eval path="$path"
61291      if test ! -f "$path" && test ! -d "$path"; then
61292        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61293      fi
61294
61295      if test -d "$path"; then
61296        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61297      else
61298        dir="`$DIRNAME "$path"`"
61299        base="`$BASENAME "$path"`"
61300        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61301      fi
61302    fi
61303  fi
61304
61305
61306  # Only process if variable expands to non-empty
61307
61308  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61310
61311  # Input might be given as Windows format, start by converting to
61312  # unix format.
61313  path="$POTENTIAL_FREETYPE_LIB_PATH"
61314  new_path=`$CYGPATH -u "$path"`
61315
61316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61319  # "foo.exe" is OK but "foo" is an error.
61320  #
61321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61322  # It is also a way to make sure we got the proper file name for the real test later on.
61323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61324  if test "x$test_shortpath" = x; then
61325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61327    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61328  fi
61329
61330  # Call helper function which possibly converts this using DOS-style short mode.
61331  # If so, the updated path is stored in $new_path.
61332
61333  input_path="$new_path"
61334  # Check if we need to convert this using DOS-style short mode. If the path
61335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61336  # take no chances and rewrite it.
61337  # Note: m4 eats our [], so we need to use [ and ] instead.
61338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61339  if test "x$has_forbidden_chars" != x; then
61340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61344      # Going to short mode and back again did indeed matter. Since short mode is
61345      # case insensitive, let's make it lowercase to improve readability.
61346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61347      # Now convert it back to Unix-style (cygpath)
61348      input_path=`$CYGPATH -u "$shortmode_path"`
61349      new_path="$input_path"
61350    fi
61351  fi
61352
61353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61354  if test "x$test_cygdrive_prefix" = x; then
61355    # As a simple fix, exclude /usr/bin since it's not a real path.
61356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61358      # a path prefixed by /cygdrive for fixpath to work.
61359      new_path="$CYGWIN_ROOT_PATH$input_path"
61360    fi
61361  fi
61362
61363
61364  if test "x$path" != "x$new_path"; then
61365    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61368  fi
61369
61370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61371
61372  path="$POTENTIAL_FREETYPE_LIB_PATH"
61373  has_colon=`$ECHO $path | $GREP ^.:`
61374  new_path="$path"
61375  if test "x$has_colon" = x; then
61376    # Not in mixed or Windows style, start by that.
61377    new_path=`cmd //c echo $path`
61378  fi
61379
61380
61381  input_path="$new_path"
61382  # Check if we need to convert this using DOS-style short mode. If the path
61383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61384  # take no chances and rewrite it.
61385  # Note: m4 eats our [], so we need to use [ and ] instead.
61386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61387  if test "x$has_forbidden_chars" != x; then
61388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61390  fi
61391
61392
61393  windows_path="$new_path"
61394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61395    unix_path=`$CYGPATH -u "$windows_path"`
61396    new_path="$unix_path"
61397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61399    new_path="$unix_path"
61400  fi
61401
61402  if test "x$path" != "x$new_path"; then
61403    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61405$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61406  fi
61407
61408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61410
61411    else
61412      # We're on a unix platform. Hooray! :)
61413      path="$POTENTIAL_FREETYPE_LIB_PATH"
61414      has_space=`$ECHO "$path" | $GREP " "`
61415      if test "x$has_space" != x; then
61416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61417$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61419      fi
61420
61421      # Use eval to expand a potential ~
61422      eval path="$path"
61423      if test ! -f "$path" && test ! -d "$path"; then
61424        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61425      fi
61426
61427      if test -d "$path"; then
61428        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61429      else
61430        dir="`$DIRNAME "$path"`"
61431        base="`$BASENAME "$path"`"
61432        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61433      fi
61434    fi
61435  fi
61436
61437
61438    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61440$as_echo_n "checking for freetype includes... " >&6; }
61441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61442$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61443    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61445$as_echo_n "checking for freetype libraries... " >&6; }
61446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61447$as_echo "$FREETYPE_LIB_PATH" >&6; }
61448  fi
61449
61450            else
61451
61452  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61453  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61454  METHOD="well-known location"
61455
61456  # Let's start with an optimistic view of the world :-)
61457  FOUND_FREETYPE=yes
61458
61459  # First look for the canonical freetype main include file ft2build.h.
61460  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61461    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61462    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61463    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61464      # Fail.
61465      FOUND_FREETYPE=no
61466    fi
61467  fi
61468
61469  if test "x$FOUND_FREETYPE" = xyes; then
61470    # Include file found, let's continue the sanity check.
61471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61472$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61473
61474    # Reset to default value
61475    FREETYPE_BASE_NAME=freetype
61476    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61477    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61478      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61480        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61481        # for the .6 version explicitly.
61482        FREETYPE_BASE_NAME=freetype.6
61483        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61484        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61485$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61486      else
61487        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61489        FOUND_FREETYPE=no
61490      fi
61491    else
61492      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61493        # On Windows, we will need both .lib and .dll file.
61494        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61495          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61497          FOUND_FREETYPE=no
61498        fi
61499      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61501        # Found lib in isa dir, use that instead.
61502        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61503        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61504$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61505      fi
61506    fi
61507  fi
61508
61509  if test "x$FOUND_FREETYPE" = xyes; then
61510
61511  # Only process if variable expands to non-empty
61512
61513  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61515
61516  # Input might be given as Windows format, start by converting to
61517  # unix format.
61518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61519  new_path=`$CYGPATH -u "$path"`
61520
61521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61524  # "foo.exe" is OK but "foo" is an error.
61525  #
61526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61527  # It is also a way to make sure we got the proper file name for the real test later on.
61528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61529  if test "x$test_shortpath" = x; then
61530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61533  fi
61534
61535  # Call helper function which possibly converts this using DOS-style short mode.
61536  # If so, the updated path is stored in $new_path.
61537
61538  input_path="$new_path"
61539  # Check if we need to convert this using DOS-style short mode. If the path
61540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61541  # take no chances and rewrite it.
61542  # Note: m4 eats our [], so we need to use [ and ] instead.
61543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61544  if test "x$has_forbidden_chars" != x; then
61545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61549      # Going to short mode and back again did indeed matter. Since short mode is
61550      # case insensitive, let's make it lowercase to improve readability.
61551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61552      # Now convert it back to Unix-style (cygpath)
61553      input_path=`$CYGPATH -u "$shortmode_path"`
61554      new_path="$input_path"
61555    fi
61556  fi
61557
61558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61559  if test "x$test_cygdrive_prefix" = x; then
61560    # As a simple fix, exclude /usr/bin since it's not a real path.
61561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61563      # a path prefixed by /cygdrive for fixpath to work.
61564      new_path="$CYGWIN_ROOT_PATH$input_path"
61565    fi
61566  fi
61567
61568
61569  if test "x$path" != "x$new_path"; then
61570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61573  fi
61574
61575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61576
61577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61578  has_colon=`$ECHO $path | $GREP ^.:`
61579  new_path="$path"
61580  if test "x$has_colon" = x; then
61581    # Not in mixed or Windows style, start by that.
61582    new_path=`cmd //c echo $path`
61583  fi
61584
61585
61586  input_path="$new_path"
61587  # Check if we need to convert this using DOS-style short mode. If the path
61588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61589  # take no chances and rewrite it.
61590  # Note: m4 eats our [], so we need to use [ and ] instead.
61591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61592  if test "x$has_forbidden_chars" != x; then
61593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61595  fi
61596
61597
61598  windows_path="$new_path"
61599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61600    unix_path=`$CYGPATH -u "$windows_path"`
61601    new_path="$unix_path"
61602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61604    new_path="$unix_path"
61605  fi
61606
61607  if test "x$path" != "x$new_path"; then
61608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61611  fi
61612
61613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61615
61616    else
61617      # We're on a unix platform. Hooray! :)
61618      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61619      has_space=`$ECHO "$path" | $GREP " "`
61620      if test "x$has_space" != x; then
61621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61624      fi
61625
61626      # Use eval to expand a potential ~
61627      eval path="$path"
61628      if test ! -f "$path" && test ! -d "$path"; then
61629        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61630      fi
61631
61632      if test -d "$path"; then
61633        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61634      else
61635        dir="`$DIRNAME "$path"`"
61636        base="`$BASENAME "$path"`"
61637        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61638      fi
61639    fi
61640  fi
61641
61642
61643  # Only process if variable expands to non-empty
61644
61645  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61647
61648  # Input might be given as Windows format, start by converting to
61649  # unix format.
61650  path="$POTENTIAL_FREETYPE_LIB_PATH"
61651  new_path=`$CYGPATH -u "$path"`
61652
61653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61656  # "foo.exe" is OK but "foo" is an error.
61657  #
61658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61659  # It is also a way to make sure we got the proper file name for the real test later on.
61660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61661  if test "x$test_shortpath" = x; then
61662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61664    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61665  fi
61666
61667  # Call helper function which possibly converts this using DOS-style short mode.
61668  # If so, the updated path is stored in $new_path.
61669
61670  input_path="$new_path"
61671  # Check if we need to convert this using DOS-style short mode. If the path
61672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61673  # take no chances and rewrite it.
61674  # Note: m4 eats our [], so we need to use [ and ] instead.
61675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61676  if test "x$has_forbidden_chars" != x; then
61677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61681      # Going to short mode and back again did indeed matter. Since short mode is
61682      # case insensitive, let's make it lowercase to improve readability.
61683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61684      # Now convert it back to Unix-style (cygpath)
61685      input_path=`$CYGPATH -u "$shortmode_path"`
61686      new_path="$input_path"
61687    fi
61688  fi
61689
61690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61691  if test "x$test_cygdrive_prefix" = x; then
61692    # As a simple fix, exclude /usr/bin since it's not a real path.
61693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61695      # a path prefixed by /cygdrive for fixpath to work.
61696      new_path="$CYGWIN_ROOT_PATH$input_path"
61697    fi
61698  fi
61699
61700
61701  if test "x$path" != "x$new_path"; then
61702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61705  fi
61706
61707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61708
61709  path="$POTENTIAL_FREETYPE_LIB_PATH"
61710  has_colon=`$ECHO $path | $GREP ^.:`
61711  new_path="$path"
61712  if test "x$has_colon" = x; then
61713    # Not in mixed or Windows style, start by that.
61714    new_path=`cmd //c echo $path`
61715  fi
61716
61717
61718  input_path="$new_path"
61719  # Check if we need to convert this using DOS-style short mode. If the path
61720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61721  # take no chances and rewrite it.
61722  # Note: m4 eats our [], so we need to use [ and ] instead.
61723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61724  if test "x$has_forbidden_chars" != x; then
61725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61727  fi
61728
61729
61730  windows_path="$new_path"
61731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61732    unix_path=`$CYGPATH -u "$windows_path"`
61733    new_path="$unix_path"
61734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61736    new_path="$unix_path"
61737  fi
61738
61739  if test "x$path" != "x$new_path"; then
61740    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61742$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61743  fi
61744
61745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61747
61748    else
61749      # We're on a unix platform. Hooray! :)
61750      path="$POTENTIAL_FREETYPE_LIB_PATH"
61751      has_space=`$ECHO "$path" | $GREP " "`
61752      if test "x$has_space" != x; then
61753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61756      fi
61757
61758      # Use eval to expand a potential ~
61759      eval path="$path"
61760      if test ! -f "$path" && test ! -d "$path"; then
61761        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61762      fi
61763
61764      if test -d "$path"; then
61765        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61766      else
61767        dir="`$DIRNAME "$path"`"
61768        base="`$BASENAME "$path"`"
61769        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61770      fi
61771    fi
61772  fi
61773
61774
61775    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61777$as_echo_n "checking for freetype includes... " >&6; }
61778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61779$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61780    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61782$as_echo_n "checking for freetype libraries... " >&6; }
61783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61784$as_echo "$FREETYPE_LIB_PATH" >&6; }
61785  fi
61786
61787              if test "x$FOUND_FREETYPE" != xyes; then
61788
61789  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61790  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61791  METHOD="well-known location"
61792
61793  # Let's start with an optimistic view of the world :-)
61794  FOUND_FREETYPE=yes
61795
61796  # First look for the canonical freetype main include file ft2build.h.
61797  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61798    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61799    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61800    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61801      # Fail.
61802      FOUND_FREETYPE=no
61803    fi
61804  fi
61805
61806  if test "x$FOUND_FREETYPE" = xyes; then
61807    # Include file found, let's continue the sanity check.
61808    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61809$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61810
61811    # Reset to default value
61812    FREETYPE_BASE_NAME=freetype
61813    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61814    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61815      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61816          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61817        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61818        # for the .6 version explicitly.
61819        FREETYPE_BASE_NAME=freetype.6
61820        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61821        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61822$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61823      else
61824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61826        FOUND_FREETYPE=no
61827      fi
61828    else
61829      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61830        # On Windows, we will need both .lib and .dll file.
61831        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61832          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61834          FOUND_FREETYPE=no
61835        fi
61836      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61837          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61838        # Found lib in isa dir, use that instead.
61839        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61840        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61841$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61842      fi
61843    fi
61844  fi
61845
61846  if test "x$FOUND_FREETYPE" = xyes; then
61847
61848  # Only process if variable expands to non-empty
61849
61850  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61852
61853  # Input might be given as Windows format, start by converting to
61854  # unix format.
61855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61856  new_path=`$CYGPATH -u "$path"`
61857
61858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61861  # "foo.exe" is OK but "foo" is an error.
61862  #
61863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61864  # It is also a way to make sure we got the proper file name for the real test later on.
61865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61866  if test "x$test_shortpath" = x; then
61867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61870  fi
61871
61872  # Call helper function which possibly converts this using DOS-style short mode.
61873  # If so, the updated path is stored in $new_path.
61874
61875  input_path="$new_path"
61876  # Check if we need to convert this using DOS-style short mode. If the path
61877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61878  # take no chances and rewrite it.
61879  # Note: m4 eats our [], so we need to use [ and ] instead.
61880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61881  if test "x$has_forbidden_chars" != x; then
61882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61886      # Going to short mode and back again did indeed matter. Since short mode is
61887      # case insensitive, let's make it lowercase to improve readability.
61888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61889      # Now convert it back to Unix-style (cygpath)
61890      input_path=`$CYGPATH -u "$shortmode_path"`
61891      new_path="$input_path"
61892    fi
61893  fi
61894
61895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61896  if test "x$test_cygdrive_prefix" = x; then
61897    # As a simple fix, exclude /usr/bin since it's not a real path.
61898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61900      # a path prefixed by /cygdrive for fixpath to work.
61901      new_path="$CYGWIN_ROOT_PATH$input_path"
61902    fi
61903  fi
61904
61905
61906  if test "x$path" != "x$new_path"; then
61907    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61910  fi
61911
61912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61913
61914  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61915  has_colon=`$ECHO $path | $GREP ^.:`
61916  new_path="$path"
61917  if test "x$has_colon" = x; then
61918    # Not in mixed or Windows style, start by that.
61919    new_path=`cmd //c echo $path`
61920  fi
61921
61922
61923  input_path="$new_path"
61924  # Check if we need to convert this using DOS-style short mode. If the path
61925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61926  # take no chances and rewrite it.
61927  # Note: m4 eats our [], so we need to use [ and ] instead.
61928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61929  if test "x$has_forbidden_chars" != x; then
61930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61932  fi
61933
61934
61935  windows_path="$new_path"
61936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61937    unix_path=`$CYGPATH -u "$windows_path"`
61938    new_path="$unix_path"
61939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61941    new_path="$unix_path"
61942  fi
61943
61944  if test "x$path" != "x$new_path"; then
61945    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61948  fi
61949
61950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61952
61953    else
61954      # We're on a unix platform. Hooray! :)
61955      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61956      has_space=`$ECHO "$path" | $GREP " "`
61957      if test "x$has_space" != x; then
61958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61961      fi
61962
61963      # Use eval to expand a potential ~
61964      eval path="$path"
61965      if test ! -f "$path" && test ! -d "$path"; then
61966        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61967      fi
61968
61969      if test -d "$path"; then
61970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61971      else
61972        dir="`$DIRNAME "$path"`"
61973        base="`$BASENAME "$path"`"
61974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61975      fi
61976    fi
61977  fi
61978
61979
61980  # Only process if variable expands to non-empty
61981
61982  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61984
61985  # Input might be given as Windows format, start by converting to
61986  # unix format.
61987  path="$POTENTIAL_FREETYPE_LIB_PATH"
61988  new_path=`$CYGPATH -u "$path"`
61989
61990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61993  # "foo.exe" is OK but "foo" is an error.
61994  #
61995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61996  # It is also a way to make sure we got the proper file name for the real test later on.
61997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61998  if test "x$test_shortpath" = x; then
61999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62001    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62002  fi
62003
62004  # Call helper function which possibly converts this using DOS-style short mode.
62005  # If so, the updated path is stored in $new_path.
62006
62007  input_path="$new_path"
62008  # Check if we need to convert this using DOS-style short mode. If the path
62009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62010  # take no chances and rewrite it.
62011  # Note: m4 eats our [], so we need to use [ and ] instead.
62012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62013  if test "x$has_forbidden_chars" != x; then
62014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62018      # Going to short mode and back again did indeed matter. Since short mode is
62019      # case insensitive, let's make it lowercase to improve readability.
62020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62021      # Now convert it back to Unix-style (cygpath)
62022      input_path=`$CYGPATH -u "$shortmode_path"`
62023      new_path="$input_path"
62024    fi
62025  fi
62026
62027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62028  if test "x$test_cygdrive_prefix" = x; then
62029    # As a simple fix, exclude /usr/bin since it's not a real path.
62030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62032      # a path prefixed by /cygdrive for fixpath to work.
62033      new_path="$CYGWIN_ROOT_PATH$input_path"
62034    fi
62035  fi
62036
62037
62038  if test "x$path" != "x$new_path"; then
62039    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62042  fi
62043
62044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62045
62046  path="$POTENTIAL_FREETYPE_LIB_PATH"
62047  has_colon=`$ECHO $path | $GREP ^.:`
62048  new_path="$path"
62049  if test "x$has_colon" = x; then
62050    # Not in mixed or Windows style, start by that.
62051    new_path=`cmd //c echo $path`
62052  fi
62053
62054
62055  input_path="$new_path"
62056  # Check if we need to convert this using DOS-style short mode. If the path
62057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62058  # take no chances and rewrite it.
62059  # Note: m4 eats our [], so we need to use [ and ] instead.
62060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62061  if test "x$has_forbidden_chars" != x; then
62062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62064  fi
62065
62066
62067  windows_path="$new_path"
62068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62069    unix_path=`$CYGPATH -u "$windows_path"`
62070    new_path="$unix_path"
62071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62073    new_path="$unix_path"
62074  fi
62075
62076  if test "x$path" != "x$new_path"; then
62077    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62080  fi
62081
62082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62084
62085    else
62086      # We're on a unix platform. Hooray! :)
62087      path="$POTENTIAL_FREETYPE_LIB_PATH"
62088      has_space=`$ECHO "$path" | $GREP " "`
62089      if test "x$has_space" != x; then
62090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62093      fi
62094
62095      # Use eval to expand a potential ~
62096      eval path="$path"
62097      if test ! -f "$path" && test ! -d "$path"; then
62098        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62099      fi
62100
62101      if test -d "$path"; then
62102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62103      else
62104        dir="`$DIRNAME "$path"`"
62105        base="`$BASENAME "$path"`"
62106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62107      fi
62108    fi
62109  fi
62110
62111
62112    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62114$as_echo_n "checking for freetype includes... " >&6; }
62115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62116$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62117    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62119$as_echo_n "checking for freetype libraries... " >&6; }
62120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62121$as_echo "$FREETYPE_LIB_PATH" >&6; }
62122  fi
62123
62124              fi
62125            fi
62126          fi
62127        fi
62128      fi # end check in well-known locations
62129
62130      if test "x$FOUND_FREETYPE" != xyes; then
62131
62132  # Print a helpful message on how to acquire the necessary build dependency.
62133  # freetype is the help tag: freetype, cups, alsa etc
62134  MISSING_DEPENDENCY=freetype
62135
62136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62137    cygwin_help $MISSING_DEPENDENCY
62138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62139    msys_help $MISSING_DEPENDENCY
62140  else
62141    PKGHANDLER_COMMAND=
62142
62143    case $PKGHANDLER in
62144      apt-get)
62145        apt_help     $MISSING_DEPENDENCY ;;
62146      yum)
62147        yum_help     $MISSING_DEPENDENCY ;;
62148      port)
62149        port_help    $MISSING_DEPENDENCY ;;
62150      pkgutil)
62151        pkgutil_help $MISSING_DEPENDENCY ;;
62152      pkgadd)
62153        pkgadd_help  $MISSING_DEPENDENCY ;;
62154    esac
62155
62156    if test "x$PKGHANDLER_COMMAND" != x; then
62157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62158    fi
62159  fi
62160
62161        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62162      fi
62163    fi # end user specified settings
62164
62165    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62166    if test "x$FREETYPE_CFLAGS" = x; then
62167
62168  # Only process if variable expands to non-empty
62169
62170  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62172
62173  # Input might be given as Windows format, start by converting to
62174  # unix format.
62175  path="$FREETYPE_INCLUDE_PATH"
62176  new_path=`$CYGPATH -u "$path"`
62177
62178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62181  # "foo.exe" is OK but "foo" is an error.
62182  #
62183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62184  # It is also a way to make sure we got the proper file name for the real test later on.
62185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62186  if test "x$test_shortpath" = x; then
62187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62188$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62189    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62190  fi
62191
62192  # Call helper function which possibly converts this using DOS-style short mode.
62193  # If so, the updated path is stored in $new_path.
62194
62195  input_path="$new_path"
62196  # Check if we need to convert this using DOS-style short mode. If the path
62197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62198  # take no chances and rewrite it.
62199  # Note: m4 eats our [], so we need to use [ and ] instead.
62200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62201  if test "x$has_forbidden_chars" != x; then
62202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62206      # Going to short mode and back again did indeed matter. Since short mode is
62207      # case insensitive, let's make it lowercase to improve readability.
62208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62209      # Now convert it back to Unix-style (cygpath)
62210      input_path=`$CYGPATH -u "$shortmode_path"`
62211      new_path="$input_path"
62212    fi
62213  fi
62214
62215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62216  if test "x$test_cygdrive_prefix" = x; then
62217    # As a simple fix, exclude /usr/bin since it's not a real path.
62218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62220      # a path prefixed by /cygdrive for fixpath to work.
62221      new_path="$CYGWIN_ROOT_PATH$input_path"
62222    fi
62223  fi
62224
62225
62226  if test "x$path" != "x$new_path"; then
62227    FREETYPE_INCLUDE_PATH="$new_path"
62228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62229$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62230  fi
62231
62232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62233
62234  path="$FREETYPE_INCLUDE_PATH"
62235  has_colon=`$ECHO $path | $GREP ^.:`
62236  new_path="$path"
62237  if test "x$has_colon" = x; then
62238    # Not in mixed or Windows style, start by that.
62239    new_path=`cmd //c echo $path`
62240  fi
62241
62242
62243  input_path="$new_path"
62244  # Check if we need to convert this using DOS-style short mode. If the path
62245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62246  # take no chances and rewrite it.
62247  # Note: m4 eats our [], so we need to use [ and ] instead.
62248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62249  if test "x$has_forbidden_chars" != x; then
62250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62252  fi
62253
62254
62255  windows_path="$new_path"
62256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62257    unix_path=`$CYGPATH -u "$windows_path"`
62258    new_path="$unix_path"
62259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62261    new_path="$unix_path"
62262  fi
62263
62264  if test "x$path" != "x$new_path"; then
62265    FREETYPE_INCLUDE_PATH="$new_path"
62266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62267$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62268  fi
62269
62270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62272
62273    else
62274      # We're on a unix platform. Hooray! :)
62275      path="$FREETYPE_INCLUDE_PATH"
62276      has_space=`$ECHO "$path" | $GREP " "`
62277      if test "x$has_space" != x; then
62278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62279$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62281      fi
62282
62283      # Use eval to expand a potential ~
62284      eval path="$path"
62285      if test ! -f "$path" && test ! -d "$path"; then
62286        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62287      fi
62288
62289      if test -d "$path"; then
62290        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62291      else
62292        dir="`$DIRNAME "$path"`"
62293        base="`$BASENAME "$path"`"
62294        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62295      fi
62296    fi
62297  fi
62298
62299      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62300        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62301      else
62302        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62303      fi
62304    fi
62305
62306    if test "x$FREETYPE_LIBS" = x; then
62307
62308  # Only process if variable expands to non-empty
62309
62310  if test "x$FREETYPE_LIB_PATH" != x; then
62311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62312
62313  # Input might be given as Windows format, start by converting to
62314  # unix format.
62315  path="$FREETYPE_LIB_PATH"
62316  new_path=`$CYGPATH -u "$path"`
62317
62318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62321  # "foo.exe" is OK but "foo" is an error.
62322  #
62323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62324  # It is also a way to make sure we got the proper file name for the real test later on.
62325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62326  if test "x$test_shortpath" = x; then
62327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62328$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62329    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62330  fi
62331
62332  # Call helper function which possibly converts this using DOS-style short mode.
62333  # If so, the updated path is stored in $new_path.
62334
62335  input_path="$new_path"
62336  # Check if we need to convert this using DOS-style short mode. If the path
62337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62338  # take no chances and rewrite it.
62339  # Note: m4 eats our [], so we need to use [ and ] instead.
62340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62341  if test "x$has_forbidden_chars" != x; then
62342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62346      # Going to short mode and back again did indeed matter. Since short mode is
62347      # case insensitive, let's make it lowercase to improve readability.
62348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62349      # Now convert it back to Unix-style (cygpath)
62350      input_path=`$CYGPATH -u "$shortmode_path"`
62351      new_path="$input_path"
62352    fi
62353  fi
62354
62355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62356  if test "x$test_cygdrive_prefix" = x; then
62357    # As a simple fix, exclude /usr/bin since it's not a real path.
62358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62360      # a path prefixed by /cygdrive for fixpath to work.
62361      new_path="$CYGWIN_ROOT_PATH$input_path"
62362    fi
62363  fi
62364
62365
62366  if test "x$path" != "x$new_path"; then
62367    FREETYPE_LIB_PATH="$new_path"
62368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62369$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62370  fi
62371
62372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62373
62374  path="$FREETYPE_LIB_PATH"
62375  has_colon=`$ECHO $path | $GREP ^.:`
62376  new_path="$path"
62377  if test "x$has_colon" = x; then
62378    # Not in mixed or Windows style, start by that.
62379    new_path=`cmd //c echo $path`
62380  fi
62381
62382
62383  input_path="$new_path"
62384  # Check if we need to convert this using DOS-style short mode. If the path
62385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62386  # take no chances and rewrite it.
62387  # Note: m4 eats our [], so we need to use [ and ] instead.
62388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62389  if test "x$has_forbidden_chars" != x; then
62390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62392  fi
62393
62394
62395  windows_path="$new_path"
62396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62397    unix_path=`$CYGPATH -u "$windows_path"`
62398    new_path="$unix_path"
62399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62401    new_path="$unix_path"
62402  fi
62403
62404  if test "x$path" != "x$new_path"; then
62405    FREETYPE_LIB_PATH="$new_path"
62406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62407$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62408  fi
62409
62410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62412
62413    else
62414      # We're on a unix platform. Hooray! :)
62415      path="$FREETYPE_LIB_PATH"
62416      has_space=`$ECHO "$path" | $GREP " "`
62417      if test "x$has_space" != x; then
62418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62419$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62421      fi
62422
62423      # Use eval to expand a potential ~
62424      eval path="$path"
62425      if test ! -f "$path" && test ! -d "$path"; then
62426        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62427      fi
62428
62429      if test -d "$path"; then
62430        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62431      else
62432        dir="`$DIRNAME "$path"`"
62433        base="`$BASENAME "$path"`"
62434        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62435      fi
62436    fi
62437  fi
62438
62439      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62440        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62441      else
62442        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62443      fi
62444    fi
62445
62446    # Try to compile it
62447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62448$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62449    ac_ext=cpp
62450ac_cpp='$CXXCPP $CPPFLAGS'
62451ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62452ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62453ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62454
62455    PREV_CXXCFLAGS="$CXXFLAGS"
62456    PREV_LIBS="$LIBS"
62457    PREV_CXX="$CXX"
62458    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62459    LIBS="$LIBS $FREETYPE_LIBS"
62460    CXX="$FIXPATH $CXX"
62461    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62462/* end confdefs.h.  */
62463
62464          #include<ft2build.h>
62465          #include FT_FREETYPE_H
62466          int main () {
62467            FT_Init_FreeType(NULL);
62468            return 0;
62469          }
62470
62471_ACEOF
62472if ac_fn_cxx_try_link "$LINENO"; then :
62473
62474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62475$as_echo "yes" >&6; }
62476
62477else
62478
62479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62480$as_echo "no" >&6; }
62481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62482$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62483          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62484$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62485
62486
62487  # Print a helpful message on how to acquire the necessary build dependency.
62488  # freetype is the help tag: freetype, cups, alsa etc
62489  MISSING_DEPENDENCY=freetype
62490
62491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62492    cygwin_help $MISSING_DEPENDENCY
62493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62494    msys_help $MISSING_DEPENDENCY
62495  else
62496    PKGHANDLER_COMMAND=
62497
62498    case $PKGHANDLER in
62499      apt-get)
62500        apt_help     $MISSING_DEPENDENCY ;;
62501      yum)
62502        yum_help     $MISSING_DEPENDENCY ;;
62503      port)
62504        port_help    $MISSING_DEPENDENCY ;;
62505      pkgutil)
62506        pkgutil_help $MISSING_DEPENDENCY ;;
62507      pkgadd)
62508        pkgadd_help  $MISSING_DEPENDENCY ;;
62509    esac
62510
62511    if test "x$PKGHANDLER_COMMAND" != x; then
62512      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62513    fi
62514  fi
62515
62516
62517          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62518
62519
62520fi
62521rm -f core conftest.err conftest.$ac_objext \
62522    conftest$ac_exeext conftest.$ac_ext
62523    CXXCFLAGS="$PREV_CXXFLAGS"
62524    LIBS="$PREV_LIBS"
62525    CXX="$PREV_CXX"
62526    ac_ext=cpp
62527ac_cpp='$CXXCPP $CPPFLAGS'
62528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62531
62532
62533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62534$as_echo_n "checking if we should bundle freetype... " >&6; }
62535    if test "x$BUNDLE_FREETYPE" = xyes; then
62536      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62537    fi
62538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62539$as_echo "$BUNDLE_FREETYPE" >&6; }
62540
62541  fi # end freetype needed
62542
62543
62544
62545
62546
62547
62548
62549# Check whether --with-alsa was given.
62550if test "${with_alsa+set}" = set; then :
62551  withval=$with_alsa;
62552fi
62553
62554
62555# Check whether --with-alsa-include was given.
62556if test "${with_alsa_include+set}" = set; then :
62557  withval=$with_alsa_include;
62558fi
62559
62560
62561# Check whether --with-alsa-lib was given.
62562if test "${with_alsa_lib+set}" = set; then :
62563  withval=$with_alsa_lib;
62564fi
62565
62566
62567  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62568    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62569        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62570        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62571      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62572$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62573    fi
62574    ALSA_CFLAGS=
62575    ALSA_LIBS=
62576  else
62577    ALSA_FOUND=no
62578
62579    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62580      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62581    fi
62582
62583    if test "x${with_alsa}" != x; then
62584      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62585      ALSA_CFLAGS="-I${with_alsa}/include"
62586      ALSA_FOUND=yes
62587    fi
62588    if test "x${with_alsa_include}" != x; then
62589      ALSA_CFLAGS="-I${with_alsa_include}"
62590      ALSA_FOUND=yes
62591    fi
62592    if test "x${with_alsa_lib}" != x; then
62593      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62594      ALSA_FOUND=yes
62595    fi
62596    # Do not try pkg-config if we have a sysroot set.
62597    if test "x$SYSROOT" = x; then
62598      if test "x$ALSA_FOUND" = xno; then
62599
62600pkg_failed=no
62601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62602$as_echo_n "checking for ALSA... " >&6; }
62603
62604if test -n "$ALSA_CFLAGS"; then
62605    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62606 elif test -n "$PKG_CONFIG"; then
62607    if test -n "$PKG_CONFIG" && \
62608    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62609  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62610  ac_status=$?
62611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62612  test $ac_status = 0; }; then
62613  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62614else
62615  pkg_failed=yes
62616fi
62617 else
62618    pkg_failed=untried
62619fi
62620if test -n "$ALSA_LIBS"; then
62621    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62622 elif test -n "$PKG_CONFIG"; then
62623    if test -n "$PKG_CONFIG" && \
62624    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62625  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62626  ac_status=$?
62627  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62628  test $ac_status = 0; }; then
62629  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62630else
62631  pkg_failed=yes
62632fi
62633 else
62634    pkg_failed=untried
62635fi
62636
62637
62638
62639if test $pkg_failed = yes; then
62640
62641if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62642        _pkg_short_errors_supported=yes
62643else
62644        _pkg_short_errors_supported=no
62645fi
62646        if test $_pkg_short_errors_supported = yes; then
62647	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62648        else
62649	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62650        fi
62651	# Put the nasty error message in config.log where it belongs
62652	echo "$ALSA_PKG_ERRORS" >&5
62653
62654	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62655$as_echo "no" >&6; }
62656                ALSA_FOUND=no
62657elif test $pkg_failed = untried; then
62658	ALSA_FOUND=no
62659else
62660	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62661	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62663$as_echo "yes" >&6; }
62664	ALSA_FOUND=yes
62665fi
62666      fi
62667    fi
62668    if test "x$ALSA_FOUND" = xno; then
62669      for ac_header in alsa/asoundlib.h
62670do :
62671  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62672if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62673  cat >>confdefs.h <<_ACEOF
62674#define HAVE_ALSA_ASOUNDLIB_H 1
62675_ACEOF
62676
62677            ALSA_FOUND=yes
62678            ALSA_CFLAGS=-Iignoreme
62679            ALSA_LIBS=-lasound
62680            DEFAULT_ALSA=yes
62681
62682else
62683  ALSA_FOUND=no
62684
62685fi
62686
62687done
62688
62689    fi
62690    if test "x$ALSA_FOUND" = xno; then
62691
62692  # Print a helpful message on how to acquire the necessary build dependency.
62693  # alsa is the help tag: freetype, cups, alsa etc
62694  MISSING_DEPENDENCY=alsa
62695
62696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62697    cygwin_help $MISSING_DEPENDENCY
62698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62699    msys_help $MISSING_DEPENDENCY
62700  else
62701    PKGHANDLER_COMMAND=
62702
62703    case $PKGHANDLER in
62704      apt-get)
62705        apt_help     $MISSING_DEPENDENCY ;;
62706      yum)
62707        yum_help     $MISSING_DEPENDENCY ;;
62708      port)
62709        port_help    $MISSING_DEPENDENCY ;;
62710      pkgutil)
62711        pkgutil_help $MISSING_DEPENDENCY ;;
62712      pkgadd)
62713        pkgadd_help  $MISSING_DEPENDENCY ;;
62714    esac
62715
62716    if test "x$PKGHANDLER_COMMAND" != x; then
62717      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62718    fi
62719  fi
62720
62721      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62722    fi
62723  fi
62724
62725
62726
62727
62728
62729
62730# Check whether --with-libffi was given.
62731if test "${with_libffi+set}" = set; then :
62732  withval=$with_libffi;
62733fi
62734
62735
62736# Check whether --with-libffi-include was given.
62737if test "${with_libffi_include+set}" = set; then :
62738  withval=$with_libffi_include;
62739fi
62740
62741
62742# Check whether --with-libffi-lib was given.
62743if test "${with_libffi_lib+set}" = set; then :
62744  withval=$with_libffi_lib;
62745fi
62746
62747  # Check whether --enable-libffi-bundling was given.
62748if test "${enable_libffi_bundling+set}" = set; then :
62749  enableval=$enable_libffi_bundling;
62750fi
62751
62752
62753  if test "x$NEEDS_LIB_FFI" = xfalse; then
62754    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62755        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62756        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62757      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62758$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62759    fi
62760    LIBFFI_CFLAGS=
62761    LIBFFI_LIBS=
62762  else
62763    LIBFFI_FOUND=no
62764
62765    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62766      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62767    fi
62768
62769    if test "x${with_libffi}" != x; then
62770      LIBFFI_LIB_PATH="${with_libffi}/lib"
62771      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62772      LIBFFI_CFLAGS="-I${with_libffi}/include"
62773      LIBFFI_FOUND=yes
62774    fi
62775    if test "x${with_libffi_include}" != x; then
62776      LIBFFI_CFLAGS="-I${with_libffi_include}"
62777      LIBFFI_FOUND=yes
62778    fi
62779    if test "x${with_libffi_lib}" != x; then
62780      LIBFFI_LIB_PATH="${with_libffi_lib}"
62781      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62782      LIBFFI_FOUND=yes
62783    fi
62784    # Do not try pkg-config if we have a sysroot set.
62785    if test "x$SYSROOT" = x; then
62786      if test "x$LIBFFI_FOUND" = xno; then
62787        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62788
62789pkg_failed=no
62790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62791$as_echo_n "checking for LIBFFI... " >&6; }
62792
62793if test -n "$LIBFFI_CFLAGS"; then
62794    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62795 elif test -n "$PKG_CONFIG"; then
62796    if test -n "$PKG_CONFIG" && \
62797    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62798  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62799  ac_status=$?
62800  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62801  test $ac_status = 0; }; then
62802  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62803else
62804  pkg_failed=yes
62805fi
62806 else
62807    pkg_failed=untried
62808fi
62809if test -n "$LIBFFI_LIBS"; then
62810    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62811 elif test -n "$PKG_CONFIG"; then
62812    if test -n "$PKG_CONFIG" && \
62813    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62814  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62815  ac_status=$?
62816  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62817  test $ac_status = 0; }; then
62818  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62819else
62820  pkg_failed=yes
62821fi
62822 else
62823    pkg_failed=untried
62824fi
62825
62826
62827
62828if test $pkg_failed = yes; then
62829
62830if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62831        _pkg_short_errors_supported=yes
62832else
62833        _pkg_short_errors_supported=no
62834fi
62835        if test $_pkg_short_errors_supported = yes; then
62836	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62837        else
62838	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62839        fi
62840	# Put the nasty error message in config.log where it belongs
62841	echo "$LIBFFI_PKG_ERRORS" >&5
62842
62843	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62844$as_echo "no" >&6; }
62845                LIBFFI_FOUND=no
62846elif test $pkg_failed = untried; then
62847	LIBFFI_FOUND=no
62848else
62849	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62850	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62852$as_echo "yes" >&6; }
62853	LIBFFI_FOUND=yes
62854fi
62855      fi
62856    fi
62857    if test "x$LIBFFI_FOUND" = xno; then
62858      for ac_header in ffi.h
62859do :
62860  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62861if test "x$ac_cv_header_ffi_h" = xyes; then :
62862  cat >>confdefs.h <<_ACEOF
62863#define HAVE_FFI_H 1
62864_ACEOF
62865
62866            LIBFFI_FOUND=yes
62867            LIBFFI_CFLAGS=
62868            LIBFFI_LIBS=-lffi
62869
62870else
62871  LIBFFI_FOUND=no
62872
62873fi
62874
62875done
62876
62877    fi
62878    if test "x$LIBFFI_FOUND" = xno; then
62879
62880  # Print a helpful message on how to acquire the necessary build dependency.
62881  # ffi is the help tag: freetype, cups, alsa etc
62882  MISSING_DEPENDENCY=ffi
62883
62884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62885    cygwin_help $MISSING_DEPENDENCY
62886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62887    msys_help $MISSING_DEPENDENCY
62888  else
62889    PKGHANDLER_COMMAND=
62890
62891    case $PKGHANDLER in
62892      apt-get)
62893        apt_help     $MISSING_DEPENDENCY ;;
62894      yum)
62895        yum_help     $MISSING_DEPENDENCY ;;
62896      port)
62897        port_help    $MISSING_DEPENDENCY ;;
62898      pkgutil)
62899        pkgutil_help $MISSING_DEPENDENCY ;;
62900      pkgadd)
62901        pkgadd_help  $MISSING_DEPENDENCY ;;
62902    esac
62903
62904    if test "x$PKGHANDLER_COMMAND" != x; then
62905      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62906    fi
62907  fi
62908
62909      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62910    fi
62911
62912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62913$as_echo_n "checking if libffi works... " >&6; }
62914    ac_ext=c
62915ac_cpp='$CPP $CPPFLAGS'
62916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62918ac_compiler_gnu=$ac_cv_c_compiler_gnu
62919
62920    OLD_CFLAGS="$CFLAGS"
62921    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62922    OLD_LIBS="$LIBS"
62923    LIBS="$LIBS $LIBFFI_LIBS"
62924    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62925/* end confdefs.h.  */
62926#include <ffi.h>
62927int
62928main ()
62929{
62930
62931          ffi_call(NULL, NULL, NULL, NULL);
62932          return 0;
62933
62934  ;
62935  return 0;
62936}
62937_ACEOF
62938if ac_fn_c_try_link "$LINENO"; then :
62939  LIBFFI_WORKS=yes
62940else
62941  LIBFFI_WORKS=no
62942
62943fi
62944rm -f core conftest.err conftest.$ac_objext \
62945    conftest$ac_exeext conftest.$ac_ext
62946    CFLAGS="$OLD_CFLAGS"
62947    LIBS="$OLD_LIBS"
62948    ac_ext=cpp
62949ac_cpp='$CXXCPP $CPPFLAGS'
62950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62953
62954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62955$as_echo "$LIBFFI_WORKS" >&6; }
62956
62957    if test "x$LIBFFI_WORKS" = xno; then
62958
62959  # Print a helpful message on how to acquire the necessary build dependency.
62960  # ffi is the help tag: freetype, cups, alsa etc
62961  MISSING_DEPENDENCY=ffi
62962
62963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62964    cygwin_help $MISSING_DEPENDENCY
62965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62966    msys_help $MISSING_DEPENDENCY
62967  else
62968    PKGHANDLER_COMMAND=
62969
62970    case $PKGHANDLER in
62971      apt-get)
62972        apt_help     $MISSING_DEPENDENCY ;;
62973      yum)
62974        yum_help     $MISSING_DEPENDENCY ;;
62975      port)
62976        port_help    $MISSING_DEPENDENCY ;;
62977      pkgutil)
62978        pkgutil_help $MISSING_DEPENDENCY ;;
62979      pkgadd)
62980        pkgadd_help  $MISSING_DEPENDENCY ;;
62981    esac
62982
62983    if test "x$PKGHANDLER_COMMAND" != x; then
62984      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62985    fi
62986  fi
62987
62988      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62989    fi
62990
62991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62992$as_echo_n "checking if libffi should be bundled... " >&6; }
62993    if test "x$enable_libffi_bundling" = "x"; then
62994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62995$as_echo "no" >&6; }
62996      ENABLE_LIBFFI_BUNDLING=false
62997    elif  test "x$enable_libffi_bundling" = "xno"; then
62998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62999$as_echo "no, forced" >&6; }
63000      ENABLE_LIBFFI_BUNDLING=false
63001    elif  test "x$enable_libffi_bundling" = "xyes"; then
63002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63003$as_echo "yes, forced" >&6; }
63004      ENABLE_LIBFFI_BUNDLING=true
63005    else
63006      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63007    fi
63008
63009    # Find the libffi.so.X to bundle
63010    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63012$as_echo_n "checking for libffi lib file location... " >&6; }
63013      if test "x${LIBFFI_LIB_PATH}" != x; then
63014        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63015          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63016        else
63017          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63018        fi
63019      else
63020        # If we don't have an explicit path, look in a few obvious places
63021        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63022          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63023            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63024          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63025            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63026          else
63027            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63028          fi
63029        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63030          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63031            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63032          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63033            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63034          else
63035            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63036          fi
63037        else
63038          # Fallback on the default /usr/lib dir
63039          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63040            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63041          else
63042            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63043          fi
63044        fi
63045      fi
63046      # Make sure the wildcard is evaluated
63047      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63049$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63050    fi
63051  fi
63052
63053
63054
63055
63056
63057
63058
63059  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63060    # Extract the first word of "llvm-config", so it can be a program name with args.
63061set dummy llvm-config; ac_word=$2
63062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63063$as_echo_n "checking for $ac_word... " >&6; }
63064if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63065  $as_echo_n "(cached) " >&6
63066else
63067  if test -n "$LLVM_CONFIG"; then
63068  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63069else
63070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63071for as_dir in $PATH
63072do
63073  IFS=$as_save_IFS
63074  test -z "$as_dir" && as_dir=.
63075    for ac_exec_ext in '' $ac_executable_extensions; do
63076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63077    ac_cv_prog_LLVM_CONFIG="llvm-config"
63078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63079    break 2
63080  fi
63081done
63082  done
63083IFS=$as_save_IFS
63084
63085fi
63086fi
63087LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63088if test -n "$LLVM_CONFIG"; then
63089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63090$as_echo "$LLVM_CONFIG" >&6; }
63091else
63092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63093$as_echo "no" >&6; }
63094fi
63095
63096
63097
63098    if test "x$LLVM_CONFIG" != xllvm-config; then
63099      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63100    fi
63101
63102    llvm_components="jit mcjit engine nativecodegen native"
63103    unset LLVM_CFLAGS
63104    for flag in $("$LLVM_CONFIG" --cxxflags); do
63105      if echo "${flag}" | grep -q '^-[ID]'; then
63106        if test "${flag}" != "-D_DEBUG" ; then
63107          if test "${LLVM_CFLAGS}" != "" ; then
63108            LLVM_CFLAGS="${LLVM_CFLAGS} "
63109          fi
63110          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63111        fi
63112      fi
63113    done
63114    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63115    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63116
63117    unset LLVM_LDFLAGS
63118    for flag in $("${LLVM_CONFIG}" --ldflags); do
63119      if echo "${flag}" | grep -q '^-L'; then
63120        if test "${LLVM_LDFLAGS}" != ""; then
63121          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63122        fi
63123        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63124      fi
63125    done
63126
63127    unset LLVM_LIBS
63128    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63129      if echo "${flag}" | grep -q '^-l'; then
63130        if test "${LLVM_LIBS}" != ""; then
63131          LLVM_LIBS="${LLVM_LIBS} "
63132        fi
63133        LLVM_LIBS="${LLVM_LIBS}${flag}"
63134      fi
63135    done
63136
63137    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63138    # always properly detect -ltinfo
63139    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63140
63141
63142
63143
63144  fi
63145
63146
63147
63148# Check whether --with-libjpeg was given.
63149if test "${with_libjpeg+set}" = set; then :
63150  withval=$with_libjpeg;
63151fi
63152
63153
63154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63155$as_echo_n "checking for which libjpeg to use... " >&6; }
63156  # default is bundled
63157  DEFAULT_LIBJPEG=bundled
63158  # if user didn't specify, use DEFAULT_LIBJPEG
63159  if test "x${with_libjpeg}" = "x"; then
63160    with_libjpeg=${DEFAULT_LIBJPEG}
63161  fi
63162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63163$as_echo "${with_libjpeg}" >&6; }
63164
63165  if test "x${with_libjpeg}" = "xbundled"; then
63166    USE_EXTERNAL_LIBJPEG=false
63167  elif test "x${with_libjpeg}" = "xsystem"; then
63168    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63169if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63170
63171else
63172   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63173fi
63174
63175
63176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63177$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63178if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63179  $as_echo_n "(cached) " >&6
63180else
63181  ac_check_lib_save_LIBS=$LIBS
63182LIBS="-ljpeg  $LIBS"
63183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63184/* end confdefs.h.  */
63185
63186/* Override any GCC internal prototype to avoid an error.
63187   Use char because int might match the return type of a GCC
63188   builtin and then its argument prototype would still apply.  */
63189#ifdef __cplusplus
63190extern "C"
63191#endif
63192char jpeg_CreateDecompress ();
63193int
63194main ()
63195{
63196return jpeg_CreateDecompress ();
63197  ;
63198  return 0;
63199}
63200_ACEOF
63201if ac_fn_cxx_try_link "$LINENO"; then :
63202  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63203else
63204  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63205fi
63206rm -f core conftest.err conftest.$ac_objext \
63207    conftest$ac_exeext conftest.$ac_ext
63208LIBS=$ac_check_lib_save_LIBS
63209fi
63210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63211$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63212if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63213  cat >>confdefs.h <<_ACEOF
63214#define HAVE_LIBJPEG 1
63215_ACEOF
63216
63217  LIBS="-ljpeg $LIBS"
63218
63219else
63220   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63221fi
63222
63223
63224    USE_EXTERNAL_LIBJPEG=true
63225  else
63226    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63227  fi
63228
63229
63230
63231
63232
63233# Check whether --with-giflib was given.
63234if test "${with_giflib+set}" = set; then :
63235  withval=$with_giflib;
63236fi
63237
63238
63239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63240$as_echo_n "checking for which giflib to use... " >&6; }
63241  # default is bundled
63242  DEFAULT_GIFLIB=bundled
63243  # if user didn't specify, use DEFAULT_GIFLIB
63244  if test "x${with_giflib}" = "x"; then
63245    with_giflib=${DEFAULT_GIFLIB}
63246  fi
63247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63248$as_echo "${with_giflib}" >&6; }
63249
63250  if test "x${with_giflib}" = "xbundled"; then
63251    USE_EXTERNAL_LIBGIF=false
63252  elif test "x${with_giflib}" = "xsystem"; then
63253    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63254if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63255
63256else
63257   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63258fi
63259
63260
63261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63262$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63263if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63264  $as_echo_n "(cached) " >&6
63265else
63266  ac_check_lib_save_LIBS=$LIBS
63267LIBS="-lgif  $LIBS"
63268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63269/* end confdefs.h.  */
63270
63271/* Override any GCC internal prototype to avoid an error.
63272   Use char because int might match the return type of a GCC
63273   builtin and then its argument prototype would still apply.  */
63274#ifdef __cplusplus
63275extern "C"
63276#endif
63277char DGifGetCode ();
63278int
63279main ()
63280{
63281return DGifGetCode ();
63282  ;
63283  return 0;
63284}
63285_ACEOF
63286if ac_fn_cxx_try_link "$LINENO"; then :
63287  ac_cv_lib_gif_DGifGetCode=yes
63288else
63289  ac_cv_lib_gif_DGifGetCode=no
63290fi
63291rm -f core conftest.err conftest.$ac_objext \
63292    conftest$ac_exeext conftest.$ac_ext
63293LIBS=$ac_check_lib_save_LIBS
63294fi
63295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63296$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63297if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63298  cat >>confdefs.h <<_ACEOF
63299#define HAVE_LIBGIF 1
63300_ACEOF
63301
63302  LIBS="-lgif $LIBS"
63303
63304else
63305   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63306fi
63307
63308
63309    USE_EXTERNAL_LIBGIF=true
63310  else
63311    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63312  fi
63313
63314
63315
63316
63317
63318# Check whether --with-libpng was given.
63319if test "${with_libpng+set}" = set; then :
63320  withval=$with_libpng;
63321fi
63322
63323
63324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63325$as_echo_n "checking for which libpng to use... " >&6; }
63326
63327  # default is bundled
63328  DEFAULT_LIBPNG=bundled
63329  # if user didn't specify, use DEFAULT_LIBPNG
63330  if test "x${with_libpng}" = "x"; then
63331      with_libpng=${DEFAULT_LIBPNG}
63332  fi
63333
63334  if test "x${with_libpng}" = "xbundled"; then
63335      USE_EXTERNAL_LIBPNG=false
63336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63337$as_echo "bundled" >&6; }
63338  elif test "x${with_libpng}" = "xsystem"; then
63339
63340pkg_failed=no
63341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63342$as_echo_n "checking for PNG... " >&6; }
63343
63344if test -n "$PNG_CFLAGS"; then
63345    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63346 elif test -n "$PKG_CONFIG"; then
63347    if test -n "$PKG_CONFIG" && \
63348    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63349  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63350  ac_status=$?
63351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63352  test $ac_status = 0; }; then
63353  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63354else
63355  pkg_failed=yes
63356fi
63357 else
63358    pkg_failed=untried
63359fi
63360if test -n "$PNG_LIBS"; then
63361    pkg_cv_PNG_LIBS="$PNG_LIBS"
63362 elif test -n "$PKG_CONFIG"; then
63363    if test -n "$PKG_CONFIG" && \
63364    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63365  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63366  ac_status=$?
63367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63368  test $ac_status = 0; }; then
63369  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63370else
63371  pkg_failed=yes
63372fi
63373 else
63374    pkg_failed=untried
63375fi
63376
63377
63378
63379if test $pkg_failed = yes; then
63380
63381if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63382        _pkg_short_errors_supported=yes
63383else
63384        _pkg_short_errors_supported=no
63385fi
63386        if test $_pkg_short_errors_supported = yes; then
63387	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63388        else
63389	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63390        fi
63391	# Put the nasty error message in config.log where it belongs
63392	echo "$PNG_PKG_ERRORS" >&5
63393
63394	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63395$as_echo "no" >&6; }
63396                 LIBPNG_FOUND=no
63397elif test $pkg_failed = untried; then
63398	 LIBPNG_FOUND=no
63399else
63400	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63401	PNG_LIBS=$pkg_cv_PNG_LIBS
63402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63403$as_echo "yes" >&6; }
63404	 LIBPNG_FOUND=yes
63405fi
63406      if test "x${LIBPNG_FOUND}" = "xyes"; then
63407          USE_EXTERNAL_LIBPNG=true
63408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63409$as_echo "system" >&6; }
63410      else
63411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63412$as_echo "system not found" >&6; }
63413          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63414      fi
63415  else
63416      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63417  fi
63418
63419
63420
63421
63422
63423# Check whether --with-zlib was given.
63424if test "${with_zlib+set}" = set; then :
63425  withval=$with_zlib;
63426fi
63427
63428
63429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63430$as_echo_n "checking for compress in -lz... " >&6; }
63431if ${ac_cv_lib_z_compress+:} false; then :
63432  $as_echo_n "(cached) " >&6
63433else
63434  ac_check_lib_save_LIBS=$LIBS
63435LIBS="-lz  $LIBS"
63436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63437/* end confdefs.h.  */
63438
63439/* Override any GCC internal prototype to avoid an error.
63440   Use char because int might match the return type of a GCC
63441   builtin and then its argument prototype would still apply.  */
63442#ifdef __cplusplus
63443extern "C"
63444#endif
63445char compress ();
63446int
63447main ()
63448{
63449return compress ();
63450  ;
63451  return 0;
63452}
63453_ACEOF
63454if ac_fn_cxx_try_link "$LINENO"; then :
63455  ac_cv_lib_z_compress=yes
63456else
63457  ac_cv_lib_z_compress=no
63458fi
63459rm -f core conftest.err conftest.$ac_objext \
63460    conftest$ac_exeext conftest.$ac_ext
63461LIBS=$ac_check_lib_save_LIBS
63462fi
63463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63464$as_echo "$ac_cv_lib_z_compress" >&6; }
63465if test "x$ac_cv_lib_z_compress" = xyes; then :
63466   ZLIB_FOUND=yes
63467else
63468   ZLIB_FOUND=no
63469fi
63470
63471
63472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63473$as_echo_n "checking for which zlib to use... " >&6; }
63474
63475  DEFAULT_ZLIB=system
63476  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63477    # On windows default is bundled...on others default is system
63478    DEFAULT_ZLIB=bundled
63479  fi
63480
63481  if test "x${ZLIB_FOUND}" != "xyes"; then
63482    # If we don't find any system...set default to bundled
63483    DEFAULT_ZLIB=bundled
63484  fi
63485
63486  # If user didn't specify, use DEFAULT_ZLIB
63487  if test "x${with_zlib}" = "x"; then
63488    with_zlib=${DEFAULT_ZLIB}
63489  fi
63490
63491  if test "x${with_zlib}" = "xbundled"; then
63492    USE_EXTERNAL_LIBZ=false
63493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63494$as_echo "bundled" >&6; }
63495  elif test "x${with_zlib}" = "xsystem"; then
63496    if test "x${ZLIB_FOUND}" = "xyes"; then
63497      USE_EXTERNAL_LIBZ=true
63498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63499$as_echo "system" >&6; }
63500    else
63501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63502$as_echo "system not found" >&6; }
63503      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63504    fi
63505  else
63506    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63507  fi
63508
63509
63510
63511
63512
63513# Check whether --with-lcms was given.
63514if test "${with_lcms+set}" = set; then :
63515  withval=$with_lcms;
63516fi
63517
63518
63519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63520$as_echo_n "checking for which lcms to use... " >&6; }
63521
63522  DEFAULT_LCMS=bundled
63523  # If user didn't specify, use DEFAULT_LCMS
63524  if test "x${with_lcms}" = "x"; then
63525      with_lcms=${DEFAULT_LCMS}
63526  fi
63527
63528  if test "x${with_lcms}" = "xbundled"; then
63529    USE_EXTERNAL_LCMS=false
63530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63531$as_echo "bundled" >&6; }
63532  elif test "x${with_lcms}" = "xsystem"; then
63533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63534$as_echo "system" >&6; }
63535
63536pkg_failed=no
63537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63538$as_echo_n "checking for LCMS... " >&6; }
63539
63540if test -n "$LCMS_CFLAGS"; then
63541    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63542 elif test -n "$PKG_CONFIG"; then
63543    if test -n "$PKG_CONFIG" && \
63544    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63545  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63546  ac_status=$?
63547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63548  test $ac_status = 0; }; then
63549  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63550else
63551  pkg_failed=yes
63552fi
63553 else
63554    pkg_failed=untried
63555fi
63556if test -n "$LCMS_LIBS"; then
63557    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63558 elif test -n "$PKG_CONFIG"; then
63559    if test -n "$PKG_CONFIG" && \
63560    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63561  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63562  ac_status=$?
63563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63564  test $ac_status = 0; }; then
63565  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63566else
63567  pkg_failed=yes
63568fi
63569 else
63570    pkg_failed=untried
63571fi
63572
63573
63574
63575if test $pkg_failed = yes; then
63576
63577if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63578        _pkg_short_errors_supported=yes
63579else
63580        _pkg_short_errors_supported=no
63581fi
63582        if test $_pkg_short_errors_supported = yes; then
63583	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63584        else
63585	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63586        fi
63587	# Put the nasty error message in config.log where it belongs
63588	echo "$LCMS_PKG_ERRORS" >&5
63589
63590	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63591$as_echo "no" >&6; }
63592                LCMS_FOUND=no
63593elif test $pkg_failed = untried; then
63594	LCMS_FOUND=no
63595else
63596	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63597	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63599$as_echo "yes" >&6; }
63600	LCMS_FOUND=yes
63601fi
63602    if test "x${LCMS_FOUND}" = "xyes"; then
63603      USE_EXTERNAL_LCMS=true
63604    else
63605      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63606    fi
63607  else
63608    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63609  fi
63610
63611
63612
63613
63614
63615
63616
63617
63618
63619
63620
63621  # Setup libm (the maths library)
63622  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63624$as_echo_n "checking for cos in -lm... " >&6; }
63625if ${ac_cv_lib_m_cos+:} false; then :
63626  $as_echo_n "(cached) " >&6
63627else
63628  ac_check_lib_save_LIBS=$LIBS
63629LIBS="-lm  $LIBS"
63630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63631/* end confdefs.h.  */
63632
63633/* Override any GCC internal prototype to avoid an error.
63634   Use char because int might match the return type of a GCC
63635   builtin and then its argument prototype would still apply.  */
63636#ifdef __cplusplus
63637extern "C"
63638#endif
63639char cos ();
63640int
63641main ()
63642{
63643return cos ();
63644  ;
63645  return 0;
63646}
63647_ACEOF
63648if ac_fn_cxx_try_link "$LINENO"; then :
63649  ac_cv_lib_m_cos=yes
63650else
63651  ac_cv_lib_m_cos=no
63652fi
63653rm -f core conftest.err conftest.$ac_objext \
63654    conftest$ac_exeext conftest.$ac_ext
63655LIBS=$ac_check_lib_save_LIBS
63656fi
63657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63658$as_echo "$ac_cv_lib_m_cos" >&6; }
63659if test "x$ac_cv_lib_m_cos" = xyes; then :
63660  cat >>confdefs.h <<_ACEOF
63661#define HAVE_LIBM 1
63662_ACEOF
63663
63664  LIBS="-lm $LIBS"
63665
63666else
63667
63668        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63669$as_echo "$as_me: Maths library was not found" >&6;}
63670
63671fi
63672
63673    LIBM="-lm"
63674  else
63675    LIBM=""
63676  fi
63677
63678
63679  # Setup libdl (for dynamic library loading)
63680  save_LIBS="$LIBS"
63681  LIBS=""
63682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63683$as_echo_n "checking for dlopen in -ldl... " >&6; }
63684if ${ac_cv_lib_dl_dlopen+:} false; then :
63685  $as_echo_n "(cached) " >&6
63686else
63687  ac_check_lib_save_LIBS=$LIBS
63688LIBS="-ldl  $LIBS"
63689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63690/* end confdefs.h.  */
63691
63692/* Override any GCC internal prototype to avoid an error.
63693   Use char because int might match the return type of a GCC
63694   builtin and then its argument prototype would still apply.  */
63695#ifdef __cplusplus
63696extern "C"
63697#endif
63698char dlopen ();
63699int
63700main ()
63701{
63702return dlopen ();
63703  ;
63704  return 0;
63705}
63706_ACEOF
63707if ac_fn_cxx_try_link "$LINENO"; then :
63708  ac_cv_lib_dl_dlopen=yes
63709else
63710  ac_cv_lib_dl_dlopen=no
63711fi
63712rm -f core conftest.err conftest.$ac_objext \
63713    conftest$ac_exeext conftest.$ac_ext
63714LIBS=$ac_check_lib_save_LIBS
63715fi
63716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63717$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63718if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63719  cat >>confdefs.h <<_ACEOF
63720#define HAVE_LIBDL 1
63721_ACEOF
63722
63723  LIBS="-ldl $LIBS"
63724
63725fi
63726
63727  LIBDL="$LIBS"
63728
63729  LIBS="$save_LIBS"
63730
63731  # Deprecated libraries, keep the flags for backwards compatibility
63732  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63733
63734
63735# Check whether --with-dxsdk was given.
63736if test "${with_dxsdk+set}" = set; then :
63737  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63738$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63739fi
63740
63741
63742
63743
63744# Check whether --with-dxsdk-lib was given.
63745if test "${with_dxsdk_lib+set}" = set; then :
63746  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63747$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63748fi
63749
63750
63751
63752
63753# Check whether --with-dxsdk-include was given.
63754if test "${with_dxsdk_include+set}" = set; then :
63755  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63756$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63757fi
63758
63759
63760  fi
63761
63762  # Control if libzip can use mmap. Available for purposes of overriding.
63763  LIBZIP_CAN_USE_MMAP=true
63764
63765
63766
63767  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63768    # Find the root of the Solaris Studio installation from the compiler path
63769    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63770    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63772$as_echo_n "checking for libstlport.so.1... " >&6; }
63773    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63774      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63775      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63776    fi
63777    if test -f "$STLPORT_LIB"; then
63778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63779$as_echo "yes, $STLPORT_LIB" >&6; }
63780
63781  # Only process if variable expands to non-empty
63782
63783  if test "x$STLPORT_LIB" != x; then
63784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63785
63786  # Input might be given as Windows format, start by converting to
63787  # unix format.
63788  path="$STLPORT_LIB"
63789  new_path=`$CYGPATH -u "$path"`
63790
63791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63794  # "foo.exe" is OK but "foo" is an error.
63795  #
63796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63797  # It is also a way to make sure we got the proper file name for the real test later on.
63798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63799  if test "x$test_shortpath" = x; then
63800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63801$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63802    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63803  fi
63804
63805  # Call helper function which possibly converts this using DOS-style short mode.
63806  # If so, the updated path is stored in $new_path.
63807
63808  input_path="$new_path"
63809  # Check if we need to convert this using DOS-style short mode. If the path
63810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63811  # take no chances and rewrite it.
63812  # Note: m4 eats our [], so we need to use [ and ] instead.
63813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63814  if test "x$has_forbidden_chars" != x; then
63815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63819      # Going to short mode and back again did indeed matter. Since short mode is
63820      # case insensitive, let's make it lowercase to improve readability.
63821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63822      # Now convert it back to Unix-style (cygpath)
63823      input_path=`$CYGPATH -u "$shortmode_path"`
63824      new_path="$input_path"
63825    fi
63826  fi
63827
63828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63829  if test "x$test_cygdrive_prefix" = x; then
63830    # As a simple fix, exclude /usr/bin since it's not a real path.
63831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63833      # a path prefixed by /cygdrive for fixpath to work.
63834      new_path="$CYGWIN_ROOT_PATH$input_path"
63835    fi
63836  fi
63837
63838
63839  if test "x$path" != "x$new_path"; then
63840    STLPORT_LIB="$new_path"
63841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63842$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63843  fi
63844
63845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63846
63847  path="$STLPORT_LIB"
63848  has_colon=`$ECHO $path | $GREP ^.:`
63849  new_path="$path"
63850  if test "x$has_colon" = x; then
63851    # Not in mixed or Windows style, start by that.
63852    new_path=`cmd //c echo $path`
63853  fi
63854
63855
63856  input_path="$new_path"
63857  # Check if we need to convert this using DOS-style short mode. If the path
63858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63859  # take no chances and rewrite it.
63860  # Note: m4 eats our [], so we need to use [ and ] instead.
63861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63862  if test "x$has_forbidden_chars" != x; then
63863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63865  fi
63866
63867
63868  windows_path="$new_path"
63869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63870    unix_path=`$CYGPATH -u "$windows_path"`
63871    new_path="$unix_path"
63872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63874    new_path="$unix_path"
63875  fi
63876
63877  if test "x$path" != "x$new_path"; then
63878    STLPORT_LIB="$new_path"
63879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63880$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63881  fi
63882
63883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63885
63886    else
63887      # We're on a unix platform. Hooray! :)
63888      path="$STLPORT_LIB"
63889      has_space=`$ECHO "$path" | $GREP " "`
63890      if test "x$has_space" != x; then
63891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63892$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63894      fi
63895
63896      # Use eval to expand a potential ~
63897      eval path="$path"
63898      if test ! -f "$path" && test ! -d "$path"; then
63899        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63900      fi
63901
63902      if test -d "$path"; then
63903        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63904      else
63905        dir="`$DIRNAME "$path"`"
63906        base="`$BASENAME "$path"`"
63907        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63908      fi
63909    fi
63910  fi
63911
63912    else
63913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63914$as_echo "no, not found at $STLPORT_LIB" >&6; }
63915      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63916    fi
63917
63918  fi
63919
63920
63921
63922# Check whether --with-libelf was given.
63923if test "${with_libelf+set}" = set; then :
63924  withval=$with_libelf;
63925fi
63926
63927
63928# Check whether --with-libelf-include was given.
63929if test "${with_libelf_include+set}" = set; then :
63930  withval=$with_libelf_include;
63931fi
63932
63933
63934# Check whether --with-libelf-lib was given.
63935if test "${with_libelf_lib+set}" = set; then :
63936  withval=$with_libelf_lib;
63937fi
63938
63939
63940  if test "x$ENABLE_AOT" = xfalse; then
63941    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
63942        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
63943        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
63944      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
63945$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
63946    fi
63947    LIBELF_CFLAGS=
63948    LIBELF_LIBS=
63949  else
63950    LIBELF_FOUND=no
63951
63952    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
63953      ENABLE_AOT="false"
63954      if test "x${enable_aot}" = xyes; then
63955        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
63956      fi
63957    else
63958      if test "x${with_libelf}" != x; then
63959        ELF_LIBS="-L${with_libelf}/lib -lelf"
63960        ELF_CFLAGS="-I${with_libelf}/include"
63961        LIBELF_FOUND=yes
63962      fi
63963      if test "x${with_libelf_include}" != x; then
63964        ELF_CFLAGS="-I${with_libelf_include}"
63965        LIBELF_FOUND=yes
63966      fi
63967      if test "x${with_libelf_lib}" != x; then
63968        ELF_LIBS="-L${with_libelf_lib} -lelf"
63969        LIBELF_FOUND=yes
63970      fi
63971      # Do not try pkg-config if we have a sysroot set.
63972      if test "x$SYSROOT" = x; then
63973        if test "x$LIBELF_FOUND" = xno; then
63974          # Figure out ELF_CFLAGS and ELF_LIBS
63975
63976pkg_failed=no
63977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
63978$as_echo_n "checking for ELF... " >&6; }
63979
63980if test -n "$ELF_CFLAGS"; then
63981    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
63982 elif test -n "$PKG_CONFIG"; then
63983    if test -n "$PKG_CONFIG" && \
63984    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
63985  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
63986  ac_status=$?
63987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63988  test $ac_status = 0; }; then
63989  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
63990else
63991  pkg_failed=yes
63992fi
63993 else
63994    pkg_failed=untried
63995fi
63996if test -n "$ELF_LIBS"; then
63997    pkg_cv_ELF_LIBS="$ELF_LIBS"
63998 elif test -n "$PKG_CONFIG"; then
63999    if test -n "$PKG_CONFIG" && \
64000    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64001  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64002  ac_status=$?
64003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64004  test $ac_status = 0; }; then
64005  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64006else
64007  pkg_failed=yes
64008fi
64009 else
64010    pkg_failed=untried
64011fi
64012
64013
64014
64015if test $pkg_failed = yes; then
64016
64017if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64018        _pkg_short_errors_supported=yes
64019else
64020        _pkg_short_errors_supported=no
64021fi
64022        if test $_pkg_short_errors_supported = yes; then
64023	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64024        else
64025	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64026        fi
64027	# Put the nasty error message in config.log where it belongs
64028	echo "$ELF_PKG_ERRORS" >&5
64029
64030	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64031$as_echo "no" >&6; }
64032                LIBELF_FOUND=no
64033elif test $pkg_failed = untried; then
64034	LIBELF_FOUND=no
64035else
64036	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64037	ELF_LIBS=$pkg_cv_ELF_LIBS
64038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64039$as_echo "yes" >&6; }
64040	LIBELF_FOUND=yes
64041fi
64042        fi
64043      fi
64044      if test "x$LIBELF_FOUND" = xno; then
64045        for ac_header in libelf.h
64046do :
64047  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64048if test "x$ac_cv_header_libelf_h" = xyes; then :
64049  cat >>confdefs.h <<_ACEOF
64050#define HAVE_LIBELF_H 1
64051_ACEOF
64052
64053              LIBELF_FOUND=yes
64054              ELF_CFLAGS=
64055              ELF_LIBS=-lelf
64056
64057else
64058  LIBELF_FOUND=no
64059
64060fi
64061
64062done
64063
64064      fi
64065      if test "x$LIBELF_FOUND" = xno; then
64066        ENABLE_AOT="false"
64067
64068  # Print a helpful message on how to acquire the necessary build dependency.
64069  # elf is the help tag: freetype, cups, alsa etc
64070  MISSING_DEPENDENCY=elf
64071
64072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64073    cygwin_help $MISSING_DEPENDENCY
64074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64075    msys_help $MISSING_DEPENDENCY
64076  else
64077    PKGHANDLER_COMMAND=
64078
64079    case $PKGHANDLER in
64080      apt-get)
64081        apt_help     $MISSING_DEPENDENCY ;;
64082      yum)
64083        yum_help     $MISSING_DEPENDENCY ;;
64084      port)
64085        port_help    $MISSING_DEPENDENCY ;;
64086      pkgutil)
64087        pkgutil_help $MISSING_DEPENDENCY ;;
64088      pkgadd)
64089        pkgadd_help  $MISSING_DEPENDENCY ;;
64090    esac
64091
64092    if test "x$PKGHANDLER_COMMAND" != x; then
64093      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64094    fi
64095  fi
64096
64097        if test "x${enable_aot}" = xyes; then
64098          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64099        else
64100          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64101$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64102        fi
64103      else
64104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64105$as_echo_n "checking if libelf works... " >&6; }
64106        ac_ext=c
64107ac_cpp='$CPP $CPPFLAGS'
64108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64110ac_compiler_gnu=$ac_cv_c_compiler_gnu
64111
64112        OLD_CFLAGS="$CFLAGS"
64113        CFLAGS="$CFLAGS $ELF_CFLAGS"
64114        OLD_LIBS="$LIBS"
64115        LIBS="$LIBS $ELF_LIBS"
64116        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64117/* end confdefs.h.  */
64118#include <libelf.h>
64119int
64120main ()
64121{
64122
64123              elf_version(0);
64124              return 0;
64125
64126  ;
64127  return 0;
64128}
64129_ACEOF
64130if ac_fn_c_try_link "$LINENO"; then :
64131  LIBELF_WORKS=yes
64132else
64133  LIBELF_WORKS=no
64134
64135fi
64136rm -f core conftest.err conftest.$ac_objext \
64137    conftest$ac_exeext conftest.$ac_ext
64138        CFLAGS="$OLD_CFLAGS"
64139        LIBS="$OLD_LIBS"
64140        ac_ext=cpp
64141ac_cpp='$CXXCPP $CPPFLAGS'
64142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64145
64146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64147$as_echo "$LIBELF_WORKS" >&6; }
64148
64149        if test "x$LIBELF_WORKS" = xno; then
64150          ENABLE_AOT="false"
64151
64152  # Print a helpful message on how to acquire the necessary build dependency.
64153  # elf is the help tag: freetype, cups, alsa etc
64154  MISSING_DEPENDENCY=elf
64155
64156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64157    cygwin_help $MISSING_DEPENDENCY
64158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64159    msys_help $MISSING_DEPENDENCY
64160  else
64161    PKGHANDLER_COMMAND=
64162
64163    case $PKGHANDLER in
64164      apt-get)
64165        apt_help     $MISSING_DEPENDENCY ;;
64166      yum)
64167        yum_help     $MISSING_DEPENDENCY ;;
64168      port)
64169        port_help    $MISSING_DEPENDENCY ;;
64170      pkgutil)
64171        pkgutil_help $MISSING_DEPENDENCY ;;
64172      pkgadd)
64173        pkgadd_help  $MISSING_DEPENDENCY ;;
64174    esac
64175
64176    if test "x$PKGHANDLER_COMMAND" != x; then
64177      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64178    fi
64179  fi
64180
64181          if test "x$enable_aot" = "xyes"; then
64182            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64183          else
64184            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64185$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64186          fi
64187        fi
64188      fi
64189    fi
64190  fi
64191
64192
64193
64194
64195
64196
64197
64198
64199
64200
64201
64202
64203
64204
64205
64206
64207
64208
64209# Hotspot setup depends on lib checks (AOT needs libelf).
64210
64211
64212  # The user can in some cases supply additional jvm features. For the custom
64213  # variant, this defines the entire variant.
64214
64215# Check whether --with-jvm-features was given.
64216if test "${with_jvm_features+set}" = set; then :
64217  withval=$with_jvm_features;
64218fi
64219
64220  if test "x$with_jvm_features" != x; then
64221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64222$as_echo_n "checking additional JVM features... " >&6; }
64223    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64225$as_echo "$JVM_FEATURES" >&6; }
64226  fi
64227
64228  # Override hotspot cpu definitions for ARM platforms
64229  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64230    HOTSPOT_TARGET_CPU=arm_32
64231    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64232    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64233    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64234  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64235    HOTSPOT_TARGET_CPU=arm_64
64236    HOTSPOT_TARGET_CPU_ARCH=arm
64237    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64238    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64239  fi
64240
64241  # Verify that dependencies are met for explicitly set features.
64242  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64243    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64244  fi
64245
64246  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64247    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64248  fi
64249
64250  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64251    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64252  fi
64253
64254  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64255    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64256  fi
64257
64258  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64259    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64260  fi
64261
64262  # Turn on additional features based on other parts of configure
64263  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64264    JVM_FEATURES="$JVM_FEATURES dtrace"
64265  else
64266    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64267      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64268    fi
64269  fi
64270
64271  if test "x$STATIC_BUILD" = "xtrue"; then
64272    JVM_FEATURES="$JVM_FEATURES static-build"
64273  else
64274    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64275      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64276    fi
64277  fi
64278
64279  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64280    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64281      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64282    fi
64283  fi
64284
64285  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64286    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64287      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64288    fi
64289  fi
64290
64291  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64292  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64293     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64294     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64295    JVM_FEATURES_jvmci="jvmci"
64296  else
64297    JVM_FEATURES_jvmci=""
64298  fi
64299
64300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64301$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64302  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64304$as_echo "yes, forced" >&6; }
64305    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64306      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64307    fi
64308    INCLUDE_GRAAL="true"
64309  else
64310    # By default enable graal build where AOT is available
64311    if test "x$ENABLE_AOT" = "xtrue"; then
64312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64313$as_echo "yes" >&6; }
64314      JVM_FEATURES_graal="graal"
64315      INCLUDE_GRAAL="true"
64316    else
64317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64318$as_echo "no" >&6; }
64319      JVM_FEATURES_graal=""
64320      INCLUDE_GRAAL="false"
64321    fi
64322  fi
64323
64324
64325
64326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64327$as_echo_n "checking if aot should be enabled... " >&6; }
64328  if test "x$ENABLE_AOT" = "xtrue"; then
64329    if test "x$enable_aot" = "xyes"; then
64330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64331$as_echo "yes, forced" >&6; }
64332    else
64333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64334$as_echo "yes" >&6; }
64335    fi
64336    JVM_FEATURES_aot="aot"
64337  else
64338    if test "x$enable_aot" = "xno"; then
64339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64340$as_echo "no, forced" >&6; }
64341    else
64342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64343$as_echo "no" >&6; }
64344    fi
64345    JVM_FEATURES_aot=""
64346  fi
64347
64348  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64349    # Default to use link time optimizations on minimal on arm
64350    JVM_FEATURES_link_time_opt="link-time-opt"
64351  else
64352    JVM_FEATURES_link_time_opt=""
64353  fi
64354
64355  # All variants but minimal (and custom) get these features
64356  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64357
64358  # Enable features depending on variant.
64359  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64360  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64361  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64362  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64363  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64364  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64365  JVM_FEATURES_custom="$JVM_FEATURES"
64366
64367
64368
64369
64370
64371
64372
64373
64374
64375  # Used for verification of Makefiles by check-jvm-feature
64376
64377
64378  # We don't support --with-jvm-interpreter anymore, use zero instead.
64379
64380
64381# Check whether --with-jvm-interpreter was given.
64382if test "${with_jvm_interpreter+set}" = set; then :
64383  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64384$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64385fi
64386
64387
64388
64389
64390###############################################################################
64391#
64392# We need to do some final tweaking, when everything else is done.
64393#
64394###############################################################################
64395
64396
64397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64398$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64399
64400  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64401    ENABLE_INTREE_EC=yes
64402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64403$as_echo "yes" >&6; }
64404  else
64405    ENABLE_INTREE_EC=no
64406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64407$as_echo "no" >&6; }
64408  fi
64409
64410
64411
64412
64413  # Check whether --enable-jtreg-failure-handler was given.
64414if test "${enable_jtreg_failure_handler+set}" = set; then :
64415  enableval=$enable_jtreg_failure_handler;
64416fi
64417
64418
64419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64420$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64421
64422  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64423    if test "x$JT_HOME" = "x"; then
64424      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64425    else
64426      BUILD_FAILURE_HANDLER=true
64427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64428$as_echo "yes, forced" >&6; }
64429    fi
64430  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64431    BUILD_FAILURE_HANDLER=false
64432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64433$as_echo "no, forced" >&6; }
64434  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64435      || test "x$enable_jtreg_failure_handler" = "x"; then
64436    if test "x$JT_HOME" = "x"; then
64437      BUILD_FAILURE_HANDLER=false
64438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64439$as_echo "no, missing jtreg" >&6; }
64440    else
64441      BUILD_FAILURE_HANDLER=true
64442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64443$as_echo "yes, jtreg present" >&6; }
64444    fi
64445  else
64446    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64447  fi
64448
64449
64450
64451
64452  # Check whether --enable-generate-classlist was given.
64453if test "${enable_generate_classlist+set}" = set; then :
64454  enableval=$enable_generate_classlist;
64455fi
64456
64457
64458  # Check if it's likely that it's possible to generate the classlist. Depending
64459  # on exact jvm configuration it could be possible anyway.
64460  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64461    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64462  else
64463    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64464  fi
64465
64466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64467$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64468  if test "x$enable_generate_classlist" = "xyes"; then
64469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64470$as_echo "yes, forced" >&6; }
64471    ENABLE_GENERATE_CLASSLIST="true"
64472    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64473      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64474$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64475    fi
64476  elif test "x$enable_generate_classlist" = "xno"; then
64477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64478$as_echo "no, forced" >&6; }
64479    ENABLE_GENERATE_CLASSLIST="false"
64480  elif test "x$enable_generate_classlist" = "x"; then
64481    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64483$as_echo "yes" >&6; }
64484      ENABLE_GENERATE_CLASSLIST="true"
64485    else
64486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64487$as_echo "no" >&6; }
64488      ENABLE_GENERATE_CLASSLIST="false"
64489    fi
64490  else
64491    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64492  fi
64493
64494
64495
64496
64497###############################################################################
64498#
64499# Configure parts of the build that only affect the build performance,
64500# not the result.
64501#
64502###############################################################################
64503
64504
64505  # How many cores do we have on this build system?
64506
64507# Check whether --with-num-cores was given.
64508if test "${with_num_cores+set}" = set; then :
64509  withval=$with_num_cores;
64510fi
64511
64512  if test "x$with_num_cores" = x; then
64513    # The number of cores were not specified, try to probe them.
64514
64515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64516$as_echo_n "checking for number of cores... " >&6; }
64517  NUM_CORES=1
64518  FOUND_CORES=no
64519
64520  if test -f /proc/cpuinfo; then
64521    # Looks like a Linux (or cygwin) system
64522    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64523    FOUND_CORES=yes
64524  elif test -x /usr/sbin/psrinfo; then
64525    # Looks like a Solaris system
64526    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64527    FOUND_CORES=yes
64528  elif test -x /usr/sbin/sysctl; then
64529    # Looks like a MacOSX system
64530    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64531    FOUND_CORES=yes
64532  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64533    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64534    FOUND_CORES=yes
64535  elif test -n "$NUMBER_OF_PROCESSORS"; then
64536    # On windows, look in the env
64537    NUM_CORES=$NUMBER_OF_PROCESSORS
64538    FOUND_CORES=yes
64539  fi
64540
64541  if test "x$FOUND_CORES" = xyes; then
64542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64543$as_echo "$NUM_CORES" >&6; }
64544  else
64545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64546$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64547    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64548$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64549  fi
64550
64551  else
64552    NUM_CORES=$with_num_cores
64553  fi
64554
64555
64556
64557  # How much memory do we have on this build system?
64558
64559# Check whether --with-memory-size was given.
64560if test "${with_memory_size+set}" = set; then :
64561  withval=$with_memory_size;
64562fi
64563
64564  if test "x$with_memory_size" = x; then
64565    # The memory size was not specified, try to probe it.
64566
64567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64568$as_echo_n "checking for memory size... " >&6; }
64569  # Default to 1024 MB
64570  MEMORY_SIZE=1024
64571  FOUND_MEM=no
64572
64573  if test -f /proc/meminfo; then
64574    # Looks like a Linux (or cygwin) system
64575    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64576    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64577    FOUND_MEM=yes
64578  elif test -x /usr/sbin/prtconf; then
64579    # Looks like a Solaris or AIX system
64580    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64581    FOUND_MEM=yes
64582  elif test -x /usr/sbin/sysctl; then
64583    # Looks like a MacOSX system
64584    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64585    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64586    FOUND_MEM=yes
64587  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64588    # Windows, but without cygwin
64589    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64590    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64591    FOUND_MEM=yes
64592  fi
64593
64594  if test "x$FOUND_MEM" = xyes; then
64595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64596$as_echo "$MEMORY_SIZE MB" >&6; }
64597  else
64598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64599$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64600    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64601$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64602  fi
64603
64604  else
64605    MEMORY_SIZE=$with_memory_size
64606  fi
64607
64608
64609
64610  # Provide a decent default number of parallel jobs for make depending on
64611  # number of cores, amount of memory and machine architecture.
64612
64613# Check whether --with-jobs was given.
64614if test "${with_jobs+set}" = set; then :
64615  withval=$with_jobs;
64616fi
64617
64618  if test "x$with_jobs" = x; then
64619    # Number of jobs was not specified, calculate.
64620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64621$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64622    # Approximate memory in GB.
64623    memory_gb=`expr $MEMORY_SIZE / 1024`
64624    # Pick the lowest of memory in gb and number of cores.
64625    if test "$memory_gb" -lt "$NUM_CORES"; then
64626      JOBS="$memory_gb"
64627    else
64628      JOBS="$NUM_CORES"
64629    fi
64630    if test "$JOBS" -eq "0"; then
64631      JOBS=1
64632    fi
64633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64634$as_echo "$JOBS" >&6; }
64635  else
64636    JOBS=$with_jobs
64637  fi
64638
64639
64640
64641  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64642
64643# Check whether --with-test-jobs was given.
64644if test "${with_test_jobs+set}" = set; then :
64645  withval=$with_test_jobs;
64646fi
64647
64648  if test "x$with_test_jobs" = x; then
64649      TEST_JOBS=0
64650  else
64651      TEST_JOBS=$with_test_jobs
64652  fi
64653
64654
64655
64656# Setup arguments for the boot jdk (after cores and memory have been setup)
64657
64658  ##############################################################################
64659  #
64660  # Specify jvm options for anything that is run with the Boot JDK.
64661  # Not all JVM:s accept the same arguments on the command line.
64662  #
64663
64664# Check whether --with-boot-jdk-jvmargs was given.
64665if test "${with_boot_jdk_jvmargs+set}" = set; then :
64666  withval=$with_boot_jdk_jvmargs;
64667fi
64668
64669
64670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64671$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64672
64673  # Disable special log output when a debug build is used as Boot JDK...
64674
64675  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64676  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64677  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64678  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64679  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64680  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64681    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64682    JVM_ARG_OK=true
64683  else
64684    $ECHO "Arg failed:" >&5
64685    $ECHO "$OUTPUT" >&5
64686    JVM_ARG_OK=false
64687  fi
64688
64689
64690  # Force en-US environment
64691
64692  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64693  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64694  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64695  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64696  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64697  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64698    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64699    JVM_ARG_OK=true
64700  else
64701    $ECHO "Arg failed:" >&5
64702    $ECHO "$OUTPUT" >&5
64703    JVM_ARG_OK=false
64704  fi
64705
64706
64707  # Apply user provided options.
64708
64709  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64710  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64711  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64712  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64713  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64714  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64715    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64716    JVM_ARG_OK=true
64717  else
64718    $ECHO "Arg failed:" >&5
64719    $ECHO "$OUTPUT" >&5
64720    JVM_ARG_OK=false
64721  fi
64722
64723
64724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64725$as_echo "$boot_jdk_jvmargs" >&6; }
64726
64727  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64728  JAVA_FLAGS=$boot_jdk_jvmargs
64729
64730
64731
64732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64733$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64734
64735  # Starting amount of heap memory.
64736
64737  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64738  $ECHO "Command: $JAVA -Xms64M -version" >&5
64739  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64740  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64741  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64742  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64743    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64744    JVM_ARG_OK=true
64745  else
64746    $ECHO "Arg failed:" >&5
64747    $ECHO "$OUTPUT" >&5
64748    JVM_ARG_OK=false
64749  fi
64750
64751  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64752
64753  # Maximum amount of heap memory and stack size.
64754  JVM_HEAP_LIMIT_32="1024"
64755  # Running a 64 bit JVM allows for and requires a bigger heap
64756  JVM_HEAP_LIMIT_64="1600"
64757  STACK_SIZE_32=768
64758  STACK_SIZE_64=1536
64759  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64760  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64761    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64762  fi
64763  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64764    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64765  fi
64766  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64767    JVM_HEAP_LIMIT_32=512
64768    JVM_HEAP_LIMIT_64=512
64769  fi
64770
64771  if test "x$BOOT_JDK_BITS" = "x32"; then
64772    STACK_SIZE=$STACK_SIZE_32
64773    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64774  else
64775    STACK_SIZE=$STACK_SIZE_64
64776    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64777  fi
64778
64779  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64780  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64781  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64782  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64783  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64784  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64785    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64786    JVM_ARG_OK=true
64787  else
64788    $ECHO "Arg failed:" >&5
64789    $ECHO "$OUTPUT" >&5
64790    JVM_ARG_OK=false
64791  fi
64792
64793
64794  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64795  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64796  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64797  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64798  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64799  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64800    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64801    JVM_ARG_OK=true
64802  else
64803    $ECHO "Arg failed:" >&5
64804    $ECHO "$OUTPUT" >&5
64805    JVM_ARG_OK=false
64806  fi
64807
64808
64809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64810$as_echo "$boot_jdk_jvmargs_big" >&6; }
64811
64812  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64813
64814
64815  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64816    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64817    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64818  else
64819    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64820    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64821  fi
64822  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64823  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64825$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64827$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64828
64829
64830  # By default, the main javac compilations use big
64831  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64832
64833
64834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64835$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64836
64837  # Use serial gc for small short lived tools if possible
64838
64839  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64840  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64841  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64842  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64843  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64844  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64845    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64846    JVM_ARG_OK=true
64847  else
64848    $ECHO "Arg failed:" >&5
64849    $ECHO "$OUTPUT" >&5
64850    JVM_ARG_OK=false
64851  fi
64852
64853
64854  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64855  $ECHO "Command: $JAVA -Xms32M -version" >&5
64856  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64857  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64858  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64859  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64860    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64861    JVM_ARG_OK=true
64862  else
64863    $ECHO "Arg failed:" >&5
64864    $ECHO "$OUTPUT" >&5
64865    JVM_ARG_OK=false
64866  fi
64867
64868
64869  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64870  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64871  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64872  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64873  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64874  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64875    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64876    JVM_ARG_OK=true
64877  else
64878    $ECHO "Arg failed:" >&5
64879    $ECHO "$OUTPUT" >&5
64880    JVM_ARG_OK=false
64881  fi
64882
64883
64884  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64885  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64886  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64887  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64888  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64889  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64890    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64891    JVM_ARG_OK=true
64892  else
64893    $ECHO "Arg failed:" >&5
64894    $ECHO "$OUTPUT" >&5
64895    JVM_ARG_OK=false
64896  fi
64897
64898
64899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64900$as_echo "$boot_jdk_jvmargs_small" >&6; }
64901
64902  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64903
64904
64905  JAVA_TOOL_FLAGS_SMALL=""
64906  for f in $JAVA_FLAGS_SMALL; do
64907    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64908  done
64909
64910
64911
64912# Setup smart javac (after cores and memory have been setup)
64913
64914
64915# Check whether --with-sjavac-server-java was given.
64916if test "${with_sjavac_server_java+set}" = set; then :
64917  withval=$with_sjavac_server_java;
64918fi
64919
64920
64921  if test "x$with_sjavac_server_java" != x; then
64922    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64923    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64924    if test "x$FOUND_VERSION" = x; then
64925      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64926    fi
64927  else
64928    SJAVAC_SERVER_JAVA="$JAVA"
64929  fi
64930
64931
64932  if test "$MEMORY_SIZE" -gt "3000"; then
64933
64934  $ECHO "Check if jvm arg is ok: -d64" >&5
64935  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64936  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64937  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64938  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64939  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64940    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64941    JVM_ARG_OK=true
64942  else
64943    $ECHO "Arg failed:" >&5
64944    $ECHO "$OUTPUT" >&5
64945    JVM_ARG_OK=false
64946  fi
64947
64948    if test "$JVM_ARG_OK" = true; then
64949      JVM_64BIT=true
64950      JVM_ARG_OK=false
64951    fi
64952  fi
64953
64954  MX_VALUE=`expr $MEMORY_SIZE / 2`
64955  if test "$JVM_64BIT" = true; then
64956    # Set ms lower than mx since more than one instance of the server might
64957    # get launched at the same time before they figure out which instance won.
64958    MS_VALUE=512
64959    if test "$MX_VALUE" -gt "2048"; then
64960      MX_VALUE=2048
64961    fi
64962  else
64963    MS_VALUE=256
64964    if test "$MX_VALUE" -gt "1500"; then
64965      MX_VALUE=1500
64966    fi
64967  fi
64968  if test "$MX_VALUE" -lt "512"; then
64969    MX_VALUE=512
64970  fi
64971
64972  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64973  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64974  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64975  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64976  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64977  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64978    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64979    JVM_ARG_OK=true
64980  else
64981    $ECHO "Arg failed:" >&5
64982    $ECHO "$OUTPUT" >&5
64983    JVM_ARG_OK=false
64984  fi
64985
64986
64987
64988  # Check whether --enable-sjavac was given.
64989if test "${enable_sjavac+set}" = set; then :
64990  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64991else
64992  ENABLE_SJAVAC="no"
64993fi
64994
64995  if test "x$JVM_ARG_OK" = "xfalse"; then
64996    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64997$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64998    ENABLE_SJAVAC="no"
64999  fi
65000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65001$as_echo_n "checking whether to use sjavac... " >&6; }
65002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65003$as_echo "$ENABLE_SJAVAC" >&6; }
65004
65005
65006  # Check whether --enable-javac-server was given.
65007if test "${enable_javac_server+set}" = set; then :
65008  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65009else
65010  ENABLE_JAVAC_SERVER="yes"
65011fi
65012
65013  if test "x$JVM_ARG_OK" = "xfalse"; then
65014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65015$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65016    ENABLE_JAVAC_SERVER="no"
65017  fi
65018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65019$as_echo_n "checking whether to use javac server... " >&6; }
65020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65021$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65022
65023
65024  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65025    # When using a server javac, the small client instances do not need much
65026    # resources.
65027    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65028  fi
65029
65030
65031# Setup use of icecc if requested
65032
65033  # Check whether --enable-icecc was given.
65034if test "${enable_icecc+set}" = set; then :
65035  enableval=$enable_icecc;
65036fi
65037
65038
65039  if test "x${enable_icecc}" = "xyes"; then
65040
65041
65042
65043  # Publish this variable in the help.
65044
65045
65046  if [ -z "${ICECC_CMD+x}" ]; then
65047    # The variable is not set by user, try to locate tool using the code snippet
65048    for ac_prog in icecc
65049do
65050  # Extract the first word of "$ac_prog", so it can be a program name with args.
65051set dummy $ac_prog; ac_word=$2
65052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65053$as_echo_n "checking for $ac_word... " >&6; }
65054if ${ac_cv_path_ICECC_CMD+:} false; then :
65055  $as_echo_n "(cached) " >&6
65056else
65057  case $ICECC_CMD in
65058  [\\/]* | ?:[\\/]*)
65059  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65060  ;;
65061  *)
65062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65063for as_dir in $PATH
65064do
65065  IFS=$as_save_IFS
65066  test -z "$as_dir" && as_dir=.
65067    for ac_exec_ext in '' $ac_executable_extensions; do
65068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65069    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65071    break 2
65072  fi
65073done
65074  done
65075IFS=$as_save_IFS
65076
65077  ;;
65078esac
65079fi
65080ICECC_CMD=$ac_cv_path_ICECC_CMD
65081if test -n "$ICECC_CMD"; then
65082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65083$as_echo "$ICECC_CMD" >&6; }
65084else
65085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65086$as_echo "no" >&6; }
65087fi
65088
65089
65090  test -n "$ICECC_CMD" && break
65091done
65092
65093  else
65094    # The variable is set, but is it from the command line or the environment?
65095
65096    # Try to remove the string !ICECC_CMD! from our list.
65097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65099      # If it failed, the variable was not from the command line. Ignore it,
65100      # but warn the user (except for BASH, which is always set by the calling BASH).
65101      if test "xICECC_CMD" != xBASH; then
65102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65103$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65104      fi
65105      # Try to locate tool using the code snippet
65106      for ac_prog in icecc
65107do
65108  # Extract the first word of "$ac_prog", so it can be a program name with args.
65109set dummy $ac_prog; ac_word=$2
65110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65111$as_echo_n "checking for $ac_word... " >&6; }
65112if ${ac_cv_path_ICECC_CMD+:} false; then :
65113  $as_echo_n "(cached) " >&6
65114else
65115  case $ICECC_CMD in
65116  [\\/]* | ?:[\\/]*)
65117  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65118  ;;
65119  *)
65120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65121for as_dir in $PATH
65122do
65123  IFS=$as_save_IFS
65124  test -z "$as_dir" && as_dir=.
65125    for ac_exec_ext in '' $ac_executable_extensions; do
65126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65127    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65129    break 2
65130  fi
65131done
65132  done
65133IFS=$as_save_IFS
65134
65135  ;;
65136esac
65137fi
65138ICECC_CMD=$ac_cv_path_ICECC_CMD
65139if test -n "$ICECC_CMD"; then
65140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65141$as_echo "$ICECC_CMD" >&6; }
65142else
65143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65144$as_echo "no" >&6; }
65145fi
65146
65147
65148  test -n "$ICECC_CMD" && break
65149done
65150
65151    else
65152      # If it succeeded, then it was overridden by the user. We will use it
65153      # for the tool.
65154
65155      # First remove it from the list of overridden variables, so we can test
65156      # for unknown variables in the end.
65157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65158
65159      # Check if we try to supply an empty value
65160      if test "x$ICECC_CMD" = x; then
65161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65162$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65164$as_echo_n "checking for ICECC_CMD... " >&6; }
65165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65166$as_echo "disabled" >&6; }
65167      else
65168        # Check if the provided tool contains a complete path.
65169        tool_specified="$ICECC_CMD"
65170        tool_basename="${tool_specified##*/}"
65171        if test "x$tool_basename" = "x$tool_specified"; then
65172          # A command without a complete path is provided, search $PATH.
65173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65174$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65175          # Extract the first word of "$tool_basename", so it can be a program name with args.
65176set dummy $tool_basename; ac_word=$2
65177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65178$as_echo_n "checking for $ac_word... " >&6; }
65179if ${ac_cv_path_ICECC_CMD+:} false; then :
65180  $as_echo_n "(cached) " >&6
65181else
65182  case $ICECC_CMD in
65183  [\\/]* | ?:[\\/]*)
65184  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65185  ;;
65186  *)
65187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65188for as_dir in $PATH
65189do
65190  IFS=$as_save_IFS
65191  test -z "$as_dir" && as_dir=.
65192    for ac_exec_ext in '' $ac_executable_extensions; do
65193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65194    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65196    break 2
65197  fi
65198done
65199  done
65200IFS=$as_save_IFS
65201
65202  ;;
65203esac
65204fi
65205ICECC_CMD=$ac_cv_path_ICECC_CMD
65206if test -n "$ICECC_CMD"; then
65207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65208$as_echo "$ICECC_CMD" >&6; }
65209else
65210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65211$as_echo "no" >&6; }
65212fi
65213
65214
65215          if test "x$ICECC_CMD" = x; then
65216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65217          fi
65218        else
65219          # Otherwise we believe it is a complete path. Use it as it is.
65220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65221$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65223$as_echo_n "checking for ICECC_CMD... " >&6; }
65224          if test ! -x "$tool_specified"; then
65225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65226$as_echo "not found" >&6; }
65227            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65228          fi
65229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65230$as_echo "$tool_specified" >&6; }
65231        fi
65232      fi
65233    fi
65234
65235  fi
65236
65237
65238
65239  if test "x$ICECC_CMD" = x; then
65240    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65241  fi
65242
65243
65244    old_path="$PATH"
65245
65246    # Look for icecc-create-env in some known places
65247    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65248
65249
65250
65251  # Publish this variable in the help.
65252
65253
65254  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65255    # The variable is not set by user, try to locate tool using the code snippet
65256    for ac_prog in icecc-create-env
65257do
65258  # Extract the first word of "$ac_prog", so it can be a program name with args.
65259set dummy $ac_prog; ac_word=$2
65260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65261$as_echo_n "checking for $ac_word... " >&6; }
65262if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65263  $as_echo_n "(cached) " >&6
65264else
65265  case $ICECC_CREATE_ENV in
65266  [\\/]* | ?:[\\/]*)
65267  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65268  ;;
65269  *)
65270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65271for as_dir in $PATH
65272do
65273  IFS=$as_save_IFS
65274  test -z "$as_dir" && as_dir=.
65275    for ac_exec_ext in '' $ac_executable_extensions; do
65276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65277    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65279    break 2
65280  fi
65281done
65282  done
65283IFS=$as_save_IFS
65284
65285  ;;
65286esac
65287fi
65288ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65289if test -n "$ICECC_CREATE_ENV"; then
65290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65291$as_echo "$ICECC_CREATE_ENV" >&6; }
65292else
65293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65294$as_echo "no" >&6; }
65295fi
65296
65297
65298  test -n "$ICECC_CREATE_ENV" && break
65299done
65300
65301  else
65302    # The variable is set, but is it from the command line or the environment?
65303
65304    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65307      # If it failed, the variable was not from the command line. Ignore it,
65308      # but warn the user (except for BASH, which is always set by the calling BASH).
65309      if test "xICECC_CREATE_ENV" != xBASH; then
65310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65311$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65312      fi
65313      # Try to locate tool using the code snippet
65314      for ac_prog in icecc-create-env
65315do
65316  # Extract the first word of "$ac_prog", so it can be a program name with args.
65317set dummy $ac_prog; ac_word=$2
65318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65319$as_echo_n "checking for $ac_word... " >&6; }
65320if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65321  $as_echo_n "(cached) " >&6
65322else
65323  case $ICECC_CREATE_ENV in
65324  [\\/]* | ?:[\\/]*)
65325  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65326  ;;
65327  *)
65328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65329for as_dir in $PATH
65330do
65331  IFS=$as_save_IFS
65332  test -z "$as_dir" && as_dir=.
65333    for ac_exec_ext in '' $ac_executable_extensions; do
65334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65335    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65337    break 2
65338  fi
65339done
65340  done
65341IFS=$as_save_IFS
65342
65343  ;;
65344esac
65345fi
65346ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65347if test -n "$ICECC_CREATE_ENV"; then
65348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65349$as_echo "$ICECC_CREATE_ENV" >&6; }
65350else
65351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65352$as_echo "no" >&6; }
65353fi
65354
65355
65356  test -n "$ICECC_CREATE_ENV" && break
65357done
65358
65359    else
65360      # If it succeeded, then it was overridden by the user. We will use it
65361      # for the tool.
65362
65363      # First remove it from the list of overridden variables, so we can test
65364      # for unknown variables in the end.
65365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65366
65367      # Check if we try to supply an empty value
65368      if test "x$ICECC_CREATE_ENV" = x; then
65369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65370$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65372$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65374$as_echo "disabled" >&6; }
65375      else
65376        # Check if the provided tool contains a complete path.
65377        tool_specified="$ICECC_CREATE_ENV"
65378        tool_basename="${tool_specified##*/}"
65379        if test "x$tool_basename" = "x$tool_specified"; then
65380          # A command without a complete path is provided, search $PATH.
65381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65382$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65383          # Extract the first word of "$tool_basename", so it can be a program name with args.
65384set dummy $tool_basename; ac_word=$2
65385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65386$as_echo_n "checking for $ac_word... " >&6; }
65387if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65388  $as_echo_n "(cached) " >&6
65389else
65390  case $ICECC_CREATE_ENV in
65391  [\\/]* | ?:[\\/]*)
65392  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65393  ;;
65394  *)
65395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65396for as_dir in $PATH
65397do
65398  IFS=$as_save_IFS
65399  test -z "$as_dir" && as_dir=.
65400    for ac_exec_ext in '' $ac_executable_extensions; do
65401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65402    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65404    break 2
65405  fi
65406done
65407  done
65408IFS=$as_save_IFS
65409
65410  ;;
65411esac
65412fi
65413ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65414if test -n "$ICECC_CREATE_ENV"; then
65415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65416$as_echo "$ICECC_CREATE_ENV" >&6; }
65417else
65418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65419$as_echo "no" >&6; }
65420fi
65421
65422
65423          if test "x$ICECC_CREATE_ENV" = x; then
65424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65425          fi
65426        else
65427          # Otherwise we believe it is a complete path. Use it as it is.
65428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65429$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65431$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65432          if test ! -x "$tool_specified"; then
65433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65434$as_echo "not found" >&6; }
65435            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65436          fi
65437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65438$as_echo "$tool_specified" >&6; }
65439        fi
65440      fi
65441    fi
65442
65443  fi
65444
65445
65446
65447  if test "x$ICECC_CREATE_ENV" = x; then
65448    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65449  fi
65450
65451
65452    # Use icecc-create-env to create a minimal compilation environment that can
65453    # be sent to the other hosts in the icecream cluster.
65454    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65455    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65456    # Older versions of icecc does not have the --gcc parameter
65457    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65458      icecc_gcc_arg="--gcc"
65459    fi
65460    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65461
65462  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65463      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65464          ${icecc_create_env_log} 2>&1 )
65465  if test "$?" != "0"; then
65466    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65467$as_echo "$as_me: icecc-create-env output:" >&6;}
65468    cat \
65469          ${icecc_create_env_log}
65470    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65471  fi
65472
65473    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65474      # For clang, the icecc compilerwrapper is needed. It usually resides next
65475      # to icecc-create-env.
65476
65477
65478
65479  # Publish this variable in the help.
65480
65481
65482  if [ -z "${ICECC_WRAPPER+x}" ]; then
65483    # The variable is not set by user, try to locate tool using the code snippet
65484    for ac_prog in compilerwrapper
65485do
65486  # Extract the first word of "$ac_prog", so it can be a program name with args.
65487set dummy $ac_prog; ac_word=$2
65488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65489$as_echo_n "checking for $ac_word... " >&6; }
65490if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65491  $as_echo_n "(cached) " >&6
65492else
65493  case $ICECC_WRAPPER in
65494  [\\/]* | ?:[\\/]*)
65495  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65496  ;;
65497  *)
65498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65499for as_dir in $PATH
65500do
65501  IFS=$as_save_IFS
65502  test -z "$as_dir" && as_dir=.
65503    for ac_exec_ext in '' $ac_executable_extensions; do
65504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65505    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65507    break 2
65508  fi
65509done
65510  done
65511IFS=$as_save_IFS
65512
65513  ;;
65514esac
65515fi
65516ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65517if test -n "$ICECC_WRAPPER"; then
65518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65519$as_echo "$ICECC_WRAPPER" >&6; }
65520else
65521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65522$as_echo "no" >&6; }
65523fi
65524
65525
65526  test -n "$ICECC_WRAPPER" && break
65527done
65528
65529  else
65530    # The variable is set, but is it from the command line or the environment?
65531
65532    # Try to remove the string !ICECC_WRAPPER! from our list.
65533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65535      # If it failed, the variable was not from the command line. Ignore it,
65536      # but warn the user (except for BASH, which is always set by the calling BASH).
65537      if test "xICECC_WRAPPER" != xBASH; then
65538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65539$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65540      fi
65541      # Try to locate tool using the code snippet
65542      for ac_prog in compilerwrapper
65543do
65544  # Extract the first word of "$ac_prog", so it can be a program name with args.
65545set dummy $ac_prog; ac_word=$2
65546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65547$as_echo_n "checking for $ac_word... " >&6; }
65548if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65549  $as_echo_n "(cached) " >&6
65550else
65551  case $ICECC_WRAPPER in
65552  [\\/]* | ?:[\\/]*)
65553  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65554  ;;
65555  *)
65556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65557for as_dir in $PATH
65558do
65559  IFS=$as_save_IFS
65560  test -z "$as_dir" && as_dir=.
65561    for ac_exec_ext in '' $ac_executable_extensions; do
65562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65563    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65565    break 2
65566  fi
65567done
65568  done
65569IFS=$as_save_IFS
65570
65571  ;;
65572esac
65573fi
65574ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65575if test -n "$ICECC_WRAPPER"; then
65576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65577$as_echo "$ICECC_WRAPPER" >&6; }
65578else
65579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65580$as_echo "no" >&6; }
65581fi
65582
65583
65584  test -n "$ICECC_WRAPPER" && break
65585done
65586
65587    else
65588      # If it succeeded, then it was overridden by the user. We will use it
65589      # for the tool.
65590
65591      # First remove it from the list of overridden variables, so we can test
65592      # for unknown variables in the end.
65593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65594
65595      # Check if we try to supply an empty value
65596      if test "x$ICECC_WRAPPER" = x; then
65597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65598$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65600$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65602$as_echo "disabled" >&6; }
65603      else
65604        # Check if the provided tool contains a complete path.
65605        tool_specified="$ICECC_WRAPPER"
65606        tool_basename="${tool_specified##*/}"
65607        if test "x$tool_basename" = "x$tool_specified"; then
65608          # A command without a complete path is provided, search $PATH.
65609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65610$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65611          # Extract the first word of "$tool_basename", so it can be a program name with args.
65612set dummy $tool_basename; ac_word=$2
65613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65614$as_echo_n "checking for $ac_word... " >&6; }
65615if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65616  $as_echo_n "(cached) " >&6
65617else
65618  case $ICECC_WRAPPER in
65619  [\\/]* | ?:[\\/]*)
65620  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65621  ;;
65622  *)
65623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65624for as_dir in $PATH
65625do
65626  IFS=$as_save_IFS
65627  test -z "$as_dir" && as_dir=.
65628    for ac_exec_ext in '' $ac_executable_extensions; do
65629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65630    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65632    break 2
65633  fi
65634done
65635  done
65636IFS=$as_save_IFS
65637
65638  ;;
65639esac
65640fi
65641ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65642if test -n "$ICECC_WRAPPER"; then
65643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65644$as_echo "$ICECC_WRAPPER" >&6; }
65645else
65646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65647$as_echo "no" >&6; }
65648fi
65649
65650
65651          if test "x$ICECC_WRAPPER" = x; then
65652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65653          fi
65654        else
65655          # Otherwise we believe it is a complete path. Use it as it is.
65656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65657$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65659$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65660          if test ! -x "$tool_specified"; then
65661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65662$as_echo "not found" >&6; }
65663            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65664          fi
65665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65666$as_echo "$tool_specified" >&6; }
65667        fi
65668      fi
65669    fi
65670
65671  fi
65672
65673
65674
65675  if test "x$ICECC_WRAPPER" = x; then
65676    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65677  fi
65678
65679
65680
65681  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65682      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65683  if test "$?" != "0"; then
65684    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65685$as_echo "$as_me: icecc-create-env output:" >&6;}
65686    cat ${icecc_create_env_log}
65687    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65688  fi
65689
65690    else
65691      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65692    fi
65693    PATH="$old_path"
65694    # The bundle with the compiler gets a name based on checksums. Parse log file
65695    # to find it.
65696    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65697    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65698    if test ! -f ${ICECC_ENV_BUNDLE}; then
65699      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65700    fi
65701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65702$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65704$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65705    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65706
65707    if test "x${COMPILE_TYPE}" = "xcross"; then
65708      # If cross compiling, create a separate env package for the build compiler
65709      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65710      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65711      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65712
65713  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65714      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65715            ${icecc_create_env_log_build} 2>&1 )
65716  if test "$?" != "0"; then
65717    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65718$as_echo "$as_me: icecc-create-env output:" >&6;}
65719    cat \
65720            ${icecc_create_env_log_build}
65721    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65722  fi
65723
65724      elif test "x${BUILD_CC##*/}" = "xclang"; then
65725
65726  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65727      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65728  if test "$?" != "0"; then
65729    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65730$as_echo "$as_me: icecc-create-env output:" >&6;}
65731    cat ${icecc_create_env_log_build}
65732    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65733  fi
65734
65735      else
65736        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65737      fi
65738      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65739      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65740      if test ! -f ${ICECC_ENV_BUNDLE}; then
65741        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65742      fi
65743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65744$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65746$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65747      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65748          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65749    else
65750      BUILD_ICECC="${ICECC}"
65751    fi
65752
65753
65754  fi
65755
65756
65757# Can the C/C++ compiler use precompiled headers?
65758
65759
65760  ###############################################################################
65761  #
65762  # Can the C/C++ compiler use precompiled headers?
65763  #
65764  # Check whether --enable-precompiled-headers was given.
65765if test "${enable_precompiled_headers+set}" = set; then :
65766  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65767else
65768  ENABLE_PRECOMPH=yes
65769fi
65770
65771
65772  USE_PRECOMPILED_HEADER=1
65773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65774$as_echo_n "checking If precompiled header is enabled... " >&6; }
65775  if test "x$ENABLE_PRECOMPH" = xno; then
65776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65777$as_echo "no, forced" >&6; }
65778    USE_PRECOMPILED_HEADER=0
65779  elif test "x$ICECC" != "x"; then
65780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65781$as_echo "no, does not work effectively with icecc" >&6; }
65782    USE_PRECOMPILED_HEADER=0
65783  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65785$as_echo "no, does not work with Solaris Studio" >&6; }
65786    USE_PRECOMPILED_HEADER=0
65787  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65789$as_echo "no, does not work with xlc" >&6; }
65790    USE_PRECOMPILED_HEADER=0
65791  else
65792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65793$as_echo "yes" >&6; }
65794  fi
65795
65796  if test "x$ENABLE_PRECOMPH" = xyes; then
65797    # Check that the compiler actually supports precomp headers.
65798    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65800$as_echo_n "checking that precompiled headers work... " >&6; }
65801      echo "int alfa();" > conftest.h
65802      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65803      if test ! -f conftest.hpp.gch; then
65804        USE_PRECOMPILED_HEADER=0
65805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65806$as_echo "no" >&6; }
65807      else
65808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65809$as_echo "yes" >&6; }
65810      fi
65811      $RM conftest.h conftest.hpp.gch
65812    fi
65813  fi
65814
65815
65816
65817
65818# Setup use of ccache, if available
65819
65820  # Check whether --enable-ccache was given.
65821if test "${enable_ccache+set}" = set; then :
65822  enableval=$enable_ccache;
65823fi
65824
65825
65826  CCACHE_STATUS=
65827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65828$as_echo_n "checking is ccache enabled... " >&6; }
65829  if test "x$enable_ccache" = xyes; then
65830    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65832$as_echo "yes" >&6; }
65833      OLD_PATH="$PATH"
65834      if test "x$TOOLCHAIN_PATH" != x; then
65835        PATH=$TOOLCHAIN_PATH:$PATH
65836      fi
65837
65838
65839
65840  # Publish this variable in the help.
65841
65842
65843  if [ -z "${CCACHE+x}" ]; then
65844    # The variable is not set by user, try to locate tool using the code snippet
65845    for ac_prog in ccache
65846do
65847  # Extract the first word of "$ac_prog", so it can be a program name with args.
65848set dummy $ac_prog; ac_word=$2
65849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65850$as_echo_n "checking for $ac_word... " >&6; }
65851if ${ac_cv_path_CCACHE+:} false; then :
65852  $as_echo_n "(cached) " >&6
65853else
65854  case $CCACHE in
65855  [\\/]* | ?:[\\/]*)
65856  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65857  ;;
65858  *)
65859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65860for as_dir in $PATH
65861do
65862  IFS=$as_save_IFS
65863  test -z "$as_dir" && as_dir=.
65864    for ac_exec_ext in '' $ac_executable_extensions; do
65865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65866    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65868    break 2
65869  fi
65870done
65871  done
65872IFS=$as_save_IFS
65873
65874  ;;
65875esac
65876fi
65877CCACHE=$ac_cv_path_CCACHE
65878if test -n "$CCACHE"; then
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65880$as_echo "$CCACHE" >&6; }
65881else
65882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65883$as_echo "no" >&6; }
65884fi
65885
65886
65887  test -n "$CCACHE" && break
65888done
65889
65890  else
65891    # The variable is set, but is it from the command line or the environment?
65892
65893    # Try to remove the string !CCACHE! from our list.
65894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65896      # If it failed, the variable was not from the command line. Ignore it,
65897      # but warn the user (except for BASH, which is always set by the calling BASH).
65898      if test "xCCACHE" != xBASH; then
65899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65900$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65901      fi
65902      # Try to locate tool using the code snippet
65903      for ac_prog in ccache
65904do
65905  # Extract the first word of "$ac_prog", so it can be a program name with args.
65906set dummy $ac_prog; ac_word=$2
65907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65908$as_echo_n "checking for $ac_word... " >&6; }
65909if ${ac_cv_path_CCACHE+:} false; then :
65910  $as_echo_n "(cached) " >&6
65911else
65912  case $CCACHE in
65913  [\\/]* | ?:[\\/]*)
65914  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65915  ;;
65916  *)
65917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65918for as_dir in $PATH
65919do
65920  IFS=$as_save_IFS
65921  test -z "$as_dir" && as_dir=.
65922    for ac_exec_ext in '' $ac_executable_extensions; do
65923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65924    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65926    break 2
65927  fi
65928done
65929  done
65930IFS=$as_save_IFS
65931
65932  ;;
65933esac
65934fi
65935CCACHE=$ac_cv_path_CCACHE
65936if test -n "$CCACHE"; then
65937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65938$as_echo "$CCACHE" >&6; }
65939else
65940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65941$as_echo "no" >&6; }
65942fi
65943
65944
65945  test -n "$CCACHE" && break
65946done
65947
65948    else
65949      # If it succeeded, then it was overridden by the user. We will use it
65950      # for the tool.
65951
65952      # First remove it from the list of overridden variables, so we can test
65953      # for unknown variables in the end.
65954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65955
65956      # Check if we try to supply an empty value
65957      if test "x$CCACHE" = x; then
65958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65959$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65961$as_echo_n "checking for CCACHE... " >&6; }
65962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65963$as_echo "disabled" >&6; }
65964      else
65965        # Check if the provided tool contains a complete path.
65966        tool_specified="$CCACHE"
65967        tool_basename="${tool_specified##*/}"
65968        if test "x$tool_basename" = "x$tool_specified"; then
65969          # A command without a complete path is provided, search $PATH.
65970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65971$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65972          # Extract the first word of "$tool_basename", so it can be a program name with args.
65973set dummy $tool_basename; ac_word=$2
65974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65975$as_echo_n "checking for $ac_word... " >&6; }
65976if ${ac_cv_path_CCACHE+:} false; then :
65977  $as_echo_n "(cached) " >&6
65978else
65979  case $CCACHE in
65980  [\\/]* | ?:[\\/]*)
65981  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65982  ;;
65983  *)
65984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65985for as_dir in $PATH
65986do
65987  IFS=$as_save_IFS
65988  test -z "$as_dir" && as_dir=.
65989    for ac_exec_ext in '' $ac_executable_extensions; do
65990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65991    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65993    break 2
65994  fi
65995done
65996  done
65997IFS=$as_save_IFS
65998
65999  ;;
66000esac
66001fi
66002CCACHE=$ac_cv_path_CCACHE
66003if test -n "$CCACHE"; then
66004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66005$as_echo "$CCACHE" >&6; }
66006else
66007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66008$as_echo "no" >&6; }
66009fi
66010
66011
66012          if test "x$CCACHE" = x; then
66013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66014          fi
66015        else
66016          # Otherwise we believe it is a complete path. Use it as it is.
66017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66018$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66020$as_echo_n "checking for CCACHE... " >&6; }
66021          if test ! -x "$tool_specified"; then
66022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66023$as_echo "not found" >&6; }
66024            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66025          fi
66026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66027$as_echo "$tool_specified" >&6; }
66028        fi
66029      fi
66030    fi
66031
66032  fi
66033
66034
66035
66036  if test "x$CCACHE" = x; then
66037    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66038  fi
66039
66040
66041      PATH="$OLD_PATH"
66042      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66043      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66044    else
66045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66046$as_echo "no" >&6; }
66047      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66048$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66049    fi
66050  elif test "x$enable_ccache" = xno; then
66051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66052$as_echo "no, explicitly disabled" >&6; }
66053    CCACHE_STATUS="Disabled"
66054  elif test "x$enable_ccache" = x; then
66055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66056$as_echo "no" >&6; }
66057  else
66058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66059$as_echo "unknown" >&6; }
66060    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66061  fi
66062
66063
66064
66065# Check whether --with-ccache-dir was given.
66066if test "${with_ccache_dir+set}" = set; then :
66067  withval=$with_ccache_dir;
66068fi
66069
66070
66071  if test "x$with_ccache_dir" != x; then
66072    # When using a non home ccache directory, assume the use is to share ccache files
66073    # with other users. Thus change the umask.
66074    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66075    if test "x$CCACHE" = x; then
66076      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66077$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66078    fi
66079  fi
66080
66081  if test "x$CCACHE" != x; then
66082
66083  if test "x$CCACHE" != x; then
66084    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66085      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66086          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66087      if test "x$HAS_BAD_CCACHE" != "x"; then
66088        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66089      fi
66090    fi
66091    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66092      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66093          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66094      if test "x$HAS_BAD_CCACHE" != "x"; then
66095        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66096      fi
66097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66098$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66099      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66100      PUSHED_FLAGS="$CXXFLAGS"
66101      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66102      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66103/* end confdefs.h.  */
66104
66105int
66106main ()
66107{
66108
66109  ;
66110  return 0;
66111}
66112_ACEOF
66113if ac_fn_cxx_try_compile "$LINENO"; then :
66114  CC_KNOWS_CCACHE_TRICK=yes
66115else
66116  CC_KNOWS_CCACHE_TRICK=no
66117fi
66118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66119      CXXFLAGS="$PUSHED_FLAGS"
66120      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66122$as_echo "yes" >&6; }
66123        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66124
66125        CCACHE_SLOPPINESS=pch_defines,time_macros
66126      else
66127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66128$as_echo "no" >&6; }
66129        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66130      fi
66131    fi
66132
66133    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66134        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66135
66136    if test "x$SET_CCACHE_DIR" != x; then
66137      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66138      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66139    fi
66140  fi
66141
66142  fi
66143
66144
66145###############################################################################
66146#
66147# And now the finish...
66148#
66149###############################################################################
66150
66151# Check for some common pitfalls
66152
66153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66154    file_to_test="$SRC_ROOT/LICENSE"
66155    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66156      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
66157    fi
66158  fi
66159
66160
66161  # Did user specify any unknown variables?
66162
66163  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66164    # Replace the separating ! with spaces before presenting for end user.
66165    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66167$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66168  fi
66169
66170
66171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66172$as_echo_n "checking if build directory is on local disk... " >&6; }
66173
66174  # df -l lists only local disks; if the given directory is not found then
66175  # a non-zero exit code is given
66176  if test "x$DF" = x; then
66177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66178      # msys does not have df; use Windows "net use" instead.
66179      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66180      if test "x$IS_NETWORK_DISK" = x; then
66181        OUTPUT_DIR_IS_LOCAL="yes"
66182      else
66183        OUTPUT_DIR_IS_LOCAL="no"
66184      fi
66185    else
66186      # No df here, say it's local
66187      OUTPUT_DIR_IS_LOCAL="yes"
66188    fi
66189  else
66190    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66191      OUTPUT_DIR_IS_LOCAL="yes"
66192    else
66193      OUTPUT_DIR_IS_LOCAL="no"
66194    fi
66195  fi
66196
66197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66198$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66199
66200
66201
66202  # Check if the user has any old-style ALT_ variables set.
66203  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66204
66205  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66206  # Since we can't properly handle the dependencies for this, warn the user about the situation
66207  if test -e $OUTPUT_ROOT/spec.gmk; then
66208    IS_RECONFIGURE=yes
66209  else
66210    IS_RECONFIGURE=no
66211  fi
66212
66213
66214# At the end, call the custom hook. (Dummy macro if no custom sources available)
66215
66216
66217# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66218
66219  # Keep feature lists sorted and free of duplicates
66220  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66221  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66222  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66223  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66224  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66225  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66226  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66227
66228  # Validate features
66229  for variant in $JVM_VARIANTS; do
66230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66231$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66232    features_var_name=JVM_FEATURES_$variant
66233    JVM_FEATURES_TO_TEST=${!features_var_name}
66234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66235$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66236    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66237    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66238    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66239    if test "x$INVALID_FEATURES" != x; then
66240      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66241    fi
66242  done
66243
66244
66245# We're messing a bit with internal autoconf variables to put the config.status
66246# in the output directory instead of the current directory.
66247CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66248
66249# Create the actual output files. Now the main work of configure is done.
66250cat >confcache <<\_ACEOF
66251# This file is a shell script that caches the results of configure
66252# tests run on this system so they can be shared between configure
66253# scripts and configure runs, see configure's option --config-cache.
66254# It is not useful on other systems.  If it contains results you don't
66255# want to keep, you may remove or edit it.
66256#
66257# config.status only pays attention to the cache file if you give it
66258# the --recheck option to rerun configure.
66259#
66260# `ac_cv_env_foo' variables (set or unset) will be overridden when
66261# loading this file, other *unset* `ac_cv_foo' will be assigned the
66262# following values.
66263
66264_ACEOF
66265
66266# The following way of writing the cache mishandles newlines in values,
66267# but we know of no workaround that is simple, portable, and efficient.
66268# So, we kill variables containing newlines.
66269# Ultrix sh set writes to stderr and can't be redirected directly,
66270# and sets the high bit in the cache file unless we assign to the vars.
66271(
66272  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66273    eval ac_val=\$$ac_var
66274    case $ac_val in #(
66275    *${as_nl}*)
66276      case $ac_var in #(
66277      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66278$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66279      esac
66280      case $ac_var in #(
66281      _ | IFS | as_nl) ;; #(
66282      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66283      *) { eval $ac_var=; unset $ac_var;} ;;
66284      esac ;;
66285    esac
66286  done
66287
66288  (set) 2>&1 |
66289    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66290    *${as_nl}ac_space=\ *)
66291      # `set' does not quote correctly, so add quotes: double-quote
66292      # substitution turns \\\\ into \\, and sed turns \\ into \.
66293      sed -n \
66294	"s/'/'\\\\''/g;
66295	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66296      ;; #(
66297    *)
66298      # `set' quotes correctly as required by POSIX, so do not add quotes.
66299      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66300      ;;
66301    esac |
66302    sort
66303) |
66304  sed '
66305     /^ac_cv_env_/b end
66306     t clear
66307     :clear
66308     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66309     t end
66310     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66311     :end' >>confcache
66312if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66313  if test -w "$cache_file"; then
66314    if test "x$cache_file" != "x/dev/null"; then
66315      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66316$as_echo "$as_me: updating cache $cache_file" >&6;}
66317      if test ! -f "$cache_file" || test -h "$cache_file"; then
66318	cat confcache >"$cache_file"
66319      else
66320        case $cache_file in #(
66321        */* | ?:*)
66322	  mv -f confcache "$cache_file"$$ &&
66323	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66324        *)
66325	  mv -f confcache "$cache_file" ;;
66326	esac
66327      fi
66328    fi
66329  else
66330    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66331$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66332  fi
66333fi
66334rm -f confcache
66335
66336test "x$prefix" = xNONE && prefix=$ac_default_prefix
66337# Let make expand exec_prefix.
66338test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66339
66340# Transform confdefs.h into DEFS.
66341# Protect against shell expansion while executing Makefile rules.
66342# Protect against Makefile macro expansion.
66343#
66344# If the first sed substitution is executed (which looks for macros that
66345# take arguments), then branch to the quote section.  Otherwise,
66346# look for a macro that doesn't take arguments.
66347ac_script='
66348:mline
66349/\\$/{
66350 N
66351 s,\\\n,,
66352 b mline
66353}
66354t clear
66355:clear
66356s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66357t quote
66358s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66359t quote
66360b any
66361:quote
66362s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66363s/\[/\\&/g
66364s/\]/\\&/g
66365s/\$/$$/g
66366H
66367:any
66368${
66369	g
66370	s/^\n//
66371	s/\n/ /g
66372	p
66373}
66374'
66375DEFS=`sed -n "$ac_script" confdefs.h`
66376
66377
66378ac_libobjs=
66379ac_ltlibobjs=
66380U=
66381for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66382  # 1. Remove the extension, and $U if already installed.
66383  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66384  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66385  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66386  #    will be set to the directory where LIBOBJS objects are built.
66387  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66388  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66389done
66390LIBOBJS=$ac_libobjs
66391
66392LTLIBOBJS=$ac_ltlibobjs
66393
66394
66395
66396: "${CONFIG_STATUS=./config.status}"
66397ac_write_fail=0
66398ac_clean_files_save=$ac_clean_files
66399ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66400{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66401$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66402as_write_fail=0
66403cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66404#! $SHELL
66405# Generated by $as_me.
66406# Run this file to recreate the current configuration.
66407# Compiler output produced by configure, useful for debugging
66408# configure, is in config.log if it exists.
66409
66410debug=false
66411ac_cs_recheck=false
66412ac_cs_silent=false
66413
66414SHELL=\${CONFIG_SHELL-$SHELL}
66415export SHELL
66416_ASEOF
66417cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66418## -------------------- ##
66419## M4sh Initialization. ##
66420## -------------------- ##
66421
66422# Be more Bourne compatible
66423DUALCASE=1; export DUALCASE # for MKS sh
66424if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66425  emulate sh
66426  NULLCMD=:
66427  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66428  # is contrary to our usage.  Disable this feature.
66429  alias -g '${1+"$@"}'='"$@"'
66430  setopt NO_GLOB_SUBST
66431else
66432  case `(set -o) 2>/dev/null` in #(
66433  *posix*) :
66434    set -o posix ;; #(
66435  *) :
66436     ;;
66437esac
66438fi
66439
66440
66441as_nl='
66442'
66443export as_nl
66444# Printing a long string crashes Solaris 7 /usr/bin/printf.
66445as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66446as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66447as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66448# Prefer a ksh shell builtin over an external printf program on Solaris,
66449# but without wasting forks for bash or zsh.
66450if test -z "$BASH_VERSION$ZSH_VERSION" \
66451    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66452  as_echo='print -r --'
66453  as_echo_n='print -rn --'
66454elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66455  as_echo='printf %s\n'
66456  as_echo_n='printf %s'
66457else
66458  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66459    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66460    as_echo_n='/usr/ucb/echo -n'
66461  else
66462    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66463    as_echo_n_body='eval
66464      arg=$1;
66465      case $arg in #(
66466      *"$as_nl"*)
66467	expr "X$arg" : "X\\(.*\\)$as_nl";
66468	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66469      esac;
66470      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66471    '
66472    export as_echo_n_body
66473    as_echo_n='sh -c $as_echo_n_body as_echo'
66474  fi
66475  export as_echo_body
66476  as_echo='sh -c $as_echo_body as_echo'
66477fi
66478
66479# The user is always right.
66480if test "${PATH_SEPARATOR+set}" != set; then
66481  PATH_SEPARATOR=:
66482  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66483    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66484      PATH_SEPARATOR=';'
66485  }
66486fi
66487
66488
66489# IFS
66490# We need space, tab and new line, in precisely that order.  Quoting is
66491# there to prevent editors from complaining about space-tab.
66492# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66493# splitting by setting IFS to empty value.)
66494IFS=" ""	$as_nl"
66495
66496# Find who we are.  Look in the path if we contain no directory separator.
66497as_myself=
66498case $0 in #((
66499  *[\\/]* ) as_myself=$0 ;;
66500  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66501for as_dir in $PATH
66502do
66503  IFS=$as_save_IFS
66504  test -z "$as_dir" && as_dir=.
66505    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66506  done
66507IFS=$as_save_IFS
66508
66509     ;;
66510esac
66511# We did not find ourselves, most probably we were run as `sh COMMAND'
66512# in which case we are not to be found in the path.
66513if test "x$as_myself" = x; then
66514  as_myself=$0
66515fi
66516if test ! -f "$as_myself"; then
66517  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66518  exit 1
66519fi
66520
66521# Unset variables that we do not need and which cause bugs (e.g. in
66522# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66523# suppresses any "Segmentation fault" message there.  '((' could
66524# trigger a bug in pdksh 5.2.14.
66525for as_var in BASH_ENV ENV MAIL MAILPATH
66526do eval test x\${$as_var+set} = xset \
66527  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66528done
66529PS1='$ '
66530PS2='> '
66531PS4='+ '
66532
66533# NLS nuisances.
66534LC_ALL=C
66535export LC_ALL
66536LANGUAGE=C
66537export LANGUAGE
66538
66539# CDPATH.
66540(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66541
66542
66543# as_fn_error STATUS ERROR [LINENO LOG_FD]
66544# ----------------------------------------
66545# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66546# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66547# script with STATUS, using 1 if that was 0.
66548as_fn_error ()
66549{
66550  as_status=$1; test $as_status -eq 0 && as_status=1
66551  if test "$4"; then
66552    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66553    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66554  fi
66555  $as_echo "$as_me: error: $2" >&2
66556  as_fn_exit $as_status
66557} # as_fn_error
66558
66559
66560# as_fn_set_status STATUS
66561# -----------------------
66562# Set $? to STATUS, without forking.
66563as_fn_set_status ()
66564{
66565  return $1
66566} # as_fn_set_status
66567
66568# as_fn_exit STATUS
66569# -----------------
66570# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66571as_fn_exit ()
66572{
66573  set +e
66574  as_fn_set_status $1
66575  exit $1
66576} # as_fn_exit
66577
66578# as_fn_unset VAR
66579# ---------------
66580# Portably unset VAR.
66581as_fn_unset ()
66582{
66583  { eval $1=; unset $1;}
66584}
66585as_unset=as_fn_unset
66586# as_fn_append VAR VALUE
66587# ----------------------
66588# Append the text in VALUE to the end of the definition contained in VAR. Take
66589# advantage of any shell optimizations that allow amortized linear growth over
66590# repeated appends, instead of the typical quadratic growth present in naive
66591# implementations.
66592if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66593  eval 'as_fn_append ()
66594  {
66595    eval $1+=\$2
66596  }'
66597else
66598  as_fn_append ()
66599  {
66600    eval $1=\$$1\$2
66601  }
66602fi # as_fn_append
66603
66604# as_fn_arith ARG...
66605# ------------------
66606# Perform arithmetic evaluation on the ARGs, and store the result in the
66607# global $as_val. Take advantage of shells that can avoid forks. The arguments
66608# must be portable across $(()) and expr.
66609if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66610  eval 'as_fn_arith ()
66611  {
66612    as_val=$(( $* ))
66613  }'
66614else
66615  as_fn_arith ()
66616  {
66617    as_val=`expr "$@" || test $? -eq 1`
66618  }
66619fi # as_fn_arith
66620
66621
66622if expr a : '\(a\)' >/dev/null 2>&1 &&
66623   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66624  as_expr=expr
66625else
66626  as_expr=false
66627fi
66628
66629if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66630  as_basename=basename
66631else
66632  as_basename=false
66633fi
66634
66635if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66636  as_dirname=dirname
66637else
66638  as_dirname=false
66639fi
66640
66641as_me=`$as_basename -- "$0" ||
66642$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66643	 X"$0" : 'X\(//\)$' \| \
66644	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66645$as_echo X/"$0" |
66646    sed '/^.*\/\([^/][^/]*\)\/*$/{
66647	    s//\1/
66648	    q
66649	  }
66650	  /^X\/\(\/\/\)$/{
66651	    s//\1/
66652	    q
66653	  }
66654	  /^X\/\(\/\).*/{
66655	    s//\1/
66656	    q
66657	  }
66658	  s/.*/./; q'`
66659
66660# Avoid depending upon Character Ranges.
66661as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66662as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66663as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66664as_cr_digits='0123456789'
66665as_cr_alnum=$as_cr_Letters$as_cr_digits
66666
66667ECHO_C= ECHO_N= ECHO_T=
66668case `echo -n x` in #(((((
66669-n*)
66670  case `echo 'xy\c'` in
66671  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66672  xy)  ECHO_C='\c';;
66673  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66674       ECHO_T='	';;
66675  esac;;
66676*)
66677  ECHO_N='-n';;
66678esac
66679
66680rm -f conf$$ conf$$.exe conf$$.file
66681if test -d conf$$.dir; then
66682  rm -f conf$$.dir/conf$$.file
66683else
66684  rm -f conf$$.dir
66685  mkdir conf$$.dir 2>/dev/null
66686fi
66687if (echo >conf$$.file) 2>/dev/null; then
66688  if ln -s conf$$.file conf$$ 2>/dev/null; then
66689    as_ln_s='ln -s'
66690    # ... but there are two gotchas:
66691    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66692    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66693    # In both cases, we have to default to `cp -pR'.
66694    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66695      as_ln_s='cp -pR'
66696  elif ln conf$$.file conf$$ 2>/dev/null; then
66697    as_ln_s=ln
66698  else
66699    as_ln_s='cp -pR'
66700  fi
66701else
66702  as_ln_s='cp -pR'
66703fi
66704rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66705rmdir conf$$.dir 2>/dev/null
66706
66707
66708# as_fn_mkdir_p
66709# -------------
66710# Create "$as_dir" as a directory, including parents if necessary.
66711as_fn_mkdir_p ()
66712{
66713
66714  case $as_dir in #(
66715  -*) as_dir=./$as_dir;;
66716  esac
66717  test -d "$as_dir" || eval $as_mkdir_p || {
66718    as_dirs=
66719    while :; do
66720      case $as_dir in #(
66721      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66722      *) as_qdir=$as_dir;;
66723      esac
66724      as_dirs="'$as_qdir' $as_dirs"
66725      as_dir=`$as_dirname -- "$as_dir" ||
66726$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66727	 X"$as_dir" : 'X\(//\)[^/]' \| \
66728	 X"$as_dir" : 'X\(//\)$' \| \
66729	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66730$as_echo X"$as_dir" |
66731    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66732	    s//\1/
66733	    q
66734	  }
66735	  /^X\(\/\/\)[^/].*/{
66736	    s//\1/
66737	    q
66738	  }
66739	  /^X\(\/\/\)$/{
66740	    s//\1/
66741	    q
66742	  }
66743	  /^X\(\/\).*/{
66744	    s//\1/
66745	    q
66746	  }
66747	  s/.*/./; q'`
66748      test -d "$as_dir" && break
66749    done
66750    test -z "$as_dirs" || eval "mkdir $as_dirs"
66751  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66752
66753
66754} # as_fn_mkdir_p
66755if mkdir -p . 2>/dev/null; then
66756  as_mkdir_p='mkdir -p "$as_dir"'
66757else
66758  test -d ./-p && rmdir ./-p
66759  as_mkdir_p=false
66760fi
66761
66762
66763# as_fn_executable_p FILE
66764# -----------------------
66765# Test if FILE is an executable regular file.
66766as_fn_executable_p ()
66767{
66768  test -f "$1" && test -x "$1"
66769} # as_fn_executable_p
66770as_test_x='test -x'
66771as_executable_p=as_fn_executable_p
66772
66773# Sed expression to map a string onto a valid CPP name.
66774as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66775
66776# Sed expression to map a string onto a valid variable name.
66777as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66778
66779
66780exec 6>&1
66781## ----------------------------------- ##
66782## Main body of $CONFIG_STATUS script. ##
66783## ----------------------------------- ##
66784_ASEOF
66785test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66786
66787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66788# Save the log message, to keep $0 and so on meaningful, and to
66789# report actual input values of CONFIG_FILES etc. instead of their
66790# values after options handling.
66791ac_log="
66792This file was extended by OpenJDK $as_me jdk9, which was
66793generated by GNU Autoconf 2.69.  Invocation command line was
66794
66795  CONFIG_FILES    = $CONFIG_FILES
66796  CONFIG_HEADERS  = $CONFIG_HEADERS
66797  CONFIG_LINKS    = $CONFIG_LINKS
66798  CONFIG_COMMANDS = $CONFIG_COMMANDS
66799  $ $0 $@
66800
66801on `(hostname || uname -n) 2>/dev/null | sed 1q`
66802"
66803
66804_ACEOF
66805
66806case $ac_config_files in *"
66807"*) set x $ac_config_files; shift; ac_config_files=$*;;
66808esac
66809
66810
66811
66812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66813# Files that config.status was made for.
66814config_files="$ac_config_files"
66815
66816_ACEOF
66817
66818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66819ac_cs_usage="\
66820\`$as_me' instantiates files and other configuration actions
66821from templates according to the current configuration.  Unless the files
66822and actions are specified as TAGs, all are instantiated by default.
66823
66824Usage: $0 [OPTION]... [TAG]...
66825
66826  -h, --help       print this help, then exit
66827  -V, --version    print version number and configuration settings, then exit
66828      --config     print configuration, then exit
66829  -q, --quiet, --silent
66830                   do not print progress messages
66831  -d, --debug      don't remove temporary files
66832      --recheck    update $as_me by reconfiguring in the same conditions
66833      --file=FILE[:TEMPLATE]
66834                   instantiate the configuration file FILE
66835
66836Configuration files:
66837$config_files
66838
66839Report bugs to <build-dev@openjdk.java.net>.
66840OpenJDK home page: <http://openjdk.java.net>."
66841
66842_ACEOF
66843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66844ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66845ac_cs_version="\\
66846OpenJDK config.status jdk9
66847configured by $0, generated by GNU Autoconf 2.69,
66848  with options \\"\$ac_cs_config\\"
66849
66850Copyright (C) 2012 Free Software Foundation, Inc.
66851This config.status script is free software; the Free Software Foundation
66852gives unlimited permission to copy, distribute and modify it."
66853
66854ac_pwd='$ac_pwd'
66855srcdir='$srcdir'
66856AWK='$AWK'
66857test -n "\$AWK" || AWK=awk
66858_ACEOF
66859
66860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66861# The default lists apply if the user does not specify any file.
66862ac_need_defaults=:
66863while test $# != 0
66864do
66865  case $1 in
66866  --*=?*)
66867    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66868    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66869    ac_shift=:
66870    ;;
66871  --*=)
66872    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66873    ac_optarg=
66874    ac_shift=:
66875    ;;
66876  *)
66877    ac_option=$1
66878    ac_optarg=$2
66879    ac_shift=shift
66880    ;;
66881  esac
66882
66883  case $ac_option in
66884  # Handling of the options.
66885  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66886    ac_cs_recheck=: ;;
66887  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66888    $as_echo "$ac_cs_version"; exit ;;
66889  --config | --confi | --conf | --con | --co | --c )
66890    $as_echo "$ac_cs_config"; exit ;;
66891  --debug | --debu | --deb | --de | --d | -d )
66892    debug=: ;;
66893  --file | --fil | --fi | --f )
66894    $ac_shift
66895    case $ac_optarg in
66896    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66897    '') as_fn_error $? "missing file argument" ;;
66898    esac
66899    as_fn_append CONFIG_FILES " '$ac_optarg'"
66900    ac_need_defaults=false;;
66901  --he | --h |  --help | --hel | -h )
66902    $as_echo "$ac_cs_usage"; exit ;;
66903  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66904  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66905    ac_cs_silent=: ;;
66906
66907  # This is an error.
66908  -*) as_fn_error $? "unrecognized option: \`$1'
66909Try \`$0 --help' for more information." ;;
66910
66911  *) as_fn_append ac_config_targets " $1"
66912     ac_need_defaults=false ;;
66913
66914  esac
66915  shift
66916done
66917
66918ac_configure_extra_args=
66919
66920if $ac_cs_silent; then
66921  exec 6>/dev/null
66922  ac_configure_extra_args="$ac_configure_extra_args --silent"
66923fi
66924
66925_ACEOF
66926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66927if \$ac_cs_recheck; then
66928  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66929  shift
66930  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66931  CONFIG_SHELL='$SHELL'
66932  export CONFIG_SHELL
66933  exec "\$@"
66934fi
66935
66936_ACEOF
66937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66938exec 5>>config.log
66939{
66940  echo
66941  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66942## Running $as_me. ##
66943_ASBOX
66944  $as_echo "$ac_log"
66945} >&5
66946
66947_ACEOF
66948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66949_ACEOF
66950
66951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66952
66953# Handling of arguments.
66954for ac_config_target in $ac_config_targets
66955do
66956  case $ac_config_target in
66957    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66958    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66959    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66960    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66961    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66962
66963  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66964  esac
66965done
66966
66967
66968# If the user did not use the arguments to specify the items to instantiate,
66969# then the envvar interface is used.  Set only those that are not.
66970# We use the long form for the default assignment because of an extremely
66971# bizarre bug on SunOS 4.1.3.
66972if $ac_need_defaults; then
66973  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66974fi
66975
66976# Have a temporary directory for convenience.  Make it in the build tree
66977# simply because there is no reason against having it here, and in addition,
66978# creating and moving files from /tmp can sometimes cause problems.
66979# Hook for its removal unless debugging.
66980# Note that there is a small window in which the directory will not be cleaned:
66981# after its creation but before its name has been assigned to `$tmp'.
66982$debug ||
66983{
66984  tmp= ac_tmp=
66985  trap 'exit_status=$?
66986  : "${ac_tmp:=$tmp}"
66987  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66988' 0
66989  trap 'as_fn_exit 1' 1 2 13 15
66990}
66991# Create a (secure) tmp directory for tmp files.
66992
66993{
66994  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66995  test -d "$tmp"
66996}  ||
66997{
66998  tmp=./conf$$-$RANDOM
66999  (umask 077 && mkdir "$tmp")
67000} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67001ac_tmp=$tmp
67002
67003# Set up the scripts for CONFIG_FILES section.
67004# No need to generate them if there are no CONFIG_FILES.
67005# This happens for instance with `./config.status config.h'.
67006if test -n "$CONFIG_FILES"; then
67007
67008
67009ac_cr=`echo X | tr X '\015'`
67010# On cygwin, bash can eat \r inside `` if the user requested igncr.
67011# But we know of no other shell where ac_cr would be empty at this
67012# point, so we can use a bashism as a fallback.
67013if test "x$ac_cr" = x; then
67014  eval ac_cr=\$\'\\r\'
67015fi
67016ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67017if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67018  ac_cs_awk_cr='\\r'
67019else
67020  ac_cs_awk_cr=$ac_cr
67021fi
67022
67023echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67024_ACEOF
67025
67026
67027{
67028  echo "cat >conf$$subs.awk <<_ACEOF" &&
67029  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67030  echo "_ACEOF"
67031} >conf$$subs.sh ||
67032  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67033ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67034ac_delim='%!_!# '
67035for ac_last_try in false false false false false :; do
67036  . ./conf$$subs.sh ||
67037    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67038
67039  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67040  if test $ac_delim_n = $ac_delim_num; then
67041    break
67042  elif $ac_last_try; then
67043    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67044  else
67045    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67046  fi
67047done
67048rm -f conf$$subs.sh
67049
67050cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67051cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67052_ACEOF
67053sed -n '
67054h
67055s/^/S["/; s/!.*/"]=/
67056p
67057g
67058s/^[^!]*!//
67059:repl
67060t repl
67061s/'"$ac_delim"'$//
67062t delim
67063:nl
67064h
67065s/\(.\{148\}\)..*/\1/
67066t more1
67067s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67068p
67069n
67070b repl
67071:more1
67072s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67073p
67074g
67075s/.\{148\}//
67076t nl
67077:delim
67078h
67079s/\(.\{148\}\)..*/\1/
67080t more2
67081s/["\\]/\\&/g; s/^/"/; s/$/"/
67082p
67083b
67084:more2
67085s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67086p
67087g
67088s/.\{148\}//
67089t delim
67090' <conf$$subs.awk | sed '
67091/^[^""]/{
67092  N
67093  s/\n//
67094}
67095' >>$CONFIG_STATUS || ac_write_fail=1
67096rm -f conf$$subs.awk
67097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67098_ACAWK
67099cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67100  for (key in S) S_is_set[key] = 1
67101  FS = ""
67102
67103}
67104{
67105  line = $ 0
67106  nfields = split(line, field, "@")
67107  substed = 0
67108  len = length(field[1])
67109  for (i = 2; i < nfields; i++) {
67110    key = field[i]
67111    keylen = length(key)
67112    if (S_is_set[key]) {
67113      value = S[key]
67114      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67115      len += length(value) + length(field[++i])
67116      substed = 1
67117    } else
67118      len += 1 + keylen
67119  }
67120
67121  print line
67122}
67123
67124_ACAWK
67125_ACEOF
67126cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67127if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67128  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67129else
67130  cat
67131fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67132  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67133_ACEOF
67134
67135# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67136# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67137# trailing colons and then remove the whole line if VPATH becomes empty
67138# (actually we leave an empty line to preserve line numbers).
67139if test "x$srcdir" = x.; then
67140  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67141h
67142s///
67143s/^/:/
67144s/[	 ]*$/:/
67145s/:\$(srcdir):/:/g
67146s/:\${srcdir}:/:/g
67147s/:@srcdir@:/:/g
67148s/^:*//
67149s/:*$//
67150x
67151s/\(=[	 ]*\).*/\1/
67152G
67153s/\n//
67154s/^[^=]*=[	 ]*$//
67155}'
67156fi
67157
67158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67159fi # test -n "$CONFIG_FILES"
67160
67161
67162eval set X "  :F $CONFIG_FILES      "
67163shift
67164for ac_tag
67165do
67166  case $ac_tag in
67167  :[FHLC]) ac_mode=$ac_tag; continue;;
67168  esac
67169  case $ac_mode$ac_tag in
67170  :[FHL]*:*);;
67171  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67172  :[FH]-) ac_tag=-:-;;
67173  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67174  esac
67175  ac_save_IFS=$IFS
67176  IFS=:
67177  set x $ac_tag
67178  IFS=$ac_save_IFS
67179  shift
67180  ac_file=$1
67181  shift
67182
67183  case $ac_mode in
67184  :L) ac_source=$1;;
67185  :[FH])
67186    ac_file_inputs=
67187    for ac_f
67188    do
67189      case $ac_f in
67190      -) ac_f="$ac_tmp/stdin";;
67191      *) # Look for the file first in the build tree, then in the source tree
67192	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67193	 # because $ac_f cannot contain `:'.
67194	 test -f "$ac_f" ||
67195	   case $ac_f in
67196	   [\\/$]*) false;;
67197	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67198	   esac ||
67199	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67200      esac
67201      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67202      as_fn_append ac_file_inputs " '$ac_f'"
67203    done
67204
67205    # Let's still pretend it is `configure' which instantiates (i.e., don't
67206    # use $as_me), people would be surprised to read:
67207    #    /* config.h.  Generated by config.status.  */
67208    configure_input='Generated from '`
67209	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67210	`' by configure.'
67211    if test x"$ac_file" != x-; then
67212      configure_input="$ac_file.  $configure_input"
67213      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67214$as_echo "$as_me: creating $ac_file" >&6;}
67215    fi
67216    # Neutralize special characters interpreted by sed in replacement strings.
67217    case $configure_input in #(
67218    *\&* | *\|* | *\\* )
67219       ac_sed_conf_input=`$as_echo "$configure_input" |
67220       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67221    *) ac_sed_conf_input=$configure_input;;
67222    esac
67223
67224    case $ac_tag in
67225    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67226      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67227    esac
67228    ;;
67229  esac
67230
67231  ac_dir=`$as_dirname -- "$ac_file" ||
67232$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67233	 X"$ac_file" : 'X\(//\)[^/]' \| \
67234	 X"$ac_file" : 'X\(//\)$' \| \
67235	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67236$as_echo X"$ac_file" |
67237    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67238	    s//\1/
67239	    q
67240	  }
67241	  /^X\(\/\/\)[^/].*/{
67242	    s//\1/
67243	    q
67244	  }
67245	  /^X\(\/\/\)$/{
67246	    s//\1/
67247	    q
67248	  }
67249	  /^X\(\/\).*/{
67250	    s//\1/
67251	    q
67252	  }
67253	  s/.*/./; q'`
67254  as_dir="$ac_dir"; as_fn_mkdir_p
67255  ac_builddir=.
67256
67257case "$ac_dir" in
67258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67259*)
67260  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67261  # A ".." for each directory in $ac_dir_suffix.
67262  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67263  case $ac_top_builddir_sub in
67264  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67265  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67266  esac ;;
67267esac
67268ac_abs_top_builddir=$ac_pwd
67269ac_abs_builddir=$ac_pwd$ac_dir_suffix
67270# for backward compatibility:
67271ac_top_builddir=$ac_top_build_prefix
67272
67273case $srcdir in
67274  .)  # We are building in place.
67275    ac_srcdir=.
67276    ac_top_srcdir=$ac_top_builddir_sub
67277    ac_abs_top_srcdir=$ac_pwd ;;
67278  [\\/]* | ?:[\\/]* )  # Absolute name.
67279    ac_srcdir=$srcdir$ac_dir_suffix;
67280    ac_top_srcdir=$srcdir
67281    ac_abs_top_srcdir=$srcdir ;;
67282  *) # Relative name.
67283    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67284    ac_top_srcdir=$ac_top_build_prefix$srcdir
67285    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67286esac
67287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67288
67289
67290  case $ac_mode in
67291  :F)
67292  #
67293  # CONFIG_FILE
67294  #
67295
67296_ACEOF
67297
67298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67299# If the template does not know about datarootdir, expand it.
67300# FIXME: This hack should be removed a few years after 2.60.
67301ac_datarootdir_hack=; ac_datarootdir_seen=
67302ac_sed_dataroot='
67303/datarootdir/ {
67304  p
67305  q
67306}
67307/@datadir@/p
67308/@docdir@/p
67309/@infodir@/p
67310/@localedir@/p
67311/@mandir@/p'
67312case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67313*datarootdir*) ac_datarootdir_seen=yes;;
67314*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67315  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67316$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67317_ACEOF
67318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67319  ac_datarootdir_hack='
67320  s&@datadir@&$datadir&g
67321  s&@docdir@&$docdir&g
67322  s&@infodir@&$infodir&g
67323  s&@localedir@&$localedir&g
67324  s&@mandir@&$mandir&g
67325  s&\\\${datarootdir}&$datarootdir&g' ;;
67326esac
67327_ACEOF
67328
67329# Neutralize VPATH when `$srcdir' = `.'.
67330# Shell code in configure.ac might set extrasub.
67331# FIXME: do we really want to maintain this feature?
67332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67333ac_sed_extra="$ac_vpsub
67334$extrasub
67335_ACEOF
67336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67337:t
67338/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67339s|@configure_input@|$ac_sed_conf_input|;t t
67340s&@top_builddir@&$ac_top_builddir_sub&;t t
67341s&@top_build_prefix@&$ac_top_build_prefix&;t t
67342s&@srcdir@&$ac_srcdir&;t t
67343s&@abs_srcdir@&$ac_abs_srcdir&;t t
67344s&@top_srcdir@&$ac_top_srcdir&;t t
67345s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67346s&@builddir@&$ac_builddir&;t t
67347s&@abs_builddir@&$ac_abs_builddir&;t t
67348s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67349$ac_datarootdir_hack
67350"
67351eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67352  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67353
67354test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67355  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67356  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67357      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67358  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67359which seems to be undefined.  Please make sure it is defined" >&5
67360$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67361which seems to be undefined.  Please make sure it is defined" >&2;}
67362
67363  rm -f "$ac_tmp/stdin"
67364  case $ac_file in
67365  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67366  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67367  esac \
67368  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67369 ;;
67370
67371
67372
67373  esac
67374
67375done # for ac_tag
67376
67377
67378as_fn_exit 0
67379_ACEOF
67380ac_clean_files=$ac_clean_files_save
67381
67382test $ac_write_fail = 0 ||
67383  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67384
67385
67386# configure is writing to config.log, and then calls config.status.
67387# config.status does its own redirection, appending to config.log.
67388# Unfortunately, on DOS this fails, as config.log is still kept open
67389# by configure, so config.status won't be able to write to it; its
67390# output is simply discarded.  So we exec the FD to /dev/null,
67391# effectively closing config.log, so it can be properly (re)opened and
67392# appended to by config.status.  When coming back to configure, we
67393# need to make the FD available again.
67394if test "$no_create" != yes; then
67395  ac_cs_success=:
67396  ac_config_status_args=
67397  test "$silent" = yes &&
67398    ac_config_status_args="$ac_config_status_args --quiet"
67399  exec 5>/dev/null
67400  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67401  exec 5>>config.log
67402  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67403  # would make configure fail if this is the last instruction.
67404  $ac_cs_success || as_fn_exit 1
67405fi
67406if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67407  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67408$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67409fi
67410
67411
67412# After AC_OUTPUT, we need to do final work
67413
67414
67415  # Try to move config.log (generated by autoconf) to the configure-support directory.
67416  if test -e ./config.log; then
67417    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67418  fi
67419
67420  # Rotate our log file (configure.log)
67421  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67422    $RM -f "$OUTPUT_ROOT/configure.log.old"
67423  fi
67424  if test -e "$OUTPUT_ROOT/configure.log"; then
67425    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67426  fi
67427
67428  # Move configure.log from current directory to the build output root
67429  if test -e ./configure.log; then
67430    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67431  fi
67432
67433  # Make the compare script executable
67434  $CHMOD +x $OUTPUT_ROOT/compare.sh
67435
67436
67437# Finally output some useful information to the user
67438
67439  # Finally output some useful information to the user
67440
67441  printf "\n"
67442  printf "====================================================\n"
67443  if test "x$no_create" != "xyes"; then
67444    if test "x$IS_RECONFIGURE" != "xyes"; then
67445      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67446    else
67447      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67448    fi
67449  else
67450    if test "x$IS_RECONFIGURE" != "xyes"; then
67451      printf "A configuration has been successfully checked but not created\n"
67452    else
67453      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67454    fi
67455  fi
67456  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67457    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67458  else
67459    printf "using default settings.\n"
67460  fi
67461
67462  printf "\n"
67463  printf "Configuration summary:\n"
67464  printf "* Debug level:    $DEBUG_LEVEL\n"
67465  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67466  printf "* JDK variant:    $JDK_VARIANT\n"
67467  printf "* JVM variants:   $JVM_VARIANTS\n"
67468  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67469  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67470
67471  printf "\n"
67472  printf "Tools summary:\n"
67473  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67474    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67475  fi
67476  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67477  if test "x$TOOLCHAIN_VERSION" != "x"; then
67478    print_version=" $TOOLCHAIN_VERSION"
67479  fi
67480  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67481  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67482  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67483
67484  printf "\n"
67485  printf "Build performance summary:\n"
67486  printf "* Cores to use:   $JOBS\n"
67487  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67488  if test "x$CCACHE_STATUS" != "x"; then
67489    printf "* ccache status:  $CCACHE_STATUS\n"
67490  fi
67491  printf "\n"
67492
67493  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67494    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67495    printf "will result in longer build times.\n"
67496    printf "\n"
67497  fi
67498
67499  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67500    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67501    printf "These are not respected, and will be ignored. It is recommended\n"
67502    printf "that you clean your environment. The following variables are set:\n"
67503    printf "$FOUND_ALT_VARIABLES\n"
67504    printf "\n"
67505  fi
67506
67507  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67508    printf "WARNING: Your build output directory is not on a local disk.\n"
67509    printf "This will severely degrade build performance!\n"
67510    printf "It is recommended that you create an output directory on a local disk,\n"
67511    printf "and run the configure script again from that directory.\n"
67512    printf "\n"
67513  fi
67514
67515  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67516    printf "WARNING: The result of this configuration has overridden an older\n"
67517    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67518    printf "proper build. Failure to do so might result in strange build problems.\n"
67519    printf "\n"
67520  fi
67521
67522  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67523    printf "WARNING: The result of this configuration was not saved.\n"
67524    printf "You should run without '--no-create | -n' to create the configuration.\n"
67525    printf "\n"
67526  fi
67527
67528
67529
67530  # Locate config.log.
67531  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67532    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67533  elif test -e "./config.log"; then
67534    CONFIG_LOG_PATH="."
67535  fi
67536
67537  if test -e "$CONFIG_LOG_PATH/config.log"; then
67538    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67539    if test $? -eq 0; then
67540      printf "The following warnings were produced. Repeated here for convenience:\n"
67541      # We must quote sed expression (using []) to stop m4 from eating the [].
67542      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67543      printf "\n"
67544    fi
67545  fi
67546
67547