generated-configure.sh revision 1789:11b31df300ae
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
635ENABLE_JAVAC_SERVER
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_JAVAC
642JAVA_FLAGS_BIG
643JAVA_FLAGS
644JOBS
645MEMORY_SIZE
646NUM_CORES
647ENABLE_INTREE_EC
648SALIB_NAME
649HOTSPOT_MAKE_ARGS
650LIBZIP_CAN_USE_MMAP
651LIBDL
652LIBM
653USE_EXTERNAL_LCMS
654LCMS_LIBS
655LCMS_CFLAGS
656USE_EXTERNAL_LIBZ
657USE_EXTERNAL_LIBPNG
658PNG_LIBS
659PNG_CFLAGS
660USE_EXTERNAL_LIBGIF
661USE_EXTERNAL_LIBJPEG
662LLVM_LIBS
663LLVM_LDFLAGS
664LLVM_CFLAGS
665LLVM_CONFIG
666LIBFFI_LIBS
667LIBFFI_CFLAGS
668ALSA_LIBS
669ALSA_CFLAGS
670FREETYPE_BUNDLE_LIB_PATH
671FREETYPE_LIBS
672FREETYPE_CFLAGS
673CUPS_CFLAGS
674X_EXTRA_LIBS
675X_LIBS
676X_PRE_LIBS
677X_CFLAGS
678XMKMF
679MSVCP_DLL
680MSVCR_DLL
681LIBCXX
682STATIC_CXX_SETTING
683FIXPATH_DETACH_FLAG
684FIXPATH
685GCOV_ENABLED
686ZIP_DEBUGINFO_FILES
687ENABLE_DEBUG_SYMBOLS
688CFLAGS_WARNINGS_ARE_ERRORS
689DISABLE_WARNING_PREFIX
690HOTSPOT_SET_WARNINGS_AS_ERRORS
691WARNINGS_AS_ERRORS
692COMPILER_SUPPORTS_TARGET_BITS_FLAG
693ZERO_ARCHFLAG
694LDFLAGS_TESTEXE
695LDFLAGS_TESTLIB
696LDFLAGS_CXX_JDK
697JDKEXE_LIBS
698JDKLIB_LIBS
699LDFLAGS_JDKEXE
700LDFLAGS_JDKLIB
701CXXFLAGS_TESTEXE
702CXXFLAGS_TESTLIB
703CFLAGS_TESTEXE
704CFLAGS_TESTLIB
705CXXFLAGS_JDKEXE
706CXXFLAGS_JDKLIB
707CFLAGS_JDKEXE
708CFLAGS_JDKLIB
709MACOSX_VERSION_MIN
710CXX_O_FLAG_NONE
711CXX_O_FLAG_DEBUG
712CXX_O_FLAG_NORM
713CXX_O_FLAG_HI
714CXX_O_FLAG_HIGHEST
715C_O_FLAG_NONE
716C_O_FLAG_DEBUG
717C_O_FLAG_NORM
718C_O_FLAG_HI
719C_O_FLAG_HIGHEST
720CXXFLAGS_DEBUG_SYMBOLS
721CFLAGS_DEBUG_SYMBOLS
722CXX_FLAG_DEPS
723C_FLAG_DEPS
724SET_SHARED_LIBRARY_MAPFILE
725SET_SHARED_LIBRARY_NAME
726SET_SHARED_LIBRARY_ORIGIN
727SET_EXECUTABLE_ORIGIN
728CXX_FLAG_REORDER
729C_FLAG_REORDER
730RC_FLAGS
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735STRIPFLAGS
736ARFLAGS
737COMPILER_TARGET_BITS_FLAG
738JT_HOME
739JTREGEXE
740USING_BROKEN_SUSE_LD
741PACKAGE_PATH
742USE_CLANG
743HOTSPOT_LD
744HOTSPOT_CXX
745HOTSPOT_RC
746HOTSPOT_MT
747BUILD_LD
748BUILD_CXX
749BUILD_CC
750BUILD_SYSROOT_LDFLAGS
751BUILD_SYSROOT_CFLAGS
752ac_ct_OBJDUMP
753OBJDUMP
754ac_ct_OBJCOPY
755OBJCOPY
756ac_ct_NM
757ac_ct_STRIP
758GNM
759NM
760STRIP
761MSBUILD
762DUMPBIN
763RC
764MT
765LIPO
766ac_ct_AR
767AR
768AS
769LDCXX
770LD
771CXXCPP
772CPP
773ac_ct_CXX
774CXXFLAGS
775CXX
776ac_ct_PROPER_COMPILER_CXX
777PROPER_COMPILER_CXX
778TOOLCHAIN_PATH_CXX
779POTENTIAL_CXX
780OBJEXT
781EXEEXT
782ac_ct_CC
783CPPFLAGS
784LDFLAGS
785CFLAGS
786CC
787ac_ct_PROPER_COMPILER_CC
788PROPER_COMPILER_CC
789TOOLCHAIN_PATH_CC
790POTENTIAL_CC
791VS_LIB
792VS_INCLUDE
793VS_PATH
794CYGWIN_LINK
795SYSROOT_LDFLAGS
796SYSROOT_CFLAGS
797LEGACY_EXTRA_LDFLAGS
798LEGACY_EXTRA_CXXFLAGS
799LEGACY_EXTRA_CFLAGS
800EXE_SUFFIX
801OBJ_SUFFIX
802STATIC_LIBRARY
803SHARED_LIBRARY
804STATIC_LIBRARY_SUFFIX
805SHARED_LIBRARY_SUFFIX
806LIBRARY_PREFIX
807TOOLCHAIN_TYPE
808STATIC_BUILD
809BUILD_HOTSPOT
810HOTSPOT_DIST
811BUILD_OUTPUT
812JDK_TOPDIR
813NASHORN_TOPDIR
814HOTSPOT_TOPDIR
815JAXWS_TOPDIR
816JAXP_TOPDIR
817CORBA_TOPDIR
818LANGTOOLS_TOPDIR
819BOOT_JDK_BITS
820JAVAC_FLAGS
821BOOT_JDK_SOURCETARGET
822JARSIGNER
823JAR
824JAVAH
825JAVAC
826JAVA
827BOOT_JDK
828JAVA_CHECK
829JAVAC_CHECK
830COOKED_BUILD_NUMBER
831JDK_VERSION
832COPYRIGHT_YEAR
833MACOSX_BUNDLE_ID_BASE
834MACOSX_BUNDLE_NAME_BASE
835COMPANY_NAME
836JDK_RC_PLATFORM_NAME
837PRODUCT_SUFFIX
838PRODUCT_NAME
839LAUNCHER_NAME
840MILESTONE
841JDK_BUILD_NUMBER
842JDK_UPDATE_VERSION
843JDK_MICRO_VERSION
844JDK_MINOR_VERSION
845JDK_MAJOR_VERSION
846USER_RELEASE_SUFFIX
847COMPRESS_JARS
848UNLIMITED_CRYPTO
849CACERTS_FILE
850TEST_IN_BUILD
851BUILD_HEADLESS
852SUPPORT_HEADFUL
853SUPPORT_HEADLESS
854OS_VERSION_MICRO
855OS_VERSION_MINOR
856OS_VERSION_MAJOR
857PKG_CONFIG
858BASH_ARGS
859SETFILE
860CODESIGN
861XATTR
862DSYMUTIL
863IS_GNU_TIME
864PATCH
865TIME
866STAT
867HG
868READELF
869OTOOL
870LDD
871ZIP
872UNZIP
873FIND_DELETE
874OUTPUT_SYNC
875OUTPUT_SYNC_SUPPORTED
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880MAKE
881PKGHANDLER
882CONFIGURESUPPORT_OUTPUTDIR
883OUTPUT_ROOT
884CONF_NAME
885SPEC
886SDKROOT
887XCODEBUILD
888BUILD_VARIANT_RELEASE
889DEBUG_CLASSFILES
890FASTDEBUG
891VARIANT
892DEBUG_LEVEL
893MACOSX_UNIVERSAL
894INCLUDE_SA
895JVM_VARIANT_CORE
896JVM_VARIANT_ZEROSHARK
897JVM_VARIANT_ZERO
898JVM_VARIANT_KERNEL
899JVM_VARIANT_MINIMAL1
900JVM_VARIANT_CLIENT
901JVM_VARIANT_SERVER
902JVM_VARIANTS
903JVM_INTERPRETER
904JDK_VARIANT
905SET_OPENJDK
906CANONICAL_TOPDIR
907ORIGINAL_TOPDIR
908TOPDIR
909PATH_SEP
910ZERO_ARCHDEF
911DEFINE_CROSS_COMPILE_ARCH
912LP64
913OPENJDK_TARGET_OS_EXPORT_DIR
914OPENJDK_TARGET_CPU_JLI_CFLAGS
915OPENJDK_TARGET_CPU_OSARCH
916OPENJDK_TARGET_CPU_ISADIR
917OPENJDK_TARGET_CPU_LIBDIR
918OPENJDK_TARGET_CPU_LEGACY_LIB
919OPENJDK_TARGET_CPU_LEGACY
920REQUIRED_OS_VERSION
921REQUIRED_OS_NAME
922COMPILE_TYPE
923OPENJDK_TARGET_CPU_ENDIAN
924OPENJDK_TARGET_CPU_BITS
925OPENJDK_TARGET_CPU_ARCH
926OPENJDK_TARGET_CPU
927OPENJDK_TARGET_OS_ENV
928OPENJDK_TARGET_OS_TYPE
929OPENJDK_TARGET_OS
930OPENJDK_BUILD_CPU_ENDIAN
931OPENJDK_BUILD_CPU_BITS
932OPENJDK_BUILD_CPU_ARCH
933OPENJDK_BUILD_CPU
934OPENJDK_BUILD_OS_ENV
935OPENJDK_BUILD_OS_TYPE
936OPENJDK_BUILD_OS
937OPENJDK_BUILD_AUTOCONF_NAME
938OPENJDK_TARGET_AUTOCONF_NAME
939target_os
940target_vendor
941target_cpu
942target
943host_os
944host_vendor
945host_cpu
946host
947build_os
948build_vendor
949build_cpu
950build
951NICE
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RMDIR
974RM
975PRINTF
976NAWK
977MV
978MKTEMP
979MKDIR
980LS
981LN
982HEAD
983FIND
984FILE
985EXPR
986ECHO
987DIRNAME
988DIFF
989DATE
990CUT
991CP
992COMM
993CMP
994CHMOD
995CAT
996BASH
997BASENAME
998DATE_WHEN_CONFIGURED
999ORIGINAL_PATH
1000CONFIGURE_COMMAND_LINE
1001target_alias
1002host_alias
1003build_alias
1004LIBS
1005ECHO_T
1006ECHO_N
1007ECHO_C
1008DEFS
1009mandir
1010localedir
1011libdir
1012psdir
1013pdfdir
1014dvidir
1015htmldir
1016infodir
1017docdir
1018oldincludedir
1019includedir
1020localstatedir
1021sharedstatedir
1022sysconfdir
1023datadir
1024datarootdir
1025libexecdir
1026sbindir
1027bindir
1028program_transform_name
1029prefix
1030exec_prefix
1031PACKAGE_URL
1032PACKAGE_BUGREPORT
1033PACKAGE_STRING
1034PACKAGE_VERSION
1035PACKAGE_TARNAME
1036PACKAGE_NAME
1037PATH_SEPARATOR
1038SHELL'
1039ac_subst_files=''
1040ac_user_opts='
1041enable_option_checking
1042with_target_bits
1043enable_openjdk_only
1044with_custom_make_dir
1045with_jdk_variant
1046with_jvm_interpreter
1047with_jvm_variants
1048enable_debug
1049with_debug_level
1050with_devkit
1051with_sys_root
1052with_sysroot
1053with_tools_dir
1054with_toolchain_path
1055with_extra_path
1056with_sdk_name
1057with_conf_name
1058with_output_sync
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080enable_static_build
1081with_toolchain_type
1082with_extra_cflags
1083with_extra_cxxflags
1084with_extra_ldflags
1085with_toolchain_version
1086with_build_devkit
1087with_jtreg
1088enable_warnings_as_errors
1089enable_debug_symbols
1090enable_zip_debug_info
1091enable_native_coverage
1092with_stdc__lib
1093with_msvcr_dll
1094with_msvcp_dll
1095with_x
1096with_cups
1097with_cups_include
1098with_freetype
1099with_freetype_include
1100with_freetype_lib
1101with_freetype_src
1102enable_freetype_bundling
1103with_alsa
1104with_alsa_include
1105with_alsa_lib
1106with_libffi
1107with_libffi_include
1108with_libffi_lib
1109with_libjpeg
1110with_giflib
1111with_libpng
1112with_zlib
1113with_lcms
1114with_dxsdk
1115with_dxsdk_lib
1116with_dxsdk_include
1117with_num_cores
1118with_memory_size
1119with_jobs
1120with_boot_jdk_jvmargs
1121with_sjavac_server_java
1122enable_sjavac
1123enable_javac_server
1124enable_precompiled_headers
1125enable_ccache
1126with_ccache_dir
1127'
1128      ac_precious_vars='build_alias
1129host_alias
1130target_alias
1131BASENAME
1132BASH
1133CAT
1134CHMOD
1135CMP
1136COMM
1137CP
1138CUT
1139DATE
1140DIFF
1141DIRNAME
1142ECHO
1143EXPR
1144FILE
1145FIND
1146HEAD
1147LN
1148LS
1149MKDIR
1150MKTEMP
1151MV
1152NAWK
1153PRINTF
1154RM
1155RMDIR
1156SH
1157SORT
1158TAIL
1159TAR
1160TEE
1161TOUCH
1162TR
1163UNAME
1164UNIQ
1165WC
1166WHICH
1167XARGS
1168AWK
1169GREP
1170EGREP
1171FGREP
1172SED
1173CYGPATH
1174READLINK
1175DF
1176CPIO
1177NICE
1178MAKE
1179UNZIP
1180ZIP
1181LDD
1182OTOOL
1183READELF
1184HG
1185STAT
1186TIME
1187PATCH
1188DSYMUTIL
1189XATTR
1190CODESIGN
1191SETFILE
1192PKG_CONFIG
1193JAVA
1194JAVAC
1195JAVAH
1196JAR
1197JARSIGNER
1198CC
1199CFLAGS
1200LDFLAGS
1201LIBS
1202CPPFLAGS
1203CXX
1204CXXFLAGS
1205CCC
1206CPP
1207CXXCPP
1208AS
1209AR
1210LIPO
1211STRIP
1212NM
1213GNM
1214OBJCOPY
1215OBJDUMP
1216BUILD_CC
1217BUILD_CXX
1218JTREGEXE
1219XMKMF
1220FREETYPE_CFLAGS
1221FREETYPE_LIBS
1222ALSA_CFLAGS
1223ALSA_LIBS
1224LIBFFI_CFLAGS
1225LIBFFI_LIBS
1226PNG_CFLAGS
1227PNG_LIBS
1228LCMS_CFLAGS
1229LCMS_LIBS
1230CCACHE'
1231
1232
1233# Initialize some variables set by options.
1234ac_init_help=
1235ac_init_version=false
1236ac_unrecognized_opts=
1237ac_unrecognized_sep=
1238# The variables have the same names as the options, with
1239# dashes changed to underlines.
1240cache_file=/dev/null
1241exec_prefix=NONE
1242no_create=
1243no_recursion=
1244prefix=NONE
1245program_prefix=NONE
1246program_suffix=NONE
1247program_transform_name=s,x,x,
1248silent=
1249site=
1250srcdir=
1251verbose=
1252x_includes=NONE
1253x_libraries=NONE
1254
1255# Installation directory options.
1256# These are left unexpanded so users can "make install exec_prefix=/foo"
1257# and all the variables that are supposed to be based on exec_prefix
1258# by default will actually change.
1259# Use braces instead of parens because sh, perl, etc. also accept them.
1260# (The list follows the same order as the GNU Coding Standards.)
1261bindir='${exec_prefix}/bin'
1262sbindir='${exec_prefix}/sbin'
1263libexecdir='${exec_prefix}/libexec'
1264datarootdir='${prefix}/share'
1265datadir='${datarootdir}'
1266sysconfdir='${prefix}/etc'
1267sharedstatedir='${prefix}/com'
1268localstatedir='${prefix}/var'
1269includedir='${prefix}/include'
1270oldincludedir='/usr/include'
1271docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1272infodir='${datarootdir}/info'
1273htmldir='${docdir}'
1274dvidir='${docdir}'
1275pdfdir='${docdir}'
1276psdir='${docdir}'
1277libdir='${exec_prefix}/lib'
1278localedir='${datarootdir}/locale'
1279mandir='${datarootdir}/man'
1280
1281ac_prev=
1282ac_dashdash=
1283for ac_option
1284do
1285  # If the previous option needs an argument, assign it.
1286  if test -n "$ac_prev"; then
1287    eval $ac_prev=\$ac_option
1288    ac_prev=
1289    continue
1290  fi
1291
1292  case $ac_option in
1293  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1294  *=)   ac_optarg= ;;
1295  *)    ac_optarg=yes ;;
1296  esac
1297
1298  # Accept the important Cygnus configure options, so we can diagnose typos.
1299
1300  case $ac_dashdash$ac_option in
1301  --)
1302    ac_dashdash=yes ;;
1303
1304  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1305    ac_prev=bindir ;;
1306  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1307    bindir=$ac_optarg ;;
1308
1309  -build | --build | --buil | --bui | --bu)
1310    ac_prev=build_alias ;;
1311  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1312    build_alias=$ac_optarg ;;
1313
1314  -cache-file | --cache-file | --cache-fil | --cache-fi \
1315  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1316    ac_prev=cache_file ;;
1317  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1318  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1319    cache_file=$ac_optarg ;;
1320
1321  --config-cache | -C)
1322    cache_file=config.cache ;;
1323
1324  -datadir | --datadir | --datadi | --datad)
1325    ac_prev=datadir ;;
1326  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1327    datadir=$ac_optarg ;;
1328
1329  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1330  | --dataroo | --dataro | --datar)
1331    ac_prev=datarootdir ;;
1332  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1333  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1334    datarootdir=$ac_optarg ;;
1335
1336  -disable-* | --disable-*)
1337    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1338    # Reject names that are not valid shell variable names.
1339    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1340      as_fn_error $? "invalid feature name: $ac_useropt"
1341    ac_useropt_orig=$ac_useropt
1342    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1343    case $ac_user_opts in
1344      *"
1345"enable_$ac_useropt"
1346"*) ;;
1347      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1348	 ac_unrecognized_sep=', ';;
1349    esac
1350    eval enable_$ac_useropt=no ;;
1351
1352  -docdir | --docdir | --docdi | --doc | --do)
1353    ac_prev=docdir ;;
1354  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1355    docdir=$ac_optarg ;;
1356
1357  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1358    ac_prev=dvidir ;;
1359  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1360    dvidir=$ac_optarg ;;
1361
1362  -enable-* | --enable-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid feature name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"enable_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval enable_$ac_useropt=\$ac_optarg ;;
1377
1378  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1379  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1380  | --exec | --exe | --ex)
1381    ac_prev=exec_prefix ;;
1382  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1383  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1384  | --exec=* | --exe=* | --ex=*)
1385    exec_prefix=$ac_optarg ;;
1386
1387  -gas | --gas | --ga | --g)
1388    # Obsolete; use --with-gas.
1389    with_gas=yes ;;
1390
1391  -help | --help | --hel | --he | -h)
1392    ac_init_help=long ;;
1393  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1394    ac_init_help=recursive ;;
1395  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1396    ac_init_help=short ;;
1397
1398  -host | --host | --hos | --ho)
1399    ac_prev=host_alias ;;
1400  -host=* | --host=* | --hos=* | --ho=*)
1401    host_alias=$ac_optarg ;;
1402
1403  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1404    ac_prev=htmldir ;;
1405  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1406  | --ht=*)
1407    htmldir=$ac_optarg ;;
1408
1409  -includedir | --includedir | --includedi | --included | --include \
1410  | --includ | --inclu | --incl | --inc)
1411    ac_prev=includedir ;;
1412  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1413  | --includ=* | --inclu=* | --incl=* | --inc=*)
1414    includedir=$ac_optarg ;;
1415
1416  -infodir | --infodir | --infodi | --infod | --info | --inf)
1417    ac_prev=infodir ;;
1418  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1419    infodir=$ac_optarg ;;
1420
1421  -libdir | --libdir | --libdi | --libd)
1422    ac_prev=libdir ;;
1423  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1424    libdir=$ac_optarg ;;
1425
1426  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1427  | --libexe | --libex | --libe)
1428    ac_prev=libexecdir ;;
1429  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1430  | --libexe=* | --libex=* | --libe=*)
1431    libexecdir=$ac_optarg ;;
1432
1433  -localedir | --localedir | --localedi | --localed | --locale)
1434    ac_prev=localedir ;;
1435  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1436    localedir=$ac_optarg ;;
1437
1438  -localstatedir | --localstatedir | --localstatedi | --localstated \
1439  | --localstate | --localstat | --localsta | --localst | --locals)
1440    ac_prev=localstatedir ;;
1441  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1442  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1443    localstatedir=$ac_optarg ;;
1444
1445  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1446    ac_prev=mandir ;;
1447  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1448    mandir=$ac_optarg ;;
1449
1450  -nfp | --nfp | --nf)
1451    # Obsolete; use --without-fp.
1452    with_fp=no ;;
1453
1454  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1455  | --no-cr | --no-c | -n)
1456    no_create=yes ;;
1457
1458  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1459  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1460    no_recursion=yes ;;
1461
1462  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1463  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1464  | --oldin | --oldi | --old | --ol | --o)
1465    ac_prev=oldincludedir ;;
1466  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1467  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1468  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1469    oldincludedir=$ac_optarg ;;
1470
1471  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1472    ac_prev=prefix ;;
1473  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1474    prefix=$ac_optarg ;;
1475
1476  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1477  | --program-pre | --program-pr | --program-p)
1478    ac_prev=program_prefix ;;
1479  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1480  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1481    program_prefix=$ac_optarg ;;
1482
1483  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1484  | --program-suf | --program-su | --program-s)
1485    ac_prev=program_suffix ;;
1486  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1487  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1488    program_suffix=$ac_optarg ;;
1489
1490  -program-transform-name | --program-transform-name \
1491  | --program-transform-nam | --program-transform-na \
1492  | --program-transform-n | --program-transform- \
1493  | --program-transform | --program-transfor \
1494  | --program-transfo | --program-transf \
1495  | --program-trans | --program-tran \
1496  | --progr-tra | --program-tr | --program-t)
1497    ac_prev=program_transform_name ;;
1498  -program-transform-name=* | --program-transform-name=* \
1499  | --program-transform-nam=* | --program-transform-na=* \
1500  | --program-transform-n=* | --program-transform-=* \
1501  | --program-transform=* | --program-transfor=* \
1502  | --program-transfo=* | --program-transf=* \
1503  | --program-trans=* | --program-tran=* \
1504  | --progr-tra=* | --program-tr=* | --program-t=*)
1505    program_transform_name=$ac_optarg ;;
1506
1507  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1508    ac_prev=pdfdir ;;
1509  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1510    pdfdir=$ac_optarg ;;
1511
1512  -psdir | --psdir | --psdi | --psd | --ps)
1513    ac_prev=psdir ;;
1514  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1515    psdir=$ac_optarg ;;
1516
1517  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1518  | -silent | --silent | --silen | --sile | --sil)
1519    silent=yes ;;
1520
1521  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1522    ac_prev=sbindir ;;
1523  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1524  | --sbi=* | --sb=*)
1525    sbindir=$ac_optarg ;;
1526
1527  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1528  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1529  | --sharedst | --shareds | --shared | --share | --shar \
1530  | --sha | --sh)
1531    ac_prev=sharedstatedir ;;
1532  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1533  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1534  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1535  | --sha=* | --sh=*)
1536    sharedstatedir=$ac_optarg ;;
1537
1538  -site | --site | --sit)
1539    ac_prev=site ;;
1540  -site=* | --site=* | --sit=*)
1541    site=$ac_optarg ;;
1542
1543  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1544    ac_prev=srcdir ;;
1545  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1546    srcdir=$ac_optarg ;;
1547
1548  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1549  | --syscon | --sysco | --sysc | --sys | --sy)
1550    ac_prev=sysconfdir ;;
1551  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1552  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1553    sysconfdir=$ac_optarg ;;
1554
1555  -target | --target | --targe | --targ | --tar | --ta | --t)
1556    ac_prev=target_alias ;;
1557  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1558    target_alias=$ac_optarg ;;
1559
1560  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1561    verbose=yes ;;
1562
1563  -version | --version | --versio | --versi | --vers | -V)
1564    ac_init_version=: ;;
1565
1566  -with-* | --with-*)
1567    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1568    # Reject names that are not valid shell variable names.
1569    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1570      as_fn_error $? "invalid package name: $ac_useropt"
1571    ac_useropt_orig=$ac_useropt
1572    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1573    case $ac_user_opts in
1574      *"
1575"with_$ac_useropt"
1576"*) ;;
1577      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1578	 ac_unrecognized_sep=', ';;
1579    esac
1580    eval with_$ac_useropt=\$ac_optarg ;;
1581
1582  -without-* | --without-*)
1583    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1584    # Reject names that are not valid shell variable names.
1585    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1586      as_fn_error $? "invalid package name: $ac_useropt"
1587    ac_useropt_orig=$ac_useropt
1588    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1589    case $ac_user_opts in
1590      *"
1591"with_$ac_useropt"
1592"*) ;;
1593      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1594	 ac_unrecognized_sep=', ';;
1595    esac
1596    eval with_$ac_useropt=no ;;
1597
1598  --x)
1599    # Obsolete; use --with-x.
1600    with_x=yes ;;
1601
1602  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1603  | --x-incl | --x-inc | --x-in | --x-i)
1604    ac_prev=x_includes ;;
1605  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1606  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1607    x_includes=$ac_optarg ;;
1608
1609  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1610  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1611    ac_prev=x_libraries ;;
1612  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1613  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1614    x_libraries=$ac_optarg ;;
1615
1616  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1617Try \`$0 --help' for more information"
1618    ;;
1619
1620  *=*)
1621    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1622    # Reject names that are not valid shell variable names.
1623    case $ac_envvar in #(
1624      '' | [0-9]* | *[!_$as_cr_alnum]* )
1625      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1626    esac
1627    eval $ac_envvar=\$ac_optarg
1628    export $ac_envvar ;;
1629
1630  *)
1631    # FIXME: should be removed in autoconf 3.0.
1632    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1633    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1634      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1635    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1636    ;;
1637
1638  esac
1639done
1640
1641if test -n "$ac_prev"; then
1642  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1643  as_fn_error $? "missing argument to $ac_option"
1644fi
1645
1646if test -n "$ac_unrecognized_opts"; then
1647  case $enable_option_checking in
1648    no) ;;
1649    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1650    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1651  esac
1652fi
1653
1654# Check all directory arguments for consistency.
1655for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1656		datadir sysconfdir sharedstatedir localstatedir includedir \
1657		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1658		libdir localedir mandir
1659do
1660  eval ac_val=\$$ac_var
1661  # Remove trailing slashes.
1662  case $ac_val in
1663    */ )
1664      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1665      eval $ac_var=\$ac_val;;
1666  esac
1667  # Be sure to have absolute directory names.
1668  case $ac_val in
1669    [\\/$]* | ?:[\\/]* )  continue;;
1670    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1671  esac
1672  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1673done
1674
1675# There might be people who depend on the old broken behavior: `$host'
1676# used to hold the argument of --host etc.
1677# FIXME: To remove some day.
1678build=$build_alias
1679host=$host_alias
1680target=$target_alias
1681
1682# FIXME: To remove some day.
1683if test "x$host_alias" != x; then
1684  if test "x$build_alias" = x; then
1685    cross_compiling=maybe
1686  elif test "x$build_alias" != "x$host_alias"; then
1687    cross_compiling=yes
1688  fi
1689fi
1690
1691ac_tool_prefix=
1692test -n "$host_alias" && ac_tool_prefix=$host_alias-
1693
1694test "$silent" = yes && exec 6>/dev/null
1695
1696
1697ac_pwd=`pwd` && test -n "$ac_pwd" &&
1698ac_ls_di=`ls -di .` &&
1699ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1700  as_fn_error $? "working directory cannot be determined"
1701test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1702  as_fn_error $? "pwd does not report name of working directory"
1703
1704
1705# Find the source files, if location was not specified.
1706if test -z "$srcdir"; then
1707  ac_srcdir_defaulted=yes
1708  # Try the directory containing this script, then the parent directory.
1709  ac_confdir=`$as_dirname -- "$as_myself" ||
1710$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1711	 X"$as_myself" : 'X\(//\)[^/]' \| \
1712	 X"$as_myself" : 'X\(//\)$' \| \
1713	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1714$as_echo X"$as_myself" |
1715    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\/\)[^/].*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\/\)$/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\).*/{
1728	    s//\1/
1729	    q
1730	  }
1731	  s/.*/./; q'`
1732  srcdir=$ac_confdir
1733  if test ! -r "$srcdir/$ac_unique_file"; then
1734    srcdir=..
1735  fi
1736else
1737  ac_srcdir_defaulted=no
1738fi
1739if test ! -r "$srcdir/$ac_unique_file"; then
1740  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1741  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1742fi
1743ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1744ac_abs_confdir=`(
1745	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1746	pwd)`
1747# When building in place, set srcdir=.
1748if test "$ac_abs_confdir" = "$ac_pwd"; then
1749  srcdir=.
1750fi
1751# Remove unnecessary trailing slashes from srcdir.
1752# Double slashes in file names in object file debugging info
1753# mess up M-x gdb in Emacs.
1754case $srcdir in
1755*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1756esac
1757for ac_var in $ac_precious_vars; do
1758  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1759  eval ac_env_${ac_var}_value=\$${ac_var}
1760  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1761  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1762done
1763
1764#
1765# Report the --help message.
1766#
1767if test "$ac_init_help" = "long"; then
1768  # Omit some internal or obsolete options to make the list less imposing.
1769  # This message is too long to be a string in the A/UX 3.1 sh.
1770  cat <<_ACEOF
1771\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1772
1773Usage: $0 [OPTION]... [VAR=VALUE]...
1774
1775To assign environment variables (e.g., CC, CFLAGS...), specify them as
1776VAR=VALUE.  See below for descriptions of some of the useful variables.
1777
1778Defaults for the options are specified in brackets.
1779
1780Configuration:
1781  -h, --help              display this help and exit
1782      --help=short        display options specific to this package
1783      --help=recursive    display the short help of all the included packages
1784  -V, --version           display version information and exit
1785  -q, --quiet, --silent   do not print \`checking ...' messages
1786      --cache-file=FILE   cache test results in FILE [disabled]
1787  -C, --config-cache      alias for \`--cache-file=config.cache'
1788  -n, --no-create         do not create output files
1789      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1790
1791Installation directories:
1792  --prefix=PREFIX         install architecture-independent files in PREFIX
1793                          [$ac_default_prefix]
1794  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1795                          [PREFIX]
1796
1797By default, \`make install' will install all the files in
1798\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1799an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1800for instance \`--prefix=\$HOME'.
1801
1802For better control, use the options below.
1803
1804Fine tuning of the installation directories:
1805  --bindir=DIR            user executables [EPREFIX/bin]
1806  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1807  --libexecdir=DIR        program executables [EPREFIX/libexec]
1808  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1809  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1810  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1811  --libdir=DIR            object code libraries [EPREFIX/lib]
1812  --includedir=DIR        C header files [PREFIX/include]
1813  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1814  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1815  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1816  --infodir=DIR           info documentation [DATAROOTDIR/info]
1817  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1818  --mandir=DIR            man documentation [DATAROOTDIR/man]
1819  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1820  --htmldir=DIR           html documentation [DOCDIR]
1821  --dvidir=DIR            dvi documentation [DOCDIR]
1822  --pdfdir=DIR            pdf documentation [DOCDIR]
1823  --psdir=DIR             ps documentation [DOCDIR]
1824_ACEOF
1825
1826  cat <<\_ACEOF
1827
1828X features:
1829  --x-includes=DIR    X include files are in DIR
1830  --x-libraries=DIR   X library files are in DIR
1831
1832System types:
1833  --build=BUILD     configure for building on BUILD [guessed]
1834  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1835  --target=TARGET   configure for building compilers for TARGET [HOST]
1836_ACEOF
1837fi
1838
1839if test -n "$ac_init_help"; then
1840  case $ac_init_help in
1841     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1842   esac
1843  cat <<\_ACEOF
1844
1845Optional Features:
1846  --disable-option-checking  ignore unrecognized --enable/--with options
1847  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1848  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1849  --enable-openjdk-only   suppress building custom source even if present
1850                          [disabled]
1851  --enable-debug          set the debug level to fastdebug (shorthand for
1852                          --with-debug-level=fastdebug) [disabled]
1853  --disable-headful       disable building headful support (graphical UI
1854                          support) [enabled]
1855  --enable-hotspot-test-in-build
1856                          run the Queens test after Hotspot build [disabled]
1857  --enable-unlimited-crypto
1858                          Enable unlimited crypto policy [disabled]
1859  --enable-static-build   enable static library build [disabled]
1860  --disable-warnings-as-errors
1861                          do not consider native warnings to be an error
1862                          [enabled]
1863  --disable-debug-symbols disable generation of debug symbols [enabled]
1864  --disable-zip-debug-info
1865                          disable zipping of debug-info files [enabled]
1866  --enable-native-coverage
1867                          enable native compilation with code coverage
1868                          data[disabled]
1869  --disable-freetype-bundling
1870                          disable bundling of the freetype library with the
1871                          build result [enabled on Windows or when using
1872                          --with-freetype, disabled otherwise]
1873  --enable-sjavac         use sjavac to do fast incremental compiles
1874                          [disabled]
1875  --enable-javac-server   use only the server part of sjavac for faster javac
1876                          compiles [disabled]
1877  --disable-precompiled-headers
1878                          disable using precompiled headers when compiling C++
1879                          [enabled]
1880  --enable-ccache         enable using ccache to speed up recompilations
1881                          [disabled]
1882
1883Optional Packages:
1884  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1885  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1886  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1887                          support it), e.g. --with-target-bits=32 [guessed]
1888  --with-custom-make-dir  Deprecated. Option is kept for backwards
1889                          compatibility and is ignored
1890  --with-jdk-variant      JDK variant to build (normal) [normal]
1891  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1892  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1893                          client, minimal1, kernel, zero, zeroshark, core)
1894                          [server]
1895  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1896                          optimized (HotSpot build only)) [release]
1897  --with-devkit           use this devkit for compilers, tools and resources
1898  --with-sys-root         alias for --with-sysroot for backwards compatability
1899  --with-sysroot          use this directory as sysroot
1900  --with-tools-dir        alias for --with-toolchain-path for backwards
1901                          compatibility
1902  --with-toolchain-path   prepend these directories when searching for
1903                          toolchain binaries (compilers etc)
1904  --with-extra-path       prepend these directories to the default path
1905  --with-sdk-name         use the platform SDK of the given name. [macosx]
1906  --with-conf-name        use this as the name of the configuration [generated
1907                          from important configuration options]
1908  --with-output-sync      set make output sync type if supported by make.
1909                          [recurse]
1910  --with-cacerts-file     specify alternative cacerts file
1911  --with-milestone        Set milestone value for build [internal]
1912  --with-update-version   Set update version value for build [b00]
1913  --with-user-release-suffix
1914                          Add a custom string to the version string if build
1915                          number is not set.[username_builddateb00]
1916  --with-build-number     Set build number value for build [b00]
1917  --with-copyright-year   Set copyright year value for build [current year]
1918  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1919  --with-add-source-root  Deprecated. Option is kept for backwards
1920                          compatibility and is ignored
1921  --with-override-source-root
1922                          Deprecated. Option is kept for backwards
1923                          compatibility and is ignored
1924  --with-adds-and-overrides
1925                          Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-override-langtools
1928                          Deprecated. Option is kept for backwards
1929                          compatibility and is ignored
1930  --with-override-corba   Deprecated. Option is kept for backwards
1931                          compatibility and is ignored
1932  --with-override-jaxp    Deprecated. Option is kept for backwards
1933                          compatibility and is ignored
1934  --with-override-jaxws   Deprecated. Option is kept for backwards
1935                          compatibility and is ignored
1936  --with-override-hotspot Deprecated. Option is kept for backwards
1937                          compatibility and is ignored
1938  --with-override-nashorn Deprecated. Option is kept for backwards
1939                          compatibility and is ignored
1940  --with-override-jdk     Deprecated. Option is kept for backwards
1941                          compatibility and is ignored
1942  --with-import-hotspot   import hotspot binaries from this jdk image or
1943                          hotspot build dist dir instead of building from
1944                          source
1945  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1946                          to show possible values [platform dependent]
1947  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1948  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1949  --with-extra-ldflags    extra flags to be used when linking jdk
1950  --with-toolchain-version
1951                          the version of the toolchain to look for, use
1952                          '--help' to show possible values [platform
1953                          dependent]
1954  --with-build-devkit     Devkit to use for the build platform toolchain
1955  --with-jtreg            Regression Test Harness [probed]
1956  --with-stdc++lib=<static>,<dynamic>,<default>
1957                          force linking of the C++ runtime on Linux to either
1958                          static or dynamic, default is static with dynamic as
1959                          fallback
1960  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1961                          (Windows only) [probed]
1962  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1963                          (Windows only) [probed]
1964  --with-x                use the X Window System
1965  --with-cups             specify prefix directory for the cups package
1966                          (expecting the headers under PATH/include)
1967  --with-cups-include     specify directory for the cups include files
1968  --with-freetype         specify prefix directory for the freetype package
1969                          (expecting the libraries under PATH/lib and the
1970                          headers under PATH/include)
1971  --with-freetype-include specify directory for the freetype include files
1972  --with-freetype-lib     specify directory for the freetype library
1973  --with-freetype-src     specify directory with freetype sources to
1974                          automatically build the library (experimental,
1975                          Windows-only)
1976  --with-alsa             specify prefix directory for the alsa package
1977                          (expecting the libraries under PATH/lib and the
1978                          headers under PATH/include)
1979  --with-alsa-include     specify directory for the alsa include files
1980  --with-alsa-lib         specify directory for the alsa library
1981  --with-libffi           specify prefix directory for the libffi package
1982                          (expecting the libraries under PATH/lib and the
1983                          headers under PATH/include)
1984  --with-libffi-include   specify directory for the libffi include files
1985  --with-libffi-lib       specify directory for the libffi library
1986  --with-libjpeg          use libjpeg from build system or OpenJDK source
1987                          (system, bundled) [bundled]
1988  --with-giflib           use giflib from build system or OpenJDK source
1989                          (system, bundled) [bundled]
1990  --with-libpng           use libpng from build system or OpenJDK source
1991                          (system, bundled) [bundled]
1992  --with-zlib             use zlib from build system or OpenJDK source
1993                          (system, bundled) [bundled]
1994  --with-lcms             use lcms2 from build system or OpenJDK source
1995                          (system, bundled) [bundled]
1996  --with-dxsdk            Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1999                          compatibility and is ignored
2000  --with-dxsdk-include    Deprecated. Option is kept for backwards
2001                          compatibility and is ignored
2002  --with-num-cores        number of cores in the build system, e.g.
2003                          --with-num-cores=8 [probed]
2004  --with-memory-size      memory (in MB) available in the build system, e.g.
2005                          --with-memory-size=1024 [probed]
2006  --with-jobs             number of parallel jobs to let make run [calculated
2007                          based on cores and memory]
2008  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2009                          invocations of boot JDK, overriding the default
2010                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2011                          -enableassertions"
2012  --with-sjavac-server-java
2013                          use this java binary for running the sjavac
2014                          background server [Boot JDK java]
2015  --with-ccache-dir       where to store ccache files [~/.ccache]
2016
2017Some influential environment variables:
2018  BASENAME    Override default value for BASENAME
2019  BASH        Override default value for BASH
2020  CAT         Override default value for CAT
2021  CHMOD       Override default value for CHMOD
2022  CMP         Override default value for CMP
2023  COMM        Override default value for COMM
2024  CP          Override default value for CP
2025  CUT         Override default value for CUT
2026  DATE        Override default value for DATE
2027  DIFF        Override default value for DIFF
2028  DIRNAME     Override default value for DIRNAME
2029  ECHO        Override default value for ECHO
2030  EXPR        Override default value for EXPR
2031  FILE        Override default value for FILE
2032  FIND        Override default value for FIND
2033  HEAD        Override default value for HEAD
2034  LN          Override default value for LN
2035  LS          Override default value for LS
2036  MKDIR       Override default value for MKDIR
2037  MKTEMP      Override default value for MKTEMP
2038  MV          Override default value for MV
2039  NAWK        Override default value for NAWK
2040  PRINTF      Override default value for PRINTF
2041  RM          Override default value for RM
2042  RMDIR       Override default value for RMDIR
2043  SH          Override default value for SH
2044  SORT        Override default value for SORT
2045  TAIL        Override default value for TAIL
2046  TAR         Override default value for TAR
2047  TEE         Override default value for TEE
2048  TOUCH       Override default value for TOUCH
2049  TR          Override default value for TR
2050  UNAME       Override default value for UNAME
2051  UNIQ        Override default value for UNIQ
2052  WC          Override default value for WC
2053  WHICH       Override default value for WHICH
2054  XARGS       Override default value for XARGS
2055  AWK         Override default value for AWK
2056  GREP        Override default value for GREP
2057  EGREP       Override default value for EGREP
2058  FGREP       Override default value for FGREP
2059  SED         Override default value for SED
2060  CYGPATH     Override default value for CYGPATH
2061  READLINK    Override default value for READLINK
2062  DF          Override default value for DF
2063  CPIO        Override default value for CPIO
2064  NICE        Override default value for NICE
2065  MAKE        Override default value for MAKE
2066  UNZIP       Override default value for UNZIP
2067  ZIP         Override default value for ZIP
2068  LDD         Override default value for LDD
2069  OTOOL       Override default value for OTOOL
2070  READELF     Override default value for READELF
2071  HG          Override default value for HG
2072  STAT        Override default value for STAT
2073  TIME        Override default value for TIME
2074  PATCH       Override default value for PATCH
2075  DSYMUTIL    Override default value for DSYMUTIL
2076  XATTR       Override default value for XATTR
2077  CODESIGN    Override default value for CODESIGN
2078  SETFILE     Override default value for SETFILE
2079  PKG_CONFIG  path to pkg-config utility
2080  JAVA        Override default value for JAVA
2081  JAVAC       Override default value for JAVAC
2082  JAVAH       Override default value for JAVAH
2083  JAR         Override default value for JAR
2084  JARSIGNER   Override default value for JARSIGNER
2085  CC          C compiler command
2086  CFLAGS      C compiler flags
2087  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2088              nonstandard directory <lib dir>
2089  LIBS        libraries to pass to the linker, e.g. -l<library>
2090  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2091              you have headers in a nonstandard directory <include dir>
2092  CXX         C++ compiler command
2093  CXXFLAGS    C++ compiler flags
2094  CPP         C preprocessor
2095  CXXCPP      C++ preprocessor
2096  AS          Override default value for AS
2097  AR          Override default value for AR
2098  LIPO        Override default value for LIPO
2099  STRIP       Override default value for STRIP
2100  NM          Override default value for NM
2101  GNM         Override default value for GNM
2102  OBJCOPY     Override default value for OBJCOPY
2103  OBJDUMP     Override default value for OBJDUMP
2104  BUILD_CC    Override default value for BUILD_CC
2105  BUILD_CXX   Override default value for BUILD_CXX
2106  JTREGEXE    Override default value for JTREGEXE
2107  XMKMF       Path to xmkmf, Makefile generator for X Window System
2108  FREETYPE_CFLAGS
2109              C compiler flags for FREETYPE, overriding pkg-config
2110  FREETYPE_LIBS
2111              linker flags for FREETYPE, overriding pkg-config
2112  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2113  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2114  LIBFFI_CFLAGS
2115              C compiler flags for LIBFFI, overriding pkg-config
2116  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2117  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2118  PNG_LIBS    linker flags for PNG, overriding pkg-config
2119  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2120  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2121  CCACHE      Override default value for CCACHE
2122
2123Use these variables to override the choices made by `configure' or to help
2124it to find libraries and programs with nonstandard names/locations.
2125
2126Report bugs to <build-dev@openjdk.java.net>.
2127OpenJDK home page: <http://openjdk.java.net>.
2128_ACEOF
2129ac_status=$?
2130fi
2131
2132if test "$ac_init_help" = "recursive"; then
2133  # If there are subdirs, report their specific --help.
2134  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2135    test -d "$ac_dir" ||
2136      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2137      continue
2138    ac_builddir=.
2139
2140case "$ac_dir" in
2141.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2142*)
2143  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2144  # A ".." for each directory in $ac_dir_suffix.
2145  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2146  case $ac_top_builddir_sub in
2147  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2148  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2149  esac ;;
2150esac
2151ac_abs_top_builddir=$ac_pwd
2152ac_abs_builddir=$ac_pwd$ac_dir_suffix
2153# for backward compatibility:
2154ac_top_builddir=$ac_top_build_prefix
2155
2156case $srcdir in
2157  .)  # We are building in place.
2158    ac_srcdir=.
2159    ac_top_srcdir=$ac_top_builddir_sub
2160    ac_abs_top_srcdir=$ac_pwd ;;
2161  [\\/]* | ?:[\\/]* )  # Absolute name.
2162    ac_srcdir=$srcdir$ac_dir_suffix;
2163    ac_top_srcdir=$srcdir
2164    ac_abs_top_srcdir=$srcdir ;;
2165  *) # Relative name.
2166    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2167    ac_top_srcdir=$ac_top_build_prefix$srcdir
2168    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2169esac
2170ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2171
2172    cd "$ac_dir" || { ac_status=$?; continue; }
2173    # Check for guested configure.
2174    if test -f "$ac_srcdir/configure.gnu"; then
2175      echo &&
2176      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2177    elif test -f "$ac_srcdir/configure"; then
2178      echo &&
2179      $SHELL "$ac_srcdir/configure" --help=recursive
2180    else
2181      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2182    fi || ac_status=$?
2183    cd "$ac_pwd" || { ac_status=$?; break; }
2184  done
2185fi
2186
2187test -n "$ac_init_help" && exit $ac_status
2188if $ac_init_version; then
2189  cat <<\_ACEOF
2190OpenJDK configure jdk9
2191generated by GNU Autoconf 2.69
2192
2193Copyright (C) 2012 Free Software Foundation, Inc.
2194This configure script is free software; the Free Software Foundation
2195gives unlimited permission to copy, distribute and modify it.
2196_ACEOF
2197  exit
2198fi
2199
2200## ------------------------ ##
2201## Autoconf initialization. ##
2202## ------------------------ ##
2203
2204# ac_fn_c_try_compile LINENO
2205# --------------------------
2206# Try to compile conftest.$ac_ext, and return whether this succeeded.
2207ac_fn_c_try_compile ()
2208{
2209  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210  rm -f conftest.$ac_objext
2211  if { { ac_try="$ac_compile"
2212case "(($ac_try" in
2213  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2214  *) ac_try_echo=$ac_try;;
2215esac
2216eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2217$as_echo "$ac_try_echo"; } >&5
2218  (eval "$ac_compile") 2>conftest.err
2219  ac_status=$?
2220  if test -s conftest.err; then
2221    grep -v '^ *+' conftest.err >conftest.er1
2222    cat conftest.er1 >&5
2223    mv -f conftest.er1 conftest.err
2224  fi
2225  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2226  test $ac_status = 0; } && {
2227	 test -z "$ac_c_werror_flag" ||
2228	 test ! -s conftest.err
2229       } && test -s conftest.$ac_objext; then :
2230  ac_retval=0
2231else
2232  $as_echo "$as_me: failed program was:" >&5
2233sed 's/^/| /' conftest.$ac_ext >&5
2234
2235	ac_retval=1
2236fi
2237  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2238  as_fn_set_status $ac_retval
2239
2240} # ac_fn_c_try_compile
2241
2242# ac_fn_cxx_try_compile LINENO
2243# ----------------------------
2244# Try to compile conftest.$ac_ext, and return whether this succeeded.
2245ac_fn_cxx_try_compile ()
2246{
2247  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248  rm -f conftest.$ac_objext
2249  if { { ac_try="$ac_compile"
2250case "(($ac_try" in
2251  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2252  *) ac_try_echo=$ac_try;;
2253esac
2254eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2255$as_echo "$ac_try_echo"; } >&5
2256  (eval "$ac_compile") 2>conftest.err
2257  ac_status=$?
2258  if test -s conftest.err; then
2259    grep -v '^ *+' conftest.err >conftest.er1
2260    cat conftest.er1 >&5
2261    mv -f conftest.er1 conftest.err
2262  fi
2263  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2264  test $ac_status = 0; } && {
2265	 test -z "$ac_cxx_werror_flag" ||
2266	 test ! -s conftest.err
2267       } && test -s conftest.$ac_objext; then :
2268  ac_retval=0
2269else
2270  $as_echo "$as_me: failed program was:" >&5
2271sed 's/^/| /' conftest.$ac_ext >&5
2272
2273	ac_retval=1
2274fi
2275  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276  as_fn_set_status $ac_retval
2277
2278} # ac_fn_cxx_try_compile
2279
2280# ac_fn_c_try_cpp LINENO
2281# ----------------------
2282# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2283ac_fn_c_try_cpp ()
2284{
2285  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286  if { { ac_try="$ac_cpp conftest.$ac_ext"
2287case "(($ac_try" in
2288  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2289  *) ac_try_echo=$ac_try;;
2290esac
2291eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2292$as_echo "$ac_try_echo"; } >&5
2293  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2294  ac_status=$?
2295  if test -s conftest.err; then
2296    grep -v '^ *+' conftest.err >conftest.er1
2297    cat conftest.er1 >&5
2298    mv -f conftest.er1 conftest.err
2299  fi
2300  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2301  test $ac_status = 0; } > conftest.i && {
2302	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2303	 test ! -s conftest.err
2304       }; then :
2305  ac_retval=0
2306else
2307  $as_echo "$as_me: failed program was:" >&5
2308sed 's/^/| /' conftest.$ac_ext >&5
2309
2310    ac_retval=1
2311fi
2312  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313  as_fn_set_status $ac_retval
2314
2315} # ac_fn_c_try_cpp
2316
2317# ac_fn_cxx_try_cpp LINENO
2318# ------------------------
2319# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2320ac_fn_cxx_try_cpp ()
2321{
2322  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323  if { { ac_try="$ac_cpp conftest.$ac_ext"
2324case "(($ac_try" in
2325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2326  *) ac_try_echo=$ac_try;;
2327esac
2328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2329$as_echo "$ac_try_echo"; } >&5
2330  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2331  ac_status=$?
2332  if test -s conftest.err; then
2333    grep -v '^ *+' conftest.err >conftest.er1
2334    cat conftest.er1 >&5
2335    mv -f conftest.er1 conftest.err
2336  fi
2337  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2338  test $ac_status = 0; } > conftest.i && {
2339	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2340	 test ! -s conftest.err
2341       }; then :
2342  ac_retval=0
2343else
2344  $as_echo "$as_me: failed program was:" >&5
2345sed 's/^/| /' conftest.$ac_ext >&5
2346
2347    ac_retval=1
2348fi
2349  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2350  as_fn_set_status $ac_retval
2351
2352} # ac_fn_cxx_try_cpp
2353
2354# ac_fn_c_try_link LINENO
2355# -----------------------
2356# Try to link conftest.$ac_ext, and return whether this succeeded.
2357ac_fn_c_try_link ()
2358{
2359  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2360  rm -f conftest.$ac_objext conftest$ac_exeext
2361  if { { ac_try="$ac_link"
2362case "(($ac_try" in
2363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2364  *) ac_try_echo=$ac_try;;
2365esac
2366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2367$as_echo "$ac_try_echo"; } >&5
2368  (eval "$ac_link") 2>conftest.err
2369  ac_status=$?
2370  if test -s conftest.err; then
2371    grep -v '^ *+' conftest.err >conftest.er1
2372    cat conftest.er1 >&5
2373    mv -f conftest.er1 conftest.err
2374  fi
2375  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2376  test $ac_status = 0; } && {
2377	 test -z "$ac_c_werror_flag" ||
2378	 test ! -s conftest.err
2379       } && test -s conftest$ac_exeext && {
2380	 test "$cross_compiling" = yes ||
2381	 test -x conftest$ac_exeext
2382       }; then :
2383  ac_retval=0
2384else
2385  $as_echo "$as_me: failed program was:" >&5
2386sed 's/^/| /' conftest.$ac_ext >&5
2387
2388	ac_retval=1
2389fi
2390  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2391  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2392  # interfere with the next link command; also delete a directory that is
2393  # left behind by Apple's compiler.  We do this before executing the actions.
2394  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2395  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2396  as_fn_set_status $ac_retval
2397
2398} # ac_fn_c_try_link
2399
2400# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2401# ---------------------------------------------------------
2402# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2403# the include files in INCLUDES and setting the cache variable VAR
2404# accordingly.
2405ac_fn_cxx_check_header_mongrel ()
2406{
2407  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408  if eval \${$3+:} false; then :
2409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2410$as_echo_n "checking for $2... " >&6; }
2411if eval \${$3+:} false; then :
2412  $as_echo_n "(cached) " >&6
2413fi
2414eval ac_res=\$$3
2415	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416$as_echo "$ac_res" >&6; }
2417else
2418  # Is the header compilable?
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2420$as_echo_n "checking $2 usability... " >&6; }
2421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2422/* end confdefs.h.  */
2423$4
2424#include <$2>
2425_ACEOF
2426if ac_fn_cxx_try_compile "$LINENO"; then :
2427  ac_header_compiler=yes
2428else
2429  ac_header_compiler=no
2430fi
2431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2433$as_echo "$ac_header_compiler" >&6; }
2434
2435# Is the header present?
2436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2437$as_echo_n "checking $2 presence... " >&6; }
2438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2439/* end confdefs.h.  */
2440#include <$2>
2441_ACEOF
2442if ac_fn_cxx_try_cpp "$LINENO"; then :
2443  ac_header_preproc=yes
2444else
2445  ac_header_preproc=no
2446fi
2447rm -f conftest.err conftest.i conftest.$ac_ext
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2449$as_echo "$ac_header_preproc" >&6; }
2450
2451# So?  What about this header?
2452case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2453  yes:no: )
2454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2455$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2457$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2458    ;;
2459  no:yes:* )
2460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2461$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2463$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2465$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2467$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2468    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2469$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2470( $as_echo "## ----------------------------------------- ##
2471## Report this to build-dev@openjdk.java.net ##
2472## ----------------------------------------- ##"
2473     ) | sed "s/^/$as_me: WARNING:     /" >&2
2474    ;;
2475esac
2476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2477$as_echo_n "checking for $2... " >&6; }
2478if eval \${$3+:} false; then :
2479  $as_echo_n "(cached) " >&6
2480else
2481  eval "$3=\$ac_header_compiler"
2482fi
2483eval ac_res=\$$3
2484	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2485$as_echo "$ac_res" >&6; }
2486fi
2487  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488
2489} # ac_fn_cxx_check_header_mongrel
2490
2491# ac_fn_cxx_try_run LINENO
2492# ------------------------
2493# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2494# that executables *can* be run.
2495ac_fn_cxx_try_run ()
2496{
2497  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2498  if { { ac_try="$ac_link"
2499case "(($ac_try" in
2500  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2501  *) ac_try_echo=$ac_try;;
2502esac
2503eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2504$as_echo "$ac_try_echo"; } >&5
2505  (eval "$ac_link") 2>&5
2506  ac_status=$?
2507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2508  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2509  { { case "(($ac_try" in
2510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511  *) ac_try_echo=$ac_try;;
2512esac
2513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514$as_echo "$ac_try_echo"; } >&5
2515  (eval "$ac_try") 2>&5
2516  ac_status=$?
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; }; }; then :
2519  ac_retval=0
2520else
2521  $as_echo "$as_me: program exited with status $ac_status" >&5
2522       $as_echo "$as_me: failed program was:" >&5
2523sed 's/^/| /' conftest.$ac_ext >&5
2524
2525       ac_retval=$ac_status
2526fi
2527  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2528  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2529  as_fn_set_status $ac_retval
2530
2531} # ac_fn_cxx_try_run
2532
2533# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2534# ---------------------------------------------------------
2535# Tests whether HEADER exists and can be compiled using the include files in
2536# INCLUDES, setting the cache variable VAR accordingly.
2537ac_fn_cxx_check_header_compile ()
2538{
2539  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541$as_echo_n "checking for $2... " >&6; }
2542if eval \${$3+:} false; then :
2543  $as_echo_n "(cached) " >&6
2544else
2545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546/* end confdefs.h.  */
2547$4
2548#include <$2>
2549_ACEOF
2550if ac_fn_cxx_try_compile "$LINENO"; then :
2551  eval "$3=yes"
2552else
2553  eval "$3=no"
2554fi
2555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2556fi
2557eval ac_res=\$$3
2558	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2559$as_echo "$ac_res" >&6; }
2560  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561
2562} # ac_fn_cxx_check_header_compile
2563
2564# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2565# ----------------------------------------------
2566# Tries to find the compile-time value of EXPR in a program that includes
2567# INCLUDES, setting VAR accordingly. Returns whether the value could be
2568# computed
2569ac_fn_cxx_compute_int ()
2570{
2571  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2572  if test "$cross_compiling" = yes; then
2573    # Depending upon the size, compute the lo and hi bounds.
2574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576$4
2577int
2578main ()
2579{
2580static int test_array [1 - 2 * !(($2) >= 0)];
2581test_array [0] = 0;
2582return test_array [0];
2583
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588if ac_fn_cxx_try_compile "$LINENO"; then :
2589  ac_lo=0 ac_mid=0
2590  while :; do
2591    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594int
2595main ()
2596{
2597static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2598test_array [0] = 0;
2599return test_array [0];
2600
2601  ;
2602  return 0;
2603}
2604_ACEOF
2605if ac_fn_cxx_try_compile "$LINENO"; then :
2606  ac_hi=$ac_mid; break
2607else
2608  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2609			if test $ac_lo -le $ac_mid; then
2610			  ac_lo= ac_hi=
2611			  break
2612			fi
2613			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2614fi
2615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2616  done
2617else
2618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620$4
2621int
2622main ()
2623{
2624static int test_array [1 - 2 * !(($2) < 0)];
2625test_array [0] = 0;
2626return test_array [0];
2627
2628  ;
2629  return 0;
2630}
2631_ACEOF
2632if ac_fn_cxx_try_compile "$LINENO"; then :
2633  ac_hi=-1 ac_mid=-1
2634  while :; do
2635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636/* end confdefs.h.  */
2637$4
2638int
2639main ()
2640{
2641static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2642test_array [0] = 0;
2643return test_array [0];
2644
2645  ;
2646  return 0;
2647}
2648_ACEOF
2649if ac_fn_cxx_try_compile "$LINENO"; then :
2650  ac_lo=$ac_mid; break
2651else
2652  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2653			if test $ac_mid -le $ac_hi; then
2654			  ac_lo= ac_hi=
2655			  break
2656			fi
2657			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2658fi
2659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660  done
2661else
2662  ac_lo= ac_hi=
2663fi
2664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2665fi
2666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2667# Binary search between lo and hi bounds.
2668while test "x$ac_lo" != "x$ac_hi"; do
2669  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2671/* end confdefs.h.  */
2672$4
2673int
2674main ()
2675{
2676static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2677test_array [0] = 0;
2678return test_array [0];
2679
2680  ;
2681  return 0;
2682}
2683_ACEOF
2684if ac_fn_cxx_try_compile "$LINENO"; then :
2685  ac_hi=$ac_mid
2686else
2687  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2688fi
2689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2690done
2691case $ac_lo in #((
2692?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2693'') ac_retval=1 ;;
2694esac
2695  else
2696    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2697/* end confdefs.h.  */
2698$4
2699static long int longval () { return $2; }
2700static unsigned long int ulongval () { return $2; }
2701#include <stdio.h>
2702#include <stdlib.h>
2703int
2704main ()
2705{
2706
2707  FILE *f = fopen ("conftest.val", "w");
2708  if (! f)
2709    return 1;
2710  if (($2) < 0)
2711    {
2712      long int i = longval ();
2713      if (i != ($2))
2714	return 1;
2715      fprintf (f, "%ld", i);
2716    }
2717  else
2718    {
2719      unsigned long int i = ulongval ();
2720      if (i != ($2))
2721	return 1;
2722      fprintf (f, "%lu", i);
2723    }
2724  /* Do not output a trailing newline, as this causes \r\n confusion
2725     on some platforms.  */
2726  return ferror (f) || fclose (f) != 0;
2727
2728  ;
2729  return 0;
2730}
2731_ACEOF
2732if ac_fn_cxx_try_run "$LINENO"; then :
2733  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2734else
2735  ac_retval=1
2736fi
2737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2738  conftest.$ac_objext conftest.beam conftest.$ac_ext
2739rm -f conftest.val
2740
2741  fi
2742  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743  as_fn_set_status $ac_retval
2744
2745} # ac_fn_cxx_compute_int
2746
2747# ac_fn_cxx_try_link LINENO
2748# -------------------------
2749# Try to link conftest.$ac_ext, and return whether this succeeded.
2750ac_fn_cxx_try_link ()
2751{
2752  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753  rm -f conftest.$ac_objext conftest$ac_exeext
2754  if { { ac_try="$ac_link"
2755case "(($ac_try" in
2756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2757  *) ac_try_echo=$ac_try;;
2758esac
2759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2760$as_echo "$ac_try_echo"; } >&5
2761  (eval "$ac_link") 2>conftest.err
2762  ac_status=$?
2763  if test -s conftest.err; then
2764    grep -v '^ *+' conftest.err >conftest.er1
2765    cat conftest.er1 >&5
2766    mv -f conftest.er1 conftest.err
2767  fi
2768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2769  test $ac_status = 0; } && {
2770	 test -z "$ac_cxx_werror_flag" ||
2771	 test ! -s conftest.err
2772       } && test -s conftest$ac_exeext && {
2773	 test "$cross_compiling" = yes ||
2774	 test -x conftest$ac_exeext
2775       }; then :
2776  ac_retval=0
2777else
2778  $as_echo "$as_me: failed program was:" >&5
2779sed 's/^/| /' conftest.$ac_ext >&5
2780
2781	ac_retval=1
2782fi
2783  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2784  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2785  # interfere with the next link command; also delete a directory that is
2786  # left behind by Apple's compiler.  We do this before executing the actions.
2787  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2788  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789  as_fn_set_status $ac_retval
2790
2791} # ac_fn_cxx_try_link
2792
2793# ac_fn_cxx_check_func LINENO FUNC VAR
2794# ------------------------------------
2795# Tests whether FUNC exists, setting the cache variable VAR accordingly
2796ac_fn_cxx_check_func ()
2797{
2798  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2800$as_echo_n "checking for $2... " >&6; }
2801if eval \${$3+:} false; then :
2802  $as_echo_n "(cached) " >&6
2803else
2804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805/* end confdefs.h.  */
2806/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2807   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2808#define $2 innocuous_$2
2809
2810/* System header to define __stub macros and hopefully few prototypes,
2811    which can conflict with char $2 (); below.
2812    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2813    <limits.h> exists even on freestanding compilers.  */
2814
2815#ifdef __STDC__
2816# include <limits.h>
2817#else
2818# include <assert.h>
2819#endif
2820
2821#undef $2
2822
2823/* Override any GCC internal prototype to avoid an error.
2824   Use char because int might match the return type of a GCC
2825   builtin and then its argument prototype would still apply.  */
2826#ifdef __cplusplus
2827extern "C"
2828#endif
2829char $2 ();
2830/* The GNU C library defines this for functions which it implements
2831    to always fail with ENOSYS.  Some functions are actually named
2832    something starting with __ and the normal name is an alias.  */
2833#if defined __stub_$2 || defined __stub___$2
2834choke me
2835#endif
2836
2837int
2838main ()
2839{
2840return $2 ();
2841  ;
2842  return 0;
2843}
2844_ACEOF
2845if ac_fn_cxx_try_link "$LINENO"; then :
2846  eval "$3=yes"
2847else
2848  eval "$3=no"
2849fi
2850rm -f core conftest.err conftest.$ac_objext \
2851    conftest$ac_exeext conftest.$ac_ext
2852fi
2853eval ac_res=\$$3
2854	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2855$as_echo "$ac_res" >&6; }
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857
2858} # ac_fn_cxx_check_func
2859
2860# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2861# -------------------------------------------------------
2862# Tests whether HEADER exists and can be compiled using the include files in
2863# INCLUDES, setting the cache variable VAR accordingly.
2864ac_fn_c_check_header_compile ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875#include <$2>
2876_ACEOF
2877if ac_fn_c_try_compile "$LINENO"; then :
2878  eval "$3=yes"
2879else
2880  eval "$3=no"
2881fi
2882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2883fi
2884eval ac_res=\$$3
2885	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2886$as_echo "$ac_res" >&6; }
2887  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2888
2889} # ac_fn_c_check_header_compile
2890cat >config.log <<_ACEOF
2891This file contains any messages produced by compilers while
2892running configure, to aid debugging if configure makes a mistake.
2893
2894It was created by OpenJDK $as_me jdk9, which was
2895generated by GNU Autoconf 2.69.  Invocation command line was
2896
2897  $ $0 $@
2898
2899_ACEOF
2900exec 5>>config.log
2901{
2902cat <<_ASUNAME
2903## --------- ##
2904## Platform. ##
2905## --------- ##
2906
2907hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2908uname -m = `(uname -m) 2>/dev/null || echo unknown`
2909uname -r = `(uname -r) 2>/dev/null || echo unknown`
2910uname -s = `(uname -s) 2>/dev/null || echo unknown`
2911uname -v = `(uname -v) 2>/dev/null || echo unknown`
2912
2913/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2914/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2915
2916/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2917/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2918/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2919/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2920/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2921/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2922/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2923
2924_ASUNAME
2925
2926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2927for as_dir in $PATH
2928do
2929  IFS=$as_save_IFS
2930  test -z "$as_dir" && as_dir=.
2931    $as_echo "PATH: $as_dir"
2932  done
2933IFS=$as_save_IFS
2934
2935} >&5
2936
2937cat >&5 <<_ACEOF
2938
2939
2940## ----------- ##
2941## Core tests. ##
2942## ----------- ##
2943
2944_ACEOF
2945
2946
2947# Keep a trace of the command line.
2948# Strip out --no-create and --no-recursion so they do not pile up.
2949# Strip out --silent because we don't want to record it for future runs.
2950# Also quote any args containing shell meta-characters.
2951# Make two passes to allow for proper duplicate-argument suppression.
2952ac_configure_args=
2953ac_configure_args0=
2954ac_configure_args1=
2955ac_must_keep_next=false
2956for ac_pass in 1 2
2957do
2958  for ac_arg
2959  do
2960    case $ac_arg in
2961    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2962    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2963    | -silent | --silent | --silen | --sile | --sil)
2964      continue ;;
2965    *\'*)
2966      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2967    esac
2968    case $ac_pass in
2969    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2970    2)
2971      as_fn_append ac_configure_args1 " '$ac_arg'"
2972      if test $ac_must_keep_next = true; then
2973	ac_must_keep_next=false # Got value, back to normal.
2974      else
2975	case $ac_arg in
2976	  *=* | --config-cache | -C | -disable-* | --disable-* \
2977	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2978	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2979	  | -with-* | --with-* | -without-* | --without-* | --x)
2980	    case "$ac_configure_args0 " in
2981	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2982	    esac
2983	    ;;
2984	  -* ) ac_must_keep_next=true ;;
2985	esac
2986      fi
2987      as_fn_append ac_configure_args " '$ac_arg'"
2988      ;;
2989    esac
2990  done
2991done
2992{ ac_configure_args0=; unset ac_configure_args0;}
2993{ ac_configure_args1=; unset ac_configure_args1;}
2994
2995# When interrupted or exit'd, cleanup temporary files, and complete
2996# config.log.  We remove comments because anyway the quotes in there
2997# would cause problems or look ugly.
2998# WARNING: Use '\'' to represent an apostrophe within the trap.
2999# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3000trap 'exit_status=$?
3001  # Save into config.log some information that might help in debugging.
3002  {
3003    echo
3004
3005    $as_echo "## ---------------- ##
3006## Cache variables. ##
3007## ---------------- ##"
3008    echo
3009    # The following way of writing the cache mishandles newlines in values,
3010(
3011  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3012    eval ac_val=\$$ac_var
3013    case $ac_val in #(
3014    *${as_nl}*)
3015      case $ac_var in #(
3016      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3017$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3018      esac
3019      case $ac_var in #(
3020      _ | IFS | as_nl) ;; #(
3021      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3022      *) { eval $ac_var=; unset $ac_var;} ;;
3023      esac ;;
3024    esac
3025  done
3026  (set) 2>&1 |
3027    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3028    *${as_nl}ac_space=\ *)
3029      sed -n \
3030	"s/'\''/'\''\\\\'\'''\''/g;
3031	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3032      ;; #(
3033    *)
3034      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3035      ;;
3036    esac |
3037    sort
3038)
3039    echo
3040
3041    $as_echo "## ----------------- ##
3042## Output variables. ##
3043## ----------------- ##"
3044    echo
3045    for ac_var in $ac_subst_vars
3046    do
3047      eval ac_val=\$$ac_var
3048      case $ac_val in
3049      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3050      esac
3051      $as_echo "$ac_var='\''$ac_val'\''"
3052    done | sort
3053    echo
3054
3055    if test -n "$ac_subst_files"; then
3056      $as_echo "## ------------------- ##
3057## File substitutions. ##
3058## ------------------- ##"
3059      echo
3060      for ac_var in $ac_subst_files
3061      do
3062	eval ac_val=\$$ac_var
3063	case $ac_val in
3064	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065	esac
3066	$as_echo "$ac_var='\''$ac_val'\''"
3067      done | sort
3068      echo
3069    fi
3070
3071    if test -s confdefs.h; then
3072      $as_echo "## ----------- ##
3073## confdefs.h. ##
3074## ----------- ##"
3075      echo
3076      cat confdefs.h
3077      echo
3078    fi
3079    test "$ac_signal" != 0 &&
3080      $as_echo "$as_me: caught signal $ac_signal"
3081    $as_echo "$as_me: exit $exit_status"
3082  } >&5
3083  rm -f core *.core core.conftest.* &&
3084    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3085    exit $exit_status
3086' 0
3087for ac_signal in 1 2 13 15; do
3088  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3089done
3090ac_signal=0
3091
3092# confdefs.h avoids OS command line length limits that DEFS can exceed.
3093rm -f -r conftest* confdefs.h
3094
3095$as_echo "/* confdefs.h */" > confdefs.h
3096
3097# Predefined preprocessor variables.
3098
3099cat >>confdefs.h <<_ACEOF
3100#define PACKAGE_NAME "$PACKAGE_NAME"
3101_ACEOF
3102
3103cat >>confdefs.h <<_ACEOF
3104#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3105_ACEOF
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_VERSION "$PACKAGE_VERSION"
3109_ACEOF
3110
3111cat >>confdefs.h <<_ACEOF
3112#define PACKAGE_STRING "$PACKAGE_STRING"
3113_ACEOF
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_URL "$PACKAGE_URL"
3121_ACEOF
3122
3123
3124# Let the site file select an alternate cache file if it wants to.
3125# Prefer an explicitly selected file to automatically selected ones.
3126ac_site_file1=NONE
3127ac_site_file2=NONE
3128if test -n "$CONFIG_SITE"; then
3129  # We do not want a PATH search for config.site.
3130  case $CONFIG_SITE in #((
3131    -*)  ac_site_file1=./$CONFIG_SITE;;
3132    */*) ac_site_file1=$CONFIG_SITE;;
3133    *)   ac_site_file1=./$CONFIG_SITE;;
3134  esac
3135elif test "x$prefix" != xNONE; then
3136  ac_site_file1=$prefix/share/config.site
3137  ac_site_file2=$prefix/etc/config.site
3138else
3139  ac_site_file1=$ac_default_prefix/share/config.site
3140  ac_site_file2=$ac_default_prefix/etc/config.site
3141fi
3142for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3143do
3144  test "x$ac_site_file" = xNONE && continue
3145  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3147$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3148    sed 's/^/| /' "$ac_site_file" >&5
3149    . "$ac_site_file" \
3150      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3152as_fn_error $? "failed to load site script $ac_site_file
3153See \`config.log' for more details" "$LINENO" 5; }
3154  fi
3155done
3156
3157if test -r "$cache_file"; then
3158  # Some versions of bash will fail to source /dev/null (special files
3159  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3160  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3162$as_echo "$as_me: loading cache $cache_file" >&6;}
3163    case $cache_file in
3164      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3165      *)                      . "./$cache_file";;
3166    esac
3167  fi
3168else
3169  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3170$as_echo "$as_me: creating cache $cache_file" >&6;}
3171  >$cache_file
3172fi
3173
3174# Check that the precious variables saved in the cache have kept the same
3175# value.
3176ac_cache_corrupted=false
3177for ac_var in $ac_precious_vars; do
3178  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3179  eval ac_new_set=\$ac_env_${ac_var}_set
3180  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3181  eval ac_new_val=\$ac_env_${ac_var}_value
3182  case $ac_old_set,$ac_new_set in
3183    set,)
3184      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3185$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3186      ac_cache_corrupted=: ;;
3187    ,set)
3188      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3189$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3190      ac_cache_corrupted=: ;;
3191    ,);;
3192    *)
3193      if test "x$ac_old_val" != "x$ac_new_val"; then
3194	# differences in whitespace do not lead to failure.
3195	ac_old_val_w=`echo x $ac_old_val`
3196	ac_new_val_w=`echo x $ac_new_val`
3197	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3198	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3199$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3200	  ac_cache_corrupted=:
3201	else
3202	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3203$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3204	  eval $ac_var=\$ac_old_val
3205	fi
3206	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3207$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3208	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3209$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3210      fi;;
3211  esac
3212  # Pass precious variables to config.status.
3213  if test "$ac_new_set" = set; then
3214    case $ac_new_val in
3215    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3216    *) ac_arg=$ac_var=$ac_new_val ;;
3217    esac
3218    case " $ac_configure_args " in
3219      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3220      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3221    esac
3222  fi
3223done
3224if $ac_cache_corrupted; then
3225  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3228$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3229  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3230fi
3231## -------------------- ##
3232## Main body of script. ##
3233## -------------------- ##
3234
3235ac_ext=c
3236ac_cpp='$CPP $CPPFLAGS'
3237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3239ac_compiler_gnu=$ac_cv_c_compiler_gnu
3240
3241
3242
3243ac_aux_dir=
3244for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3245  if test -f "$ac_dir/install-sh"; then
3246    ac_aux_dir=$ac_dir
3247    ac_install_sh="$ac_aux_dir/install-sh -c"
3248    break
3249  elif test -f "$ac_dir/install.sh"; then
3250    ac_aux_dir=$ac_dir
3251    ac_install_sh="$ac_aux_dir/install.sh -c"
3252    break
3253  elif test -f "$ac_dir/shtool"; then
3254    ac_aux_dir=$ac_dir
3255    ac_install_sh="$ac_aux_dir/shtool install -c"
3256    break
3257  fi
3258done
3259if test -z "$ac_aux_dir"; then
3260  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
3261fi
3262
3263# These three variables are undocumented and unsupported,
3264# and are intended to be withdrawn in a future Autoconf release.
3265# They can cause serious problems if a builder's source tree is in a directory
3266# whose full name contains unusual characters.
3267ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3268ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3269ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3270
3271
3272# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3273
3274#
3275# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3277#
3278# This code is free software; you can redistribute it and/or modify it
3279# under the terms of the GNU General Public License version 2 only, as
3280# published by the Free Software Foundation.  Oracle designates this
3281# particular file as subject to the "Classpath" exception as provided
3282# by Oracle in the LICENSE file that accompanied this code.
3283#
3284# This code is distributed in the hope that it will be useful, but WITHOUT
3285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3287# version 2 for more details (a copy is included in the LICENSE file that
3288# accompanied this code).
3289#
3290# You should have received a copy of the GNU General Public License version
3291# 2 along with this work; if not, write to the Free Software Foundation,
3292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3293#
3294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3295# or visit www.oracle.com if you need additional information or have any
3296# questions.
3297#
3298
3299#
3300# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3301#
3302# This program is free software; you can redistribute it and/or modify
3303# it under the terms of the GNU General Public License as published by
3304# the Free Software Foundation; either version 2 of the License, or
3305# (at your option) any later version.
3306#
3307# This program is distributed in the hope that it will be useful, but
3308# WITHOUT ANY WARRANTY; without even the implied warranty of
3309# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3310# General Public License for more details.
3311#
3312# You should have received a copy of the GNU General Public License
3313# along with this program; if not, write to the Free Software
3314# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3315#
3316# As a special exception to the GNU General Public License, if you
3317# distribute this file as part of a program that contains a
3318# configuration script generated by Autoconf, you may include it under
3319# the same distribution terms that you use for the rest of that program.
3320
3321# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3322# ----------------------------------
3323# PKG_PROG_PKG_CONFIG
3324
3325# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3326#
3327# Check to see whether a particular set of modules exists.  Similar
3328# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3329#
3330#
3331# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3332# this or PKG_CHECK_MODULES is called, or make sure to call
3333# PKG_CHECK_EXISTS manually
3334# --------------------------------------------------------------
3335
3336
3337
3338# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3339# ---------------------------------------------
3340# _PKG_CONFIG
3341
3342# _PKG_SHORT_ERRORS_SUPPORTED
3343# -----------------------------
3344# _PKG_SHORT_ERRORS_SUPPORTED
3345
3346
3347# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3348# [ACTION-IF-NOT-FOUND])
3349#
3350#
3351# Note that if there is a possibility the first call to
3352# PKG_CHECK_MODULES might not happen, you should be sure to include an
3353# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3354#
3355#
3356# --------------------------------------------------------------
3357# PKG_CHECK_MODULES
3358
3359
3360# Include these first...
3361#
3362# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3363# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3364#
3365# This code is free software; you can redistribute it and/or modify it
3366# under the terms of the GNU General Public License version 2 only, as
3367# published by the Free Software Foundation.  Oracle designates this
3368# particular file as subject to the "Classpath" exception as provided
3369# by Oracle in the LICENSE file that accompanied this code.
3370#
3371# This code is distributed in the hope that it will be useful, but WITHOUT
3372# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3373# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3374# version 2 for more details (a copy is included in the LICENSE file that
3375# accompanied this code).
3376#
3377# You should have received a copy of the GNU General Public License version
3378# 2 along with this work; if not, write to the Free Software Foundation,
3379# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3380#
3381# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3382# or visit www.oracle.com if you need additional information or have any
3383# questions.
3384#
3385
3386# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3387# If so, then append $1 to $2 \
3388# Also set JVM_ARG_OK to true/false depending on outcome.
3389
3390
3391# Appends a string to a path variable, only adding the : when needed.
3392
3393
3394# Prepends a string to a path variable, only adding the : when needed.
3395
3396
3397# This will make sure the given variable points to a full and proper
3398# path. This means:
3399# 1) There will be no spaces in the path. On unix platforms,
3400#    spaces in the path will result in an error. On Windows,
3401#    the path will be rewritten using short-style to be space-free.
3402# 2) The path will be absolute, and it will be in unix-style (on
3403#     cygwin).
3404# $1: The name of the variable to fix
3405
3406
3407# This will make sure the given variable points to a executable
3408# with a full and proper path. This means:
3409# 1) There will be no spaces in the path. On unix platforms,
3410#    spaces in the path will result in an error. On Windows,
3411#    the path will be rewritten using short-style to be space-free.
3412# 2) The path will be absolute, and it will be in unix-style (on
3413#     cygwin).
3414# Any arguments given to the executable is preserved.
3415# If the input variable does not have a directory specification, then
3416# it need to be in the PATH.
3417# $1: The name of the variable to fix
3418
3419
3420
3421
3422# Register a --with argument but mark it as deprecated
3423# $1: The name of the with argument to deprecate, not including --with-
3424
3425
3426# Register a --enable argument but mark it as deprecated
3427# $1: The name of the with argument to deprecate, not including --enable-
3428# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3429
3430
3431
3432
3433# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3434# $1: variable to check
3435
3436
3437# Check that there are no unprocessed overridden variables left.
3438# If so, they are an incorrect argument and we will exit with an error.
3439
3440
3441# Setup a tool for the given variable. If correctly specified by the user,
3442# use that value, otherwise search for the tool using the supplied code snippet.
3443# $1: variable to set
3444# $2: code snippet to call to look for the tool
3445# $3: code snippet to call if variable was used to find tool
3446
3447
3448# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3449# $1: variable to set
3450# $2: executable name (or list of names) to look for
3451
3452
3453# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3454# $1: variable to set
3455# $2: executable name (or list of names) to look for
3456
3457
3458# Like BASIC_PATH_PROGS but fails if no tool was found.
3459# $1: variable to set
3460# $2: executable name (or list of names) to look for
3461
3462
3463# Like BASIC_SETUP_TOOL but fails if no tool was found.
3464# $1: variable to set
3465# $2: autoconf macro to call to look for the special tool
3466
3467
3468# Setup the most fundamental tools that relies on not much else to set up,
3469# but is used by much of the early bootstrap code.
3470
3471
3472# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3473
3474
3475# Evaluates platform specific overrides for devkit variables.
3476# $1: Name of variable
3477
3478
3479
3480
3481
3482
3483#%%% Simple tools %%%
3484
3485# Check if we have found a usable version of make
3486# $1: the path to a potential make binary (or empty)
3487# $2: the description on how we found this
3488
3489
3490
3491
3492# Goes looking for a usable version of GNU make.
3493
3494
3495
3496
3497
3498
3499# Check if build directory is on local disk. If not possible to determine,
3500# we prefer to claim it's local.
3501# Argument 1: directory to test
3502# Argument 2: what to do if it is on local disk
3503# Argument 3: what to do otherwise (remote disk or failure)
3504
3505
3506# Check that source files have basic read permissions set. This might
3507# not be the case in cygwin in certain conditions.
3508
3509
3510
3511
3512# Check for support for specific options in bash
3513
3514
3515# Code to run after AC_OUTPUT
3516
3517
3518#
3519# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3520# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3521#
3522# This code is free software; you can redistribute it and/or modify it
3523# under the terms of the GNU General Public License version 2 only, as
3524# published by the Free Software Foundation.  Oracle designates this
3525# particular file as subject to the "Classpath" exception as provided
3526# by Oracle in the LICENSE file that accompanied this code.
3527#
3528# This code is distributed in the hope that it will be useful, but WITHOUT
3529# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3530# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3531# version 2 for more details (a copy is included in the LICENSE file that
3532# accompanied this code).
3533#
3534# You should have received a copy of the GNU General Public License version
3535# 2 along with this work; if not, write to the Free Software Foundation,
3536# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3537#
3538# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3539# or visit www.oracle.com if you need additional information or have any
3540# questions.
3541#
3542
3543
3544
3545
3546
3547# Helper function which possibly converts a path using DOS-style short mode.
3548# If so, the updated path is stored in $new_path.
3549# $1: The path to check
3550
3551
3552# Helper function which possibly converts a path using DOS-style short mode.
3553# If so, the updated path is stored in $new_path.
3554# $1: The path to check
3555
3556
3557# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3558# and could probably be heavily simplified. However, all changes in this
3559# area tend to need lot of testing in different scenarios, and in lack of
3560# proper unit testing, cleaning this up has not been deemed worth the effort
3561# at the moment.
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3572
3573
3574
3575
3576# ... then the rest
3577#
3578# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3579# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580#
3581# This code is free software; you can redistribute it and/or modify it
3582# under the terms of the GNU General Public License version 2 only, as
3583# published by the Free Software Foundation.  Oracle designates this
3584# particular file as subject to the "Classpath" exception as provided
3585# by Oracle in the LICENSE file that accompanied this code.
3586#
3587# This code is distributed in the hope that it will be useful, but WITHOUT
3588# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590# version 2 for more details (a copy is included in the LICENSE file that
3591# accompanied this code).
3592#
3593# You should have received a copy of the GNU General Public License version
3594# 2 along with this work; if not, write to the Free Software Foundation,
3595# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596#
3597# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598# or visit www.oracle.com if you need additional information or have any
3599# questions.
3600#
3601
3602########################################################################
3603# This file handles detection of the Boot JDK. The Boot JDK detection
3604# process has been developed as a response to solve a complex real-world
3605# problem. Initially, it was simple, but it has grown as platform after
3606# platform, idiosyncracy after idiosyncracy has been supported.
3607#
3608# The basic idea is this:
3609# 1) You need an acceptable *) JDK to use as a Boot JDK
3610# 2) There are several ways to locate a JDK, that are mostly platform
3611#    dependent **)
3612# 3) You can have multiple JDKs installed
3613# 4) If possible, configure should try to dig out an acceptable JDK
3614#    automatically, without having to resort to command-line options
3615#
3616# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3617#     javac) and not a JRE, etc.
3618#
3619# **) On Windows we typically use a well-known path.
3620#     On MacOSX we typically use the tool java_home.
3621#     On Linux we typically find javac in the $PATH, and then follow a
3622#     chain of symlinks that often ends up in a real JDK.
3623#
3624# This leads to the code where we check in different ways to locate a
3625# JDK, and if one is found, check if it is acceptable. If not, we print
3626# our reasons for rejecting it (useful when debugging non-working
3627# configure situations) and continue checking the next one.
3628########################################################################
3629
3630# Execute the check given as argument, and verify the result
3631# If the Boot JDK was previously found, do nothing
3632# $1 A command line (typically autoconf macro) to execute
3633
3634
3635# Test: Is bootjdk explicitely set by command line arguments?
3636
3637
3638# Test: Is $JAVA_HOME set?
3639
3640
3641# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3642
3643
3644# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3645# $1: Argument to the java_home binary (optional)
3646
3647
3648# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3649
3650
3651# Look for a jdk in the given path. If there are multiple, try to select the newest.
3652# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3653# $1 = Path to directory containing jdk installations.
3654# $2 = String to append to the found JDK directory to get the proper JDK home
3655
3656
3657# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3658# environmental variable as base for where to look.
3659# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3660
3661
3662# Test: Is there a JDK installed in default, well-known locations?
3663
3664
3665# Check that a command-line tool in the Boot JDK is correct
3666# $1 = name of variable to assign
3667# $2 = name of binary
3668
3669
3670###############################################################################
3671#
3672# We need a Boot JDK to bootstrap the build.
3673#
3674
3675
3676
3677
3678
3679#
3680# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3681# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3682#
3683# This code is free software; you can redistribute it and/or modify it
3684# under the terms of the GNU General Public License version 2 only, as
3685# published by the Free Software Foundation.  Oracle designates this
3686# particular file as subject to the "Classpath" exception as provided
3687# by Oracle in the LICENSE file that accompanied this code.
3688#
3689# This code is distributed in the hope that it will be useful, but WITHOUT
3690# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3691# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3692# version 2 for more details (a copy is included in the LICENSE file that
3693# accompanied this code).
3694#
3695# You should have received a copy of the GNU General Public License version
3696# 2 along with this work; if not, write to the Free Software Foundation,
3697# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3698#
3699# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3700# or visit www.oracle.com if you need additional information or have any
3701# questions.
3702#
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723#
3724# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3725# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3726#
3727# This code is free software; you can redistribute it and/or modify it
3728# under the terms of the GNU General Public License version 2 only, as
3729# published by the Free Software Foundation.  Oracle designates this
3730# particular file as subject to the "Classpath" exception as provided
3731# by Oracle in the LICENSE file that accompanied this code.
3732#
3733# This code is distributed in the hope that it will be useful, but WITHOUT
3734# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3735# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3736# version 2 for more details (a copy is included in the LICENSE file that
3737# accompanied this code).
3738#
3739# You should have received a copy of the GNU General Public License version
3740# 2 along with this work; if not, write to the Free Software Foundation,
3741# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3742#
3743# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3744# or visit www.oracle.com if you need additional information or have any
3745# questions.
3746#
3747
3748# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3749# corresponding configure arguments instead
3750
3751
3752# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3753# that configure can use them while detecting compilers.
3754# TOOLCHAIN_TYPE is available here.
3755# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3756
3757
3758
3759
3760
3761
3762# Documentation on common flags used for solstudio in HIGHEST.
3763#
3764# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3765#          done with care, there are some assumptions below that need to
3766#          be understood about the use of pointers, and IEEE behavior.
3767#
3768# -fns: Use non-standard floating point mode (not IEEE 754)
3769# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3770# -fsingle: Use single precision floating point with 'float'
3771# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3772#   (Source with excessing pointer casting and data access with mixed
3773#    pointer types are not recommended)
3774# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3775#   (If you expect perfect errno behavior, do not use this)
3776# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3777# -xrestrict: Pointer parameters to functions do not overlap
3778#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3779#    If you pass in multiple pointers to the same data, do not use this)
3780# -xlibmil: Inline some library routines
3781#   (If you expect perfect errno behavior, do not use this)
3782# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3783#   (If you expect perfect errno behavior, do not use this)
3784#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3785
3786    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3787    # Bug?
3788    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3789    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3790    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3791    #fi
3792
3793
3794
3795
3796
3797# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3798#                                   [RUN-IF-FALSE])
3799# ------------------------------------------------------------
3800# Check that the c and c++ compilers support an argument
3801
3802
3803# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3804#                                    [RUN-IF-FALSE])
3805# ------------------------------------------------------------
3806# Check that the linker support an argument
3807
3808
3809
3810
3811#
3812# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3813# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3814#
3815# This code is free software; you can redistribute it and/or modify it
3816# under the terms of the GNU General Public License version 2 only, as
3817# published by the Free Software Foundation.  Oracle designates this
3818# particular file as subject to the "Classpath" exception as provided
3819# by Oracle in the LICENSE file that accompanied this code.
3820#
3821# This code is distributed in the hope that it will be useful, but WITHOUT
3822# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3823# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3824# version 2 for more details (a copy is included in the LICENSE file that
3825# accompanied this code).
3826#
3827# You should have received a copy of the GNU General Public License version
3828# 2 along with this work; if not, write to the Free Software Foundation,
3829# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3830#
3831# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3832# or visit www.oracle.com if you need additional information or have any
3833# questions.
3834#
3835
3836
3837
3838
3839
3840cygwin_help() {
3841  case $1 in
3842    unzip)
3843      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3844      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3845      ;;
3846    zip)
3847      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3848      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3849      ;;
3850    make)
3851      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3852      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3853      ;;
3854    freetype)
3855      HELP_MSG="
3856The freetype library can now be build during the configure process.
3857Download the freetype sources and unpack them into an arbitrary directory:
3858
3859wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3860tar -xzf freetype-2.5.3.tar.gz
3861
3862Then run configure with '--with-freetype-src=<freetype_src>'. This will
3863automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3864builds or into '<freetype_src>/lib32' for 32-bit builds.
3865Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3866and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3867      ;;
3868  esac
3869}
3870
3871msys_help() {
3872  PKGHANDLER_COMMAND=""
3873}
3874
3875apt_help() {
3876  case $1 in
3877    reduced)
3878      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3879    devkit)
3880      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3881    openjdk)
3882      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3883    alsa)
3884      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3885    cups)
3886      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3887    freetype)
3888      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3889    ffi)
3890      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3891    x11)
3892      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3893    ccache)
3894      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3895  esac
3896}
3897
3898yum_help() {
3899  case $1 in
3900    devkit)
3901      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3902    openjdk)
3903      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3904    alsa)
3905      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3906    cups)
3907      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3908    freetype)
3909      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3910    x11)
3911      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3912    ccache)
3913      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3914  esac
3915}
3916
3917port_help() {
3918  PKGHANDLER_COMMAND=""
3919}
3920
3921pkgutil_help() {
3922  PKGHANDLER_COMMAND=""
3923}
3924
3925pkgadd_help() {
3926  PKGHANDLER_COMMAND=""
3927}
3928
3929# This function will check if we're called from the "configure" wrapper while
3930# printing --help. If so, we will print out additional information that can
3931# only be extracted within the autoconf script, and then exit. This must be
3932# called at the very beginning in configure.ac.
3933
3934
3935
3936
3937
3938
3939#
3940# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973###############################################################################
3974#
3975# Should we build only OpenJDK even if closed sources are present?
3976#
3977
3978
3979
3980
3981###############################################################################
3982#
3983# Setup version numbers
3984#
3985
3986
3987
3988
3989
3990
3991################################################################################
3992#
3993# Gcov coverage data for hotspot
3994#
3995
3996
3997################################################################################
3998#
3999# Static build support.  When enabled will generate static
4000# libraries instead of shared libraries for all JDK libs.
4001#
4002
4003
4004
4005
4006#
4007# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4008# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009#
4010# This code is free software; you can redistribute it and/or modify it
4011# under the terms of the GNU General Public License version 2 only, as
4012# published by the Free Software Foundation.  Oracle designates this
4013# particular file as subject to the "Classpath" exception as provided
4014# by Oracle in the LICENSE file that accompanied this code.
4015#
4016# This code is distributed in the hope that it will be useful, but WITHOUT
4017# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019# version 2 for more details (a copy is included in the LICENSE file that
4020# accompanied this code).
4021#
4022# You should have received a copy of the GNU General Public License version
4023# 2 along with this work; if not, write to the Free Software Foundation,
4024# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025#
4026# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027# or visit www.oracle.com if you need additional information or have any
4028# questions.
4029#
4030
4031# Major library component reside in separate files.
4032#
4033# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4034# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4035#
4036# This code is free software; you can redistribute it and/or modify it
4037# under the terms of the GNU General Public License version 2 only, as
4038# published by the Free Software Foundation.  Oracle designates this
4039# particular file as subject to the "Classpath" exception as provided
4040# by Oracle in the LICENSE file that accompanied this code.
4041#
4042# This code is distributed in the hope that it will be useful, but WITHOUT
4043# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4044# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4045# version 2 for more details (a copy is included in the LICENSE file that
4046# accompanied this code).
4047#
4048# You should have received a copy of the GNU General Public License version
4049# 2 along with this work; if not, write to the Free Software Foundation,
4050# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4051#
4052# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4053# or visit www.oracle.com if you need additional information or have any
4054# questions.
4055#
4056
4057################################################################################
4058# Setup alsa (Advanced Linux Sound Architecture)
4059################################################################################
4060
4061
4062#
4063# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4064# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4065#
4066# This code is free software; you can redistribute it and/or modify it
4067# under the terms of the GNU General Public License version 2 only, as
4068# published by the Free Software Foundation.  Oracle designates this
4069# particular file as subject to the "Classpath" exception as provided
4070# by Oracle in the LICENSE file that accompanied this code.
4071#
4072# This code is distributed in the hope that it will be useful, but WITHOUT
4073# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4074# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4075# version 2 for more details (a copy is included in the LICENSE file that
4076# accompanied this code).
4077#
4078# You should have received a copy of the GNU General Public License version
4079# 2 along with this work; if not, write to the Free Software Foundation,
4080# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4081#
4082# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4083# or visit www.oracle.com if you need additional information or have any
4084# questions.
4085#
4086
4087################################################################################
4088# Setup bundled libraries.
4089#
4090# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4091# OpenJDK repository. Default is to use these libraries as bundled, but they
4092# might be replaced by en external version by the user.
4093################################################################################
4094
4095
4096################################################################################
4097# Setup libjpeg
4098################################################################################
4099
4100
4101################################################################################
4102# Setup giflib
4103################################################################################
4104
4105
4106################################################################################
4107# Setup libpng
4108################################################################################
4109
4110
4111################################################################################
4112# Setup zlib
4113################################################################################
4114
4115
4116################################################################################
4117# Setup lcms (Little CMS)
4118################################################################################
4119
4120
4121#
4122# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4123# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4124#
4125# This code is free software; you can redistribute it and/or modify it
4126# under the terms of the GNU General Public License version 2 only, as
4127# published by the Free Software Foundation.  Oracle designates this
4128# particular file as subject to the "Classpath" exception as provided
4129# by Oracle in the LICENSE file that accompanied this code.
4130#
4131# This code is distributed in the hope that it will be useful, but WITHOUT
4132# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4133# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4134# version 2 for more details (a copy is included in the LICENSE file that
4135# accompanied this code).
4136#
4137# You should have received a copy of the GNU General Public License version
4138# 2 along with this work; if not, write to the Free Software Foundation,
4139# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4140#
4141# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4142# or visit www.oracle.com if you need additional information or have any
4143# questions.
4144#
4145
4146################################################################################
4147# Setup cups (Common Unix Printing System)
4148################################################################################
4149
4150
4151#
4152# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4153# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4154#
4155# This code is free software; you can redistribute it and/or modify it
4156# under the terms of the GNU General Public License version 2 only, as
4157# published by the Free Software Foundation.  Oracle designates this
4158# particular file as subject to the "Classpath" exception as provided
4159# by Oracle in the LICENSE file that accompanied this code.
4160#
4161# This code is distributed in the hope that it will be useful, but WITHOUT
4162# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4163# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4164# version 2 for more details (a copy is included in the LICENSE file that
4165# accompanied this code).
4166#
4167# You should have received a copy of the GNU General Public License version
4168# 2 along with this work; if not, write to the Free Software Foundation,
4169# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4170#
4171# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4172# or visit www.oracle.com if you need additional information or have any
4173# questions.
4174#
4175
4176################################################################################
4177# Setup libffi (Foreign Function Interface)
4178################################################################################
4179
4180
4181#
4182# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4183# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4184#
4185# This code is free software; you can redistribute it and/or modify it
4186# under the terms of the GNU General Public License version 2 only, as
4187# published by the Free Software Foundation.  Oracle designates this
4188# particular file as subject to the "Classpath" exception as provided
4189# by Oracle in the LICENSE file that accompanied this code.
4190#
4191# This code is distributed in the hope that it will be useful, but WITHOUT
4192# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4193# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4194# version 2 for more details (a copy is included in the LICENSE file that
4195# accompanied this code).
4196#
4197# You should have received a copy of the GNU General Public License version
4198# 2 along with this work; if not, write to the Free Software Foundation,
4199# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4200#
4201# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4202# or visit www.oracle.com if you need additional information or have any
4203# questions.
4204#
4205
4206################################################################################
4207# Build the freetype lib from source
4208################################################################################
4209
4210
4211################################################################################
4212# Check if a potential freeype library match is correct and usable
4213################################################################################
4214
4215
4216################################################################################
4217# Setup freetype (The FreeType2 font rendering library)
4218################################################################################
4219
4220
4221#
4222# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4224#
4225# This code is free software; you can redistribute it and/or modify it
4226# under the terms of the GNU General Public License version 2 only, as
4227# published by the Free Software Foundation.  Oracle designates this
4228# particular file as subject to the "Classpath" exception as provided
4229# by Oracle in the LICENSE file that accompanied this code.
4230#
4231# This code is distributed in the hope that it will be useful, but WITHOUT
4232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4234# version 2 for more details (a copy is included in the LICENSE file that
4235# accompanied this code).
4236#
4237# You should have received a copy of the GNU General Public License version
4238# 2 along with this work; if not, write to the Free Software Foundation,
4239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4240#
4241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4242# or visit www.oracle.com if you need additional information or have any
4243# questions.
4244#
4245
4246################################################################################
4247# Setup the standard C/C++ runtime libraries.
4248#
4249# Most importantly, determine if stdc++ should be linked statically or
4250# dynamically.
4251################################################################################
4252
4253
4254#
4255# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4256# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4257#
4258# This code is free software; you can redistribute it and/or modify it
4259# under the terms of the GNU General Public License version 2 only, as
4260# published by the Free Software Foundation.  Oracle designates this
4261# particular file as subject to the "Classpath" exception as provided
4262# by Oracle in the LICENSE file that accompanied this code.
4263#
4264# This code is distributed in the hope that it will be useful, but WITHOUT
4265# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4266# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4267# version 2 for more details (a copy is included in the LICENSE file that
4268# accompanied this code).
4269#
4270# You should have received a copy of the GNU General Public License version
4271# 2 along with this work; if not, write to the Free Software Foundation,
4272# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4273#
4274# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4275# or visit www.oracle.com if you need additional information or have any
4276# questions.
4277#
4278
4279################################################################################
4280# Setup X11 Windows system
4281################################################################################
4282
4283
4284
4285################################################################################
4286# Determine which libraries are needed for this configuration
4287################################################################################
4288
4289
4290################################################################################
4291# Parse library options, and setup needed libraries
4292################################################################################
4293
4294
4295################################################################################
4296# Setup llvm (Low-Level VM)
4297################################################################################
4298
4299
4300################################################################################
4301# Setup various libraries, typically small system libraries
4302################################################################################
4303
4304
4305#
4306# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4307# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4308#
4309# This code is free software; you can redistribute it and/or modify it
4310# under the terms of the GNU General Public License version 2 only, as
4311# published by the Free Software Foundation.  Oracle designates this
4312# particular file as subject to the "Classpath" exception as provided
4313# by Oracle in the LICENSE file that accompanied this code.
4314#
4315# This code is distributed in the hope that it will be useful, but WITHOUT
4316# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4317# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4318# version 2 for more details (a copy is included in the LICENSE file that
4319# accompanied this code).
4320#
4321# You should have received a copy of the GNU General Public License version
4322# 2 along with this work; if not, write to the Free Software Foundation,
4323# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4324#
4325# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4326# or visit www.oracle.com if you need additional information or have any
4327# questions.
4328#
4329
4330# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4331# Converts autoconf style CPU name to OpenJDK style, into
4332# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4333
4334
4335# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4336# Converts autoconf style OS name to OpenJDK style, into
4337# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4338
4339
4340# Expects $host_os $host_cpu $build_os and $build_cpu
4341# and $with_target_bits to have been setup!
4342#
4343# Translate the standard triplet(quadruplet) definition
4344# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4345# OPENJDK_BUILD_OS, etc.
4346
4347
4348# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4349# accordingly. Must be done after setting up build and target system, but before
4350# doing anything else with these values.
4351
4352
4353# Setup the legacy variables, for controlling the old makefiles.
4354#
4355
4356
4357
4358
4359#%%% Build and target systems %%%
4360
4361
4362
4363
4364# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4365# Add -mX to various FLAGS variables.
4366
4367
4368
4369
4370
4371
4372#
4373# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4375#
4376# This code is free software; you can redistribute it and/or modify it
4377# under the terms of the GNU General Public License version 2 only, as
4378# published by the Free Software Foundation.  Oracle designates this
4379# particular file as subject to the "Classpath" exception as provided
4380# by Oracle in the LICENSE file that accompanied this code.
4381#
4382# This code is distributed in the hope that it will be useful, but WITHOUT
4383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4385# version 2 for more details (a copy is included in the LICENSE file that
4386# accompanied this code).
4387#
4388# You should have received a copy of the GNU General Public License version
4389# 2 along with this work; if not, write to the Free Software Foundation,
4390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4391#
4392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4393# or visit www.oracle.com if you need additional information or have any
4394# questions.
4395#
4396
4397
4398
4399
4400
4401
4402
4403#
4404# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4405# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4406#
4407# This code is free software; you can redistribute it and/or modify it
4408# under the terms of the GNU General Public License version 2 only, as
4409# published by the Free Software Foundation.  Oracle designates this
4410# particular file as subject to the "Classpath" exception as provided
4411# by Oracle in the LICENSE file that accompanied this code.
4412#
4413# This code is distributed in the hope that it will be useful, but WITHOUT
4414# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4415# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4416# version 2 for more details (a copy is included in the LICENSE file that
4417# accompanied this code).
4418#
4419# You should have received a copy of the GNU General Public License version
4420# 2 along with this work; if not, write to the Free Software Foundation,
4421# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4422#
4423# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4424# or visit www.oracle.com if you need additional information or have any
4425# questions.
4426#
4427
4428########################################################################
4429# This file is responsible for detecting, verifying and setting up the
4430# toolchain, i.e. the compiler, linker and related utilities. It will setup
4431# proper paths to the binaries, but it will not setup any flags.
4432#
4433# The binaries used is determined by the toolchain type, which is the family of
4434# compilers and related tools that are used.
4435########################################################################
4436
4437
4438# All valid toolchains, regardless of platform (used by help.m4)
4439VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4440
4441# These toolchains are valid on different platforms
4442VALID_TOOLCHAINS_linux="gcc clang"
4443VALID_TOOLCHAINS_solaris="solstudio"
4444VALID_TOOLCHAINS_macosx="gcc clang"
4445VALID_TOOLCHAINS_aix="xlc"
4446VALID_TOOLCHAINS_windows="microsoft"
4447
4448# Toolchain descriptions
4449TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4450TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4451TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4452TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4453TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4454
4455# Setup a number of variables describing how native output files are
4456# named on this platform/toolchain.
4457
4458
4459# Determine which toolchain type to use, and make sure it is valid for this
4460# platform. Setup various information about the selected toolchain.
4461
4462
4463# Before we start detecting the toolchain executables, we might need some
4464# special setup, e.g. additional paths etc.
4465
4466
4467# Restore path, etc
4468
4469
4470# Check if a compiler is of the toolchain type we expect, and save the version
4471# information from it. If the compiler does not match the expected type,
4472# this function will abort using AC_MSG_ERROR. If it matches, the version will
4473# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4474# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4475#
4476# $1 = compiler to test (CC or CXX)
4477# $2 = human readable name of compiler (C or C++)
4478
4479
4480# Try to locate the given C or C++ compiler in the path, or otherwise.
4481#
4482# $1 = compiler to test (CC or CXX)
4483# $2 = human readable name of compiler (C or C++)
4484# $3 = list of compiler names to search for
4485
4486
4487# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4488# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4489# archiver (AR). Verify that the compilers are correct according to the
4490# toolchain type.
4491
4492
4493# Setup additional tools that is considered a part of the toolchain, but not the
4494# core part. Many of these are highly platform-specific and do not exist,
4495# and/or are not needed on all platforms.
4496
4497
4498# Setup the build tools (i.e, the compiler and linker used to build programs
4499# that should be run on the build platform, not the target platform, as a build
4500# helper). Since the non-cross-compile case uses the normal, target compilers
4501# for this, we can only do this after these have been setup.
4502
4503
4504# Setup legacy variables that are still needed as alternative ways to refer to
4505# parts of the toolchain.
4506
4507
4508# Do some additional checks on the detected tools.
4509
4510
4511# Setup the JTReg Regression Test Harness.
4512
4513
4514#
4515# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4516# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4517#
4518# This code is free software; you can redistribute it and/or modify it
4519# under the terms of the GNU General Public License version 2 only, as
4520# published by the Free Software Foundation.  Oracle designates this
4521# particular file as subject to the "Classpath" exception as provided
4522# by Oracle in the LICENSE file that accompanied this code.
4523#
4524# This code is distributed in the hope that it will be useful, but WITHOUT
4525# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4526# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4527# version 2 for more details (a copy is included in the LICENSE file that
4528# accompanied this code).
4529#
4530# You should have received a copy of the GNU General Public License version
4531# 2 along with this work; if not, write to the Free Software Foundation,
4532# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4533#
4534# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4535# or visit www.oracle.com if you need additional information or have any
4536# questions.
4537#
4538
4539################################################################################
4540# The order of these defines the priority by which we try to find them.
4541VALID_VS_VERSIONS="2013 2012 2010"
4542
4543VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4544VS_VERSION_INTERNAL_2010=100
4545VS_MSVCR_2010=msvcr100.dll
4546# We don't use msvcp on Visual Studio 2010
4547#VS_MSVCP_2010=msvcp100.dll
4548VS_ENVVAR_2010="VS100COMNTOOLS"
4549VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4550VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4551VS_VS_PLATFORM_NAME_2010="v100"
4552VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4553
4554VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4555VS_VERSION_INTERNAL_2012=110
4556VS_MSVCR_2012=msvcr110.dll
4557VS_MSVCP_2012=msvcp110.dll
4558VS_ENVVAR_2012="VS110COMNTOOLS"
4559VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4560VS_SDK_INSTALLDIR_2012=
4561VS_VS_PLATFORM_NAME_2012="v110"
4562VS_SDK_PLATFORM_NAME_2012=
4563
4564VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4565VS_VERSION_INTERNAL_2013=120
4566VS_MSVCR_2013=msvcr120.dll
4567VS_MSVCP_2013=msvcp120.dll
4568VS_ENVVAR_2013="VS120COMNTOOLS"
4569VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4570VS_SDK_INSTALLDIR_2013=
4571VS_VS_PLATFORM_NAME_2013="v120"
4572VS_SDK_PLATFORM_NAME_2013=
4573
4574################################################################################
4575
4576
4577
4578################################################################################
4579
4580
4581
4582################################################################################
4583# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4584# build environment and assigns it to VS_ENV_CMD
4585
4586
4587################################################################################
4588
4589
4590
4591################################################################################
4592# Check if the VS env variables were setup prior to running configure.
4593# If not, then find vcvarsall.bat and run it automatically, and integrate
4594# the set env variables into the spec file.
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609# This line needs to be here, verbatim, after all includes and the dummy hook
4610# definitions. It is replaced with custom functionality when building
4611# custom sources.
4612#CUSTOM_AUTOCONF_INCLUDE
4613
4614# Do not change or remove the following line, it is needed for consistency checks:
4615DATE_WHEN_GENERATED=1448375773
4616
4617###############################################################################
4618#
4619# Initialization / Boot-strapping
4620#
4621# The bootstrapping process needs to solve the "chicken or the egg" problem,
4622# thus it jumps back and forth, each time gaining something needed later on.
4623#
4624###############################################################################
4625
4626# If we are requested to print additional help, do that and then exit.
4627# This must be the very first call.
4628
4629  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4630    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4631    $PRINTF "Which are valid to use depends on the build platform.\n"
4632    for toolchain in $VALID_TOOLCHAINS_all; do
4633      # Use indirect variable referencing
4634      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4635      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4636      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4637    done
4638
4639    # And now exit directly
4640    exit 0
4641  fi
4642
4643
4644# Basic initialization that must happen first of all in the normal process.
4645
4646  # Save the original command line. This is passed to us by the wrapper configure script.
4647
4648  # Save the path variable before it gets changed
4649  ORIGINAL_PATH="$PATH"
4650
4651  DATE_WHEN_CONFIGURED=`LANG=C date`
4652
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4654$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4656$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4657
4658
4659  # Start with tools that do not need have cross compilation support
4660  # and can be expected to be found in the default PATH. These tools are
4661  # used by configure.
4662
4663  # First are all the simple required tools.
4664
4665
4666
4667  # Publish this variable in the help.
4668
4669
4670  if [ -z "${BASENAME+x}" ]; then
4671    # The variable is not set by user, try to locate tool using the code snippet
4672    for ac_prog in basename
4673do
4674  # Extract the first word of "$ac_prog", so it can be a program name with args.
4675set dummy $ac_prog; ac_word=$2
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677$as_echo_n "checking for $ac_word... " >&6; }
4678if ${ac_cv_path_BASENAME+:} false; then :
4679  $as_echo_n "(cached) " >&6
4680else
4681  case $BASENAME in
4682  [\\/]* | ?:[\\/]*)
4683  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4684  ;;
4685  *)
4686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687for as_dir in $PATH
4688do
4689  IFS=$as_save_IFS
4690  test -z "$as_dir" && as_dir=.
4691    for ac_exec_ext in '' $ac_executable_extensions; do
4692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4693    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695    break 2
4696  fi
4697done
4698  done
4699IFS=$as_save_IFS
4700
4701  ;;
4702esac
4703fi
4704BASENAME=$ac_cv_path_BASENAME
4705if test -n "$BASENAME"; then
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4707$as_echo "$BASENAME" >&6; }
4708else
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
4711fi
4712
4713
4714  test -n "$BASENAME" && break
4715done
4716
4717  else
4718    # The variable is set, but is it from the command line or the environment?
4719
4720    # Try to remove the string !BASENAME! from our list.
4721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4723      # If it failed, the variable was not from the command line. Ignore it,
4724      # but warn the user (except for BASH, which is always set by the calling BASH).
4725      if test "xBASENAME" != xBASH; then
4726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4727$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4728      fi
4729      # Try to locate tool using the code snippet
4730      for ac_prog in basename
4731do
4732  # Extract the first word of "$ac_prog", so it can be a program name with args.
4733set dummy $ac_prog; ac_word=$2
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
4736if ${ac_cv_path_BASENAME+:} false; then :
4737  $as_echo_n "(cached) " >&6
4738else
4739  case $BASENAME in
4740  [\\/]* | ?:[\\/]*)
4741  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4742  ;;
4743  *)
4744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in $PATH
4746do
4747  IFS=$as_save_IFS
4748  test -z "$as_dir" && as_dir=.
4749    for ac_exec_ext in '' $ac_executable_extensions; do
4750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4751    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753    break 2
4754  fi
4755done
4756  done
4757IFS=$as_save_IFS
4758
4759  ;;
4760esac
4761fi
4762BASENAME=$ac_cv_path_BASENAME
4763if test -n "$BASENAME"; then
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4765$as_echo "$BASENAME" >&6; }
4766else
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771
4772  test -n "$BASENAME" && break
4773done
4774
4775    else
4776      # If it succeeded, then it was overridden by the user. We will use it
4777      # for the tool.
4778
4779      # First remove it from the list of overridden variables, so we can test
4780      # for unknown variables in the end.
4781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4782
4783      # Check if we try to supply an empty value
4784      if test "x$BASENAME" = x; then
4785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4786$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4788$as_echo_n "checking for BASENAME... " >&6; }
4789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4790$as_echo "disabled" >&6; }
4791      else
4792        # Check if the provided tool contains a complete path.
4793        tool_specified="$BASENAME"
4794        tool_basename="${tool_specified##*/}"
4795        if test "x$tool_basename" = "x$tool_specified"; then
4796          # A command without a complete path is provided, search $PATH.
4797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4798$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4799          # Extract the first word of "$tool_basename", so it can be a program name with args.
4800set dummy $tool_basename; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_BASENAME+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $BASENAME in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829BASENAME=$ac_cv_path_BASENAME
4830if test -n "$BASENAME"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4832$as_echo "$BASENAME" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839          if test "x$BASENAME" = x; then
4840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4841          fi
4842        else
4843          # Otherwise we believe it is a complete path. Use it as it is.
4844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4845$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4847$as_echo_n "checking for BASENAME... " >&6; }
4848          if test ! -x "$tool_specified"; then
4849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4850$as_echo "not found" >&6; }
4851            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4852          fi
4853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4854$as_echo "$tool_specified" >&6; }
4855        fi
4856      fi
4857    fi
4858
4859  fi
4860
4861
4862
4863  if test "x$BASENAME" = x; then
4864    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4865  fi
4866
4867
4868
4869
4870
4871  # Publish this variable in the help.
4872
4873
4874  if [ -z "${BASH+x}" ]; then
4875    # The variable is not set by user, try to locate tool using the code snippet
4876    for ac_prog in bash
4877do
4878  # Extract the first word of "$ac_prog", so it can be a program name with args.
4879set dummy $ac_prog; ac_word=$2
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if ${ac_cv_path_BASH+:} false; then :
4883  $as_echo_n "(cached) " >&6
4884else
4885  case $BASH in
4886  [\\/]* | ?:[\\/]*)
4887  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4888  ;;
4889  *)
4890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4891for as_dir in $PATH
4892do
4893  IFS=$as_save_IFS
4894  test -z "$as_dir" && as_dir=.
4895    for ac_exec_ext in '' $ac_executable_extensions; do
4896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4897    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4899    break 2
4900  fi
4901done
4902  done
4903IFS=$as_save_IFS
4904
4905  ;;
4906esac
4907fi
4908BASH=$ac_cv_path_BASH
4909if test -n "$BASH"; then
4910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4911$as_echo "$BASH" >&6; }
4912else
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4914$as_echo "no" >&6; }
4915fi
4916
4917
4918  test -n "$BASH" && break
4919done
4920
4921  else
4922    # The variable is set, but is it from the command line or the environment?
4923
4924    # Try to remove the string !BASH! from our list.
4925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4927      # If it failed, the variable was not from the command line. Ignore it,
4928      # but warn the user (except for BASH, which is always set by the calling BASH).
4929      if test "xBASH" != xBASH; then
4930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4931$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4932      fi
4933      # Try to locate tool using the code snippet
4934      for ac_prog in bash
4935do
4936  # Extract the first word of "$ac_prog", so it can be a program name with args.
4937set dummy $ac_prog; ac_word=$2
4938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4939$as_echo_n "checking for $ac_word... " >&6; }
4940if ${ac_cv_path_BASH+:} false; then :
4941  $as_echo_n "(cached) " >&6
4942else
4943  case $BASH in
4944  [\\/]* | ?:[\\/]*)
4945  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4946  ;;
4947  *)
4948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949for as_dir in $PATH
4950do
4951  IFS=$as_save_IFS
4952  test -z "$as_dir" && as_dir=.
4953    for ac_exec_ext in '' $ac_executable_extensions; do
4954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4955    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957    break 2
4958  fi
4959done
4960  done
4961IFS=$as_save_IFS
4962
4963  ;;
4964esac
4965fi
4966BASH=$ac_cv_path_BASH
4967if test -n "$BASH"; then
4968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4969$as_echo "$BASH" >&6; }
4970else
4971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972$as_echo "no" >&6; }
4973fi
4974
4975
4976  test -n "$BASH" && break
4977done
4978
4979    else
4980      # If it succeeded, then it was overridden by the user. We will use it
4981      # for the tool.
4982
4983      # First remove it from the list of overridden variables, so we can test
4984      # for unknown variables in the end.
4985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4986
4987      # Check if we try to supply an empty value
4988      if test "x$BASH" = x; then
4989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4990$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4992$as_echo_n "checking for BASH... " >&6; }
4993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4994$as_echo "disabled" >&6; }
4995      else
4996        # Check if the provided tool contains a complete path.
4997        tool_specified="$BASH"
4998        tool_basename="${tool_specified##*/}"
4999        if test "x$tool_basename" = "x$tool_specified"; then
5000          # A command without a complete path is provided, search $PATH.
5001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5002$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5003          # Extract the first word of "$tool_basename", so it can be a program name with args.
5004set dummy $tool_basename; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_BASH+:} false; then :
5008  $as_echo_n "(cached) " >&6
5009else
5010  case $BASH in
5011  [\\/]* | ?:[\\/]*)
5012  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5013  ;;
5014  *)
5015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018  IFS=$as_save_IFS
5019  test -z "$as_dir" && as_dir=.
5020    for ac_exec_ext in '' $ac_executable_extensions; do
5021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024    break 2
5025  fi
5026done
5027  done
5028IFS=$as_save_IFS
5029
5030  ;;
5031esac
5032fi
5033BASH=$ac_cv_path_BASH
5034if test -n "$BASH"; then
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5036$as_echo "$BASH" >&6; }
5037else
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042
5043          if test "x$BASH" = x; then
5044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5045          fi
5046        else
5047          # Otherwise we believe it is a complete path. Use it as it is.
5048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5049$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5051$as_echo_n "checking for BASH... " >&6; }
5052          if test ! -x "$tool_specified"; then
5053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5054$as_echo "not found" >&6; }
5055            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5056          fi
5057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5058$as_echo "$tool_specified" >&6; }
5059        fi
5060      fi
5061    fi
5062
5063  fi
5064
5065
5066
5067  if test "x$BASH" = x; then
5068    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5069  fi
5070
5071
5072
5073
5074
5075  # Publish this variable in the help.
5076
5077
5078  if [ -z "${CAT+x}" ]; then
5079    # The variable is not set by user, try to locate tool using the code snippet
5080    for ac_prog in cat
5081do
5082  # Extract the first word of "$ac_prog", so it can be a program name with args.
5083set dummy $ac_prog; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_CAT+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  case $CAT in
5090  [\\/]* | ?:[\\/]*)
5091  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5092  ;;
5093  *)
5094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097  IFS=$as_save_IFS
5098  test -z "$as_dir" && as_dir=.
5099    for ac_exec_ext in '' $ac_executable_extensions; do
5100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103    break 2
5104  fi
5105done
5106  done
5107IFS=$as_save_IFS
5108
5109  ;;
5110esac
5111fi
5112CAT=$ac_cv_path_CAT
5113if test -n "$CAT"; then
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5115$as_echo "$CAT" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122  test -n "$CAT" && break
5123done
5124
5125  else
5126    # The variable is set, but is it from the command line or the environment?
5127
5128    # Try to remove the string !CAT! from our list.
5129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5131      # If it failed, the variable was not from the command line. Ignore it,
5132      # but warn the user (except for BASH, which is always set by the calling BASH).
5133      if test "xCAT" != xBASH; then
5134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5135$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5136      fi
5137      # Try to locate tool using the code snippet
5138      for ac_prog in cat
5139do
5140  # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if ${ac_cv_path_CAT+:} false; then :
5145  $as_echo_n "(cached) " >&6
5146else
5147  case $CAT in
5148  [\\/]* | ?:[\\/]*)
5149  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5150  ;;
5151  *)
5152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155  IFS=$as_save_IFS
5156  test -z "$as_dir" && as_dir=.
5157    for ac_exec_ext in '' $ac_executable_extensions; do
5158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5159    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161    break 2
5162  fi
5163done
5164  done
5165IFS=$as_save_IFS
5166
5167  ;;
5168esac
5169fi
5170CAT=$ac_cv_path_CAT
5171if test -n "$CAT"; then
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5173$as_echo "$CAT" >&6; }
5174else
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
5177fi
5178
5179
5180  test -n "$CAT" && break
5181done
5182
5183    else
5184      # If it succeeded, then it was overridden by the user. We will use it
5185      # for the tool.
5186
5187      # First remove it from the list of overridden variables, so we can test
5188      # for unknown variables in the end.
5189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5190
5191      # Check if we try to supply an empty value
5192      if test "x$CAT" = x; then
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5194$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5196$as_echo_n "checking for CAT... " >&6; }
5197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5198$as_echo "disabled" >&6; }
5199      else
5200        # Check if the provided tool contains a complete path.
5201        tool_specified="$CAT"
5202        tool_basename="${tool_specified##*/}"
5203        if test "x$tool_basename" = "x$tool_specified"; then
5204          # A command without a complete path is provided, search $PATH.
5205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5206$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5207          # Extract the first word of "$tool_basename", so it can be a program name with args.
5208set dummy $tool_basename; ac_word=$2
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210$as_echo_n "checking for $ac_word... " >&6; }
5211if ${ac_cv_path_CAT+:} false; then :
5212  $as_echo_n "(cached) " >&6
5213else
5214  case $CAT in
5215  [\\/]* | ?:[\\/]*)
5216  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5217  ;;
5218  *)
5219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220for as_dir in $PATH
5221do
5222  IFS=$as_save_IFS
5223  test -z "$as_dir" && as_dir=.
5224    for ac_exec_ext in '' $ac_executable_extensions; do
5225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5226    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228    break 2
5229  fi
5230done
5231  done
5232IFS=$as_save_IFS
5233
5234  ;;
5235esac
5236fi
5237CAT=$ac_cv_path_CAT
5238if test -n "$CAT"; then
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5240$as_echo "$CAT" >&6; }
5241else
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243$as_echo "no" >&6; }
5244fi
5245
5246
5247          if test "x$CAT" = x; then
5248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5249          fi
5250        else
5251          # Otherwise we believe it is a complete path. Use it as it is.
5252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5253$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5255$as_echo_n "checking for CAT... " >&6; }
5256          if test ! -x "$tool_specified"; then
5257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5258$as_echo "not found" >&6; }
5259            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5260          fi
5261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5262$as_echo "$tool_specified" >&6; }
5263        fi
5264      fi
5265    fi
5266
5267  fi
5268
5269
5270
5271  if test "x$CAT" = x; then
5272    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5273  fi
5274
5275
5276
5277
5278
5279  # Publish this variable in the help.
5280
5281
5282  if [ -z "${CHMOD+x}" ]; then
5283    # The variable is not set by user, try to locate tool using the code snippet
5284    for ac_prog in chmod
5285do
5286  # Extract the first word of "$ac_prog", so it can be a program name with args.
5287set dummy $ac_prog; ac_word=$2
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289$as_echo_n "checking for $ac_word... " >&6; }
5290if ${ac_cv_path_CHMOD+:} false; then :
5291  $as_echo_n "(cached) " >&6
5292else
5293  case $CHMOD in
5294  [\\/]* | ?:[\\/]*)
5295  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5296  ;;
5297  *)
5298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301  IFS=$as_save_IFS
5302  test -z "$as_dir" && as_dir=.
5303    for ac_exec_ext in '' $ac_executable_extensions; do
5304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5305    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307    break 2
5308  fi
5309done
5310  done
5311IFS=$as_save_IFS
5312
5313  ;;
5314esac
5315fi
5316CHMOD=$ac_cv_path_CHMOD
5317if test -n "$CHMOD"; then
5318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5319$as_echo "$CHMOD" >&6; }
5320else
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322$as_echo "no" >&6; }
5323fi
5324
5325
5326  test -n "$CHMOD" && break
5327done
5328
5329  else
5330    # The variable is set, but is it from the command line or the environment?
5331
5332    # Try to remove the string !CHMOD! from our list.
5333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5335      # If it failed, the variable was not from the command line. Ignore it,
5336      # but warn the user (except for BASH, which is always set by the calling BASH).
5337      if test "xCHMOD" != xBASH; then
5338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5339$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5340      fi
5341      # Try to locate tool using the code snippet
5342      for ac_prog in chmod
5343do
5344  # Extract the first word of "$ac_prog", so it can be a program name with args.
5345set dummy $ac_prog; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if ${ac_cv_path_CHMOD+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $CHMOD in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374CHMOD=$ac_cv_path_CHMOD
5375if test -n "$CHMOD"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5377$as_echo "$CHMOD" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384  test -n "$CHMOD" && break
5385done
5386
5387    else
5388      # If it succeeded, then it was overridden by the user. We will use it
5389      # for the tool.
5390
5391      # First remove it from the list of overridden variables, so we can test
5392      # for unknown variables in the end.
5393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5394
5395      # Check if we try to supply an empty value
5396      if test "x$CHMOD" = x; then
5397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5398$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5400$as_echo_n "checking for CHMOD... " >&6; }
5401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5402$as_echo "disabled" >&6; }
5403      else
5404        # Check if the provided tool contains a complete path.
5405        tool_specified="$CHMOD"
5406        tool_basename="${tool_specified##*/}"
5407        if test "x$tool_basename" = "x$tool_specified"; then
5408          # A command without a complete path is provided, search $PATH.
5409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5410$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5411          # Extract the first word of "$tool_basename", so it can be a program name with args.
5412set dummy $tool_basename; ac_word=$2
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414$as_echo_n "checking for $ac_word... " >&6; }
5415if ${ac_cv_path_CHMOD+:} false; then :
5416  $as_echo_n "(cached) " >&6
5417else
5418  case $CHMOD in
5419  [\\/]* | ?:[\\/]*)
5420  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5421  ;;
5422  *)
5423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424for as_dir in $PATH
5425do
5426  IFS=$as_save_IFS
5427  test -z "$as_dir" && as_dir=.
5428    for ac_exec_ext in '' $ac_executable_extensions; do
5429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432    break 2
5433  fi
5434done
5435  done
5436IFS=$as_save_IFS
5437
5438  ;;
5439esac
5440fi
5441CHMOD=$ac_cv_path_CHMOD
5442if test -n "$CHMOD"; then
5443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5444$as_echo "$CHMOD" >&6; }
5445else
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447$as_echo "no" >&6; }
5448fi
5449
5450
5451          if test "x$CHMOD" = x; then
5452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5453          fi
5454        else
5455          # Otherwise we believe it is a complete path. Use it as it is.
5456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5457$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5459$as_echo_n "checking for CHMOD... " >&6; }
5460          if test ! -x "$tool_specified"; then
5461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5462$as_echo "not found" >&6; }
5463            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5464          fi
5465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5466$as_echo "$tool_specified" >&6; }
5467        fi
5468      fi
5469    fi
5470
5471  fi
5472
5473
5474
5475  if test "x$CHMOD" = x; then
5476    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5477  fi
5478
5479
5480
5481
5482
5483  # Publish this variable in the help.
5484
5485
5486  if [ -z "${CMP+x}" ]; then
5487    # The variable is not set by user, try to locate tool using the code snippet
5488    for ac_prog in cmp
5489do
5490  # Extract the first word of "$ac_prog", so it can be a program name with args.
5491set dummy $ac_prog; ac_word=$2
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493$as_echo_n "checking for $ac_word... " >&6; }
5494if ${ac_cv_path_CMP+:} false; then :
5495  $as_echo_n "(cached) " >&6
5496else
5497  case $CMP in
5498  [\\/]* | ?:[\\/]*)
5499  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5500  ;;
5501  *)
5502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5503for as_dir in $PATH
5504do
5505  IFS=$as_save_IFS
5506  test -z "$as_dir" && as_dir=.
5507    for ac_exec_ext in '' $ac_executable_extensions; do
5508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5509    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5511    break 2
5512  fi
5513done
5514  done
5515IFS=$as_save_IFS
5516
5517  ;;
5518esac
5519fi
5520CMP=$ac_cv_path_CMP
5521if test -n "$CMP"; then
5522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5523$as_echo "$CMP" >&6; }
5524else
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5526$as_echo "no" >&6; }
5527fi
5528
5529
5530  test -n "$CMP" && break
5531done
5532
5533  else
5534    # The variable is set, but is it from the command line or the environment?
5535
5536    # Try to remove the string !CMP! from our list.
5537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5539      # If it failed, the variable was not from the command line. Ignore it,
5540      # but warn the user (except for BASH, which is always set by the calling BASH).
5541      if test "xCMP" != xBASH; then
5542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5543$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5544      fi
5545      # Try to locate tool using the code snippet
5546      for ac_prog in cmp
5547do
5548  # Extract the first word of "$ac_prog", so it can be a program name with args.
5549set dummy $ac_prog; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_CMP+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $CMP in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578CMP=$ac_cv_path_CMP
5579if test -n "$CMP"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5581$as_echo "$CMP" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588  test -n "$CMP" && break
5589done
5590
5591    else
5592      # If it succeeded, then it was overridden by the user. We will use it
5593      # for the tool.
5594
5595      # First remove it from the list of overridden variables, so we can test
5596      # for unknown variables in the end.
5597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5598
5599      # Check if we try to supply an empty value
5600      if test "x$CMP" = x; then
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5602$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5604$as_echo_n "checking for CMP... " >&6; }
5605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5606$as_echo "disabled" >&6; }
5607      else
5608        # Check if the provided tool contains a complete path.
5609        tool_specified="$CMP"
5610        tool_basename="${tool_specified##*/}"
5611        if test "x$tool_basename" = "x$tool_specified"; then
5612          # A command without a complete path is provided, search $PATH.
5613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5614$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5615          # Extract the first word of "$tool_basename", so it can be a program name with args.
5616set dummy $tool_basename; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if ${ac_cv_path_CMP+:} false; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  case $CMP in
5623  [\\/]* | ?:[\\/]*)
5624  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5625  ;;
5626  *)
5627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628for as_dir in $PATH
5629do
5630  IFS=$as_save_IFS
5631  test -z "$as_dir" && as_dir=.
5632    for ac_exec_ext in '' $ac_executable_extensions; do
5633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636    break 2
5637  fi
5638done
5639  done
5640IFS=$as_save_IFS
5641
5642  ;;
5643esac
5644fi
5645CMP=$ac_cv_path_CMP
5646if test -n "$CMP"; then
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5648$as_echo "$CMP" >&6; }
5649else
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651$as_echo "no" >&6; }
5652fi
5653
5654
5655          if test "x$CMP" = x; then
5656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5657          fi
5658        else
5659          # Otherwise we believe it is a complete path. Use it as it is.
5660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5661$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5663$as_echo_n "checking for CMP... " >&6; }
5664          if test ! -x "$tool_specified"; then
5665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5666$as_echo "not found" >&6; }
5667            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5668          fi
5669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5670$as_echo "$tool_specified" >&6; }
5671        fi
5672      fi
5673    fi
5674
5675  fi
5676
5677
5678
5679  if test "x$CMP" = x; then
5680    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5681  fi
5682
5683
5684
5685
5686
5687  # Publish this variable in the help.
5688
5689
5690  if [ -z "${COMM+x}" ]; then
5691    # The variable is not set by user, try to locate tool using the code snippet
5692    for ac_prog in comm
5693do
5694  # Extract the first word of "$ac_prog", so it can be a program name with args.
5695set dummy $ac_prog; ac_word=$2
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
5698if ${ac_cv_path_COMM+:} false; then :
5699  $as_echo_n "(cached) " >&6
5700else
5701  case $COMM in
5702  [\\/]* | ?:[\\/]*)
5703  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5704  ;;
5705  *)
5706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709  IFS=$as_save_IFS
5710  test -z "$as_dir" && as_dir=.
5711    for ac_exec_ext in '' $ac_executable_extensions; do
5712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5713    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5715    break 2
5716  fi
5717done
5718  done
5719IFS=$as_save_IFS
5720
5721  ;;
5722esac
5723fi
5724COMM=$ac_cv_path_COMM
5725if test -n "$COMM"; then
5726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5727$as_echo "$COMM" >&6; }
5728else
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
5731fi
5732
5733
5734  test -n "$COMM" && break
5735done
5736
5737  else
5738    # The variable is set, but is it from the command line or the environment?
5739
5740    # Try to remove the string !COMM! from our list.
5741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5743      # If it failed, the variable was not from the command line. Ignore it,
5744      # but warn the user (except for BASH, which is always set by the calling BASH).
5745      if test "xCOMM" != xBASH; then
5746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5747$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5748      fi
5749      # Try to locate tool using the code snippet
5750      for ac_prog in comm
5751do
5752  # Extract the first word of "$ac_prog", so it can be a program name with args.
5753set dummy $ac_prog; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
5756if ${ac_cv_path_COMM+:} false; then :
5757  $as_echo_n "(cached) " >&6
5758else
5759  case $COMM in
5760  [\\/]* | ?:[\\/]*)
5761  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5762  ;;
5763  *)
5764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765for as_dir in $PATH
5766do
5767  IFS=$as_save_IFS
5768  test -z "$as_dir" && as_dir=.
5769    for ac_exec_ext in '' $ac_executable_extensions; do
5770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5773    break 2
5774  fi
5775done
5776  done
5777IFS=$as_save_IFS
5778
5779  ;;
5780esac
5781fi
5782COMM=$ac_cv_path_COMM
5783if test -n "$COMM"; then
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5785$as_echo "$COMM" >&6; }
5786else
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792  test -n "$COMM" && break
5793done
5794
5795    else
5796      # If it succeeded, then it was overridden by the user. We will use it
5797      # for the tool.
5798
5799      # First remove it from the list of overridden variables, so we can test
5800      # for unknown variables in the end.
5801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5802
5803      # Check if we try to supply an empty value
5804      if test "x$COMM" = x; then
5805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5806$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5808$as_echo_n "checking for COMM... " >&6; }
5809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5810$as_echo "disabled" >&6; }
5811      else
5812        # Check if the provided tool contains a complete path.
5813        tool_specified="$COMM"
5814        tool_basename="${tool_specified##*/}"
5815        if test "x$tool_basename" = "x$tool_specified"; then
5816          # A command without a complete path is provided, search $PATH.
5817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5818$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5819          # Extract the first word of "$tool_basename", so it can be a program name with args.
5820set dummy $tool_basename; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_path_COMM+:} false; then :
5824  $as_echo_n "(cached) " >&6
5825else
5826  case $COMM in
5827  [\\/]* | ?:[\\/]*)
5828  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5829  ;;
5830  *)
5831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834  IFS=$as_save_IFS
5835  test -z "$as_dir" && as_dir=.
5836    for ac_exec_ext in '' $ac_executable_extensions; do
5837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840    break 2
5841  fi
5842done
5843  done
5844IFS=$as_save_IFS
5845
5846  ;;
5847esac
5848fi
5849COMM=$ac_cv_path_COMM
5850if test -n "$COMM"; then
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5852$as_echo "$COMM" >&6; }
5853else
5854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855$as_echo "no" >&6; }
5856fi
5857
5858
5859          if test "x$COMM" = x; then
5860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5861          fi
5862        else
5863          # Otherwise we believe it is a complete path. Use it as it is.
5864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5865$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5867$as_echo_n "checking for COMM... " >&6; }
5868          if test ! -x "$tool_specified"; then
5869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5870$as_echo "not found" >&6; }
5871            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5872          fi
5873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5874$as_echo "$tool_specified" >&6; }
5875        fi
5876      fi
5877    fi
5878
5879  fi
5880
5881
5882
5883  if test "x$COMM" = x; then
5884    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5885  fi
5886
5887
5888
5889
5890
5891  # Publish this variable in the help.
5892
5893
5894  if [ -z "${CP+x}" ]; then
5895    # The variable is not set by user, try to locate tool using the code snippet
5896    for ac_prog in cp
5897do
5898  # Extract the first word of "$ac_prog", so it can be a program name with args.
5899set dummy $ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_path_CP+:} false; then :
5903  $as_echo_n "(cached) " >&6
5904else
5905  case $CP in
5906  [\\/]* | ?:[\\/]*)
5907  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5908  ;;
5909  *)
5910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5911for as_dir in $PATH
5912do
5913  IFS=$as_save_IFS
5914  test -z "$as_dir" && as_dir=.
5915    for ac_exec_ext in '' $ac_executable_extensions; do
5916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5917    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5919    break 2
5920  fi
5921done
5922  done
5923IFS=$as_save_IFS
5924
5925  ;;
5926esac
5927fi
5928CP=$ac_cv_path_CP
5929if test -n "$CP"; then
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5931$as_echo "$CP" >&6; }
5932else
5933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934$as_echo "no" >&6; }
5935fi
5936
5937
5938  test -n "$CP" && break
5939done
5940
5941  else
5942    # The variable is set, but is it from the command line or the environment?
5943
5944    # Try to remove the string !CP! from our list.
5945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5947      # If it failed, the variable was not from the command line. Ignore it,
5948      # but warn the user (except for BASH, which is always set by the calling BASH).
5949      if test "xCP" != xBASH; then
5950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5951$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5952      fi
5953      # Try to locate tool using the code snippet
5954      for ac_prog in cp
5955do
5956  # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_path_CP+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  case $CP in
5964  [\\/]* | ?:[\\/]*)
5965  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5966  ;;
5967  *)
5968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971  IFS=$as_save_IFS
5972  test -z "$as_dir" && as_dir=.
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977    break 2
5978  fi
5979done
5980  done
5981IFS=$as_save_IFS
5982
5983  ;;
5984esac
5985fi
5986CP=$ac_cv_path_CP
5987if test -n "$CP"; then
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5989$as_echo "$CP" >&6; }
5990else
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
5996  test -n "$CP" && break
5997done
5998
5999    else
6000      # If it succeeded, then it was overridden by the user. We will use it
6001      # for the tool.
6002
6003      # First remove it from the list of overridden variables, so we can test
6004      # for unknown variables in the end.
6005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6006
6007      # Check if we try to supply an empty value
6008      if test "x$CP" = x; then
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6010$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6012$as_echo_n "checking for CP... " >&6; }
6013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6014$as_echo "disabled" >&6; }
6015      else
6016        # Check if the provided tool contains a complete path.
6017        tool_specified="$CP"
6018        tool_basename="${tool_specified##*/}"
6019        if test "x$tool_basename" = "x$tool_specified"; then
6020          # A command without a complete path is provided, search $PATH.
6021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6022$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6023          # Extract the first word of "$tool_basename", so it can be a program name with args.
6024set dummy $tool_basename; ac_word=$2
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
6027if ${ac_cv_path_CP+:} false; then :
6028  $as_echo_n "(cached) " >&6
6029else
6030  case $CP in
6031  [\\/]* | ?:[\\/]*)
6032  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6033  ;;
6034  *)
6035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038  IFS=$as_save_IFS
6039  test -z "$as_dir" && as_dir=.
6040    for ac_exec_ext in '' $ac_executable_extensions; do
6041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044    break 2
6045  fi
6046done
6047  done
6048IFS=$as_save_IFS
6049
6050  ;;
6051esac
6052fi
6053CP=$ac_cv_path_CP
6054if test -n "$CP"; then
6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6056$as_echo "$CP" >&6; }
6057else
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063          if test "x$CP" = x; then
6064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6065          fi
6066        else
6067          # Otherwise we believe it is a complete path. Use it as it is.
6068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6069$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6071$as_echo_n "checking for CP... " >&6; }
6072          if test ! -x "$tool_specified"; then
6073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6074$as_echo "not found" >&6; }
6075            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6076          fi
6077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6078$as_echo "$tool_specified" >&6; }
6079        fi
6080      fi
6081    fi
6082
6083  fi
6084
6085
6086
6087  if test "x$CP" = x; then
6088    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6089  fi
6090
6091
6092
6093
6094
6095  # Publish this variable in the help.
6096
6097
6098  if [ -z "${CUT+x}" ]; then
6099    # The variable is not set by user, try to locate tool using the code snippet
6100    for ac_prog in cut
6101do
6102  # Extract the first word of "$ac_prog", so it can be a program name with args.
6103set dummy $ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_path_CUT+:} false; then :
6107  $as_echo_n "(cached) " >&6
6108else
6109  case $CUT in
6110  [\\/]* | ?:[\\/]*)
6111  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6112  ;;
6113  *)
6114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117  IFS=$as_save_IFS
6118  test -z "$as_dir" && as_dir=.
6119    for ac_exec_ext in '' $ac_executable_extensions; do
6120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123    break 2
6124  fi
6125done
6126  done
6127IFS=$as_save_IFS
6128
6129  ;;
6130esac
6131fi
6132CUT=$ac_cv_path_CUT
6133if test -n "$CUT"; then
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6135$as_echo "$CUT" >&6; }
6136else
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
6139fi
6140
6141
6142  test -n "$CUT" && break
6143done
6144
6145  else
6146    # The variable is set, but is it from the command line or the environment?
6147
6148    # Try to remove the string !CUT! from our list.
6149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6151      # If it failed, the variable was not from the command line. Ignore it,
6152      # but warn the user (except for BASH, which is always set by the calling BASH).
6153      if test "xCUT" != xBASH; then
6154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6155$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6156      fi
6157      # Try to locate tool using the code snippet
6158      for ac_prog in cut
6159do
6160  # Extract the first word of "$ac_prog", so it can be a program name with args.
6161set dummy $ac_prog; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_CUT+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $CUT in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190CUT=$ac_cv_path_CUT
6191if test -n "$CUT"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6193$as_echo "$CUT" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200  test -n "$CUT" && break
6201done
6202
6203    else
6204      # If it succeeded, then it was overridden by the user. We will use it
6205      # for the tool.
6206
6207      # First remove it from the list of overridden variables, so we can test
6208      # for unknown variables in the end.
6209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6210
6211      # Check if we try to supply an empty value
6212      if test "x$CUT" = x; then
6213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6214$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6216$as_echo_n "checking for CUT... " >&6; }
6217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6218$as_echo "disabled" >&6; }
6219      else
6220        # Check if the provided tool contains a complete path.
6221        tool_specified="$CUT"
6222        tool_basename="${tool_specified##*/}"
6223        if test "x$tool_basename" = "x$tool_specified"; then
6224          # A command without a complete path is provided, search $PATH.
6225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6226$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6227          # Extract the first word of "$tool_basename", so it can be a program name with args.
6228set dummy $tool_basename; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_path_CUT+:} false; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234  case $CUT in
6235  [\\/]* | ?:[\\/]*)
6236  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6237  ;;
6238  *)
6239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240for as_dir in $PATH
6241do
6242  IFS=$as_save_IFS
6243  test -z "$as_dir" && as_dir=.
6244    for ac_exec_ext in '' $ac_executable_extensions; do
6245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248    break 2
6249  fi
6250done
6251  done
6252IFS=$as_save_IFS
6253
6254  ;;
6255esac
6256fi
6257CUT=$ac_cv_path_CUT
6258if test -n "$CUT"; then
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6260$as_echo "$CUT" >&6; }
6261else
6262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263$as_echo "no" >&6; }
6264fi
6265
6266
6267          if test "x$CUT" = x; then
6268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6269          fi
6270        else
6271          # Otherwise we believe it is a complete path. Use it as it is.
6272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6273$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6275$as_echo_n "checking for CUT... " >&6; }
6276          if test ! -x "$tool_specified"; then
6277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6278$as_echo "not found" >&6; }
6279            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6280          fi
6281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6282$as_echo "$tool_specified" >&6; }
6283        fi
6284      fi
6285    fi
6286
6287  fi
6288
6289
6290
6291  if test "x$CUT" = x; then
6292    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6293  fi
6294
6295
6296
6297
6298
6299  # Publish this variable in the help.
6300
6301
6302  if [ -z "${DATE+x}" ]; then
6303    # The variable is not set by user, try to locate tool using the code snippet
6304    for ac_prog in date
6305do
6306  # Extract the first word of "$ac_prog", so it can be a program name with args.
6307set dummy $ac_prog; ac_word=$2
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6309$as_echo_n "checking for $ac_word... " >&6; }
6310if ${ac_cv_path_DATE+:} false; then :
6311  $as_echo_n "(cached) " >&6
6312else
6313  case $DATE in
6314  [\\/]* | ?:[\\/]*)
6315  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6316  ;;
6317  *)
6318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319for as_dir in $PATH
6320do
6321  IFS=$as_save_IFS
6322  test -z "$as_dir" && as_dir=.
6323    for ac_exec_ext in '' $ac_executable_extensions; do
6324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6325    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6327    break 2
6328  fi
6329done
6330  done
6331IFS=$as_save_IFS
6332
6333  ;;
6334esac
6335fi
6336DATE=$ac_cv_path_DATE
6337if test -n "$DATE"; then
6338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6339$as_echo "$DATE" >&6; }
6340else
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
6343fi
6344
6345
6346  test -n "$DATE" && break
6347done
6348
6349  else
6350    # The variable is set, but is it from the command line or the environment?
6351
6352    # Try to remove the string !DATE! from our list.
6353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6355      # If it failed, the variable was not from the command line. Ignore it,
6356      # but warn the user (except for BASH, which is always set by the calling BASH).
6357      if test "xDATE" != xBASH; then
6358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6359$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6360      fi
6361      # Try to locate tool using the code snippet
6362      for ac_prog in date
6363do
6364  # Extract the first word of "$ac_prog", so it can be a program name with args.
6365set dummy $ac_prog; ac_word=$2
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367$as_echo_n "checking for $ac_word... " >&6; }
6368if ${ac_cv_path_DATE+:} false; then :
6369  $as_echo_n "(cached) " >&6
6370else
6371  case $DATE in
6372  [\\/]* | ?:[\\/]*)
6373  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6374  ;;
6375  *)
6376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379  IFS=$as_save_IFS
6380  test -z "$as_dir" && as_dir=.
6381    for ac_exec_ext in '' $ac_executable_extensions; do
6382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385    break 2
6386  fi
6387done
6388  done
6389IFS=$as_save_IFS
6390
6391  ;;
6392esac
6393fi
6394DATE=$ac_cv_path_DATE
6395if test -n "$DATE"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6397$as_echo "$DATE" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404  test -n "$DATE" && break
6405done
6406
6407    else
6408      # If it succeeded, then it was overridden by the user. We will use it
6409      # for the tool.
6410
6411      # First remove it from the list of overridden variables, so we can test
6412      # for unknown variables in the end.
6413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6414
6415      # Check if we try to supply an empty value
6416      if test "x$DATE" = x; then
6417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6418$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6420$as_echo_n "checking for DATE... " >&6; }
6421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6422$as_echo "disabled" >&6; }
6423      else
6424        # Check if the provided tool contains a complete path.
6425        tool_specified="$DATE"
6426        tool_basename="${tool_specified##*/}"
6427        if test "x$tool_basename" = "x$tool_specified"; then
6428          # A command without a complete path is provided, search $PATH.
6429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6430$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6431          # Extract the first word of "$tool_basename", so it can be a program name with args.
6432set dummy $tool_basename; ac_word=$2
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434$as_echo_n "checking for $ac_word... " >&6; }
6435if ${ac_cv_path_DATE+:} false; then :
6436  $as_echo_n "(cached) " >&6
6437else
6438  case $DATE in
6439  [\\/]* | ?:[\\/]*)
6440  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6441  ;;
6442  *)
6443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444for as_dir in $PATH
6445do
6446  IFS=$as_save_IFS
6447  test -z "$as_dir" && as_dir=.
6448    for ac_exec_ext in '' $ac_executable_extensions; do
6449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452    break 2
6453  fi
6454done
6455  done
6456IFS=$as_save_IFS
6457
6458  ;;
6459esac
6460fi
6461DATE=$ac_cv_path_DATE
6462if test -n "$DATE"; then
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6464$as_echo "$DATE" >&6; }
6465else
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467$as_echo "no" >&6; }
6468fi
6469
6470
6471          if test "x$DATE" = x; then
6472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6473          fi
6474        else
6475          # Otherwise we believe it is a complete path. Use it as it is.
6476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6477$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6479$as_echo_n "checking for DATE... " >&6; }
6480          if test ! -x "$tool_specified"; then
6481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6482$as_echo "not found" >&6; }
6483            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6484          fi
6485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6486$as_echo "$tool_specified" >&6; }
6487        fi
6488      fi
6489    fi
6490
6491  fi
6492
6493
6494
6495  if test "x$DATE" = x; then
6496    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6497  fi
6498
6499
6500
6501
6502
6503  # Publish this variable in the help.
6504
6505
6506  if [ -z "${DIFF+x}" ]; then
6507    # The variable is not set by user, try to locate tool using the code snippet
6508    for ac_prog in gdiff diff
6509do
6510  # Extract the first word of "$ac_prog", so it can be a program name with args.
6511set dummy $ac_prog; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if ${ac_cv_path_DIFF+:} false; then :
6515  $as_echo_n "(cached) " >&6
6516else
6517  case $DIFF in
6518  [\\/]* | ?:[\\/]*)
6519  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6520  ;;
6521  *)
6522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6523for as_dir in $PATH
6524do
6525  IFS=$as_save_IFS
6526  test -z "$as_dir" && as_dir=.
6527    for ac_exec_ext in '' $ac_executable_extensions; do
6528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6529    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6531    break 2
6532  fi
6533done
6534  done
6535IFS=$as_save_IFS
6536
6537  ;;
6538esac
6539fi
6540DIFF=$ac_cv_path_DIFF
6541if test -n "$DIFF"; then
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6543$as_echo "$DIFF" >&6; }
6544else
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
6547fi
6548
6549
6550  test -n "$DIFF" && break
6551done
6552
6553  else
6554    # The variable is set, but is it from the command line or the environment?
6555
6556    # Try to remove the string !DIFF! from our list.
6557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6559      # If it failed, the variable was not from the command line. Ignore it,
6560      # but warn the user (except for BASH, which is always set by the calling BASH).
6561      if test "xDIFF" != xBASH; then
6562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6563$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6564      fi
6565      # Try to locate tool using the code snippet
6566      for ac_prog in gdiff diff
6567do
6568  # Extract the first word of "$ac_prog", so it can be a program name with args.
6569set dummy $ac_prog; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_DIFF+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $DIFF in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598DIFF=$ac_cv_path_DIFF
6599if test -n "$DIFF"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6601$as_echo "$DIFF" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608  test -n "$DIFF" && break
6609done
6610
6611    else
6612      # If it succeeded, then it was overridden by the user. We will use it
6613      # for the tool.
6614
6615      # First remove it from the list of overridden variables, so we can test
6616      # for unknown variables in the end.
6617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6618
6619      # Check if we try to supply an empty value
6620      if test "x$DIFF" = x; then
6621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6622$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6624$as_echo_n "checking for DIFF... " >&6; }
6625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6626$as_echo "disabled" >&6; }
6627      else
6628        # Check if the provided tool contains a complete path.
6629        tool_specified="$DIFF"
6630        tool_basename="${tool_specified##*/}"
6631        if test "x$tool_basename" = "x$tool_specified"; then
6632          # A command without a complete path is provided, search $PATH.
6633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6634$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6635          # Extract the first word of "$tool_basename", so it can be a program name with args.
6636set dummy $tool_basename; ac_word=$2
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638$as_echo_n "checking for $ac_word... " >&6; }
6639if ${ac_cv_path_DIFF+:} false; then :
6640  $as_echo_n "(cached) " >&6
6641else
6642  case $DIFF in
6643  [\\/]* | ?:[\\/]*)
6644  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6645  ;;
6646  *)
6647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648for as_dir in $PATH
6649do
6650  IFS=$as_save_IFS
6651  test -z "$as_dir" && as_dir=.
6652    for ac_exec_ext in '' $ac_executable_extensions; do
6653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6654    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656    break 2
6657  fi
6658done
6659  done
6660IFS=$as_save_IFS
6661
6662  ;;
6663esac
6664fi
6665DIFF=$ac_cv_path_DIFF
6666if test -n "$DIFF"; then
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6668$as_echo "$DIFF" >&6; }
6669else
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
6675          if test "x$DIFF" = x; then
6676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6677          fi
6678        else
6679          # Otherwise we believe it is a complete path. Use it as it is.
6680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6681$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6683$as_echo_n "checking for DIFF... " >&6; }
6684          if test ! -x "$tool_specified"; then
6685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6686$as_echo "not found" >&6; }
6687            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6688          fi
6689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6690$as_echo "$tool_specified" >&6; }
6691        fi
6692      fi
6693    fi
6694
6695  fi
6696
6697
6698
6699  if test "x$DIFF" = x; then
6700    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6701  fi
6702
6703
6704
6705
6706
6707  # Publish this variable in the help.
6708
6709
6710  if [ -z "${DIRNAME+x}" ]; then
6711    # The variable is not set by user, try to locate tool using the code snippet
6712    for ac_prog in dirname
6713do
6714  # Extract the first word of "$ac_prog", so it can be a program name with args.
6715set dummy $ac_prog; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_DIRNAME+:} false; then :
6719  $as_echo_n "(cached) " >&6
6720else
6721  case $DIRNAME in
6722  [\\/]* | ?:[\\/]*)
6723  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6724  ;;
6725  *)
6726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in $PATH
6728do
6729  IFS=$as_save_IFS
6730  test -z "$as_dir" && as_dir=.
6731    for ac_exec_ext in '' $ac_executable_extensions; do
6732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735    break 2
6736  fi
6737done
6738  done
6739IFS=$as_save_IFS
6740
6741  ;;
6742esac
6743fi
6744DIRNAME=$ac_cv_path_DIRNAME
6745if test -n "$DIRNAME"; then
6746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6747$as_echo "$DIRNAME" >&6; }
6748else
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750$as_echo "no" >&6; }
6751fi
6752
6753
6754  test -n "$DIRNAME" && break
6755done
6756
6757  else
6758    # The variable is set, but is it from the command line or the environment?
6759
6760    # Try to remove the string !DIRNAME! from our list.
6761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6763      # If it failed, the variable was not from the command line. Ignore it,
6764      # but warn the user (except for BASH, which is always set by the calling BASH).
6765      if test "xDIRNAME" != xBASH; then
6766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6767$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6768      fi
6769      # Try to locate tool using the code snippet
6770      for ac_prog in dirname
6771do
6772  # Extract the first word of "$ac_prog", so it can be a program name with args.
6773set dummy $ac_prog; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_DIRNAME+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $DIRNAME in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802DIRNAME=$ac_cv_path_DIRNAME
6803if test -n "$DIRNAME"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6805$as_echo "$DIRNAME" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812  test -n "$DIRNAME" && break
6813done
6814
6815    else
6816      # If it succeeded, then it was overridden by the user. We will use it
6817      # for the tool.
6818
6819      # First remove it from the list of overridden variables, so we can test
6820      # for unknown variables in the end.
6821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6822
6823      # Check if we try to supply an empty value
6824      if test "x$DIRNAME" = x; then
6825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6826$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6828$as_echo_n "checking for DIRNAME... " >&6; }
6829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6830$as_echo "disabled" >&6; }
6831      else
6832        # Check if the provided tool contains a complete path.
6833        tool_specified="$DIRNAME"
6834        tool_basename="${tool_specified##*/}"
6835        if test "x$tool_basename" = "x$tool_specified"; then
6836          # A command without a complete path is provided, search $PATH.
6837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6838$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6839          # Extract the first word of "$tool_basename", so it can be a program name with args.
6840set dummy $tool_basename; ac_word=$2
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842$as_echo_n "checking for $ac_word... " >&6; }
6843if ${ac_cv_path_DIRNAME+:} false; then :
6844  $as_echo_n "(cached) " >&6
6845else
6846  case $DIRNAME in
6847  [\\/]* | ?:[\\/]*)
6848  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6849  ;;
6850  *)
6851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852for as_dir in $PATH
6853do
6854  IFS=$as_save_IFS
6855  test -z "$as_dir" && as_dir=.
6856    for ac_exec_ext in '' $ac_executable_extensions; do
6857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860    break 2
6861  fi
6862done
6863  done
6864IFS=$as_save_IFS
6865
6866  ;;
6867esac
6868fi
6869DIRNAME=$ac_cv_path_DIRNAME
6870if test -n "$DIRNAME"; then
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6872$as_echo "$DIRNAME" >&6; }
6873else
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876fi
6877
6878
6879          if test "x$DIRNAME" = x; then
6880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6881          fi
6882        else
6883          # Otherwise we believe it is a complete path. Use it as it is.
6884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6885$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6887$as_echo_n "checking for DIRNAME... " >&6; }
6888          if test ! -x "$tool_specified"; then
6889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6890$as_echo "not found" >&6; }
6891            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6892          fi
6893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6894$as_echo "$tool_specified" >&6; }
6895        fi
6896      fi
6897    fi
6898
6899  fi
6900
6901
6902
6903  if test "x$DIRNAME" = x; then
6904    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6905  fi
6906
6907
6908
6909
6910
6911  # Publish this variable in the help.
6912
6913
6914  if [ -z "${ECHO+x}" ]; then
6915    # The variable is not set by user, try to locate tool using the code snippet
6916    for ac_prog in echo
6917do
6918  # Extract the first word of "$ac_prog", so it can be a program name with args.
6919set dummy $ac_prog; ac_word=$2
6920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6921$as_echo_n "checking for $ac_word... " >&6; }
6922if ${ac_cv_path_ECHO+:} false; then :
6923  $as_echo_n "(cached) " >&6
6924else
6925  case $ECHO in
6926  [\\/]* | ?:[\\/]*)
6927  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6928  ;;
6929  *)
6930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6931for as_dir in $PATH
6932do
6933  IFS=$as_save_IFS
6934  test -z "$as_dir" && as_dir=.
6935    for ac_exec_ext in '' $ac_executable_extensions; do
6936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6937    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6939    break 2
6940  fi
6941done
6942  done
6943IFS=$as_save_IFS
6944
6945  ;;
6946esac
6947fi
6948ECHO=$ac_cv_path_ECHO
6949if test -n "$ECHO"; then
6950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6951$as_echo "$ECHO" >&6; }
6952else
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6954$as_echo "no" >&6; }
6955fi
6956
6957
6958  test -n "$ECHO" && break
6959done
6960
6961  else
6962    # The variable is set, but is it from the command line or the environment?
6963
6964    # Try to remove the string !ECHO! from our list.
6965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6967      # If it failed, the variable was not from the command line. Ignore it,
6968      # but warn the user (except for BASH, which is always set by the calling BASH).
6969      if test "xECHO" != xBASH; then
6970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6971$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6972      fi
6973      # Try to locate tool using the code snippet
6974      for ac_prog in echo
6975do
6976  # Extract the first word of "$ac_prog", so it can be a program name with args.
6977set dummy $ac_prog; ac_word=$2
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6979$as_echo_n "checking for $ac_word... " >&6; }
6980if ${ac_cv_path_ECHO+:} false; then :
6981  $as_echo_n "(cached) " >&6
6982else
6983  case $ECHO in
6984  [\\/]* | ?:[\\/]*)
6985  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6986  ;;
6987  *)
6988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989for as_dir in $PATH
6990do
6991  IFS=$as_save_IFS
6992  test -z "$as_dir" && as_dir=.
6993    for ac_exec_ext in '' $ac_executable_extensions; do
6994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6995    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6997    break 2
6998  fi
6999done
7000  done
7001IFS=$as_save_IFS
7002
7003  ;;
7004esac
7005fi
7006ECHO=$ac_cv_path_ECHO
7007if test -n "$ECHO"; then
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7009$as_echo "$ECHO" >&6; }
7010else
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7012$as_echo "no" >&6; }
7013fi
7014
7015
7016  test -n "$ECHO" && break
7017done
7018
7019    else
7020      # If it succeeded, then it was overridden by the user. We will use it
7021      # for the tool.
7022
7023      # First remove it from the list of overridden variables, so we can test
7024      # for unknown variables in the end.
7025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7026
7027      # Check if we try to supply an empty value
7028      if test "x$ECHO" = x; then
7029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7030$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7032$as_echo_n "checking for ECHO... " >&6; }
7033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7034$as_echo "disabled" >&6; }
7035      else
7036        # Check if the provided tool contains a complete path.
7037        tool_specified="$ECHO"
7038        tool_basename="${tool_specified##*/}"
7039        if test "x$tool_basename" = "x$tool_specified"; then
7040          # A command without a complete path is provided, search $PATH.
7041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7042$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7043          # Extract the first word of "$tool_basename", so it can be a program name with args.
7044set dummy $tool_basename; ac_word=$2
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046$as_echo_n "checking for $ac_word... " >&6; }
7047if ${ac_cv_path_ECHO+:} false; then :
7048  $as_echo_n "(cached) " >&6
7049else
7050  case $ECHO in
7051  [\\/]* | ?:[\\/]*)
7052  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7053  ;;
7054  *)
7055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056for as_dir in $PATH
7057do
7058  IFS=$as_save_IFS
7059  test -z "$as_dir" && as_dir=.
7060    for ac_exec_ext in '' $ac_executable_extensions; do
7061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7062    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7064    break 2
7065  fi
7066done
7067  done
7068IFS=$as_save_IFS
7069
7070  ;;
7071esac
7072fi
7073ECHO=$ac_cv_path_ECHO
7074if test -n "$ECHO"; then
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7076$as_echo "$ECHO" >&6; }
7077else
7078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7079$as_echo "no" >&6; }
7080fi
7081
7082
7083          if test "x$ECHO" = x; then
7084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7085          fi
7086        else
7087          # Otherwise we believe it is a complete path. Use it as it is.
7088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7089$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7091$as_echo_n "checking for ECHO... " >&6; }
7092          if test ! -x "$tool_specified"; then
7093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7094$as_echo "not found" >&6; }
7095            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7096          fi
7097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7098$as_echo "$tool_specified" >&6; }
7099        fi
7100      fi
7101    fi
7102
7103  fi
7104
7105
7106
7107  if test "x$ECHO" = x; then
7108    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7109  fi
7110
7111
7112
7113
7114
7115  # Publish this variable in the help.
7116
7117
7118  if [ -z "${EXPR+x}" ]; then
7119    # The variable is not set by user, try to locate tool using the code snippet
7120    for ac_prog in expr
7121do
7122  # Extract the first word of "$ac_prog", so it can be a program name with args.
7123set dummy $ac_prog; ac_word=$2
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if ${ac_cv_path_EXPR+:} false; then :
7127  $as_echo_n "(cached) " >&6
7128else
7129  case $EXPR in
7130  [\\/]* | ?:[\\/]*)
7131  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7132  ;;
7133  *)
7134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135for as_dir in $PATH
7136do
7137  IFS=$as_save_IFS
7138  test -z "$as_dir" && as_dir=.
7139    for ac_exec_ext in '' $ac_executable_extensions; do
7140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143    break 2
7144  fi
7145done
7146  done
7147IFS=$as_save_IFS
7148
7149  ;;
7150esac
7151fi
7152EXPR=$ac_cv_path_EXPR
7153if test -n "$EXPR"; then
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7155$as_echo "$EXPR" >&6; }
7156else
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161
7162  test -n "$EXPR" && break
7163done
7164
7165  else
7166    # The variable is set, but is it from the command line or the environment?
7167
7168    # Try to remove the string !EXPR! from our list.
7169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7171      # If it failed, the variable was not from the command line. Ignore it,
7172      # but warn the user (except for BASH, which is always set by the calling BASH).
7173      if test "xEXPR" != xBASH; then
7174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7175$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7176      fi
7177      # Try to locate tool using the code snippet
7178      for ac_prog in expr
7179do
7180  # Extract the first word of "$ac_prog", so it can be a program name with args.
7181set dummy $ac_prog; ac_word=$2
7182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183$as_echo_n "checking for $ac_word... " >&6; }
7184if ${ac_cv_path_EXPR+:} false; then :
7185  $as_echo_n "(cached) " >&6
7186else
7187  case $EXPR in
7188  [\\/]* | ?:[\\/]*)
7189  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7190  ;;
7191  *)
7192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193for as_dir in $PATH
7194do
7195  IFS=$as_save_IFS
7196  test -z "$as_dir" && as_dir=.
7197    for ac_exec_ext in '' $ac_executable_extensions; do
7198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7201    break 2
7202  fi
7203done
7204  done
7205IFS=$as_save_IFS
7206
7207  ;;
7208esac
7209fi
7210EXPR=$ac_cv_path_EXPR
7211if test -n "$EXPR"; then
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7213$as_echo "$EXPR" >&6; }
7214else
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
7217fi
7218
7219
7220  test -n "$EXPR" && break
7221done
7222
7223    else
7224      # If it succeeded, then it was overridden by the user. We will use it
7225      # for the tool.
7226
7227      # First remove it from the list of overridden variables, so we can test
7228      # for unknown variables in the end.
7229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7230
7231      # Check if we try to supply an empty value
7232      if test "x$EXPR" = x; then
7233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7234$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7236$as_echo_n "checking for EXPR... " >&6; }
7237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7238$as_echo "disabled" >&6; }
7239      else
7240        # Check if the provided tool contains a complete path.
7241        tool_specified="$EXPR"
7242        tool_basename="${tool_specified##*/}"
7243        if test "x$tool_basename" = "x$tool_specified"; then
7244          # A command without a complete path is provided, search $PATH.
7245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7246$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7247          # Extract the first word of "$tool_basename", so it can be a program name with args.
7248set dummy $tool_basename; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_EXPR+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $EXPR in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277EXPR=$ac_cv_path_EXPR
7278if test -n "$EXPR"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7280$as_echo "$EXPR" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287          if test "x$EXPR" = x; then
7288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7289          fi
7290        else
7291          # Otherwise we believe it is a complete path. Use it as it is.
7292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7293$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7295$as_echo_n "checking for EXPR... " >&6; }
7296          if test ! -x "$tool_specified"; then
7297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7298$as_echo "not found" >&6; }
7299            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7300          fi
7301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7302$as_echo "$tool_specified" >&6; }
7303        fi
7304      fi
7305    fi
7306
7307  fi
7308
7309
7310
7311  if test "x$EXPR" = x; then
7312    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7313  fi
7314
7315
7316
7317
7318
7319  # Publish this variable in the help.
7320
7321
7322  if [ -z "${FILE+x}" ]; then
7323    # The variable is not set by user, try to locate tool using the code snippet
7324    for ac_prog in file
7325do
7326  # Extract the first word of "$ac_prog", so it can be a program name with args.
7327set dummy $ac_prog; ac_word=$2
7328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7329$as_echo_n "checking for $ac_word... " >&6; }
7330if ${ac_cv_path_FILE+:} false; then :
7331  $as_echo_n "(cached) " >&6
7332else
7333  case $FILE in
7334  [\\/]* | ?:[\\/]*)
7335  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7336  ;;
7337  *)
7338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7339for as_dir in $PATH
7340do
7341  IFS=$as_save_IFS
7342  test -z "$as_dir" && as_dir=.
7343    for ac_exec_ext in '' $ac_executable_extensions; do
7344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7345    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7347    break 2
7348  fi
7349done
7350  done
7351IFS=$as_save_IFS
7352
7353  ;;
7354esac
7355fi
7356FILE=$ac_cv_path_FILE
7357if test -n "$FILE"; then
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7359$as_echo "$FILE" >&6; }
7360else
7361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362$as_echo "no" >&6; }
7363fi
7364
7365
7366  test -n "$FILE" && break
7367done
7368
7369  else
7370    # The variable is set, but is it from the command line or the environment?
7371
7372    # Try to remove the string !FILE! from our list.
7373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7375      # If it failed, the variable was not from the command line. Ignore it,
7376      # but warn the user (except for BASH, which is always set by the calling BASH).
7377      if test "xFILE" != xBASH; then
7378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7379$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7380      fi
7381      # Try to locate tool using the code snippet
7382      for ac_prog in file
7383do
7384  # Extract the first word of "$ac_prog", so it can be a program name with args.
7385set dummy $ac_prog; ac_word=$2
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
7388if ${ac_cv_path_FILE+:} false; then :
7389  $as_echo_n "(cached) " >&6
7390else
7391  case $FILE in
7392  [\\/]* | ?:[\\/]*)
7393  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7394  ;;
7395  *)
7396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399  IFS=$as_save_IFS
7400  test -z "$as_dir" && as_dir=.
7401    for ac_exec_ext in '' $ac_executable_extensions; do
7402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405    break 2
7406  fi
7407done
7408  done
7409IFS=$as_save_IFS
7410
7411  ;;
7412esac
7413fi
7414FILE=$ac_cv_path_FILE
7415if test -n "$FILE"; then
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7417$as_echo "$FILE" >&6; }
7418else
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420$as_echo "no" >&6; }
7421fi
7422
7423
7424  test -n "$FILE" && break
7425done
7426
7427    else
7428      # If it succeeded, then it was overridden by the user. We will use it
7429      # for the tool.
7430
7431      # First remove it from the list of overridden variables, so we can test
7432      # for unknown variables in the end.
7433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7434
7435      # Check if we try to supply an empty value
7436      if test "x$FILE" = x; then
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7438$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7440$as_echo_n "checking for FILE... " >&6; }
7441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7442$as_echo "disabled" >&6; }
7443      else
7444        # Check if the provided tool contains a complete path.
7445        tool_specified="$FILE"
7446        tool_basename="${tool_specified##*/}"
7447        if test "x$tool_basename" = "x$tool_specified"; then
7448          # A command without a complete path is provided, search $PATH.
7449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7450$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7451          # Extract the first word of "$tool_basename", so it can be a program name with args.
7452set dummy $tool_basename; ac_word=$2
7453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7454$as_echo_n "checking for $ac_word... " >&6; }
7455if ${ac_cv_path_FILE+:} false; then :
7456  $as_echo_n "(cached) " >&6
7457else
7458  case $FILE in
7459  [\\/]* | ?:[\\/]*)
7460  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7461  ;;
7462  *)
7463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7464for as_dir in $PATH
7465do
7466  IFS=$as_save_IFS
7467  test -z "$as_dir" && as_dir=.
7468    for ac_exec_ext in '' $ac_executable_extensions; do
7469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7470    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7472    break 2
7473  fi
7474done
7475  done
7476IFS=$as_save_IFS
7477
7478  ;;
7479esac
7480fi
7481FILE=$ac_cv_path_FILE
7482if test -n "$FILE"; then
7483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7484$as_echo "$FILE" >&6; }
7485else
7486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487$as_echo "no" >&6; }
7488fi
7489
7490
7491          if test "x$FILE" = x; then
7492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7493          fi
7494        else
7495          # Otherwise we believe it is a complete path. Use it as it is.
7496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7497$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7499$as_echo_n "checking for FILE... " >&6; }
7500          if test ! -x "$tool_specified"; then
7501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7502$as_echo "not found" >&6; }
7503            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7504          fi
7505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7506$as_echo "$tool_specified" >&6; }
7507        fi
7508      fi
7509    fi
7510
7511  fi
7512
7513
7514
7515  if test "x$FILE" = x; then
7516    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7517  fi
7518
7519
7520
7521
7522
7523  # Publish this variable in the help.
7524
7525
7526  if [ -z "${FIND+x}" ]; then
7527    # The variable is not set by user, try to locate tool using the code snippet
7528    for ac_prog in find
7529do
7530  # Extract the first word of "$ac_prog", so it can be a program name with args.
7531set dummy $ac_prog; ac_word=$2
7532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7533$as_echo_n "checking for $ac_word... " >&6; }
7534if ${ac_cv_path_FIND+:} false; then :
7535  $as_echo_n "(cached) " >&6
7536else
7537  case $FIND in
7538  [\\/]* | ?:[\\/]*)
7539  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7540  ;;
7541  *)
7542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7543for as_dir in $PATH
7544do
7545  IFS=$as_save_IFS
7546  test -z "$as_dir" && as_dir=.
7547    for ac_exec_ext in '' $ac_executable_extensions; do
7548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7549    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7551    break 2
7552  fi
7553done
7554  done
7555IFS=$as_save_IFS
7556
7557  ;;
7558esac
7559fi
7560FIND=$ac_cv_path_FIND
7561if test -n "$FIND"; then
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7563$as_echo "$FIND" >&6; }
7564else
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566$as_echo "no" >&6; }
7567fi
7568
7569
7570  test -n "$FIND" && break
7571done
7572
7573  else
7574    # The variable is set, but is it from the command line or the environment?
7575
7576    # Try to remove the string !FIND! from our list.
7577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7579      # If it failed, the variable was not from the command line. Ignore it,
7580      # but warn the user (except for BASH, which is always set by the calling BASH).
7581      if test "xFIND" != xBASH; then
7582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7583$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7584      fi
7585      # Try to locate tool using the code snippet
7586      for ac_prog in find
7587do
7588  # Extract the first word of "$ac_prog", so it can be a program name with args.
7589set dummy $ac_prog; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_FIND+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $FIND in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618FIND=$ac_cv_path_FIND
7619if test -n "$FIND"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7621$as_echo "$FIND" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628  test -n "$FIND" && break
7629done
7630
7631    else
7632      # If it succeeded, then it was overridden by the user. We will use it
7633      # for the tool.
7634
7635      # First remove it from the list of overridden variables, so we can test
7636      # for unknown variables in the end.
7637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7638
7639      # Check if we try to supply an empty value
7640      if test "x$FIND" = x; then
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7642$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7644$as_echo_n "checking for FIND... " >&6; }
7645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7646$as_echo "disabled" >&6; }
7647      else
7648        # Check if the provided tool contains a complete path.
7649        tool_specified="$FIND"
7650        tool_basename="${tool_specified##*/}"
7651        if test "x$tool_basename" = "x$tool_specified"; then
7652          # A command without a complete path is provided, search $PATH.
7653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7654$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7655          # Extract the first word of "$tool_basename", so it can be a program name with args.
7656set dummy $tool_basename; ac_word=$2
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658$as_echo_n "checking for $ac_word... " >&6; }
7659if ${ac_cv_path_FIND+:} false; then :
7660  $as_echo_n "(cached) " >&6
7661else
7662  case $FIND in
7663  [\\/]* | ?:[\\/]*)
7664  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7665  ;;
7666  *)
7667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668for as_dir in $PATH
7669do
7670  IFS=$as_save_IFS
7671  test -z "$as_dir" && as_dir=.
7672    for ac_exec_ext in '' $ac_executable_extensions; do
7673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676    break 2
7677  fi
7678done
7679  done
7680IFS=$as_save_IFS
7681
7682  ;;
7683esac
7684fi
7685FIND=$ac_cv_path_FIND
7686if test -n "$FIND"; then
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7688$as_echo "$FIND" >&6; }
7689else
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
7692fi
7693
7694
7695          if test "x$FIND" = x; then
7696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7697          fi
7698        else
7699          # Otherwise we believe it is a complete path. Use it as it is.
7700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7701$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7703$as_echo_n "checking for FIND... " >&6; }
7704          if test ! -x "$tool_specified"; then
7705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7706$as_echo "not found" >&6; }
7707            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7708          fi
7709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7710$as_echo "$tool_specified" >&6; }
7711        fi
7712      fi
7713    fi
7714
7715  fi
7716
7717
7718
7719  if test "x$FIND" = x; then
7720    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7721  fi
7722
7723
7724
7725
7726
7727  # Publish this variable in the help.
7728
7729
7730  if [ -z "${HEAD+x}" ]; then
7731    # The variable is not set by user, try to locate tool using the code snippet
7732    for ac_prog in head
7733do
7734  # Extract the first word of "$ac_prog", so it can be a program name with args.
7735set dummy $ac_prog; ac_word=$2
7736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7737$as_echo_n "checking for $ac_word... " >&6; }
7738if ${ac_cv_path_HEAD+:} false; then :
7739  $as_echo_n "(cached) " >&6
7740else
7741  case $HEAD in
7742  [\\/]* | ?:[\\/]*)
7743  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7744  ;;
7745  *)
7746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7747for as_dir in $PATH
7748do
7749  IFS=$as_save_IFS
7750  test -z "$as_dir" && as_dir=.
7751    for ac_exec_ext in '' $ac_executable_extensions; do
7752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7753    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7755    break 2
7756  fi
7757done
7758  done
7759IFS=$as_save_IFS
7760
7761  ;;
7762esac
7763fi
7764HEAD=$ac_cv_path_HEAD
7765if test -n "$HEAD"; then
7766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7767$as_echo "$HEAD" >&6; }
7768else
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7770$as_echo "no" >&6; }
7771fi
7772
7773
7774  test -n "$HEAD" && break
7775done
7776
7777  else
7778    # The variable is set, but is it from the command line or the environment?
7779
7780    # Try to remove the string !HEAD! from our list.
7781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7783      # If it failed, the variable was not from the command line. Ignore it,
7784      # but warn the user (except for BASH, which is always set by the calling BASH).
7785      if test "xHEAD" != xBASH; then
7786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7787$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7788      fi
7789      # Try to locate tool using the code snippet
7790      for ac_prog in head
7791do
7792  # Extract the first word of "$ac_prog", so it can be a program name with args.
7793set dummy $ac_prog; ac_word=$2
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7795$as_echo_n "checking for $ac_word... " >&6; }
7796if ${ac_cv_path_HEAD+:} false; then :
7797  $as_echo_n "(cached) " >&6
7798else
7799  case $HEAD in
7800  [\\/]* | ?:[\\/]*)
7801  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7802  ;;
7803  *)
7804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7805for as_dir in $PATH
7806do
7807  IFS=$as_save_IFS
7808  test -z "$as_dir" && as_dir=.
7809    for ac_exec_ext in '' $ac_executable_extensions; do
7810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7811    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7813    break 2
7814  fi
7815done
7816  done
7817IFS=$as_save_IFS
7818
7819  ;;
7820esac
7821fi
7822HEAD=$ac_cv_path_HEAD
7823if test -n "$HEAD"; then
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7825$as_echo "$HEAD" >&6; }
7826else
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828$as_echo "no" >&6; }
7829fi
7830
7831
7832  test -n "$HEAD" && break
7833done
7834
7835    else
7836      # If it succeeded, then it was overridden by the user. We will use it
7837      # for the tool.
7838
7839      # First remove it from the list of overridden variables, so we can test
7840      # for unknown variables in the end.
7841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7842
7843      # Check if we try to supply an empty value
7844      if test "x$HEAD" = x; then
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7846$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7848$as_echo_n "checking for HEAD... " >&6; }
7849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7850$as_echo "disabled" >&6; }
7851      else
7852        # Check if the provided tool contains a complete path.
7853        tool_specified="$HEAD"
7854        tool_basename="${tool_specified##*/}"
7855        if test "x$tool_basename" = "x$tool_specified"; then
7856          # A command without a complete path is provided, search $PATH.
7857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7858$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7859          # Extract the first word of "$tool_basename", so it can be a program name with args.
7860set dummy $tool_basename; ac_word=$2
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862$as_echo_n "checking for $ac_word... " >&6; }
7863if ${ac_cv_path_HEAD+:} false; then :
7864  $as_echo_n "(cached) " >&6
7865else
7866  case $HEAD in
7867  [\\/]* | ?:[\\/]*)
7868  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7869  ;;
7870  *)
7871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872for as_dir in $PATH
7873do
7874  IFS=$as_save_IFS
7875  test -z "$as_dir" && as_dir=.
7876    for ac_exec_ext in '' $ac_executable_extensions; do
7877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880    break 2
7881  fi
7882done
7883  done
7884IFS=$as_save_IFS
7885
7886  ;;
7887esac
7888fi
7889HEAD=$ac_cv_path_HEAD
7890if test -n "$HEAD"; then
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7892$as_echo "$HEAD" >&6; }
7893else
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895$as_echo "no" >&6; }
7896fi
7897
7898
7899          if test "x$HEAD" = x; then
7900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7901          fi
7902        else
7903          # Otherwise we believe it is a complete path. Use it as it is.
7904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7905$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7907$as_echo_n "checking for HEAD... " >&6; }
7908          if test ! -x "$tool_specified"; then
7909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7910$as_echo "not found" >&6; }
7911            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7912          fi
7913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7914$as_echo "$tool_specified" >&6; }
7915        fi
7916      fi
7917    fi
7918
7919  fi
7920
7921
7922
7923  if test "x$HEAD" = x; then
7924    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7925  fi
7926
7927
7928
7929
7930
7931  # Publish this variable in the help.
7932
7933
7934  if [ -z "${LN+x}" ]; then
7935    # The variable is not set by user, try to locate tool using the code snippet
7936    for ac_prog in ln
7937do
7938  # Extract the first word of "$ac_prog", so it can be a program name with args.
7939set dummy $ac_prog; ac_word=$2
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941$as_echo_n "checking for $ac_word... " >&6; }
7942if ${ac_cv_path_LN+:} false; then :
7943  $as_echo_n "(cached) " >&6
7944else
7945  case $LN in
7946  [\\/]* | ?:[\\/]*)
7947  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7948  ;;
7949  *)
7950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951for as_dir in $PATH
7952do
7953  IFS=$as_save_IFS
7954  test -z "$as_dir" && as_dir=.
7955    for ac_exec_ext in '' $ac_executable_extensions; do
7956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7957    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959    break 2
7960  fi
7961done
7962  done
7963IFS=$as_save_IFS
7964
7965  ;;
7966esac
7967fi
7968LN=$ac_cv_path_LN
7969if test -n "$LN"; then
7970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7971$as_echo "$LN" >&6; }
7972else
7973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7974$as_echo "no" >&6; }
7975fi
7976
7977
7978  test -n "$LN" && break
7979done
7980
7981  else
7982    # The variable is set, but is it from the command line or the environment?
7983
7984    # Try to remove the string !LN! from our list.
7985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7987      # If it failed, the variable was not from the command line. Ignore it,
7988      # but warn the user (except for BASH, which is always set by the calling BASH).
7989      if test "xLN" != xBASH; then
7990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7991$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7992      fi
7993      # Try to locate tool using the code snippet
7994      for ac_prog in ln
7995do
7996  # Extract the first word of "$ac_prog", so it can be a program name with args.
7997set dummy $ac_prog; ac_word=$2
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999$as_echo_n "checking for $ac_word... " >&6; }
8000if ${ac_cv_path_LN+:} false; then :
8001  $as_echo_n "(cached) " >&6
8002else
8003  case $LN in
8004  [\\/]* | ?:[\\/]*)
8005  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8006  ;;
8007  *)
8008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009for as_dir in $PATH
8010do
8011  IFS=$as_save_IFS
8012  test -z "$as_dir" && as_dir=.
8013    for ac_exec_ext in '' $ac_executable_extensions; do
8014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017    break 2
8018  fi
8019done
8020  done
8021IFS=$as_save_IFS
8022
8023  ;;
8024esac
8025fi
8026LN=$ac_cv_path_LN
8027if test -n "$LN"; then
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8029$as_echo "$LN" >&6; }
8030else
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
8033fi
8034
8035
8036  test -n "$LN" && break
8037done
8038
8039    else
8040      # If it succeeded, then it was overridden by the user. We will use it
8041      # for the tool.
8042
8043      # First remove it from the list of overridden variables, so we can test
8044      # for unknown variables in the end.
8045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8046
8047      # Check if we try to supply an empty value
8048      if test "x$LN" = x; then
8049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8050$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8052$as_echo_n "checking for LN... " >&6; }
8053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8054$as_echo "disabled" >&6; }
8055      else
8056        # Check if the provided tool contains a complete path.
8057        tool_specified="$LN"
8058        tool_basename="${tool_specified##*/}"
8059        if test "x$tool_basename" = "x$tool_specified"; then
8060          # A command without a complete path is provided, search $PATH.
8061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8062$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8063          # Extract the first word of "$tool_basename", so it can be a program name with args.
8064set dummy $tool_basename; ac_word=$2
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066$as_echo_n "checking for $ac_word... " >&6; }
8067if ${ac_cv_path_LN+:} false; then :
8068  $as_echo_n "(cached) " >&6
8069else
8070  case $LN in
8071  [\\/]* | ?:[\\/]*)
8072  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8073  ;;
8074  *)
8075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076for as_dir in $PATH
8077do
8078  IFS=$as_save_IFS
8079  test -z "$as_dir" && as_dir=.
8080    for ac_exec_ext in '' $ac_executable_extensions; do
8081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084    break 2
8085  fi
8086done
8087  done
8088IFS=$as_save_IFS
8089
8090  ;;
8091esac
8092fi
8093LN=$ac_cv_path_LN
8094if test -n "$LN"; then
8095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8096$as_echo "$LN" >&6; }
8097else
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099$as_echo "no" >&6; }
8100fi
8101
8102
8103          if test "x$LN" = x; then
8104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8105          fi
8106        else
8107          # Otherwise we believe it is a complete path. Use it as it is.
8108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8109$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8111$as_echo_n "checking for LN... " >&6; }
8112          if test ! -x "$tool_specified"; then
8113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8114$as_echo "not found" >&6; }
8115            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8116          fi
8117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8118$as_echo "$tool_specified" >&6; }
8119        fi
8120      fi
8121    fi
8122
8123  fi
8124
8125
8126
8127  if test "x$LN" = x; then
8128    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8129  fi
8130
8131
8132
8133
8134
8135  # Publish this variable in the help.
8136
8137
8138  if [ -z "${LS+x}" ]; then
8139    # The variable is not set by user, try to locate tool using the code snippet
8140    for ac_prog in ls
8141do
8142  # Extract the first word of "$ac_prog", so it can be a program name with args.
8143set dummy $ac_prog; ac_word=$2
8144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8145$as_echo_n "checking for $ac_word... " >&6; }
8146if ${ac_cv_path_LS+:} false; then :
8147  $as_echo_n "(cached) " >&6
8148else
8149  case $LS in
8150  [\\/]* | ?:[\\/]*)
8151  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8152  ;;
8153  *)
8154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8155for as_dir in $PATH
8156do
8157  IFS=$as_save_IFS
8158  test -z "$as_dir" && as_dir=.
8159    for ac_exec_ext in '' $ac_executable_extensions; do
8160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8161    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8163    break 2
8164  fi
8165done
8166  done
8167IFS=$as_save_IFS
8168
8169  ;;
8170esac
8171fi
8172LS=$ac_cv_path_LS
8173if test -n "$LS"; then
8174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8175$as_echo "$LS" >&6; }
8176else
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8178$as_echo "no" >&6; }
8179fi
8180
8181
8182  test -n "$LS" && break
8183done
8184
8185  else
8186    # The variable is set, but is it from the command line or the environment?
8187
8188    # Try to remove the string !LS! from our list.
8189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8191      # If it failed, the variable was not from the command line. Ignore it,
8192      # but warn the user (except for BASH, which is always set by the calling BASH).
8193      if test "xLS" != xBASH; then
8194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8195$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8196      fi
8197      # Try to locate tool using the code snippet
8198      for ac_prog in ls
8199do
8200  # Extract the first word of "$ac_prog", so it can be a program name with args.
8201set dummy $ac_prog; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_LS+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $LS in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230LS=$ac_cv_path_LS
8231if test -n "$LS"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8233$as_echo "$LS" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240  test -n "$LS" && break
8241done
8242
8243    else
8244      # If it succeeded, then it was overridden by the user. We will use it
8245      # for the tool.
8246
8247      # First remove it from the list of overridden variables, so we can test
8248      # for unknown variables in the end.
8249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8250
8251      # Check if we try to supply an empty value
8252      if test "x$LS" = x; then
8253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8254$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8256$as_echo_n "checking for LS... " >&6; }
8257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8258$as_echo "disabled" >&6; }
8259      else
8260        # Check if the provided tool contains a complete path.
8261        tool_specified="$LS"
8262        tool_basename="${tool_specified##*/}"
8263        if test "x$tool_basename" = "x$tool_specified"; then
8264          # A command without a complete path is provided, search $PATH.
8265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8266$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8267          # Extract the first word of "$tool_basename", so it can be a program name with args.
8268set dummy $tool_basename; ac_word=$2
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270$as_echo_n "checking for $ac_word... " >&6; }
8271if ${ac_cv_path_LS+:} false; then :
8272  $as_echo_n "(cached) " >&6
8273else
8274  case $LS in
8275  [\\/]* | ?:[\\/]*)
8276  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8277  ;;
8278  *)
8279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280for as_dir in $PATH
8281do
8282  IFS=$as_save_IFS
8283  test -z "$as_dir" && as_dir=.
8284    for ac_exec_ext in '' $ac_executable_extensions; do
8285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288    break 2
8289  fi
8290done
8291  done
8292IFS=$as_save_IFS
8293
8294  ;;
8295esac
8296fi
8297LS=$ac_cv_path_LS
8298if test -n "$LS"; then
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8300$as_echo "$LS" >&6; }
8301else
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
8304fi
8305
8306
8307          if test "x$LS" = x; then
8308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8309          fi
8310        else
8311          # Otherwise we believe it is a complete path. Use it as it is.
8312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8313$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8315$as_echo_n "checking for LS... " >&6; }
8316          if test ! -x "$tool_specified"; then
8317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8318$as_echo "not found" >&6; }
8319            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8320          fi
8321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8322$as_echo "$tool_specified" >&6; }
8323        fi
8324      fi
8325    fi
8326
8327  fi
8328
8329
8330
8331  if test "x$LS" = x; then
8332    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8333  fi
8334
8335
8336
8337
8338
8339  # Publish this variable in the help.
8340
8341
8342  if [ -z "${MKDIR+x}" ]; then
8343    # The variable is not set by user, try to locate tool using the code snippet
8344    for ac_prog in mkdir
8345do
8346  # Extract the first word of "$ac_prog", so it can be a program name with args.
8347set dummy $ac_prog; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if ${ac_cv_path_MKDIR+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353  case $MKDIR in
8354  [\\/]* | ?:[\\/]*)
8355  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8356  ;;
8357  *)
8358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361  IFS=$as_save_IFS
8362  test -z "$as_dir" && as_dir=.
8363    for ac_exec_ext in '' $ac_executable_extensions; do
8364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367    break 2
8368  fi
8369done
8370  done
8371IFS=$as_save_IFS
8372
8373  ;;
8374esac
8375fi
8376MKDIR=$ac_cv_path_MKDIR
8377if test -n "$MKDIR"; then
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8379$as_echo "$MKDIR" >&6; }
8380else
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382$as_echo "no" >&6; }
8383fi
8384
8385
8386  test -n "$MKDIR" && break
8387done
8388
8389  else
8390    # The variable is set, but is it from the command line or the environment?
8391
8392    # Try to remove the string !MKDIR! from our list.
8393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8395      # If it failed, the variable was not from the command line. Ignore it,
8396      # but warn the user (except for BASH, which is always set by the calling BASH).
8397      if test "xMKDIR" != xBASH; then
8398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8399$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8400      fi
8401      # Try to locate tool using the code snippet
8402      for ac_prog in mkdir
8403do
8404  # Extract the first word of "$ac_prog", so it can be a program name with args.
8405set dummy $ac_prog; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_MKDIR+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $MKDIR in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434MKDIR=$ac_cv_path_MKDIR
8435if test -n "$MKDIR"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8437$as_echo "$MKDIR" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444  test -n "$MKDIR" && break
8445done
8446
8447    else
8448      # If it succeeded, then it was overridden by the user. We will use it
8449      # for the tool.
8450
8451      # First remove it from the list of overridden variables, so we can test
8452      # for unknown variables in the end.
8453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8454
8455      # Check if we try to supply an empty value
8456      if test "x$MKDIR" = x; then
8457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8458$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8460$as_echo_n "checking for MKDIR... " >&6; }
8461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8462$as_echo "disabled" >&6; }
8463      else
8464        # Check if the provided tool contains a complete path.
8465        tool_specified="$MKDIR"
8466        tool_basename="${tool_specified##*/}"
8467        if test "x$tool_basename" = "x$tool_specified"; then
8468          # A command without a complete path is provided, search $PATH.
8469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8470$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8471          # Extract the first word of "$tool_basename", so it can be a program name with args.
8472set dummy $tool_basename; ac_word=$2
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474$as_echo_n "checking for $ac_word... " >&6; }
8475if ${ac_cv_path_MKDIR+:} false; then :
8476  $as_echo_n "(cached) " >&6
8477else
8478  case $MKDIR in
8479  [\\/]* | ?:[\\/]*)
8480  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8481  ;;
8482  *)
8483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484for as_dir in $PATH
8485do
8486  IFS=$as_save_IFS
8487  test -z "$as_dir" && as_dir=.
8488    for ac_exec_ext in '' $ac_executable_extensions; do
8489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492    break 2
8493  fi
8494done
8495  done
8496IFS=$as_save_IFS
8497
8498  ;;
8499esac
8500fi
8501MKDIR=$ac_cv_path_MKDIR
8502if test -n "$MKDIR"; then
8503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8504$as_echo "$MKDIR" >&6; }
8505else
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
8508fi
8509
8510
8511          if test "x$MKDIR" = x; then
8512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8513          fi
8514        else
8515          # Otherwise we believe it is a complete path. Use it as it is.
8516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8517$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8519$as_echo_n "checking for MKDIR... " >&6; }
8520          if test ! -x "$tool_specified"; then
8521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8522$as_echo "not found" >&6; }
8523            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8524          fi
8525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8526$as_echo "$tool_specified" >&6; }
8527        fi
8528      fi
8529    fi
8530
8531  fi
8532
8533
8534
8535  if test "x$MKDIR" = x; then
8536    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8537  fi
8538
8539
8540
8541
8542
8543  # Publish this variable in the help.
8544
8545
8546  if [ -z "${MKTEMP+x}" ]; then
8547    # The variable is not set by user, try to locate tool using the code snippet
8548    for ac_prog in mktemp
8549do
8550  # Extract the first word of "$ac_prog", so it can be a program name with args.
8551set dummy $ac_prog; ac_word=$2
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553$as_echo_n "checking for $ac_word... " >&6; }
8554if ${ac_cv_path_MKTEMP+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  case $MKTEMP in
8558  [\\/]* | ?:[\\/]*)
8559  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8560  ;;
8561  *)
8562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577  ;;
8578esac
8579fi
8580MKTEMP=$ac_cv_path_MKTEMP
8581if test -n "$MKTEMP"; then
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8583$as_echo "$MKTEMP" >&6; }
8584else
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
8587fi
8588
8589
8590  test -n "$MKTEMP" && break
8591done
8592
8593  else
8594    # The variable is set, but is it from the command line or the environment?
8595
8596    # Try to remove the string !MKTEMP! from our list.
8597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599      # If it failed, the variable was not from the command line. Ignore it,
8600      # but warn the user (except for BASH, which is always set by the calling BASH).
8601      if test "xMKTEMP" != xBASH; then
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8603$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8604      fi
8605      # Try to locate tool using the code snippet
8606      for ac_prog in mktemp
8607do
8608  # Extract the first word of "$ac_prog", so it can be a program name with args.
8609set dummy $ac_prog; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_MKTEMP+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $MKTEMP in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638MKTEMP=$ac_cv_path_MKTEMP
8639if test -n "$MKTEMP"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8641$as_echo "$MKTEMP" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648  test -n "$MKTEMP" && break
8649done
8650
8651    else
8652      # If it succeeded, then it was overridden by the user. We will use it
8653      # for the tool.
8654
8655      # First remove it from the list of overridden variables, so we can test
8656      # for unknown variables in the end.
8657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658
8659      # Check if we try to supply an empty value
8660      if test "x$MKTEMP" = x; then
8661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8662$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8664$as_echo_n "checking for MKTEMP... " >&6; }
8665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8666$as_echo "disabled" >&6; }
8667      else
8668        # Check if the provided tool contains a complete path.
8669        tool_specified="$MKTEMP"
8670        tool_basename="${tool_specified##*/}"
8671        if test "x$tool_basename" = "x$tool_specified"; then
8672          # A command without a complete path is provided, search $PATH.
8673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8674$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8675          # Extract the first word of "$tool_basename", so it can be a program name with args.
8676set dummy $tool_basename; ac_word=$2
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if ${ac_cv_path_MKTEMP+:} false; then :
8680  $as_echo_n "(cached) " >&6
8681else
8682  case $MKTEMP in
8683  [\\/]* | ?:[\\/]*)
8684  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8685  ;;
8686  *)
8687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688for as_dir in $PATH
8689do
8690  IFS=$as_save_IFS
8691  test -z "$as_dir" && as_dir=.
8692    for ac_exec_ext in '' $ac_executable_extensions; do
8693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696    break 2
8697  fi
8698done
8699  done
8700IFS=$as_save_IFS
8701
8702  ;;
8703esac
8704fi
8705MKTEMP=$ac_cv_path_MKTEMP
8706if test -n "$MKTEMP"; then
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8708$as_echo "$MKTEMP" >&6; }
8709else
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711$as_echo "no" >&6; }
8712fi
8713
8714
8715          if test "x$MKTEMP" = x; then
8716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8717          fi
8718        else
8719          # Otherwise we believe it is a complete path. Use it as it is.
8720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8721$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8723$as_echo_n "checking for MKTEMP... " >&6; }
8724          if test ! -x "$tool_specified"; then
8725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8726$as_echo "not found" >&6; }
8727            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8728          fi
8729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8730$as_echo "$tool_specified" >&6; }
8731        fi
8732      fi
8733    fi
8734
8735  fi
8736
8737
8738
8739  if test "x$MKTEMP" = x; then
8740    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8741  fi
8742
8743
8744
8745
8746
8747  # Publish this variable in the help.
8748
8749
8750  if [ -z "${MV+x}" ]; then
8751    # The variable is not set by user, try to locate tool using the code snippet
8752    for ac_prog in mv
8753do
8754  # Extract the first word of "$ac_prog", so it can be a program name with args.
8755set dummy $ac_prog; ac_word=$2
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8757$as_echo_n "checking for $ac_word... " >&6; }
8758if ${ac_cv_path_MV+:} false; then :
8759  $as_echo_n "(cached) " >&6
8760else
8761  case $MV in
8762  [\\/]* | ?:[\\/]*)
8763  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8764  ;;
8765  *)
8766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8767for as_dir in $PATH
8768do
8769  IFS=$as_save_IFS
8770  test -z "$as_dir" && as_dir=.
8771    for ac_exec_ext in '' $ac_executable_extensions; do
8772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8773    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8775    break 2
8776  fi
8777done
8778  done
8779IFS=$as_save_IFS
8780
8781  ;;
8782esac
8783fi
8784MV=$ac_cv_path_MV
8785if test -n "$MV"; then
8786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8787$as_echo "$MV" >&6; }
8788else
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8790$as_echo "no" >&6; }
8791fi
8792
8793
8794  test -n "$MV" && break
8795done
8796
8797  else
8798    # The variable is set, but is it from the command line or the environment?
8799
8800    # Try to remove the string !MV! from our list.
8801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8803      # If it failed, the variable was not from the command line. Ignore it,
8804      # but warn the user (except for BASH, which is always set by the calling BASH).
8805      if test "xMV" != xBASH; then
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8807$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8808      fi
8809      # Try to locate tool using the code snippet
8810      for ac_prog in mv
8811do
8812  # Extract the first word of "$ac_prog", so it can be a program name with args.
8813set dummy $ac_prog; ac_word=$2
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if ${ac_cv_path_MV+:} false; then :
8817  $as_echo_n "(cached) " >&6
8818else
8819  case $MV in
8820  [\\/]* | ?:[\\/]*)
8821  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8822  ;;
8823  *)
8824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839  ;;
8840esac
8841fi
8842MV=$ac_cv_path_MV
8843if test -n "$MV"; then
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8845$as_echo "$MV" >&6; }
8846else
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
8849fi
8850
8851
8852  test -n "$MV" && break
8853done
8854
8855    else
8856      # If it succeeded, then it was overridden by the user. We will use it
8857      # for the tool.
8858
8859      # First remove it from the list of overridden variables, so we can test
8860      # for unknown variables in the end.
8861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8862
8863      # Check if we try to supply an empty value
8864      if test "x$MV" = x; then
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8866$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8868$as_echo_n "checking for MV... " >&6; }
8869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8870$as_echo "disabled" >&6; }
8871      else
8872        # Check if the provided tool contains a complete path.
8873        tool_specified="$MV"
8874        tool_basename="${tool_specified##*/}"
8875        if test "x$tool_basename" = "x$tool_specified"; then
8876          # A command without a complete path is provided, search $PATH.
8877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8878$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8879          # Extract the first word of "$tool_basename", so it can be a program name with args.
8880set dummy $tool_basename; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if ${ac_cv_path_MV+:} false; then :
8884  $as_echo_n "(cached) " >&6
8885else
8886  case $MV in
8887  [\\/]* | ?:[\\/]*)
8888  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8889  ;;
8890  *)
8891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894  IFS=$as_save_IFS
8895  test -z "$as_dir" && as_dir=.
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906  ;;
8907esac
8908fi
8909MV=$ac_cv_path_MV
8910if test -n "$MV"; then
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8912$as_echo "$MV" >&6; }
8913else
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
8916fi
8917
8918
8919          if test "x$MV" = x; then
8920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8921          fi
8922        else
8923          # Otherwise we believe it is a complete path. Use it as it is.
8924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8925$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8927$as_echo_n "checking for MV... " >&6; }
8928          if test ! -x "$tool_specified"; then
8929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8930$as_echo "not found" >&6; }
8931            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8932          fi
8933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8934$as_echo "$tool_specified" >&6; }
8935        fi
8936      fi
8937    fi
8938
8939  fi
8940
8941
8942
8943  if test "x$MV" = x; then
8944    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8945  fi
8946
8947
8948
8949
8950
8951  # Publish this variable in the help.
8952
8953
8954  if [ -z "${NAWK+x}" ]; then
8955    # The variable is not set by user, try to locate tool using the code snippet
8956    for ac_prog in nawk gawk awk
8957do
8958  # Extract the first word of "$ac_prog", so it can be a program name with args.
8959set dummy $ac_prog; ac_word=$2
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961$as_echo_n "checking for $ac_word... " >&6; }
8962if ${ac_cv_path_NAWK+:} false; then :
8963  $as_echo_n "(cached) " >&6
8964else
8965  case $NAWK in
8966  [\\/]* | ?:[\\/]*)
8967  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8968  ;;
8969  *)
8970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971for as_dir in $PATH
8972do
8973  IFS=$as_save_IFS
8974  test -z "$as_dir" && as_dir=.
8975    for ac_exec_ext in '' $ac_executable_extensions; do
8976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979    break 2
8980  fi
8981done
8982  done
8983IFS=$as_save_IFS
8984
8985  ;;
8986esac
8987fi
8988NAWK=$ac_cv_path_NAWK
8989if test -n "$NAWK"; then
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8991$as_echo "$NAWK" >&6; }
8992else
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8994$as_echo "no" >&6; }
8995fi
8996
8997
8998  test -n "$NAWK" && break
8999done
9000
9001  else
9002    # The variable is set, but is it from the command line or the environment?
9003
9004    # Try to remove the string !NAWK! from our list.
9005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9007      # If it failed, the variable was not from the command line. Ignore it,
9008      # but warn the user (except for BASH, which is always set by the calling BASH).
9009      if test "xNAWK" != xBASH; then
9010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9011$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9012      fi
9013      # Try to locate tool using the code snippet
9014      for ac_prog in nawk gawk awk
9015do
9016  # Extract the first word of "$ac_prog", so it can be a program name with args.
9017set dummy $ac_prog; ac_word=$2
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019$as_echo_n "checking for $ac_word... " >&6; }
9020if ${ac_cv_path_NAWK+:} false; then :
9021  $as_echo_n "(cached) " >&6
9022else
9023  case $NAWK in
9024  [\\/]* | ?:[\\/]*)
9025  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9026  ;;
9027  *)
9028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029for as_dir in $PATH
9030do
9031  IFS=$as_save_IFS
9032  test -z "$as_dir" && as_dir=.
9033    for ac_exec_ext in '' $ac_executable_extensions; do
9034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037    break 2
9038  fi
9039done
9040  done
9041IFS=$as_save_IFS
9042
9043  ;;
9044esac
9045fi
9046NAWK=$ac_cv_path_NAWK
9047if test -n "$NAWK"; then
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9049$as_echo "$NAWK" >&6; }
9050else
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
9053fi
9054
9055
9056  test -n "$NAWK" && break
9057done
9058
9059    else
9060      # If it succeeded, then it was overridden by the user. We will use it
9061      # for the tool.
9062
9063      # First remove it from the list of overridden variables, so we can test
9064      # for unknown variables in the end.
9065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9066
9067      # Check if we try to supply an empty value
9068      if test "x$NAWK" = x; then
9069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9070$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9072$as_echo_n "checking for NAWK... " >&6; }
9073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9074$as_echo "disabled" >&6; }
9075      else
9076        # Check if the provided tool contains a complete path.
9077        tool_specified="$NAWK"
9078        tool_basename="${tool_specified##*/}"
9079        if test "x$tool_basename" = "x$tool_specified"; then
9080          # A command without a complete path is provided, search $PATH.
9081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9082$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9083          # Extract the first word of "$tool_basename", so it can be a program name with args.
9084set dummy $tool_basename; ac_word=$2
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086$as_echo_n "checking for $ac_word... " >&6; }
9087if ${ac_cv_path_NAWK+:} false; then :
9088  $as_echo_n "(cached) " >&6
9089else
9090  case $NAWK in
9091  [\\/]* | ?:[\\/]*)
9092  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9093  ;;
9094  *)
9095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096for as_dir in $PATH
9097do
9098  IFS=$as_save_IFS
9099  test -z "$as_dir" && as_dir=.
9100    for ac_exec_ext in '' $ac_executable_extensions; do
9101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104    break 2
9105  fi
9106done
9107  done
9108IFS=$as_save_IFS
9109
9110  ;;
9111esac
9112fi
9113NAWK=$ac_cv_path_NAWK
9114if test -n "$NAWK"; then
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9116$as_echo "$NAWK" >&6; }
9117else
9118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
9120fi
9121
9122
9123          if test "x$NAWK" = x; then
9124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9125          fi
9126        else
9127          # Otherwise we believe it is a complete path. Use it as it is.
9128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9129$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9131$as_echo_n "checking for NAWK... " >&6; }
9132          if test ! -x "$tool_specified"; then
9133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9134$as_echo "not found" >&6; }
9135            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9136          fi
9137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9138$as_echo "$tool_specified" >&6; }
9139        fi
9140      fi
9141    fi
9142
9143  fi
9144
9145
9146
9147  if test "x$NAWK" = x; then
9148    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9149  fi
9150
9151
9152
9153
9154
9155  # Publish this variable in the help.
9156
9157
9158  if [ -z "${PRINTF+x}" ]; then
9159    # The variable is not set by user, try to locate tool using the code snippet
9160    for ac_prog in printf
9161do
9162  # Extract the first word of "$ac_prog", so it can be a program name with args.
9163set dummy $ac_prog; ac_word=$2
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9165$as_echo_n "checking for $ac_word... " >&6; }
9166if ${ac_cv_path_PRINTF+:} false; then :
9167  $as_echo_n "(cached) " >&6
9168else
9169  case $PRINTF in
9170  [\\/]* | ?:[\\/]*)
9171  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9172  ;;
9173  *)
9174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9175for as_dir in $PATH
9176do
9177  IFS=$as_save_IFS
9178  test -z "$as_dir" && as_dir=.
9179    for ac_exec_ext in '' $ac_executable_extensions; do
9180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9181    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9183    break 2
9184  fi
9185done
9186  done
9187IFS=$as_save_IFS
9188
9189  ;;
9190esac
9191fi
9192PRINTF=$ac_cv_path_PRINTF
9193if test -n "$PRINTF"; then
9194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9195$as_echo "$PRINTF" >&6; }
9196else
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
9199fi
9200
9201
9202  test -n "$PRINTF" && break
9203done
9204
9205  else
9206    # The variable is set, but is it from the command line or the environment?
9207
9208    # Try to remove the string !PRINTF! from our list.
9209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9211      # If it failed, the variable was not from the command line. Ignore it,
9212      # but warn the user (except for BASH, which is always set by the calling BASH).
9213      if test "xPRINTF" != xBASH; then
9214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9215$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9216      fi
9217      # Try to locate tool using the code snippet
9218      for ac_prog in printf
9219do
9220  # Extract the first word of "$ac_prog", so it can be a program name with args.
9221set dummy $ac_prog; ac_word=$2
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9223$as_echo_n "checking for $ac_word... " >&6; }
9224if ${ac_cv_path_PRINTF+:} false; then :
9225  $as_echo_n "(cached) " >&6
9226else
9227  case $PRINTF in
9228  [\\/]* | ?:[\\/]*)
9229  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9230  ;;
9231  *)
9232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9233for as_dir in $PATH
9234do
9235  IFS=$as_save_IFS
9236  test -z "$as_dir" && as_dir=.
9237    for ac_exec_ext in '' $ac_executable_extensions; do
9238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9239    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9241    break 2
9242  fi
9243done
9244  done
9245IFS=$as_save_IFS
9246
9247  ;;
9248esac
9249fi
9250PRINTF=$ac_cv_path_PRINTF
9251if test -n "$PRINTF"; then
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9253$as_echo "$PRINTF" >&6; }
9254else
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256$as_echo "no" >&6; }
9257fi
9258
9259
9260  test -n "$PRINTF" && break
9261done
9262
9263    else
9264      # If it succeeded, then it was overridden by the user. We will use it
9265      # for the tool.
9266
9267      # First remove it from the list of overridden variables, so we can test
9268      # for unknown variables in the end.
9269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9270
9271      # Check if we try to supply an empty value
9272      if test "x$PRINTF" = x; then
9273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9274$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9276$as_echo_n "checking for PRINTF... " >&6; }
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9278$as_echo "disabled" >&6; }
9279      else
9280        # Check if the provided tool contains a complete path.
9281        tool_specified="$PRINTF"
9282        tool_basename="${tool_specified##*/}"
9283        if test "x$tool_basename" = "x$tool_specified"; then
9284          # A command without a complete path is provided, search $PATH.
9285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9286$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9287          # Extract the first word of "$tool_basename", so it can be a program name with args.
9288set dummy $tool_basename; ac_word=$2
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290$as_echo_n "checking for $ac_word... " >&6; }
9291if ${ac_cv_path_PRINTF+:} false; then :
9292  $as_echo_n "(cached) " >&6
9293else
9294  case $PRINTF in
9295  [\\/]* | ?:[\\/]*)
9296  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9297  ;;
9298  *)
9299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300for as_dir in $PATH
9301do
9302  IFS=$as_save_IFS
9303  test -z "$as_dir" && as_dir=.
9304    for ac_exec_ext in '' $ac_executable_extensions; do
9305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308    break 2
9309  fi
9310done
9311  done
9312IFS=$as_save_IFS
9313
9314  ;;
9315esac
9316fi
9317PRINTF=$ac_cv_path_PRINTF
9318if test -n "$PRINTF"; then
9319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9320$as_echo "$PRINTF" >&6; }
9321else
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
9324fi
9325
9326
9327          if test "x$PRINTF" = x; then
9328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9329          fi
9330        else
9331          # Otherwise we believe it is a complete path. Use it as it is.
9332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9333$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9335$as_echo_n "checking for PRINTF... " >&6; }
9336          if test ! -x "$tool_specified"; then
9337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9338$as_echo "not found" >&6; }
9339            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9340          fi
9341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9342$as_echo "$tool_specified" >&6; }
9343        fi
9344      fi
9345    fi
9346
9347  fi
9348
9349
9350
9351  if test "x$PRINTF" = x; then
9352    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9353  fi
9354
9355
9356
9357
9358
9359  # Publish this variable in the help.
9360
9361
9362  if [ -z "${RM+x}" ]; then
9363    # The variable is not set by user, try to locate tool using the code snippet
9364    for ac_prog in rm
9365do
9366  # Extract the first word of "$ac_prog", so it can be a program name with args.
9367set dummy $ac_prog; ac_word=$2
9368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9369$as_echo_n "checking for $ac_word... " >&6; }
9370if ${ac_cv_path_RM+:} false; then :
9371  $as_echo_n "(cached) " >&6
9372else
9373  case $RM in
9374  [\\/]* | ?:[\\/]*)
9375  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9376  ;;
9377  *)
9378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9379for as_dir in $PATH
9380do
9381  IFS=$as_save_IFS
9382  test -z "$as_dir" && as_dir=.
9383    for ac_exec_ext in '' $ac_executable_extensions; do
9384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9385    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9387    break 2
9388  fi
9389done
9390  done
9391IFS=$as_save_IFS
9392
9393  ;;
9394esac
9395fi
9396RM=$ac_cv_path_RM
9397if test -n "$RM"; then
9398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9399$as_echo "$RM" >&6; }
9400else
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
9403fi
9404
9405
9406  test -n "$RM" && break
9407done
9408
9409  else
9410    # The variable is set, but is it from the command line or the environment?
9411
9412    # Try to remove the string !RM! from our list.
9413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9415      # If it failed, the variable was not from the command line. Ignore it,
9416      # but warn the user (except for BASH, which is always set by the calling BASH).
9417      if test "xRM" != xBASH; then
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9419$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9420      fi
9421      # Try to locate tool using the code snippet
9422      for ac_prog in rm
9423do
9424  # Extract the first word of "$ac_prog", so it can be a program name with args.
9425set dummy $ac_prog; ac_word=$2
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427$as_echo_n "checking for $ac_word... " >&6; }
9428if ${ac_cv_path_RM+:} false; then :
9429  $as_echo_n "(cached) " >&6
9430else
9431  case $RM in
9432  [\\/]* | ?:[\\/]*)
9433  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9434  ;;
9435  *)
9436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439  IFS=$as_save_IFS
9440  test -z "$as_dir" && as_dir=.
9441    for ac_exec_ext in '' $ac_executable_extensions; do
9442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445    break 2
9446  fi
9447done
9448  done
9449IFS=$as_save_IFS
9450
9451  ;;
9452esac
9453fi
9454RM=$ac_cv_path_RM
9455if test -n "$RM"; then
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9457$as_echo "$RM" >&6; }
9458else
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
9461fi
9462
9463
9464  test -n "$RM" && break
9465done
9466
9467    else
9468      # If it succeeded, then it was overridden by the user. We will use it
9469      # for the tool.
9470
9471      # First remove it from the list of overridden variables, so we can test
9472      # for unknown variables in the end.
9473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9474
9475      # Check if we try to supply an empty value
9476      if test "x$RM" = x; then
9477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9478$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9480$as_echo_n "checking for RM... " >&6; }
9481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9482$as_echo "disabled" >&6; }
9483      else
9484        # Check if the provided tool contains a complete path.
9485        tool_specified="$RM"
9486        tool_basename="${tool_specified##*/}"
9487        if test "x$tool_basename" = "x$tool_specified"; then
9488          # A command without a complete path is provided, search $PATH.
9489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9490$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9491          # Extract the first word of "$tool_basename", so it can be a program name with args.
9492set dummy $tool_basename; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if ${ac_cv_path_RM+:} false; then :
9496  $as_echo_n "(cached) " >&6
9497else
9498  case $RM in
9499  [\\/]* | ?:[\\/]*)
9500  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9501  ;;
9502  *)
9503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506  IFS=$as_save_IFS
9507  test -z "$as_dir" && as_dir=.
9508    for ac_exec_ext in '' $ac_executable_extensions; do
9509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512    break 2
9513  fi
9514done
9515  done
9516IFS=$as_save_IFS
9517
9518  ;;
9519esac
9520fi
9521RM=$ac_cv_path_RM
9522if test -n "$RM"; then
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9524$as_echo "$RM" >&6; }
9525else
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531          if test "x$RM" = x; then
9532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9533          fi
9534        else
9535          # Otherwise we believe it is a complete path. Use it as it is.
9536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9537$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9539$as_echo_n "checking for RM... " >&6; }
9540          if test ! -x "$tool_specified"; then
9541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9542$as_echo "not found" >&6; }
9543            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9544          fi
9545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9546$as_echo "$tool_specified" >&6; }
9547        fi
9548      fi
9549    fi
9550
9551  fi
9552
9553
9554
9555  if test "x$RM" = x; then
9556    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9557  fi
9558
9559
9560
9561
9562
9563  # Publish this variable in the help.
9564
9565
9566  if [ -z "${RMDIR+x}" ]; then
9567    # The variable is not set by user, try to locate tool using the code snippet
9568    for ac_prog in rmdir
9569do
9570  # Extract the first word of "$ac_prog", so it can be a program name with args.
9571set dummy $ac_prog; ac_word=$2
9572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9573$as_echo_n "checking for $ac_word... " >&6; }
9574if ${ac_cv_path_RMDIR+:} false; then :
9575  $as_echo_n "(cached) " >&6
9576else
9577  case $RMDIR in
9578  [\\/]* | ?:[\\/]*)
9579  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9580  ;;
9581  *)
9582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9583for as_dir in $PATH
9584do
9585  IFS=$as_save_IFS
9586  test -z "$as_dir" && as_dir=.
9587    for ac_exec_ext in '' $ac_executable_extensions; do
9588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9589    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9591    break 2
9592  fi
9593done
9594  done
9595IFS=$as_save_IFS
9596
9597  ;;
9598esac
9599fi
9600RMDIR=$ac_cv_path_RMDIR
9601if test -n "$RMDIR"; then
9602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9603$as_echo "$RMDIR" >&6; }
9604else
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606$as_echo "no" >&6; }
9607fi
9608
9609
9610  test -n "$RMDIR" && break
9611done
9612
9613  else
9614    # The variable is set, but is it from the command line or the environment?
9615
9616    # Try to remove the string !RMDIR! from our list.
9617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9619      # If it failed, the variable was not from the command line. Ignore it,
9620      # but warn the user (except for BASH, which is always set by the calling BASH).
9621      if test "xRMDIR" != xBASH; then
9622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9623$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9624      fi
9625      # Try to locate tool using the code snippet
9626      for ac_prog in rmdir
9627do
9628  # Extract the first word of "$ac_prog", so it can be a program name with args.
9629set dummy $ac_prog; ac_word=$2
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631$as_echo_n "checking for $ac_word... " >&6; }
9632if ${ac_cv_path_RMDIR+:} false; then :
9633  $as_echo_n "(cached) " >&6
9634else
9635  case $RMDIR in
9636  [\\/]* | ?:[\\/]*)
9637  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9638  ;;
9639  *)
9640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641for as_dir in $PATH
9642do
9643  IFS=$as_save_IFS
9644  test -z "$as_dir" && as_dir=.
9645    for ac_exec_ext in '' $ac_executable_extensions; do
9646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649    break 2
9650  fi
9651done
9652  done
9653IFS=$as_save_IFS
9654
9655  ;;
9656esac
9657fi
9658RMDIR=$ac_cv_path_RMDIR
9659if test -n "$RMDIR"; then
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9661$as_echo "$RMDIR" >&6; }
9662else
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
9665fi
9666
9667
9668  test -n "$RMDIR" && break
9669done
9670
9671    else
9672      # If it succeeded, then it was overridden by the user. We will use it
9673      # for the tool.
9674
9675      # First remove it from the list of overridden variables, so we can test
9676      # for unknown variables in the end.
9677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9678
9679      # Check if we try to supply an empty value
9680      if test "x$RMDIR" = x; then
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9682$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9684$as_echo_n "checking for RMDIR... " >&6; }
9685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9686$as_echo "disabled" >&6; }
9687      else
9688        # Check if the provided tool contains a complete path.
9689        tool_specified="$RMDIR"
9690        tool_basename="${tool_specified##*/}"
9691        if test "x$tool_basename" = "x$tool_specified"; then
9692          # A command without a complete path is provided, search $PATH.
9693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9694$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9695          # Extract the first word of "$tool_basename", so it can be a program name with args.
9696set dummy $tool_basename; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_RMDIR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $RMDIR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725RMDIR=$ac_cv_path_RMDIR
9726if test -n "$RMDIR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9728$as_echo "$RMDIR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735          if test "x$RMDIR" = x; then
9736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9737          fi
9738        else
9739          # Otherwise we believe it is a complete path. Use it as it is.
9740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9741$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9743$as_echo_n "checking for RMDIR... " >&6; }
9744          if test ! -x "$tool_specified"; then
9745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9746$as_echo "not found" >&6; }
9747            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9748          fi
9749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9750$as_echo "$tool_specified" >&6; }
9751        fi
9752      fi
9753    fi
9754
9755  fi
9756
9757
9758
9759  if test "x$RMDIR" = x; then
9760    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9761  fi
9762
9763
9764
9765
9766
9767  # Publish this variable in the help.
9768
9769
9770  if [ -z "${SH+x}" ]; then
9771    # The variable is not set by user, try to locate tool using the code snippet
9772    for ac_prog in sh
9773do
9774  # Extract the first word of "$ac_prog", so it can be a program name with args.
9775set dummy $ac_prog; ac_word=$2
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9777$as_echo_n "checking for $ac_word... " >&6; }
9778if ${ac_cv_path_SH+:} false; then :
9779  $as_echo_n "(cached) " >&6
9780else
9781  case $SH in
9782  [\\/]* | ?:[\\/]*)
9783  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9784  ;;
9785  *)
9786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787for as_dir in $PATH
9788do
9789  IFS=$as_save_IFS
9790  test -z "$as_dir" && as_dir=.
9791    for ac_exec_ext in '' $ac_executable_extensions; do
9792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9793    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795    break 2
9796  fi
9797done
9798  done
9799IFS=$as_save_IFS
9800
9801  ;;
9802esac
9803fi
9804SH=$ac_cv_path_SH
9805if test -n "$SH"; then
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9807$as_echo "$SH" >&6; }
9808else
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
9811fi
9812
9813
9814  test -n "$SH" && break
9815done
9816
9817  else
9818    # The variable is set, but is it from the command line or the environment?
9819
9820    # Try to remove the string !SH! from our list.
9821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9823      # If it failed, the variable was not from the command line. Ignore it,
9824      # but warn the user (except for BASH, which is always set by the calling BASH).
9825      if test "xSH" != xBASH; then
9826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9827$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9828      fi
9829      # Try to locate tool using the code snippet
9830      for ac_prog in sh
9831do
9832  # Extract the first word of "$ac_prog", so it can be a program name with args.
9833set dummy $ac_prog; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_SH+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $SH in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862SH=$ac_cv_path_SH
9863if test -n "$SH"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9865$as_echo "$SH" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872  test -n "$SH" && break
9873done
9874
9875    else
9876      # If it succeeded, then it was overridden by the user. We will use it
9877      # for the tool.
9878
9879      # First remove it from the list of overridden variables, so we can test
9880      # for unknown variables in the end.
9881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9882
9883      # Check if we try to supply an empty value
9884      if test "x$SH" = x; then
9885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9886$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9888$as_echo_n "checking for SH... " >&6; }
9889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9890$as_echo "disabled" >&6; }
9891      else
9892        # Check if the provided tool contains a complete path.
9893        tool_specified="$SH"
9894        tool_basename="${tool_specified##*/}"
9895        if test "x$tool_basename" = "x$tool_specified"; then
9896          # A command without a complete path is provided, search $PATH.
9897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9898$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9899          # Extract the first word of "$tool_basename", so it can be a program name with args.
9900set dummy $tool_basename; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if ${ac_cv_path_SH+:} false; then :
9904  $as_echo_n "(cached) " >&6
9905else
9906  case $SH in
9907  [\\/]* | ?:[\\/]*)
9908  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9909  ;;
9910  *)
9911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914  IFS=$as_save_IFS
9915  test -z "$as_dir" && as_dir=.
9916    for ac_exec_ext in '' $ac_executable_extensions; do
9917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920    break 2
9921  fi
9922done
9923  done
9924IFS=$as_save_IFS
9925
9926  ;;
9927esac
9928fi
9929SH=$ac_cv_path_SH
9930if test -n "$SH"; then
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9932$as_echo "$SH" >&6; }
9933else
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; }
9936fi
9937
9938
9939          if test "x$SH" = x; then
9940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9941          fi
9942        else
9943          # Otherwise we believe it is a complete path. Use it as it is.
9944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9945$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9947$as_echo_n "checking for SH... " >&6; }
9948          if test ! -x "$tool_specified"; then
9949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9950$as_echo "not found" >&6; }
9951            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9952          fi
9953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9954$as_echo "$tool_specified" >&6; }
9955        fi
9956      fi
9957    fi
9958
9959  fi
9960
9961
9962
9963  if test "x$SH" = x; then
9964    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9965  fi
9966
9967
9968
9969
9970
9971  # Publish this variable in the help.
9972
9973
9974  if [ -z "${SORT+x}" ]; then
9975    # The variable is not set by user, try to locate tool using the code snippet
9976    for ac_prog in sort
9977do
9978  # Extract the first word of "$ac_prog", so it can be a program name with args.
9979set dummy $ac_prog; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if ${ac_cv_path_SORT+:} false; then :
9983  $as_echo_n "(cached) " >&6
9984else
9985  case $SORT in
9986  [\\/]* | ?:[\\/]*)
9987  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9988  ;;
9989  *)
9990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993  IFS=$as_save_IFS
9994  test -z "$as_dir" && as_dir=.
9995    for ac_exec_ext in '' $ac_executable_extensions; do
9996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999    break 2
10000  fi
10001done
10002  done
10003IFS=$as_save_IFS
10004
10005  ;;
10006esac
10007fi
10008SORT=$ac_cv_path_SORT
10009if test -n "$SORT"; then
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10011$as_echo "$SORT" >&6; }
10012else
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017
10018  test -n "$SORT" && break
10019done
10020
10021  else
10022    # The variable is set, but is it from the command line or the environment?
10023
10024    # Try to remove the string !SORT! from our list.
10025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10027      # If it failed, the variable was not from the command line. Ignore it,
10028      # but warn the user (except for BASH, which is always set by the calling BASH).
10029      if test "xSORT" != xBASH; then
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10031$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10032      fi
10033      # Try to locate tool using the code snippet
10034      for ac_prog in sort
10035do
10036  # Extract the first word of "$ac_prog", so it can be a program name with args.
10037set dummy $ac_prog; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_SORT+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $SORT in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066SORT=$ac_cv_path_SORT
10067if test -n "$SORT"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10069$as_echo "$SORT" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076  test -n "$SORT" && break
10077done
10078
10079    else
10080      # If it succeeded, then it was overridden by the user. We will use it
10081      # for the tool.
10082
10083      # First remove it from the list of overridden variables, so we can test
10084      # for unknown variables in the end.
10085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10086
10087      # Check if we try to supply an empty value
10088      if test "x$SORT" = x; then
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10090$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10092$as_echo_n "checking for SORT... " >&6; }
10093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10094$as_echo "disabled" >&6; }
10095      else
10096        # Check if the provided tool contains a complete path.
10097        tool_specified="$SORT"
10098        tool_basename="${tool_specified##*/}"
10099        if test "x$tool_basename" = "x$tool_specified"; then
10100          # A command without a complete path is provided, search $PATH.
10101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10102$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10103          # Extract the first word of "$tool_basename", so it can be a program name with args.
10104set dummy $tool_basename; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_SORT+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $SORT in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133SORT=$ac_cv_path_SORT
10134if test -n "$SORT"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10136$as_echo "$SORT" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143          if test "x$SORT" = x; then
10144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145          fi
10146        else
10147          # Otherwise we believe it is a complete path. Use it as it is.
10148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10149$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10151$as_echo_n "checking for SORT... " >&6; }
10152          if test ! -x "$tool_specified"; then
10153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154$as_echo "not found" >&6; }
10155            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10156          fi
10157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158$as_echo "$tool_specified" >&6; }
10159        fi
10160      fi
10161    fi
10162
10163  fi
10164
10165
10166
10167  if test "x$SORT" = x; then
10168    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10169  fi
10170
10171
10172
10173
10174
10175  # Publish this variable in the help.
10176
10177
10178  if [ -z "${TAIL+x}" ]; then
10179    # The variable is not set by user, try to locate tool using the code snippet
10180    for ac_prog in tail
10181do
10182  # Extract the first word of "$ac_prog", so it can be a program name with args.
10183set dummy $ac_prog; ac_word=$2
10184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10185$as_echo_n "checking for $ac_word... " >&6; }
10186if ${ac_cv_path_TAIL+:} false; then :
10187  $as_echo_n "(cached) " >&6
10188else
10189  case $TAIL in
10190  [\\/]* | ?:[\\/]*)
10191  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10192  ;;
10193  *)
10194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10195for as_dir in $PATH
10196do
10197  IFS=$as_save_IFS
10198  test -z "$as_dir" && as_dir=.
10199    for ac_exec_ext in '' $ac_executable_extensions; do
10200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10201    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10203    break 2
10204  fi
10205done
10206  done
10207IFS=$as_save_IFS
10208
10209  ;;
10210esac
10211fi
10212TAIL=$ac_cv_path_TAIL
10213if test -n "$TAIL"; then
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10215$as_echo "$TAIL" >&6; }
10216else
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218$as_echo "no" >&6; }
10219fi
10220
10221
10222  test -n "$TAIL" && break
10223done
10224
10225  else
10226    # The variable is set, but is it from the command line or the environment?
10227
10228    # Try to remove the string !TAIL! from our list.
10229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10231      # If it failed, the variable was not from the command line. Ignore it,
10232      # but warn the user (except for BASH, which is always set by the calling BASH).
10233      if test "xTAIL" != xBASH; then
10234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10235$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10236      fi
10237      # Try to locate tool using the code snippet
10238      for ac_prog in tail
10239do
10240  # Extract the first word of "$ac_prog", so it can be a program name with args.
10241set dummy $ac_prog; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_TAIL+:} false; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $TAIL in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270TAIL=$ac_cv_path_TAIL
10271if test -n "$TAIL"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10273$as_echo "$TAIL" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280  test -n "$TAIL" && break
10281done
10282
10283    else
10284      # If it succeeded, then it was overridden by the user. We will use it
10285      # for the tool.
10286
10287      # First remove it from the list of overridden variables, so we can test
10288      # for unknown variables in the end.
10289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10290
10291      # Check if we try to supply an empty value
10292      if test "x$TAIL" = x; then
10293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10294$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10296$as_echo_n "checking for TAIL... " >&6; }
10297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10298$as_echo "disabled" >&6; }
10299      else
10300        # Check if the provided tool contains a complete path.
10301        tool_specified="$TAIL"
10302        tool_basename="${tool_specified##*/}"
10303        if test "x$tool_basename" = "x$tool_specified"; then
10304          # A command without a complete path is provided, search $PATH.
10305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10306$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10307          # Extract the first word of "$tool_basename", so it can be a program name with args.
10308set dummy $tool_basename; ac_word=$2
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310$as_echo_n "checking for $ac_word... " >&6; }
10311if ${ac_cv_path_TAIL+:} false; then :
10312  $as_echo_n "(cached) " >&6
10313else
10314  case $TAIL in
10315  [\\/]* | ?:[\\/]*)
10316  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10317  ;;
10318  *)
10319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10320for as_dir in $PATH
10321do
10322  IFS=$as_save_IFS
10323  test -z "$as_dir" && as_dir=.
10324    for ac_exec_ext in '' $ac_executable_extensions; do
10325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10326    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10328    break 2
10329  fi
10330done
10331  done
10332IFS=$as_save_IFS
10333
10334  ;;
10335esac
10336fi
10337TAIL=$ac_cv_path_TAIL
10338if test -n "$TAIL"; then
10339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10340$as_echo "$TAIL" >&6; }
10341else
10342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
10344fi
10345
10346
10347          if test "x$TAIL" = x; then
10348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10349          fi
10350        else
10351          # Otherwise we believe it is a complete path. Use it as it is.
10352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10353$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10355$as_echo_n "checking for TAIL... " >&6; }
10356          if test ! -x "$tool_specified"; then
10357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10358$as_echo "not found" >&6; }
10359            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10360          fi
10361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10362$as_echo "$tool_specified" >&6; }
10363        fi
10364      fi
10365    fi
10366
10367  fi
10368
10369
10370
10371  if test "x$TAIL" = x; then
10372    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10373  fi
10374
10375
10376
10377
10378
10379  # Publish this variable in the help.
10380
10381
10382  if [ -z "${TAR+x}" ]; then
10383    # The variable is not set by user, try to locate tool using the code snippet
10384    for ac_prog in tar
10385do
10386  # Extract the first word of "$ac_prog", so it can be a program name with args.
10387set dummy $ac_prog; ac_word=$2
10388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10389$as_echo_n "checking for $ac_word... " >&6; }
10390if ${ac_cv_path_TAR+:} false; then :
10391  $as_echo_n "(cached) " >&6
10392else
10393  case $TAR in
10394  [\\/]* | ?:[\\/]*)
10395  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10396  ;;
10397  *)
10398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10399for as_dir in $PATH
10400do
10401  IFS=$as_save_IFS
10402  test -z "$as_dir" && as_dir=.
10403    for ac_exec_ext in '' $ac_executable_extensions; do
10404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10405    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10407    break 2
10408  fi
10409done
10410  done
10411IFS=$as_save_IFS
10412
10413  ;;
10414esac
10415fi
10416TAR=$ac_cv_path_TAR
10417if test -n "$TAR"; then
10418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10419$as_echo "$TAR" >&6; }
10420else
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
10423fi
10424
10425
10426  test -n "$TAR" && break
10427done
10428
10429  else
10430    # The variable is set, but is it from the command line or the environment?
10431
10432    # Try to remove the string !TAR! from our list.
10433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10435      # If it failed, the variable was not from the command line. Ignore it,
10436      # but warn the user (except for BASH, which is always set by the calling BASH).
10437      if test "xTAR" != xBASH; then
10438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10439$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10440      fi
10441      # Try to locate tool using the code snippet
10442      for ac_prog in tar
10443do
10444  # Extract the first word of "$ac_prog", so it can be a program name with args.
10445set dummy $ac_prog; ac_word=$2
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447$as_echo_n "checking for $ac_word... " >&6; }
10448if ${ac_cv_path_TAR+:} false; then :
10449  $as_echo_n "(cached) " >&6
10450else
10451  case $TAR in
10452  [\\/]* | ?:[\\/]*)
10453  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10454  ;;
10455  *)
10456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10457for as_dir in $PATH
10458do
10459  IFS=$as_save_IFS
10460  test -z "$as_dir" && as_dir=.
10461    for ac_exec_ext in '' $ac_executable_extensions; do
10462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10463    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10465    break 2
10466  fi
10467done
10468  done
10469IFS=$as_save_IFS
10470
10471  ;;
10472esac
10473fi
10474TAR=$ac_cv_path_TAR
10475if test -n "$TAR"; then
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10477$as_echo "$TAR" >&6; }
10478else
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
10481fi
10482
10483
10484  test -n "$TAR" && break
10485done
10486
10487    else
10488      # If it succeeded, then it was overridden by the user. We will use it
10489      # for the tool.
10490
10491      # First remove it from the list of overridden variables, so we can test
10492      # for unknown variables in the end.
10493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10494
10495      # Check if we try to supply an empty value
10496      if test "x$TAR" = x; then
10497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10498$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10500$as_echo_n "checking for TAR... " >&6; }
10501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10502$as_echo "disabled" >&6; }
10503      else
10504        # Check if the provided tool contains a complete path.
10505        tool_specified="$TAR"
10506        tool_basename="${tool_specified##*/}"
10507        if test "x$tool_basename" = "x$tool_specified"; then
10508          # A command without a complete path is provided, search $PATH.
10509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10510$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10511          # Extract the first word of "$tool_basename", so it can be a program name with args.
10512set dummy $tool_basename; ac_word=$2
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514$as_echo_n "checking for $ac_word... " >&6; }
10515if ${ac_cv_path_TAR+:} false; then :
10516  $as_echo_n "(cached) " >&6
10517else
10518  case $TAR in
10519  [\\/]* | ?:[\\/]*)
10520  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10521  ;;
10522  *)
10523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524for as_dir in $PATH
10525do
10526  IFS=$as_save_IFS
10527  test -z "$as_dir" && as_dir=.
10528    for ac_exec_ext in '' $ac_executable_extensions; do
10529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532    break 2
10533  fi
10534done
10535  done
10536IFS=$as_save_IFS
10537
10538  ;;
10539esac
10540fi
10541TAR=$ac_cv_path_TAR
10542if test -n "$TAR"; then
10543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10544$as_echo "$TAR" >&6; }
10545else
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
10548fi
10549
10550
10551          if test "x$TAR" = x; then
10552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10553          fi
10554        else
10555          # Otherwise we believe it is a complete path. Use it as it is.
10556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10557$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10559$as_echo_n "checking for TAR... " >&6; }
10560          if test ! -x "$tool_specified"; then
10561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10562$as_echo "not found" >&6; }
10563            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10564          fi
10565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10566$as_echo "$tool_specified" >&6; }
10567        fi
10568      fi
10569    fi
10570
10571  fi
10572
10573
10574
10575  if test "x$TAR" = x; then
10576    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10577  fi
10578
10579
10580
10581
10582
10583  # Publish this variable in the help.
10584
10585
10586  if [ -z "${TEE+x}" ]; then
10587    # The variable is not set by user, try to locate tool using the code snippet
10588    for ac_prog in tee
10589do
10590  # Extract the first word of "$ac_prog", so it can be a program name with args.
10591set dummy $ac_prog; ac_word=$2
10592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10593$as_echo_n "checking for $ac_word... " >&6; }
10594if ${ac_cv_path_TEE+:} false; then :
10595  $as_echo_n "(cached) " >&6
10596else
10597  case $TEE in
10598  [\\/]* | ?:[\\/]*)
10599  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10600  ;;
10601  *)
10602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10603for as_dir in $PATH
10604do
10605  IFS=$as_save_IFS
10606  test -z "$as_dir" && as_dir=.
10607    for ac_exec_ext in '' $ac_executable_extensions; do
10608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10609    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10611    break 2
10612  fi
10613done
10614  done
10615IFS=$as_save_IFS
10616
10617  ;;
10618esac
10619fi
10620TEE=$ac_cv_path_TEE
10621if test -n "$TEE"; then
10622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10623$as_echo "$TEE" >&6; }
10624else
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626$as_echo "no" >&6; }
10627fi
10628
10629
10630  test -n "$TEE" && break
10631done
10632
10633  else
10634    # The variable is set, but is it from the command line or the environment?
10635
10636    # Try to remove the string !TEE! from our list.
10637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10639      # If it failed, the variable was not from the command line. Ignore it,
10640      # but warn the user (except for BASH, which is always set by the calling BASH).
10641      if test "xTEE" != xBASH; then
10642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10643$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10644      fi
10645      # Try to locate tool using the code snippet
10646      for ac_prog in tee
10647do
10648  # Extract the first word of "$ac_prog", so it can be a program name with args.
10649set dummy $ac_prog; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_TEE+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $TEE in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678TEE=$ac_cv_path_TEE
10679if test -n "$TEE"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10681$as_echo "$TEE" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687
10688  test -n "$TEE" && break
10689done
10690
10691    else
10692      # If it succeeded, then it was overridden by the user. We will use it
10693      # for the tool.
10694
10695      # First remove it from the list of overridden variables, so we can test
10696      # for unknown variables in the end.
10697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10698
10699      # Check if we try to supply an empty value
10700      if test "x$TEE" = x; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10702$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10704$as_echo_n "checking for TEE... " >&6; }
10705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10706$as_echo "disabled" >&6; }
10707      else
10708        # Check if the provided tool contains a complete path.
10709        tool_specified="$TEE"
10710        tool_basename="${tool_specified##*/}"
10711        if test "x$tool_basename" = "x$tool_specified"; then
10712          # A command without a complete path is provided, search $PATH.
10713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10714$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10715          # Extract the first word of "$tool_basename", so it can be a program name with args.
10716set dummy $tool_basename; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
10719if ${ac_cv_path_TEE+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  case $TEE in
10723  [\\/]* | ?:[\\/]*)
10724  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10725  ;;
10726  *)
10727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730  IFS=$as_save_IFS
10731  test -z "$as_dir" && as_dir=.
10732    for ac_exec_ext in '' $ac_executable_extensions; do
10733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736    break 2
10737  fi
10738done
10739  done
10740IFS=$as_save_IFS
10741
10742  ;;
10743esac
10744fi
10745TEE=$ac_cv_path_TEE
10746if test -n "$TEE"; then
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10748$as_echo "$TEE" >&6; }
10749else
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755          if test "x$TEE" = x; then
10756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10757          fi
10758        else
10759          # Otherwise we believe it is a complete path. Use it as it is.
10760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10761$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10763$as_echo_n "checking for TEE... " >&6; }
10764          if test ! -x "$tool_specified"; then
10765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10766$as_echo "not found" >&6; }
10767            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10768          fi
10769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10770$as_echo "$tool_specified" >&6; }
10771        fi
10772      fi
10773    fi
10774
10775  fi
10776
10777
10778
10779  if test "x$TEE" = x; then
10780    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10781  fi
10782
10783
10784
10785
10786
10787  # Publish this variable in the help.
10788
10789
10790  if [ -z "${TOUCH+x}" ]; then
10791    # The variable is not set by user, try to locate tool using the code snippet
10792    for ac_prog in touch
10793do
10794  # Extract the first word of "$ac_prog", so it can be a program name with args.
10795set dummy $ac_prog; ac_word=$2
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797$as_echo_n "checking for $ac_word... " >&6; }
10798if ${ac_cv_path_TOUCH+:} false; then :
10799  $as_echo_n "(cached) " >&6
10800else
10801  case $TOUCH in
10802  [\\/]* | ?:[\\/]*)
10803  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10804  ;;
10805  *)
10806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807for as_dir in $PATH
10808do
10809  IFS=$as_save_IFS
10810  test -z "$as_dir" && as_dir=.
10811    for ac_exec_ext in '' $ac_executable_extensions; do
10812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815    break 2
10816  fi
10817done
10818  done
10819IFS=$as_save_IFS
10820
10821  ;;
10822esac
10823fi
10824TOUCH=$ac_cv_path_TOUCH
10825if test -n "$TOUCH"; then
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10827$as_echo "$TOUCH" >&6; }
10828else
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830$as_echo "no" >&6; }
10831fi
10832
10833
10834  test -n "$TOUCH" && break
10835done
10836
10837  else
10838    # The variable is set, but is it from the command line or the environment?
10839
10840    # Try to remove the string !TOUCH! from our list.
10841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10843      # If it failed, the variable was not from the command line. Ignore it,
10844      # but warn the user (except for BASH, which is always set by the calling BASH).
10845      if test "xTOUCH" != xBASH; then
10846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10847$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10848      fi
10849      # Try to locate tool using the code snippet
10850      for ac_prog in touch
10851do
10852  # Extract the first word of "$ac_prog", so it can be a program name with args.
10853set dummy $ac_prog; ac_word=$2
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855$as_echo_n "checking for $ac_word... " >&6; }
10856if ${ac_cv_path_TOUCH+:} false; then :
10857  $as_echo_n "(cached) " >&6
10858else
10859  case $TOUCH in
10860  [\\/]* | ?:[\\/]*)
10861  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10862  ;;
10863  *)
10864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879  ;;
10880esac
10881fi
10882TOUCH=$ac_cv_path_TOUCH
10883if test -n "$TOUCH"; then
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10885$as_echo "$TOUCH" >&6; }
10886else
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892  test -n "$TOUCH" && break
10893done
10894
10895    else
10896      # If it succeeded, then it was overridden by the user. We will use it
10897      # for the tool.
10898
10899      # First remove it from the list of overridden variables, so we can test
10900      # for unknown variables in the end.
10901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10902
10903      # Check if we try to supply an empty value
10904      if test "x$TOUCH" = x; then
10905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10906$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10908$as_echo_n "checking for TOUCH... " >&6; }
10909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10910$as_echo "disabled" >&6; }
10911      else
10912        # Check if the provided tool contains a complete path.
10913        tool_specified="$TOUCH"
10914        tool_basename="${tool_specified##*/}"
10915        if test "x$tool_basename" = "x$tool_specified"; then
10916          # A command without a complete path is provided, search $PATH.
10917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10918$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10919          # Extract the first word of "$tool_basename", so it can be a program name with args.
10920set dummy $tool_basename; ac_word=$2
10921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10922$as_echo_n "checking for $ac_word... " >&6; }
10923if ${ac_cv_path_TOUCH+:} false; then :
10924  $as_echo_n "(cached) " >&6
10925else
10926  case $TOUCH in
10927  [\\/]* | ?:[\\/]*)
10928  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10929  ;;
10930  *)
10931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932for as_dir in $PATH
10933do
10934  IFS=$as_save_IFS
10935  test -z "$as_dir" && as_dir=.
10936    for ac_exec_ext in '' $ac_executable_extensions; do
10937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10938    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940    break 2
10941  fi
10942done
10943  done
10944IFS=$as_save_IFS
10945
10946  ;;
10947esac
10948fi
10949TOUCH=$ac_cv_path_TOUCH
10950if test -n "$TOUCH"; then
10951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10952$as_echo "$TOUCH" >&6; }
10953else
10954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
10956fi
10957
10958
10959          if test "x$TOUCH" = x; then
10960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10961          fi
10962        else
10963          # Otherwise we believe it is a complete path. Use it as it is.
10964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10965$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10967$as_echo_n "checking for TOUCH... " >&6; }
10968          if test ! -x "$tool_specified"; then
10969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10970$as_echo "not found" >&6; }
10971            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10972          fi
10973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10974$as_echo "$tool_specified" >&6; }
10975        fi
10976      fi
10977    fi
10978
10979  fi
10980
10981
10982
10983  if test "x$TOUCH" = x; then
10984    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10985  fi
10986
10987
10988
10989
10990
10991  # Publish this variable in the help.
10992
10993
10994  if [ -z "${TR+x}" ]; then
10995    # The variable is not set by user, try to locate tool using the code snippet
10996    for ac_prog in tr
10997do
10998  # Extract the first word of "$ac_prog", so it can be a program name with args.
10999set dummy $ac_prog; ac_word=$2
11000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11001$as_echo_n "checking for $ac_word... " >&6; }
11002if ${ac_cv_path_TR+:} false; then :
11003  $as_echo_n "(cached) " >&6
11004else
11005  case $TR in
11006  [\\/]* | ?:[\\/]*)
11007  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11008  ;;
11009  *)
11010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11011for as_dir in $PATH
11012do
11013  IFS=$as_save_IFS
11014  test -z "$as_dir" && as_dir=.
11015    for ac_exec_ext in '' $ac_executable_extensions; do
11016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11017    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11019    break 2
11020  fi
11021done
11022  done
11023IFS=$as_save_IFS
11024
11025  ;;
11026esac
11027fi
11028TR=$ac_cv_path_TR
11029if test -n "$TR"; then
11030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11031$as_echo "$TR" >&6; }
11032else
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034$as_echo "no" >&6; }
11035fi
11036
11037
11038  test -n "$TR" && break
11039done
11040
11041  else
11042    # The variable is set, but is it from the command line or the environment?
11043
11044    # Try to remove the string !TR! from our list.
11045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11047      # If it failed, the variable was not from the command line. Ignore it,
11048      # but warn the user (except for BASH, which is always set by the calling BASH).
11049      if test "xTR" != xBASH; then
11050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11051$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11052      fi
11053      # Try to locate tool using the code snippet
11054      for ac_prog in tr
11055do
11056  # Extract the first word of "$ac_prog", so it can be a program name with args.
11057set dummy $ac_prog; ac_word=$2
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059$as_echo_n "checking for $ac_word... " >&6; }
11060if ${ac_cv_path_TR+:} false; then :
11061  $as_echo_n "(cached) " >&6
11062else
11063  case $TR in
11064  [\\/]* | ?:[\\/]*)
11065  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11066  ;;
11067  *)
11068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069for as_dir in $PATH
11070do
11071  IFS=$as_save_IFS
11072  test -z "$as_dir" && as_dir=.
11073    for ac_exec_ext in '' $ac_executable_extensions; do
11074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077    break 2
11078  fi
11079done
11080  done
11081IFS=$as_save_IFS
11082
11083  ;;
11084esac
11085fi
11086TR=$ac_cv_path_TR
11087if test -n "$TR"; then
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11089$as_echo "$TR" >&6; }
11090else
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093fi
11094
11095
11096  test -n "$TR" && break
11097done
11098
11099    else
11100      # If it succeeded, then it was overridden by the user. We will use it
11101      # for the tool.
11102
11103      # First remove it from the list of overridden variables, so we can test
11104      # for unknown variables in the end.
11105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11106
11107      # Check if we try to supply an empty value
11108      if test "x$TR" = x; then
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11110$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11112$as_echo_n "checking for TR... " >&6; }
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11114$as_echo "disabled" >&6; }
11115      else
11116        # Check if the provided tool contains a complete path.
11117        tool_specified="$TR"
11118        tool_basename="${tool_specified##*/}"
11119        if test "x$tool_basename" = "x$tool_specified"; then
11120          # A command without a complete path is provided, search $PATH.
11121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11122$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11123          # Extract the first word of "$tool_basename", so it can be a program name with args.
11124set dummy $tool_basename; ac_word=$2
11125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11126$as_echo_n "checking for $ac_word... " >&6; }
11127if ${ac_cv_path_TR+:} false; then :
11128  $as_echo_n "(cached) " >&6
11129else
11130  case $TR in
11131  [\\/]* | ?:[\\/]*)
11132  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11133  ;;
11134  *)
11135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11136for as_dir in $PATH
11137do
11138  IFS=$as_save_IFS
11139  test -z "$as_dir" && as_dir=.
11140    for ac_exec_ext in '' $ac_executable_extensions; do
11141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11142    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11144    break 2
11145  fi
11146done
11147  done
11148IFS=$as_save_IFS
11149
11150  ;;
11151esac
11152fi
11153TR=$ac_cv_path_TR
11154if test -n "$TR"; then
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11156$as_echo "$TR" >&6; }
11157else
11158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159$as_echo "no" >&6; }
11160fi
11161
11162
11163          if test "x$TR" = x; then
11164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11165          fi
11166        else
11167          # Otherwise we believe it is a complete path. Use it as it is.
11168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11169$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11171$as_echo_n "checking for TR... " >&6; }
11172          if test ! -x "$tool_specified"; then
11173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11174$as_echo "not found" >&6; }
11175            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11176          fi
11177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11178$as_echo "$tool_specified" >&6; }
11179        fi
11180      fi
11181    fi
11182
11183  fi
11184
11185
11186
11187  if test "x$TR" = x; then
11188    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11189  fi
11190
11191
11192
11193
11194
11195  # Publish this variable in the help.
11196
11197
11198  if [ -z "${UNAME+x}" ]; then
11199    # The variable is not set by user, try to locate tool using the code snippet
11200    for ac_prog in uname
11201do
11202  # Extract the first word of "$ac_prog", so it can be a program name with args.
11203set dummy $ac_prog; ac_word=$2
11204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11205$as_echo_n "checking for $ac_word... " >&6; }
11206if ${ac_cv_path_UNAME+:} false; then :
11207  $as_echo_n "(cached) " >&6
11208else
11209  case $UNAME in
11210  [\\/]* | ?:[\\/]*)
11211  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11212  ;;
11213  *)
11214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11215for as_dir in $PATH
11216do
11217  IFS=$as_save_IFS
11218  test -z "$as_dir" && as_dir=.
11219    for ac_exec_ext in '' $ac_executable_extensions; do
11220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11221    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11223    break 2
11224  fi
11225done
11226  done
11227IFS=$as_save_IFS
11228
11229  ;;
11230esac
11231fi
11232UNAME=$ac_cv_path_UNAME
11233if test -n "$UNAME"; then
11234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11235$as_echo "$UNAME" >&6; }
11236else
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238$as_echo "no" >&6; }
11239fi
11240
11241
11242  test -n "$UNAME" && break
11243done
11244
11245  else
11246    # The variable is set, but is it from the command line or the environment?
11247
11248    # Try to remove the string !UNAME! from our list.
11249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11251      # If it failed, the variable was not from the command line. Ignore it,
11252      # but warn the user (except for BASH, which is always set by the calling BASH).
11253      if test "xUNAME" != xBASH; then
11254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11255$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11256      fi
11257      # Try to locate tool using the code snippet
11258      for ac_prog in uname
11259do
11260  # Extract the first word of "$ac_prog", so it can be a program name with args.
11261set dummy $ac_prog; ac_word=$2
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
11264if ${ac_cv_path_UNAME+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  case $UNAME in
11268  [\\/]* | ?:[\\/]*)
11269  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11270  ;;
11271  *)
11272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273for as_dir in $PATH
11274do
11275  IFS=$as_save_IFS
11276  test -z "$as_dir" && as_dir=.
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287  ;;
11288esac
11289fi
11290UNAME=$ac_cv_path_UNAME
11291if test -n "$UNAME"; then
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11293$as_echo "$UNAME" >&6; }
11294else
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297fi
11298
11299
11300  test -n "$UNAME" && break
11301done
11302
11303    else
11304      # If it succeeded, then it was overridden by the user. We will use it
11305      # for the tool.
11306
11307      # First remove it from the list of overridden variables, so we can test
11308      # for unknown variables in the end.
11309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11310
11311      # Check if we try to supply an empty value
11312      if test "x$UNAME" = x; then
11313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11314$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11316$as_echo_n "checking for UNAME... " >&6; }
11317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11318$as_echo "disabled" >&6; }
11319      else
11320        # Check if the provided tool contains a complete path.
11321        tool_specified="$UNAME"
11322        tool_basename="${tool_specified##*/}"
11323        if test "x$tool_basename" = "x$tool_specified"; then
11324          # A command without a complete path is provided, search $PATH.
11325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11326$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11327          # Extract the first word of "$tool_basename", so it can be a program name with args.
11328set dummy $tool_basename; ac_word=$2
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330$as_echo_n "checking for $ac_word... " >&6; }
11331if ${ac_cv_path_UNAME+:} false; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334  case $UNAME in
11335  [\\/]* | ?:[\\/]*)
11336  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11337  ;;
11338  *)
11339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340for as_dir in $PATH
11341do
11342  IFS=$as_save_IFS
11343  test -z "$as_dir" && as_dir=.
11344    for ac_exec_ext in '' $ac_executable_extensions; do
11345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348    break 2
11349  fi
11350done
11351  done
11352IFS=$as_save_IFS
11353
11354  ;;
11355esac
11356fi
11357UNAME=$ac_cv_path_UNAME
11358if test -n "$UNAME"; then
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11360$as_echo "$UNAME" >&6; }
11361else
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364fi
11365
11366
11367          if test "x$UNAME" = x; then
11368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11369          fi
11370        else
11371          # Otherwise we believe it is a complete path. Use it as it is.
11372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11373$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11375$as_echo_n "checking for UNAME... " >&6; }
11376          if test ! -x "$tool_specified"; then
11377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11378$as_echo "not found" >&6; }
11379            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11380          fi
11381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11382$as_echo "$tool_specified" >&6; }
11383        fi
11384      fi
11385    fi
11386
11387  fi
11388
11389
11390
11391  if test "x$UNAME" = x; then
11392    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11393  fi
11394
11395
11396
11397
11398
11399  # Publish this variable in the help.
11400
11401
11402  if [ -z "${UNIQ+x}" ]; then
11403    # The variable is not set by user, try to locate tool using the code snippet
11404    for ac_prog in uniq
11405do
11406  # Extract the first word of "$ac_prog", so it can be a program name with args.
11407set dummy $ac_prog; ac_word=$2
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409$as_echo_n "checking for $ac_word... " >&6; }
11410if ${ac_cv_path_UNIQ+:} false; then :
11411  $as_echo_n "(cached) " >&6
11412else
11413  case $UNIQ in
11414  [\\/]* | ?:[\\/]*)
11415  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11416  ;;
11417  *)
11418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11419for as_dir in $PATH
11420do
11421  IFS=$as_save_IFS
11422  test -z "$as_dir" && as_dir=.
11423    for ac_exec_ext in '' $ac_executable_extensions; do
11424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11425    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11427    break 2
11428  fi
11429done
11430  done
11431IFS=$as_save_IFS
11432
11433  ;;
11434esac
11435fi
11436UNIQ=$ac_cv_path_UNIQ
11437if test -n "$UNIQ"; then
11438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11439$as_echo "$UNIQ" >&6; }
11440else
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
11443fi
11444
11445
11446  test -n "$UNIQ" && break
11447done
11448
11449  else
11450    # The variable is set, but is it from the command line or the environment?
11451
11452    # Try to remove the string !UNIQ! from our list.
11453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11455      # If it failed, the variable was not from the command line. Ignore it,
11456      # but warn the user (except for BASH, which is always set by the calling BASH).
11457      if test "xUNIQ" != xBASH; then
11458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11459$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11460      fi
11461      # Try to locate tool using the code snippet
11462      for ac_prog in uniq
11463do
11464  # Extract the first word of "$ac_prog", so it can be a program name with args.
11465set dummy $ac_prog; ac_word=$2
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467$as_echo_n "checking for $ac_word... " >&6; }
11468if ${ac_cv_path_UNIQ+:} false; then :
11469  $as_echo_n "(cached) " >&6
11470else
11471  case $UNIQ in
11472  [\\/]* | ?:[\\/]*)
11473  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11474  ;;
11475  *)
11476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477for as_dir in $PATH
11478do
11479  IFS=$as_save_IFS
11480  test -z "$as_dir" && as_dir=.
11481    for ac_exec_ext in '' $ac_executable_extensions; do
11482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485    break 2
11486  fi
11487done
11488  done
11489IFS=$as_save_IFS
11490
11491  ;;
11492esac
11493fi
11494UNIQ=$ac_cv_path_UNIQ
11495if test -n "$UNIQ"; then
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11497$as_echo "$UNIQ" >&6; }
11498else
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501fi
11502
11503
11504  test -n "$UNIQ" && break
11505done
11506
11507    else
11508      # If it succeeded, then it was overridden by the user. We will use it
11509      # for the tool.
11510
11511      # First remove it from the list of overridden variables, so we can test
11512      # for unknown variables in the end.
11513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11514
11515      # Check if we try to supply an empty value
11516      if test "x$UNIQ" = x; then
11517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11518$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11520$as_echo_n "checking for UNIQ... " >&6; }
11521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11522$as_echo "disabled" >&6; }
11523      else
11524        # Check if the provided tool contains a complete path.
11525        tool_specified="$UNIQ"
11526        tool_basename="${tool_specified##*/}"
11527        if test "x$tool_basename" = "x$tool_specified"; then
11528          # A command without a complete path is provided, search $PATH.
11529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11530$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11531          # Extract the first word of "$tool_basename", so it can be a program name with args.
11532set dummy $tool_basename; ac_word=$2
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534$as_echo_n "checking for $ac_word... " >&6; }
11535if ${ac_cv_path_UNIQ+:} false; then :
11536  $as_echo_n "(cached) " >&6
11537else
11538  case $UNIQ in
11539  [\\/]* | ?:[\\/]*)
11540  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11541  ;;
11542  *)
11543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544for as_dir in $PATH
11545do
11546  IFS=$as_save_IFS
11547  test -z "$as_dir" && as_dir=.
11548    for ac_exec_ext in '' $ac_executable_extensions; do
11549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552    break 2
11553  fi
11554done
11555  done
11556IFS=$as_save_IFS
11557
11558  ;;
11559esac
11560fi
11561UNIQ=$ac_cv_path_UNIQ
11562if test -n "$UNIQ"; then
11563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11564$as_echo "$UNIQ" >&6; }
11565else
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567$as_echo "no" >&6; }
11568fi
11569
11570
11571          if test "x$UNIQ" = x; then
11572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11573          fi
11574        else
11575          # Otherwise we believe it is a complete path. Use it as it is.
11576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11577$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11579$as_echo_n "checking for UNIQ... " >&6; }
11580          if test ! -x "$tool_specified"; then
11581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11582$as_echo "not found" >&6; }
11583            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11584          fi
11585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11586$as_echo "$tool_specified" >&6; }
11587        fi
11588      fi
11589    fi
11590
11591  fi
11592
11593
11594
11595  if test "x$UNIQ" = x; then
11596    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11597  fi
11598
11599
11600
11601
11602
11603  # Publish this variable in the help.
11604
11605
11606  if [ -z "${WC+x}" ]; then
11607    # The variable is not set by user, try to locate tool using the code snippet
11608    for ac_prog in wc
11609do
11610  # Extract the first word of "$ac_prog", so it can be a program name with args.
11611set dummy $ac_prog; ac_word=$2
11612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11613$as_echo_n "checking for $ac_word... " >&6; }
11614if ${ac_cv_path_WC+:} false; then :
11615  $as_echo_n "(cached) " >&6
11616else
11617  case $WC in
11618  [\\/]* | ?:[\\/]*)
11619  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11620  ;;
11621  *)
11622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11623for as_dir in $PATH
11624do
11625  IFS=$as_save_IFS
11626  test -z "$as_dir" && as_dir=.
11627    for ac_exec_ext in '' $ac_executable_extensions; do
11628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11629    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11631    break 2
11632  fi
11633done
11634  done
11635IFS=$as_save_IFS
11636
11637  ;;
11638esac
11639fi
11640WC=$ac_cv_path_WC
11641if test -n "$WC"; then
11642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11643$as_echo "$WC" >&6; }
11644else
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646$as_echo "no" >&6; }
11647fi
11648
11649
11650  test -n "$WC" && break
11651done
11652
11653  else
11654    # The variable is set, but is it from the command line or the environment?
11655
11656    # Try to remove the string !WC! from our list.
11657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11659      # If it failed, the variable was not from the command line. Ignore it,
11660      # but warn the user (except for BASH, which is always set by the calling BASH).
11661      if test "xWC" != xBASH; then
11662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11663$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11664      fi
11665      # Try to locate tool using the code snippet
11666      for ac_prog in wc
11667do
11668  # Extract the first word of "$ac_prog", so it can be a program name with args.
11669set dummy $ac_prog; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_WC+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $WC in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698WC=$ac_cv_path_WC
11699if test -n "$WC"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11701$as_echo "$WC" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708  test -n "$WC" && break
11709done
11710
11711    else
11712      # If it succeeded, then it was overridden by the user. We will use it
11713      # for the tool.
11714
11715      # First remove it from the list of overridden variables, so we can test
11716      # for unknown variables in the end.
11717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11718
11719      # Check if we try to supply an empty value
11720      if test "x$WC" = x; then
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11722$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11724$as_echo_n "checking for WC... " >&6; }
11725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11726$as_echo "disabled" >&6; }
11727      else
11728        # Check if the provided tool contains a complete path.
11729        tool_specified="$WC"
11730        tool_basename="${tool_specified##*/}"
11731        if test "x$tool_basename" = "x$tool_specified"; then
11732          # A command without a complete path is provided, search $PATH.
11733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11734$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11735          # Extract the first word of "$tool_basename", so it can be a program name with args.
11736set dummy $tool_basename; ac_word=$2
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11738$as_echo_n "checking for $ac_word... " >&6; }
11739if ${ac_cv_path_WC+:} false; then :
11740  $as_echo_n "(cached) " >&6
11741else
11742  case $WC in
11743  [\\/]* | ?:[\\/]*)
11744  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11745  ;;
11746  *)
11747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748for as_dir in $PATH
11749do
11750  IFS=$as_save_IFS
11751  test -z "$as_dir" && as_dir=.
11752    for ac_exec_ext in '' $ac_executable_extensions; do
11753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11754    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11756    break 2
11757  fi
11758done
11759  done
11760IFS=$as_save_IFS
11761
11762  ;;
11763esac
11764fi
11765WC=$ac_cv_path_WC
11766if test -n "$WC"; then
11767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11768$as_echo "$WC" >&6; }
11769else
11770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
11772fi
11773
11774
11775          if test "x$WC" = x; then
11776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11777          fi
11778        else
11779          # Otherwise we believe it is a complete path. Use it as it is.
11780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11781$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11783$as_echo_n "checking for WC... " >&6; }
11784          if test ! -x "$tool_specified"; then
11785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11786$as_echo "not found" >&6; }
11787            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11788          fi
11789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11790$as_echo "$tool_specified" >&6; }
11791        fi
11792      fi
11793    fi
11794
11795  fi
11796
11797
11798
11799  if test "x$WC" = x; then
11800    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11801  fi
11802
11803
11804
11805
11806
11807  # Publish this variable in the help.
11808
11809
11810  if [ -z "${WHICH+x}" ]; then
11811    # The variable is not set by user, try to locate tool using the code snippet
11812    for ac_prog in which
11813do
11814  # Extract the first word of "$ac_prog", so it can be a program name with args.
11815set dummy $ac_prog; ac_word=$2
11816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11817$as_echo_n "checking for $ac_word... " >&6; }
11818if ${ac_cv_path_WHICH+:} false; then :
11819  $as_echo_n "(cached) " >&6
11820else
11821  case $WHICH in
11822  [\\/]* | ?:[\\/]*)
11823  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11824  ;;
11825  *)
11826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11827for as_dir in $PATH
11828do
11829  IFS=$as_save_IFS
11830  test -z "$as_dir" && as_dir=.
11831    for ac_exec_ext in '' $ac_executable_extensions; do
11832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11833    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11835    break 2
11836  fi
11837done
11838  done
11839IFS=$as_save_IFS
11840
11841  ;;
11842esac
11843fi
11844WHICH=$ac_cv_path_WHICH
11845if test -n "$WHICH"; then
11846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11847$as_echo "$WHICH" >&6; }
11848else
11849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11850$as_echo "no" >&6; }
11851fi
11852
11853
11854  test -n "$WHICH" && break
11855done
11856
11857  else
11858    # The variable is set, but is it from the command line or the environment?
11859
11860    # Try to remove the string !WHICH! from our list.
11861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11863      # If it failed, the variable was not from the command line. Ignore it,
11864      # but warn the user (except for BASH, which is always set by the calling BASH).
11865      if test "xWHICH" != xBASH; then
11866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11867$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11868      fi
11869      # Try to locate tool using the code snippet
11870      for ac_prog in which
11871do
11872  # Extract the first word of "$ac_prog", so it can be a program name with args.
11873set dummy $ac_prog; ac_word=$2
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11875$as_echo_n "checking for $ac_word... " >&6; }
11876if ${ac_cv_path_WHICH+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879  case $WHICH in
11880  [\\/]* | ?:[\\/]*)
11881  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11882  ;;
11883  *)
11884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11885for as_dir in $PATH
11886do
11887  IFS=$as_save_IFS
11888  test -z "$as_dir" && as_dir=.
11889    for ac_exec_ext in '' $ac_executable_extensions; do
11890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11891    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11893    break 2
11894  fi
11895done
11896  done
11897IFS=$as_save_IFS
11898
11899  ;;
11900esac
11901fi
11902WHICH=$ac_cv_path_WHICH
11903if test -n "$WHICH"; then
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11905$as_echo "$WHICH" >&6; }
11906else
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908$as_echo "no" >&6; }
11909fi
11910
11911
11912  test -n "$WHICH" && break
11913done
11914
11915    else
11916      # If it succeeded, then it was overridden by the user. We will use it
11917      # for the tool.
11918
11919      # First remove it from the list of overridden variables, so we can test
11920      # for unknown variables in the end.
11921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11922
11923      # Check if we try to supply an empty value
11924      if test "x$WHICH" = x; then
11925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11926$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11928$as_echo_n "checking for WHICH... " >&6; }
11929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11930$as_echo "disabled" >&6; }
11931      else
11932        # Check if the provided tool contains a complete path.
11933        tool_specified="$WHICH"
11934        tool_basename="${tool_specified##*/}"
11935        if test "x$tool_basename" = "x$tool_specified"; then
11936          # A command without a complete path is provided, search $PATH.
11937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11938$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11939          # Extract the first word of "$tool_basename", so it can be a program name with args.
11940set dummy $tool_basename; ac_word=$2
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942$as_echo_n "checking for $ac_word... " >&6; }
11943if ${ac_cv_path_WHICH+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  case $WHICH in
11947  [\\/]* | ?:[\\/]*)
11948  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11949  ;;
11950  *)
11951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952for as_dir in $PATH
11953do
11954  IFS=$as_save_IFS
11955  test -z "$as_dir" && as_dir=.
11956    for ac_exec_ext in '' $ac_executable_extensions; do
11957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11958    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11960    break 2
11961  fi
11962done
11963  done
11964IFS=$as_save_IFS
11965
11966  ;;
11967esac
11968fi
11969WHICH=$ac_cv_path_WHICH
11970if test -n "$WHICH"; then
11971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11972$as_echo "$WHICH" >&6; }
11973else
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
11976fi
11977
11978
11979          if test "x$WHICH" = x; then
11980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11981          fi
11982        else
11983          # Otherwise we believe it is a complete path. Use it as it is.
11984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11985$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11987$as_echo_n "checking for WHICH... " >&6; }
11988          if test ! -x "$tool_specified"; then
11989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11990$as_echo "not found" >&6; }
11991            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11992          fi
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11994$as_echo "$tool_specified" >&6; }
11995        fi
11996      fi
11997    fi
11998
11999  fi
12000
12001
12002
12003  if test "x$WHICH" = x; then
12004    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12005  fi
12006
12007
12008
12009
12010
12011  # Publish this variable in the help.
12012
12013
12014  if [ -z "${XARGS+x}" ]; then
12015    # The variable is not set by user, try to locate tool using the code snippet
12016    for ac_prog in xargs
12017do
12018  # Extract the first word of "$ac_prog", so it can be a program name with args.
12019set dummy $ac_prog; ac_word=$2
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021$as_echo_n "checking for $ac_word... " >&6; }
12022if ${ac_cv_path_XARGS+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  case $XARGS in
12026  [\\/]* | ?:[\\/]*)
12027  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12028  ;;
12029  *)
12030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031for as_dir in $PATH
12032do
12033  IFS=$as_save_IFS
12034  test -z "$as_dir" && as_dir=.
12035    for ac_exec_ext in '' $ac_executable_extensions; do
12036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039    break 2
12040  fi
12041done
12042  done
12043IFS=$as_save_IFS
12044
12045  ;;
12046esac
12047fi
12048XARGS=$ac_cv_path_XARGS
12049if test -n "$XARGS"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12051$as_echo "$XARGS" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057
12058  test -n "$XARGS" && break
12059done
12060
12061  else
12062    # The variable is set, but is it from the command line or the environment?
12063
12064    # Try to remove the string !XARGS! from our list.
12065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12067      # If it failed, the variable was not from the command line. Ignore it,
12068      # but warn the user (except for BASH, which is always set by the calling BASH).
12069      if test "xXARGS" != xBASH; then
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12071$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12072      fi
12073      # Try to locate tool using the code snippet
12074      for ac_prog in xargs
12075do
12076  # Extract the first word of "$ac_prog", so it can be a program name with args.
12077set dummy $ac_prog; ac_word=$2
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12079$as_echo_n "checking for $ac_word... " >&6; }
12080if ${ac_cv_path_XARGS+:} false; then :
12081  $as_echo_n "(cached) " >&6
12082else
12083  case $XARGS in
12084  [\\/]* | ?:[\\/]*)
12085  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12086  ;;
12087  *)
12088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12089for as_dir in $PATH
12090do
12091  IFS=$as_save_IFS
12092  test -z "$as_dir" && as_dir=.
12093    for ac_exec_ext in '' $ac_executable_extensions; do
12094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12095    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12097    break 2
12098  fi
12099done
12100  done
12101IFS=$as_save_IFS
12102
12103  ;;
12104esac
12105fi
12106XARGS=$ac_cv_path_XARGS
12107if test -n "$XARGS"; then
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12109$as_echo "$XARGS" >&6; }
12110else
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112$as_echo "no" >&6; }
12113fi
12114
12115
12116  test -n "$XARGS" && break
12117done
12118
12119    else
12120      # If it succeeded, then it was overridden by the user. We will use it
12121      # for the tool.
12122
12123      # First remove it from the list of overridden variables, so we can test
12124      # for unknown variables in the end.
12125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12126
12127      # Check if we try to supply an empty value
12128      if test "x$XARGS" = x; then
12129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12130$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12132$as_echo_n "checking for XARGS... " >&6; }
12133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12134$as_echo "disabled" >&6; }
12135      else
12136        # Check if the provided tool contains a complete path.
12137        tool_specified="$XARGS"
12138        tool_basename="${tool_specified##*/}"
12139        if test "x$tool_basename" = "x$tool_specified"; then
12140          # A command without a complete path is provided, search $PATH.
12141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12142$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12143          # Extract the first word of "$tool_basename", so it can be a program name with args.
12144set dummy $tool_basename; ac_word=$2
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146$as_echo_n "checking for $ac_word... " >&6; }
12147if ${ac_cv_path_XARGS+:} false; then :
12148  $as_echo_n "(cached) " >&6
12149else
12150  case $XARGS in
12151  [\\/]* | ?:[\\/]*)
12152  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12153  ;;
12154  *)
12155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156for as_dir in $PATH
12157do
12158  IFS=$as_save_IFS
12159  test -z "$as_dir" && as_dir=.
12160    for ac_exec_ext in '' $ac_executable_extensions; do
12161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164    break 2
12165  fi
12166done
12167  done
12168IFS=$as_save_IFS
12169
12170  ;;
12171esac
12172fi
12173XARGS=$ac_cv_path_XARGS
12174if test -n "$XARGS"; then
12175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12176$as_echo "$XARGS" >&6; }
12177else
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
12180fi
12181
12182
12183          if test "x$XARGS" = x; then
12184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12185          fi
12186        else
12187          # Otherwise we believe it is a complete path. Use it as it is.
12188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12189$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12191$as_echo_n "checking for XARGS... " >&6; }
12192          if test ! -x "$tool_specified"; then
12193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12194$as_echo "not found" >&6; }
12195            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12196          fi
12197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12198$as_echo "$tool_specified" >&6; }
12199        fi
12200      fi
12201    fi
12202
12203  fi
12204
12205
12206
12207  if test "x$XARGS" = x; then
12208    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12209  fi
12210
12211
12212
12213  # Then required tools that require some special treatment.
12214
12215
12216  # Publish this variable in the help.
12217
12218
12219  if [ -z "${AWK+x}" ]; then
12220    # The variable is not set by user, try to locate tool using the code snippet
12221    for ac_prog in gawk mawk nawk awk
12222do
12223  # Extract the first word of "$ac_prog", so it can be a program name with args.
12224set dummy $ac_prog; ac_word=$2
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12226$as_echo_n "checking for $ac_word... " >&6; }
12227if ${ac_cv_prog_AWK+:} false; then :
12228  $as_echo_n "(cached) " >&6
12229else
12230  if test -n "$AWK"; then
12231  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12232else
12233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238    for ac_exec_ext in '' $ac_executable_extensions; do
12239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12240    ac_cv_prog_AWK="$ac_prog"
12241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12242    break 2
12243  fi
12244done
12245  done
12246IFS=$as_save_IFS
12247
12248fi
12249fi
12250AWK=$ac_cv_prog_AWK
12251if test -n "$AWK"; then
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12253$as_echo "$AWK" >&6; }
12254else
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12256$as_echo "no" >&6; }
12257fi
12258
12259
12260  test -n "$AWK" && break
12261done
12262
12263  else
12264    # The variable is set, but is it from the command line or the environment?
12265
12266    # Try to remove the string !AWK! from our list.
12267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12269      # If it failed, the variable was not from the command line. Ignore it,
12270      # but warn the user (except for BASH, which is always set by the calling BASH).
12271      if test "xAWK" != xBASH; then
12272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12273$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12274      fi
12275      # Try to locate tool using the code snippet
12276      for ac_prog in gawk mawk nawk awk
12277do
12278  # Extract the first word of "$ac_prog", so it can be a program name with args.
12279set dummy $ac_prog; ac_word=$2
12280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12281$as_echo_n "checking for $ac_word... " >&6; }
12282if ${ac_cv_prog_AWK+:} false; then :
12283  $as_echo_n "(cached) " >&6
12284else
12285  if test -n "$AWK"; then
12286  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12287else
12288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12289for as_dir in $PATH
12290do
12291  IFS=$as_save_IFS
12292  test -z "$as_dir" && as_dir=.
12293    for ac_exec_ext in '' $ac_executable_extensions; do
12294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12295    ac_cv_prog_AWK="$ac_prog"
12296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12297    break 2
12298  fi
12299done
12300  done
12301IFS=$as_save_IFS
12302
12303fi
12304fi
12305AWK=$ac_cv_prog_AWK
12306if test -n "$AWK"; then
12307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12308$as_echo "$AWK" >&6; }
12309else
12310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12311$as_echo "no" >&6; }
12312fi
12313
12314
12315  test -n "$AWK" && break
12316done
12317
12318    else
12319      # If it succeeded, then it was overridden by the user. We will use it
12320      # for the tool.
12321
12322      # First remove it from the list of overridden variables, so we can test
12323      # for unknown variables in the end.
12324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12325
12326      # Check if we try to supply an empty value
12327      if test "x$AWK" = x; then
12328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12329$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12331$as_echo_n "checking for AWK... " >&6; }
12332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12333$as_echo "disabled" >&6; }
12334      else
12335        # Check if the provided tool contains a complete path.
12336        tool_specified="$AWK"
12337        tool_basename="${tool_specified##*/}"
12338        if test "x$tool_basename" = "x$tool_specified"; then
12339          # A command without a complete path is provided, search $PATH.
12340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12341$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12342          # Extract the first word of "$tool_basename", so it can be a program name with args.
12343set dummy $tool_basename; ac_word=$2
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12345$as_echo_n "checking for $ac_word... " >&6; }
12346if ${ac_cv_path_AWK+:} false; then :
12347  $as_echo_n "(cached) " >&6
12348else
12349  case $AWK in
12350  [\\/]* | ?:[\\/]*)
12351  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12352  ;;
12353  *)
12354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12355for as_dir in $PATH
12356do
12357  IFS=$as_save_IFS
12358  test -z "$as_dir" && as_dir=.
12359    for ac_exec_ext in '' $ac_executable_extensions; do
12360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12361    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12363    break 2
12364  fi
12365done
12366  done
12367IFS=$as_save_IFS
12368
12369  ;;
12370esac
12371fi
12372AWK=$ac_cv_path_AWK
12373if test -n "$AWK"; then
12374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12375$as_echo "$AWK" >&6; }
12376else
12377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12378$as_echo "no" >&6; }
12379fi
12380
12381
12382          if test "x$AWK" = x; then
12383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12384          fi
12385        else
12386          # Otherwise we believe it is a complete path. Use it as it is.
12387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12388$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12390$as_echo_n "checking for AWK... " >&6; }
12391          if test ! -x "$tool_specified"; then
12392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12393$as_echo "not found" >&6; }
12394            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12395          fi
12396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12397$as_echo "$tool_specified" >&6; }
12398        fi
12399      fi
12400    fi
12401
12402  fi
12403
12404
12405  if test "x$AWK" = x; then
12406    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12407  fi
12408
12409
12410
12411
12412  # Publish this variable in the help.
12413
12414
12415  if [ -z "${GREP+x}" ]; then
12416    # The variable is not set by user, try to locate tool using the code snippet
12417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12418$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12419if ${ac_cv_path_GREP+:} false; then :
12420  $as_echo_n "(cached) " >&6
12421else
12422  if test -z "$GREP"; then
12423  ac_path_GREP_found=false
12424  # Loop through the user's path and test for each of PROGNAME-LIST
12425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12426for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12427do
12428  IFS=$as_save_IFS
12429  test -z "$as_dir" && as_dir=.
12430    for ac_prog in grep ggrep; do
12431    for ac_exec_ext in '' $ac_executable_extensions; do
12432      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12433      as_fn_executable_p "$ac_path_GREP" || continue
12434# Check for GNU ac_path_GREP and select it if it is found.
12435  # Check for GNU $ac_path_GREP
12436case `"$ac_path_GREP" --version 2>&1` in
12437*GNU*)
12438  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12439*)
12440  ac_count=0
12441  $as_echo_n 0123456789 >"conftest.in"
12442  while :
12443  do
12444    cat "conftest.in" "conftest.in" >"conftest.tmp"
12445    mv "conftest.tmp" "conftest.in"
12446    cp "conftest.in" "conftest.nl"
12447    $as_echo 'GREP' >> "conftest.nl"
12448    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12449    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12450    as_fn_arith $ac_count + 1 && ac_count=$as_val
12451    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12452      # Best one so far, save it but keep looking for a better one
12453      ac_cv_path_GREP="$ac_path_GREP"
12454      ac_path_GREP_max=$ac_count
12455    fi
12456    # 10*(2^10) chars as input seems more than enough
12457    test $ac_count -gt 10 && break
12458  done
12459  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12460esac
12461
12462      $ac_path_GREP_found && break 3
12463    done
12464  done
12465  done
12466IFS=$as_save_IFS
12467  if test -z "$ac_cv_path_GREP"; then
12468    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12469  fi
12470else
12471  ac_cv_path_GREP=$GREP
12472fi
12473
12474fi
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12476$as_echo "$ac_cv_path_GREP" >&6; }
12477 GREP="$ac_cv_path_GREP"
12478
12479
12480  else
12481    # The variable is set, but is it from the command line or the environment?
12482
12483    # Try to remove the string !GREP! from our list.
12484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12486      # If it failed, the variable was not from the command line. Ignore it,
12487      # but warn the user (except for BASH, which is always set by the calling BASH).
12488      if test "xGREP" != xBASH; then
12489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12490$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12491      fi
12492      # Try to locate tool using the code snippet
12493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12494$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12495if ${ac_cv_path_GREP+:} false; then :
12496  $as_echo_n "(cached) " >&6
12497else
12498  if test -z "$GREP"; then
12499  ac_path_GREP_found=false
12500  # Loop through the user's path and test for each of PROGNAME-LIST
12501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12502for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12503do
12504  IFS=$as_save_IFS
12505  test -z "$as_dir" && as_dir=.
12506    for ac_prog in grep ggrep; do
12507    for ac_exec_ext in '' $ac_executable_extensions; do
12508      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12509      as_fn_executable_p "$ac_path_GREP" || continue
12510# Check for GNU ac_path_GREP and select it if it is found.
12511  # Check for GNU $ac_path_GREP
12512case `"$ac_path_GREP" --version 2>&1` in
12513*GNU*)
12514  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12515*)
12516  ac_count=0
12517  $as_echo_n 0123456789 >"conftest.in"
12518  while :
12519  do
12520    cat "conftest.in" "conftest.in" >"conftest.tmp"
12521    mv "conftest.tmp" "conftest.in"
12522    cp "conftest.in" "conftest.nl"
12523    $as_echo 'GREP' >> "conftest.nl"
12524    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12525    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12526    as_fn_arith $ac_count + 1 && ac_count=$as_val
12527    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12528      # Best one so far, save it but keep looking for a better one
12529      ac_cv_path_GREP="$ac_path_GREP"
12530      ac_path_GREP_max=$ac_count
12531    fi
12532    # 10*(2^10) chars as input seems more than enough
12533    test $ac_count -gt 10 && break
12534  done
12535  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12536esac
12537
12538      $ac_path_GREP_found && break 3
12539    done
12540  done
12541  done
12542IFS=$as_save_IFS
12543  if test -z "$ac_cv_path_GREP"; then
12544    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12545  fi
12546else
12547  ac_cv_path_GREP=$GREP
12548fi
12549
12550fi
12551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12552$as_echo "$ac_cv_path_GREP" >&6; }
12553 GREP="$ac_cv_path_GREP"
12554
12555
12556    else
12557      # If it succeeded, then it was overridden by the user. We will use it
12558      # for the tool.
12559
12560      # First remove it from the list of overridden variables, so we can test
12561      # for unknown variables in the end.
12562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12563
12564      # Check if we try to supply an empty value
12565      if test "x$GREP" = x; then
12566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12567$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12569$as_echo_n "checking for GREP... " >&6; }
12570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12571$as_echo "disabled" >&6; }
12572      else
12573        # Check if the provided tool contains a complete path.
12574        tool_specified="$GREP"
12575        tool_basename="${tool_specified##*/}"
12576        if test "x$tool_basename" = "x$tool_specified"; then
12577          # A command without a complete path is provided, search $PATH.
12578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12579$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12580          # Extract the first word of "$tool_basename", so it can be a program name with args.
12581set dummy $tool_basename; ac_word=$2
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12583$as_echo_n "checking for $ac_word... " >&6; }
12584if ${ac_cv_path_GREP+:} false; then :
12585  $as_echo_n "(cached) " >&6
12586else
12587  case $GREP in
12588  [\\/]* | ?:[\\/]*)
12589  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12590  ;;
12591  *)
12592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12593for as_dir in $PATH
12594do
12595  IFS=$as_save_IFS
12596  test -z "$as_dir" && as_dir=.
12597    for ac_exec_ext in '' $ac_executable_extensions; do
12598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12599    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12601    break 2
12602  fi
12603done
12604  done
12605IFS=$as_save_IFS
12606
12607  ;;
12608esac
12609fi
12610GREP=$ac_cv_path_GREP
12611if test -n "$GREP"; then
12612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12613$as_echo "$GREP" >&6; }
12614else
12615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12616$as_echo "no" >&6; }
12617fi
12618
12619
12620          if test "x$GREP" = x; then
12621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12622          fi
12623        else
12624          # Otherwise we believe it is a complete path. Use it as it is.
12625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12626$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12628$as_echo_n "checking for GREP... " >&6; }
12629          if test ! -x "$tool_specified"; then
12630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12631$as_echo "not found" >&6; }
12632            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12633          fi
12634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12635$as_echo "$tool_specified" >&6; }
12636        fi
12637      fi
12638    fi
12639
12640  fi
12641
12642
12643  if test "x$GREP" = x; then
12644    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12645  fi
12646
12647
12648
12649
12650  # Publish this variable in the help.
12651
12652
12653  if [ -z "${EGREP+x}" ]; then
12654    # The variable is not set by user, try to locate tool using the code snippet
12655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12656$as_echo_n "checking for egrep... " >&6; }
12657if ${ac_cv_path_EGREP+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12661   then ac_cv_path_EGREP="$GREP -E"
12662   else
12663     if test -z "$EGREP"; then
12664  ac_path_EGREP_found=false
12665  # Loop through the user's path and test for each of PROGNAME-LIST
12666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12668do
12669  IFS=$as_save_IFS
12670  test -z "$as_dir" && as_dir=.
12671    for ac_prog in egrep; do
12672    for ac_exec_ext in '' $ac_executable_extensions; do
12673      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12674      as_fn_executable_p "$ac_path_EGREP" || continue
12675# Check for GNU ac_path_EGREP and select it if it is found.
12676  # Check for GNU $ac_path_EGREP
12677case `"$ac_path_EGREP" --version 2>&1` in
12678*GNU*)
12679  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12680*)
12681  ac_count=0
12682  $as_echo_n 0123456789 >"conftest.in"
12683  while :
12684  do
12685    cat "conftest.in" "conftest.in" >"conftest.tmp"
12686    mv "conftest.tmp" "conftest.in"
12687    cp "conftest.in" "conftest.nl"
12688    $as_echo 'EGREP' >> "conftest.nl"
12689    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12690    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12691    as_fn_arith $ac_count + 1 && ac_count=$as_val
12692    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12693      # Best one so far, save it but keep looking for a better one
12694      ac_cv_path_EGREP="$ac_path_EGREP"
12695      ac_path_EGREP_max=$ac_count
12696    fi
12697    # 10*(2^10) chars as input seems more than enough
12698    test $ac_count -gt 10 && break
12699  done
12700  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12701esac
12702
12703      $ac_path_EGREP_found && break 3
12704    done
12705  done
12706  done
12707IFS=$as_save_IFS
12708  if test -z "$ac_cv_path_EGREP"; then
12709    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12710  fi
12711else
12712  ac_cv_path_EGREP=$EGREP
12713fi
12714
12715   fi
12716fi
12717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12718$as_echo "$ac_cv_path_EGREP" >&6; }
12719 EGREP="$ac_cv_path_EGREP"
12720
12721
12722  else
12723    # The variable is set, but is it from the command line or the environment?
12724
12725    # Try to remove the string !EGREP! from our list.
12726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12728      # If it failed, the variable was not from the command line. Ignore it,
12729      # but warn the user (except for BASH, which is always set by the calling BASH).
12730      if test "xEGREP" != xBASH; then
12731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12732$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12733      fi
12734      # Try to locate tool using the code snippet
12735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12736$as_echo_n "checking for egrep... " >&6; }
12737if ${ac_cv_path_EGREP+:} false; then :
12738  $as_echo_n "(cached) " >&6
12739else
12740  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12741   then ac_cv_path_EGREP="$GREP -E"
12742   else
12743     if test -z "$EGREP"; then
12744  ac_path_EGREP_found=false
12745  # Loop through the user's path and test for each of PROGNAME-LIST
12746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12747for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12748do
12749  IFS=$as_save_IFS
12750  test -z "$as_dir" && as_dir=.
12751    for ac_prog in egrep; do
12752    for ac_exec_ext in '' $ac_executable_extensions; do
12753      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12754      as_fn_executable_p "$ac_path_EGREP" || continue
12755# Check for GNU ac_path_EGREP and select it if it is found.
12756  # Check for GNU $ac_path_EGREP
12757case `"$ac_path_EGREP" --version 2>&1` in
12758*GNU*)
12759  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12760*)
12761  ac_count=0
12762  $as_echo_n 0123456789 >"conftest.in"
12763  while :
12764  do
12765    cat "conftest.in" "conftest.in" >"conftest.tmp"
12766    mv "conftest.tmp" "conftest.in"
12767    cp "conftest.in" "conftest.nl"
12768    $as_echo 'EGREP' >> "conftest.nl"
12769    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12770    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12771    as_fn_arith $ac_count + 1 && ac_count=$as_val
12772    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12773      # Best one so far, save it but keep looking for a better one
12774      ac_cv_path_EGREP="$ac_path_EGREP"
12775      ac_path_EGREP_max=$ac_count
12776    fi
12777    # 10*(2^10) chars as input seems more than enough
12778    test $ac_count -gt 10 && break
12779  done
12780  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12781esac
12782
12783      $ac_path_EGREP_found && break 3
12784    done
12785  done
12786  done
12787IFS=$as_save_IFS
12788  if test -z "$ac_cv_path_EGREP"; then
12789    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12790  fi
12791else
12792  ac_cv_path_EGREP=$EGREP
12793fi
12794
12795   fi
12796fi
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12798$as_echo "$ac_cv_path_EGREP" >&6; }
12799 EGREP="$ac_cv_path_EGREP"
12800
12801
12802    else
12803      # If it succeeded, then it was overridden by the user. We will use it
12804      # for the tool.
12805
12806      # First remove it from the list of overridden variables, so we can test
12807      # for unknown variables in the end.
12808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12809
12810      # Check if we try to supply an empty value
12811      if test "x$EGREP" = x; then
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12813$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12815$as_echo_n "checking for EGREP... " >&6; }
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12817$as_echo "disabled" >&6; }
12818      else
12819        # Check if the provided tool contains a complete path.
12820        tool_specified="$EGREP"
12821        tool_basename="${tool_specified##*/}"
12822        if test "x$tool_basename" = "x$tool_specified"; then
12823          # A command without a complete path is provided, search $PATH.
12824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12825$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12826          # Extract the first word of "$tool_basename", so it can be a program name with args.
12827set dummy $tool_basename; ac_word=$2
12828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12829$as_echo_n "checking for $ac_word... " >&6; }
12830if ${ac_cv_path_EGREP+:} false; then :
12831  $as_echo_n "(cached) " >&6
12832else
12833  case $EGREP in
12834  [\\/]* | ?:[\\/]*)
12835  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12836  ;;
12837  *)
12838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12839for as_dir in $PATH
12840do
12841  IFS=$as_save_IFS
12842  test -z "$as_dir" && as_dir=.
12843    for ac_exec_ext in '' $ac_executable_extensions; do
12844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12845    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12847    break 2
12848  fi
12849done
12850  done
12851IFS=$as_save_IFS
12852
12853  ;;
12854esac
12855fi
12856EGREP=$ac_cv_path_EGREP
12857if test -n "$EGREP"; then
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12859$as_echo "$EGREP" >&6; }
12860else
12861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12862$as_echo "no" >&6; }
12863fi
12864
12865
12866          if test "x$EGREP" = x; then
12867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12868          fi
12869        else
12870          # Otherwise we believe it is a complete path. Use it as it is.
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12872$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12874$as_echo_n "checking for EGREP... " >&6; }
12875          if test ! -x "$tool_specified"; then
12876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12877$as_echo "not found" >&6; }
12878            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12879          fi
12880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12881$as_echo "$tool_specified" >&6; }
12882        fi
12883      fi
12884    fi
12885
12886  fi
12887
12888
12889  if test "x$EGREP" = x; then
12890    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12891  fi
12892
12893
12894
12895
12896  # Publish this variable in the help.
12897
12898
12899  if [ -z "${FGREP+x}" ]; then
12900    # The variable is not set by user, try to locate tool using the code snippet
12901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12902$as_echo_n "checking for fgrep... " >&6; }
12903if ${ac_cv_path_FGREP+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12907   then ac_cv_path_FGREP="$GREP -F"
12908   else
12909     if test -z "$FGREP"; then
12910  ac_path_FGREP_found=false
12911  # Loop through the user's path and test for each of PROGNAME-LIST
12912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12913for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12914do
12915  IFS=$as_save_IFS
12916  test -z "$as_dir" && as_dir=.
12917    for ac_prog in fgrep; do
12918    for ac_exec_ext in '' $ac_executable_extensions; do
12919      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12920      as_fn_executable_p "$ac_path_FGREP" || continue
12921# Check for GNU ac_path_FGREP and select it if it is found.
12922  # Check for GNU $ac_path_FGREP
12923case `"$ac_path_FGREP" --version 2>&1` in
12924*GNU*)
12925  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12926*)
12927  ac_count=0
12928  $as_echo_n 0123456789 >"conftest.in"
12929  while :
12930  do
12931    cat "conftest.in" "conftest.in" >"conftest.tmp"
12932    mv "conftest.tmp" "conftest.in"
12933    cp "conftest.in" "conftest.nl"
12934    $as_echo 'FGREP' >> "conftest.nl"
12935    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12936    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12937    as_fn_arith $ac_count + 1 && ac_count=$as_val
12938    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12939      # Best one so far, save it but keep looking for a better one
12940      ac_cv_path_FGREP="$ac_path_FGREP"
12941      ac_path_FGREP_max=$ac_count
12942    fi
12943    # 10*(2^10) chars as input seems more than enough
12944    test $ac_count -gt 10 && break
12945  done
12946  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12947esac
12948
12949      $ac_path_FGREP_found && break 3
12950    done
12951  done
12952  done
12953IFS=$as_save_IFS
12954  if test -z "$ac_cv_path_FGREP"; then
12955    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12956  fi
12957else
12958  ac_cv_path_FGREP=$FGREP
12959fi
12960
12961   fi
12962fi
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12964$as_echo "$ac_cv_path_FGREP" >&6; }
12965 FGREP="$ac_cv_path_FGREP"
12966
12967
12968  else
12969    # The variable is set, but is it from the command line or the environment?
12970
12971    # Try to remove the string !FGREP! from our list.
12972    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12973    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12974      # If it failed, the variable was not from the command line. Ignore it,
12975      # but warn the user (except for BASH, which is always set by the calling BASH).
12976      if test "xFGREP" != xBASH; then
12977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12978$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12979      fi
12980      # Try to locate tool using the code snippet
12981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12982$as_echo_n "checking for fgrep... " >&6; }
12983if ${ac_cv_path_FGREP+:} false; then :
12984  $as_echo_n "(cached) " >&6
12985else
12986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12987   then ac_cv_path_FGREP="$GREP -F"
12988   else
12989     if test -z "$FGREP"; then
12990  ac_path_FGREP_found=false
12991  # Loop through the user's path and test for each of PROGNAME-LIST
12992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12994do
12995  IFS=$as_save_IFS
12996  test -z "$as_dir" && as_dir=.
12997    for ac_prog in fgrep; do
12998    for ac_exec_ext in '' $ac_executable_extensions; do
12999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13000      as_fn_executable_p "$ac_path_FGREP" || continue
13001# Check for GNU ac_path_FGREP and select it if it is found.
13002  # Check for GNU $ac_path_FGREP
13003case `"$ac_path_FGREP" --version 2>&1` in
13004*GNU*)
13005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13006*)
13007  ac_count=0
13008  $as_echo_n 0123456789 >"conftest.in"
13009  while :
13010  do
13011    cat "conftest.in" "conftest.in" >"conftest.tmp"
13012    mv "conftest.tmp" "conftest.in"
13013    cp "conftest.in" "conftest.nl"
13014    $as_echo 'FGREP' >> "conftest.nl"
13015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13017    as_fn_arith $ac_count + 1 && ac_count=$as_val
13018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13019      # Best one so far, save it but keep looking for a better one
13020      ac_cv_path_FGREP="$ac_path_FGREP"
13021      ac_path_FGREP_max=$ac_count
13022    fi
13023    # 10*(2^10) chars as input seems more than enough
13024    test $ac_count -gt 10 && break
13025  done
13026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13027esac
13028
13029      $ac_path_FGREP_found && break 3
13030    done
13031  done
13032  done
13033IFS=$as_save_IFS
13034  if test -z "$ac_cv_path_FGREP"; then
13035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13036  fi
13037else
13038  ac_cv_path_FGREP=$FGREP
13039fi
13040
13041   fi
13042fi
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13044$as_echo "$ac_cv_path_FGREP" >&6; }
13045 FGREP="$ac_cv_path_FGREP"
13046
13047
13048    else
13049      # If it succeeded, then it was overridden by the user. We will use it
13050      # for the tool.
13051
13052      # First remove it from the list of overridden variables, so we can test
13053      # for unknown variables in the end.
13054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13055
13056      # Check if we try to supply an empty value
13057      if test "x$FGREP" = x; then
13058        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13059$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13061$as_echo_n "checking for FGREP... " >&6; }
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13063$as_echo "disabled" >&6; }
13064      else
13065        # Check if the provided tool contains a complete path.
13066        tool_specified="$FGREP"
13067        tool_basename="${tool_specified##*/}"
13068        if test "x$tool_basename" = "x$tool_specified"; then
13069          # A command without a complete path is provided, search $PATH.
13070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13071$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13072          # Extract the first word of "$tool_basename", so it can be a program name with args.
13073set dummy $tool_basename; ac_word=$2
13074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13075$as_echo_n "checking for $ac_word... " >&6; }
13076if ${ac_cv_path_FGREP+:} false; then :
13077  $as_echo_n "(cached) " >&6
13078else
13079  case $FGREP in
13080  [\\/]* | ?:[\\/]*)
13081  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13082  ;;
13083  *)
13084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13085for as_dir in $PATH
13086do
13087  IFS=$as_save_IFS
13088  test -z "$as_dir" && as_dir=.
13089    for ac_exec_ext in '' $ac_executable_extensions; do
13090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13091    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13093    break 2
13094  fi
13095done
13096  done
13097IFS=$as_save_IFS
13098
13099  ;;
13100esac
13101fi
13102FGREP=$ac_cv_path_FGREP
13103if test -n "$FGREP"; then
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13105$as_echo "$FGREP" >&6; }
13106else
13107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13108$as_echo "no" >&6; }
13109fi
13110
13111
13112          if test "x$FGREP" = x; then
13113            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13114          fi
13115        else
13116          # Otherwise we believe it is a complete path. Use it as it is.
13117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13118$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13120$as_echo_n "checking for FGREP... " >&6; }
13121          if test ! -x "$tool_specified"; then
13122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13123$as_echo "not found" >&6; }
13124            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13125          fi
13126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13127$as_echo "$tool_specified" >&6; }
13128        fi
13129      fi
13130    fi
13131
13132  fi
13133
13134
13135  if test "x$FGREP" = x; then
13136    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13137  fi
13138
13139
13140
13141
13142  # Publish this variable in the help.
13143
13144
13145  if [ -z "${SED+x}" ]; then
13146    # The variable is not set by user, try to locate tool using the code snippet
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13148$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13149if ${ac_cv_path_SED+:} false; then :
13150  $as_echo_n "(cached) " >&6
13151else
13152            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13153     for ac_i in 1 2 3 4 5 6 7; do
13154       ac_script="$ac_script$as_nl$ac_script"
13155     done
13156     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13157     { ac_script=; unset ac_script;}
13158     if test -z "$SED"; then
13159  ac_path_SED_found=false
13160  # Loop through the user's path and test for each of PROGNAME-LIST
13161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13162for as_dir in $PATH
13163do
13164  IFS=$as_save_IFS
13165  test -z "$as_dir" && as_dir=.
13166    for ac_prog in sed gsed; do
13167    for ac_exec_ext in '' $ac_executable_extensions; do
13168      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13169      as_fn_executable_p "$ac_path_SED" || continue
13170# Check for GNU ac_path_SED and select it if it is found.
13171  # Check for GNU $ac_path_SED
13172case `"$ac_path_SED" --version 2>&1` in
13173*GNU*)
13174  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13175*)
13176  ac_count=0
13177  $as_echo_n 0123456789 >"conftest.in"
13178  while :
13179  do
13180    cat "conftest.in" "conftest.in" >"conftest.tmp"
13181    mv "conftest.tmp" "conftest.in"
13182    cp "conftest.in" "conftest.nl"
13183    $as_echo '' >> "conftest.nl"
13184    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13186    as_fn_arith $ac_count + 1 && ac_count=$as_val
13187    if test $ac_count -gt ${ac_path_SED_max-0}; then
13188      # Best one so far, save it but keep looking for a better one
13189      ac_cv_path_SED="$ac_path_SED"
13190      ac_path_SED_max=$ac_count
13191    fi
13192    # 10*(2^10) chars as input seems more than enough
13193    test $ac_count -gt 10 && break
13194  done
13195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13196esac
13197
13198      $ac_path_SED_found && break 3
13199    done
13200  done
13201  done
13202IFS=$as_save_IFS
13203  if test -z "$ac_cv_path_SED"; then
13204    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13205  fi
13206else
13207  ac_cv_path_SED=$SED
13208fi
13209
13210fi
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13212$as_echo "$ac_cv_path_SED" >&6; }
13213 SED="$ac_cv_path_SED"
13214  rm -f conftest.sed
13215
13216  else
13217    # The variable is set, but is it from the command line or the environment?
13218
13219    # Try to remove the string !SED! from our list.
13220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13222      # If it failed, the variable was not from the command line. Ignore it,
13223      # but warn the user (except for BASH, which is always set by the calling BASH).
13224      if test "xSED" != xBASH; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13226$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13227      fi
13228      # Try to locate tool using the code snippet
13229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13231if ${ac_cv_path_SED+:} false; then :
13232  $as_echo_n "(cached) " >&6
13233else
13234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13235     for ac_i in 1 2 3 4 5 6 7; do
13236       ac_script="$ac_script$as_nl$ac_script"
13237     done
13238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13239     { ac_script=; unset ac_script;}
13240     if test -z "$SED"; then
13241  ac_path_SED_found=false
13242  # Loop through the user's path and test for each of PROGNAME-LIST
13243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13244for as_dir in $PATH
13245do
13246  IFS=$as_save_IFS
13247  test -z "$as_dir" && as_dir=.
13248    for ac_prog in sed gsed; do
13249    for ac_exec_ext in '' $ac_executable_extensions; do
13250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13251      as_fn_executable_p "$ac_path_SED" || continue
13252# Check for GNU ac_path_SED and select it if it is found.
13253  # Check for GNU $ac_path_SED
13254case `"$ac_path_SED" --version 2>&1` in
13255*GNU*)
13256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13257*)
13258  ac_count=0
13259  $as_echo_n 0123456789 >"conftest.in"
13260  while :
13261  do
13262    cat "conftest.in" "conftest.in" >"conftest.tmp"
13263    mv "conftest.tmp" "conftest.in"
13264    cp "conftest.in" "conftest.nl"
13265    $as_echo '' >> "conftest.nl"
13266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13268    as_fn_arith $ac_count + 1 && ac_count=$as_val
13269    if test $ac_count -gt ${ac_path_SED_max-0}; then
13270      # Best one so far, save it but keep looking for a better one
13271      ac_cv_path_SED="$ac_path_SED"
13272      ac_path_SED_max=$ac_count
13273    fi
13274    # 10*(2^10) chars as input seems more than enough
13275    test $ac_count -gt 10 && break
13276  done
13277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13278esac
13279
13280      $ac_path_SED_found && break 3
13281    done
13282  done
13283  done
13284IFS=$as_save_IFS
13285  if test -z "$ac_cv_path_SED"; then
13286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13287  fi
13288else
13289  ac_cv_path_SED=$SED
13290fi
13291
13292fi
13293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13294$as_echo "$ac_cv_path_SED" >&6; }
13295 SED="$ac_cv_path_SED"
13296  rm -f conftest.sed
13297
13298    else
13299      # If it succeeded, then it was overridden by the user. We will use it
13300      # for the tool.
13301
13302      # First remove it from the list of overridden variables, so we can test
13303      # for unknown variables in the end.
13304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13305
13306      # Check if we try to supply an empty value
13307      if test "x$SED" = x; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13309$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13311$as_echo_n "checking for SED... " >&6; }
13312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13313$as_echo "disabled" >&6; }
13314      else
13315        # Check if the provided tool contains a complete path.
13316        tool_specified="$SED"
13317        tool_basename="${tool_specified##*/}"
13318        if test "x$tool_basename" = "x$tool_specified"; then
13319          # A command without a complete path is provided, search $PATH.
13320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13321$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13322          # Extract the first word of "$tool_basename", so it can be a program name with args.
13323set dummy $tool_basename; ac_word=$2
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13325$as_echo_n "checking for $ac_word... " >&6; }
13326if ${ac_cv_path_SED+:} false; then :
13327  $as_echo_n "(cached) " >&6
13328else
13329  case $SED in
13330  [\\/]* | ?:[\\/]*)
13331  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13332  ;;
13333  *)
13334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13335for as_dir in $PATH
13336do
13337  IFS=$as_save_IFS
13338  test -z "$as_dir" && as_dir=.
13339    for ac_exec_ext in '' $ac_executable_extensions; do
13340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13341    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13343    break 2
13344  fi
13345done
13346  done
13347IFS=$as_save_IFS
13348
13349  ;;
13350esac
13351fi
13352SED=$ac_cv_path_SED
13353if test -n "$SED"; then
13354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13355$as_echo "$SED" >&6; }
13356else
13357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13358$as_echo "no" >&6; }
13359fi
13360
13361
13362          if test "x$SED" = x; then
13363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13364          fi
13365        else
13366          # Otherwise we believe it is a complete path. Use it as it is.
13367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13368$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13370$as_echo_n "checking for SED... " >&6; }
13371          if test ! -x "$tool_specified"; then
13372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13373$as_echo "not found" >&6; }
13374            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13375          fi
13376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13377$as_echo "$tool_specified" >&6; }
13378        fi
13379      fi
13380    fi
13381
13382  fi
13383
13384
13385  if test "x$SED" = x; then
13386    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13387  fi
13388
13389
13390
13391  # Always force rm.
13392  RM="$RM -f"
13393
13394  # pwd behaves differently on various platforms and some don't support the -L flag.
13395  # Always use the bash builtin pwd to get uniform behavior.
13396  THEPWDCMD=pwd
13397
13398  # These are not required on all platforms
13399
13400
13401  # Publish this variable in the help.
13402
13403
13404  if [ -z "${CYGPATH+x}" ]; then
13405    # The variable is not set by user, try to locate tool using the code snippet
13406    for ac_prog in cygpath
13407do
13408  # Extract the first word of "$ac_prog", so it can be a program name with args.
13409set dummy $ac_prog; ac_word=$2
13410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13411$as_echo_n "checking for $ac_word... " >&6; }
13412if ${ac_cv_path_CYGPATH+:} false; then :
13413  $as_echo_n "(cached) " >&6
13414else
13415  case $CYGPATH in
13416  [\\/]* | ?:[\\/]*)
13417  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13418  ;;
13419  *)
13420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13421for as_dir in $PATH
13422do
13423  IFS=$as_save_IFS
13424  test -z "$as_dir" && as_dir=.
13425    for ac_exec_ext in '' $ac_executable_extensions; do
13426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13427    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13429    break 2
13430  fi
13431done
13432  done
13433IFS=$as_save_IFS
13434
13435  ;;
13436esac
13437fi
13438CYGPATH=$ac_cv_path_CYGPATH
13439if test -n "$CYGPATH"; then
13440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13441$as_echo "$CYGPATH" >&6; }
13442else
13443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13444$as_echo "no" >&6; }
13445fi
13446
13447
13448  test -n "$CYGPATH" && break
13449done
13450
13451  else
13452    # The variable is set, but is it from the command line or the environment?
13453
13454    # Try to remove the string !CYGPATH! from our list.
13455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13457      # If it failed, the variable was not from the command line. Ignore it,
13458      # but warn the user (except for BASH, which is always set by the calling BASH).
13459      if test "xCYGPATH" != xBASH; then
13460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13461$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13462      fi
13463      # Try to locate tool using the code snippet
13464      for ac_prog in cygpath
13465do
13466  # Extract the first word of "$ac_prog", so it can be a program name with args.
13467set dummy $ac_prog; ac_word=$2
13468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13469$as_echo_n "checking for $ac_word... " >&6; }
13470if ${ac_cv_path_CYGPATH+:} false; then :
13471  $as_echo_n "(cached) " >&6
13472else
13473  case $CYGPATH in
13474  [\\/]* | ?:[\\/]*)
13475  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13476  ;;
13477  *)
13478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13479for as_dir in $PATH
13480do
13481  IFS=$as_save_IFS
13482  test -z "$as_dir" && as_dir=.
13483    for ac_exec_ext in '' $ac_executable_extensions; do
13484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13485    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13487    break 2
13488  fi
13489done
13490  done
13491IFS=$as_save_IFS
13492
13493  ;;
13494esac
13495fi
13496CYGPATH=$ac_cv_path_CYGPATH
13497if test -n "$CYGPATH"; then
13498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13499$as_echo "$CYGPATH" >&6; }
13500else
13501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13502$as_echo "no" >&6; }
13503fi
13504
13505
13506  test -n "$CYGPATH" && break
13507done
13508
13509    else
13510      # If it succeeded, then it was overridden by the user. We will use it
13511      # for the tool.
13512
13513      # First remove it from the list of overridden variables, so we can test
13514      # for unknown variables in the end.
13515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13516
13517      # Check if we try to supply an empty value
13518      if test "x$CYGPATH" = x; then
13519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13520$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13522$as_echo_n "checking for CYGPATH... " >&6; }
13523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13524$as_echo "disabled" >&6; }
13525      else
13526        # Check if the provided tool contains a complete path.
13527        tool_specified="$CYGPATH"
13528        tool_basename="${tool_specified##*/}"
13529        if test "x$tool_basename" = "x$tool_specified"; then
13530          # A command without a complete path is provided, search $PATH.
13531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13532$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13533          # Extract the first word of "$tool_basename", so it can be a program name with args.
13534set dummy $tool_basename; ac_word=$2
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13536$as_echo_n "checking for $ac_word... " >&6; }
13537if ${ac_cv_path_CYGPATH+:} false; then :
13538  $as_echo_n "(cached) " >&6
13539else
13540  case $CYGPATH in
13541  [\\/]* | ?:[\\/]*)
13542  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13543  ;;
13544  *)
13545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548  IFS=$as_save_IFS
13549  test -z "$as_dir" && as_dir=.
13550    for ac_exec_ext in '' $ac_executable_extensions; do
13551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13552    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13554    break 2
13555  fi
13556done
13557  done
13558IFS=$as_save_IFS
13559
13560  ;;
13561esac
13562fi
13563CYGPATH=$ac_cv_path_CYGPATH
13564if test -n "$CYGPATH"; then
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13566$as_echo "$CYGPATH" >&6; }
13567else
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
13570fi
13571
13572
13573          if test "x$CYGPATH" = x; then
13574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13575          fi
13576        else
13577          # Otherwise we believe it is a complete path. Use it as it is.
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13579$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13581$as_echo_n "checking for CYGPATH... " >&6; }
13582          if test ! -x "$tool_specified"; then
13583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13584$as_echo "not found" >&6; }
13585            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13586          fi
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13588$as_echo "$tool_specified" >&6; }
13589        fi
13590      fi
13591    fi
13592
13593  fi
13594
13595
13596
13597
13598  # Publish this variable in the help.
13599
13600
13601  if [ -z "${READLINK+x}" ]; then
13602    # The variable is not set by user, try to locate tool using the code snippet
13603    for ac_prog in greadlink readlink
13604do
13605  # Extract the first word of "$ac_prog", so it can be a program name with args.
13606set dummy $ac_prog; ac_word=$2
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13608$as_echo_n "checking for $ac_word... " >&6; }
13609if ${ac_cv_path_READLINK+:} false; then :
13610  $as_echo_n "(cached) " >&6
13611else
13612  case $READLINK in
13613  [\\/]* | ?:[\\/]*)
13614  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13615  ;;
13616  *)
13617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13618for as_dir in $PATH
13619do
13620  IFS=$as_save_IFS
13621  test -z "$as_dir" && as_dir=.
13622    for ac_exec_ext in '' $ac_executable_extensions; do
13623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13624    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13626    break 2
13627  fi
13628done
13629  done
13630IFS=$as_save_IFS
13631
13632  ;;
13633esac
13634fi
13635READLINK=$ac_cv_path_READLINK
13636if test -n "$READLINK"; then
13637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13638$as_echo "$READLINK" >&6; }
13639else
13640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13641$as_echo "no" >&6; }
13642fi
13643
13644
13645  test -n "$READLINK" && break
13646done
13647
13648  else
13649    # The variable is set, but is it from the command line or the environment?
13650
13651    # Try to remove the string !READLINK! from our list.
13652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13654      # If it failed, the variable was not from the command line. Ignore it,
13655      # but warn the user (except for BASH, which is always set by the calling BASH).
13656      if test "xREADLINK" != xBASH; then
13657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13658$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13659      fi
13660      # Try to locate tool using the code snippet
13661      for ac_prog in greadlink readlink
13662do
13663  # Extract the first word of "$ac_prog", so it can be a program name with args.
13664set dummy $ac_prog; ac_word=$2
13665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13666$as_echo_n "checking for $ac_word... " >&6; }
13667if ${ac_cv_path_READLINK+:} false; then :
13668  $as_echo_n "(cached) " >&6
13669else
13670  case $READLINK in
13671  [\\/]* | ?:[\\/]*)
13672  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13673  ;;
13674  *)
13675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13676for as_dir in $PATH
13677do
13678  IFS=$as_save_IFS
13679  test -z "$as_dir" && as_dir=.
13680    for ac_exec_ext in '' $ac_executable_extensions; do
13681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13682    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13684    break 2
13685  fi
13686done
13687  done
13688IFS=$as_save_IFS
13689
13690  ;;
13691esac
13692fi
13693READLINK=$ac_cv_path_READLINK
13694if test -n "$READLINK"; then
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13696$as_echo "$READLINK" >&6; }
13697else
13698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13699$as_echo "no" >&6; }
13700fi
13701
13702
13703  test -n "$READLINK" && break
13704done
13705
13706    else
13707      # If it succeeded, then it was overridden by the user. We will use it
13708      # for the tool.
13709
13710      # First remove it from the list of overridden variables, so we can test
13711      # for unknown variables in the end.
13712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13713
13714      # Check if we try to supply an empty value
13715      if test "x$READLINK" = x; then
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13717$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13719$as_echo_n "checking for READLINK... " >&6; }
13720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13721$as_echo "disabled" >&6; }
13722      else
13723        # Check if the provided tool contains a complete path.
13724        tool_specified="$READLINK"
13725        tool_basename="${tool_specified##*/}"
13726        if test "x$tool_basename" = "x$tool_specified"; then
13727          # A command without a complete path is provided, search $PATH.
13728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13729$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13730          # Extract the first word of "$tool_basename", so it can be a program name with args.
13731set dummy $tool_basename; ac_word=$2
13732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13733$as_echo_n "checking for $ac_word... " >&6; }
13734if ${ac_cv_path_READLINK+:} false; then :
13735  $as_echo_n "(cached) " >&6
13736else
13737  case $READLINK in
13738  [\\/]* | ?:[\\/]*)
13739  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13740  ;;
13741  *)
13742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13743for as_dir in $PATH
13744do
13745  IFS=$as_save_IFS
13746  test -z "$as_dir" && as_dir=.
13747    for ac_exec_ext in '' $ac_executable_extensions; do
13748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13749    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13751    break 2
13752  fi
13753done
13754  done
13755IFS=$as_save_IFS
13756
13757  ;;
13758esac
13759fi
13760READLINK=$ac_cv_path_READLINK
13761if test -n "$READLINK"; then
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13763$as_echo "$READLINK" >&6; }
13764else
13765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13766$as_echo "no" >&6; }
13767fi
13768
13769
13770          if test "x$READLINK" = x; then
13771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13772          fi
13773        else
13774          # Otherwise we believe it is a complete path. Use it as it is.
13775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13776$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13778$as_echo_n "checking for READLINK... " >&6; }
13779          if test ! -x "$tool_specified"; then
13780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13781$as_echo "not found" >&6; }
13782            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13783          fi
13784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13785$as_echo "$tool_specified" >&6; }
13786        fi
13787      fi
13788    fi
13789
13790  fi
13791
13792
13793
13794
13795  # Publish this variable in the help.
13796
13797
13798  if [ -z "${DF+x}" ]; then
13799    # The variable is not set by user, try to locate tool using the code snippet
13800    for ac_prog in df
13801do
13802  # Extract the first word of "$ac_prog", so it can be a program name with args.
13803set dummy $ac_prog; ac_word=$2
13804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13805$as_echo_n "checking for $ac_word... " >&6; }
13806if ${ac_cv_path_DF+:} false; then :
13807  $as_echo_n "(cached) " >&6
13808else
13809  case $DF in
13810  [\\/]* | ?:[\\/]*)
13811  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13812  ;;
13813  *)
13814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13815for as_dir in $PATH
13816do
13817  IFS=$as_save_IFS
13818  test -z "$as_dir" && as_dir=.
13819    for ac_exec_ext in '' $ac_executable_extensions; do
13820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13821    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13823    break 2
13824  fi
13825done
13826  done
13827IFS=$as_save_IFS
13828
13829  ;;
13830esac
13831fi
13832DF=$ac_cv_path_DF
13833if test -n "$DF"; then
13834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13835$as_echo "$DF" >&6; }
13836else
13837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13838$as_echo "no" >&6; }
13839fi
13840
13841
13842  test -n "$DF" && break
13843done
13844
13845  else
13846    # The variable is set, but is it from the command line or the environment?
13847
13848    # Try to remove the string !DF! from our list.
13849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13851      # If it failed, the variable was not from the command line. Ignore it,
13852      # but warn the user (except for BASH, which is always set by the calling BASH).
13853      if test "xDF" != xBASH; then
13854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13855$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13856      fi
13857      # Try to locate tool using the code snippet
13858      for ac_prog in df
13859do
13860  # Extract the first word of "$ac_prog", so it can be a program name with args.
13861set dummy $ac_prog; ac_word=$2
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13863$as_echo_n "checking for $ac_word... " >&6; }
13864if ${ac_cv_path_DF+:} false; then :
13865  $as_echo_n "(cached) " >&6
13866else
13867  case $DF in
13868  [\\/]* | ?:[\\/]*)
13869  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13870  ;;
13871  *)
13872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13873for as_dir in $PATH
13874do
13875  IFS=$as_save_IFS
13876  test -z "$as_dir" && as_dir=.
13877    for ac_exec_ext in '' $ac_executable_extensions; do
13878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13879    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13881    break 2
13882  fi
13883done
13884  done
13885IFS=$as_save_IFS
13886
13887  ;;
13888esac
13889fi
13890DF=$ac_cv_path_DF
13891if test -n "$DF"; then
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13893$as_echo "$DF" >&6; }
13894else
13895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13896$as_echo "no" >&6; }
13897fi
13898
13899
13900  test -n "$DF" && break
13901done
13902
13903    else
13904      # If it succeeded, then it was overridden by the user. We will use it
13905      # for the tool.
13906
13907      # First remove it from the list of overridden variables, so we can test
13908      # for unknown variables in the end.
13909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13910
13911      # Check if we try to supply an empty value
13912      if test "x$DF" = x; then
13913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13914$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13916$as_echo_n "checking for DF... " >&6; }
13917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13918$as_echo "disabled" >&6; }
13919      else
13920        # Check if the provided tool contains a complete path.
13921        tool_specified="$DF"
13922        tool_basename="${tool_specified##*/}"
13923        if test "x$tool_basename" = "x$tool_specified"; then
13924          # A command without a complete path is provided, search $PATH.
13925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13926$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13927          # Extract the first word of "$tool_basename", so it can be a program name with args.
13928set dummy $tool_basename; ac_word=$2
13929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13930$as_echo_n "checking for $ac_word... " >&6; }
13931if ${ac_cv_path_DF+:} false; then :
13932  $as_echo_n "(cached) " >&6
13933else
13934  case $DF in
13935  [\\/]* | ?:[\\/]*)
13936  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13937  ;;
13938  *)
13939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13940for as_dir in $PATH
13941do
13942  IFS=$as_save_IFS
13943  test -z "$as_dir" && as_dir=.
13944    for ac_exec_ext in '' $ac_executable_extensions; do
13945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13946    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13948    break 2
13949  fi
13950done
13951  done
13952IFS=$as_save_IFS
13953
13954  ;;
13955esac
13956fi
13957DF=$ac_cv_path_DF
13958if test -n "$DF"; then
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13960$as_echo "$DF" >&6; }
13961else
13962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13963$as_echo "no" >&6; }
13964fi
13965
13966
13967          if test "x$DF" = x; then
13968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13969          fi
13970        else
13971          # Otherwise we believe it is a complete path. Use it as it is.
13972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13973$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13975$as_echo_n "checking for DF... " >&6; }
13976          if test ! -x "$tool_specified"; then
13977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13978$as_echo "not found" >&6; }
13979            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13980          fi
13981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13982$as_echo "$tool_specified" >&6; }
13983        fi
13984      fi
13985    fi
13986
13987  fi
13988
13989
13990
13991
13992  # Publish this variable in the help.
13993
13994
13995  if [ -z "${CPIO+x}" ]; then
13996    # The variable is not set by user, try to locate tool using the code snippet
13997    for ac_prog in cpio bsdcpio
13998do
13999  # Extract the first word of "$ac_prog", so it can be a program name with args.
14000set dummy $ac_prog; ac_word=$2
14001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14002$as_echo_n "checking for $ac_word... " >&6; }
14003if ${ac_cv_path_CPIO+:} false; then :
14004  $as_echo_n "(cached) " >&6
14005else
14006  case $CPIO in
14007  [\\/]* | ?:[\\/]*)
14008  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14009  ;;
14010  *)
14011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14012for as_dir in $PATH
14013do
14014  IFS=$as_save_IFS
14015  test -z "$as_dir" && as_dir=.
14016    for ac_exec_ext in '' $ac_executable_extensions; do
14017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14018    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14020    break 2
14021  fi
14022done
14023  done
14024IFS=$as_save_IFS
14025
14026  ;;
14027esac
14028fi
14029CPIO=$ac_cv_path_CPIO
14030if test -n "$CPIO"; then
14031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14032$as_echo "$CPIO" >&6; }
14033else
14034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14035$as_echo "no" >&6; }
14036fi
14037
14038
14039  test -n "$CPIO" && break
14040done
14041
14042  else
14043    # The variable is set, but is it from the command line or the environment?
14044
14045    # Try to remove the string !CPIO! from our list.
14046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14048      # If it failed, the variable was not from the command line. Ignore it,
14049      # but warn the user (except for BASH, which is always set by the calling BASH).
14050      if test "xCPIO" != xBASH; then
14051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14052$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14053      fi
14054      # Try to locate tool using the code snippet
14055      for ac_prog in cpio bsdcpio
14056do
14057  # Extract the first word of "$ac_prog", so it can be a program name with args.
14058set dummy $ac_prog; ac_word=$2
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14060$as_echo_n "checking for $ac_word... " >&6; }
14061if ${ac_cv_path_CPIO+:} false; then :
14062  $as_echo_n "(cached) " >&6
14063else
14064  case $CPIO in
14065  [\\/]* | ?:[\\/]*)
14066  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14067  ;;
14068  *)
14069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14070for as_dir in $PATH
14071do
14072  IFS=$as_save_IFS
14073  test -z "$as_dir" && as_dir=.
14074    for ac_exec_ext in '' $ac_executable_extensions; do
14075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14076    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14078    break 2
14079  fi
14080done
14081  done
14082IFS=$as_save_IFS
14083
14084  ;;
14085esac
14086fi
14087CPIO=$ac_cv_path_CPIO
14088if test -n "$CPIO"; then
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14090$as_echo "$CPIO" >&6; }
14091else
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14093$as_echo "no" >&6; }
14094fi
14095
14096
14097  test -n "$CPIO" && break
14098done
14099
14100    else
14101      # If it succeeded, then it was overridden by the user. We will use it
14102      # for the tool.
14103
14104      # First remove it from the list of overridden variables, so we can test
14105      # for unknown variables in the end.
14106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14107
14108      # Check if we try to supply an empty value
14109      if test "x$CPIO" = x; then
14110        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14111$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14113$as_echo_n "checking for CPIO... " >&6; }
14114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14115$as_echo "disabled" >&6; }
14116      else
14117        # Check if the provided tool contains a complete path.
14118        tool_specified="$CPIO"
14119        tool_basename="${tool_specified##*/}"
14120        if test "x$tool_basename" = "x$tool_specified"; then
14121          # A command without a complete path is provided, search $PATH.
14122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14123$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14124          # Extract the first word of "$tool_basename", so it can be a program name with args.
14125set dummy $tool_basename; ac_word=$2
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14127$as_echo_n "checking for $ac_word... " >&6; }
14128if ${ac_cv_path_CPIO+:} false; then :
14129  $as_echo_n "(cached) " >&6
14130else
14131  case $CPIO in
14132  [\\/]* | ?:[\\/]*)
14133  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14134  ;;
14135  *)
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_exec_ext in '' $ac_executable_extensions; do
14142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14143    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14145    break 2
14146  fi
14147done
14148  done
14149IFS=$as_save_IFS
14150
14151  ;;
14152esac
14153fi
14154CPIO=$ac_cv_path_CPIO
14155if test -n "$CPIO"; then
14156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14157$as_echo "$CPIO" >&6; }
14158else
14159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14160$as_echo "no" >&6; }
14161fi
14162
14163
14164          if test "x$CPIO" = x; then
14165            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14166          fi
14167        else
14168          # Otherwise we believe it is a complete path. Use it as it is.
14169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14170$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14171          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14172$as_echo_n "checking for CPIO... " >&6; }
14173          if test ! -x "$tool_specified"; then
14174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14175$as_echo "not found" >&6; }
14176            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14177          fi
14178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14179$as_echo "$tool_specified" >&6; }
14180        fi
14181      fi
14182    fi
14183
14184  fi
14185
14186
14187
14188
14189  # Publish this variable in the help.
14190
14191
14192  if [ -z "${NICE+x}" ]; then
14193    # The variable is not set by user, try to locate tool using the code snippet
14194    for ac_prog in nice
14195do
14196  # Extract the first word of "$ac_prog", so it can be a program name with args.
14197set dummy $ac_prog; ac_word=$2
14198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14199$as_echo_n "checking for $ac_word... " >&6; }
14200if ${ac_cv_path_NICE+:} false; then :
14201  $as_echo_n "(cached) " >&6
14202else
14203  case $NICE in
14204  [\\/]* | ?:[\\/]*)
14205  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14206  ;;
14207  *)
14208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14209for as_dir in $PATH
14210do
14211  IFS=$as_save_IFS
14212  test -z "$as_dir" && as_dir=.
14213    for ac_exec_ext in '' $ac_executable_extensions; do
14214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14215    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14217    break 2
14218  fi
14219done
14220  done
14221IFS=$as_save_IFS
14222
14223  ;;
14224esac
14225fi
14226NICE=$ac_cv_path_NICE
14227if test -n "$NICE"; then
14228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14229$as_echo "$NICE" >&6; }
14230else
14231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14232$as_echo "no" >&6; }
14233fi
14234
14235
14236  test -n "$NICE" && break
14237done
14238
14239  else
14240    # The variable is set, but is it from the command line or the environment?
14241
14242    # Try to remove the string !NICE! from our list.
14243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14245      # If it failed, the variable was not from the command line. Ignore it,
14246      # but warn the user (except for BASH, which is always set by the calling BASH).
14247      if test "xNICE" != xBASH; then
14248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14249$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14250      fi
14251      # Try to locate tool using the code snippet
14252      for ac_prog in nice
14253do
14254  # Extract the first word of "$ac_prog", so it can be a program name with args.
14255set dummy $ac_prog; ac_word=$2
14256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14257$as_echo_n "checking for $ac_word... " >&6; }
14258if ${ac_cv_path_NICE+:} false; then :
14259  $as_echo_n "(cached) " >&6
14260else
14261  case $NICE in
14262  [\\/]* | ?:[\\/]*)
14263  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14264  ;;
14265  *)
14266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14267for as_dir in $PATH
14268do
14269  IFS=$as_save_IFS
14270  test -z "$as_dir" && as_dir=.
14271    for ac_exec_ext in '' $ac_executable_extensions; do
14272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14273    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14275    break 2
14276  fi
14277done
14278  done
14279IFS=$as_save_IFS
14280
14281  ;;
14282esac
14283fi
14284NICE=$ac_cv_path_NICE
14285if test -n "$NICE"; then
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14287$as_echo "$NICE" >&6; }
14288else
14289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14290$as_echo "no" >&6; }
14291fi
14292
14293
14294  test -n "$NICE" && break
14295done
14296
14297    else
14298      # If it succeeded, then it was overridden by the user. We will use it
14299      # for the tool.
14300
14301      # First remove it from the list of overridden variables, so we can test
14302      # for unknown variables in the end.
14303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14304
14305      # Check if we try to supply an empty value
14306      if test "x$NICE" = x; then
14307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14308$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14310$as_echo_n "checking for NICE... " >&6; }
14311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14312$as_echo "disabled" >&6; }
14313      else
14314        # Check if the provided tool contains a complete path.
14315        tool_specified="$NICE"
14316        tool_basename="${tool_specified##*/}"
14317        if test "x$tool_basename" = "x$tool_specified"; then
14318          # A command without a complete path is provided, search $PATH.
14319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14320$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14321          # Extract the first word of "$tool_basename", so it can be a program name with args.
14322set dummy $tool_basename; ac_word=$2
14323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14324$as_echo_n "checking for $ac_word... " >&6; }
14325if ${ac_cv_path_NICE+:} false; then :
14326  $as_echo_n "(cached) " >&6
14327else
14328  case $NICE in
14329  [\\/]* | ?:[\\/]*)
14330  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14331  ;;
14332  *)
14333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14334for as_dir in $PATH
14335do
14336  IFS=$as_save_IFS
14337  test -z "$as_dir" && as_dir=.
14338    for ac_exec_ext in '' $ac_executable_extensions; do
14339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14340    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14342    break 2
14343  fi
14344done
14345  done
14346IFS=$as_save_IFS
14347
14348  ;;
14349esac
14350fi
14351NICE=$ac_cv_path_NICE
14352if test -n "$NICE"; then
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14354$as_echo "$NICE" >&6; }
14355else
14356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14357$as_echo "no" >&6; }
14358fi
14359
14360
14361          if test "x$NICE" = x; then
14362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14363          fi
14364        else
14365          # Otherwise we believe it is a complete path. Use it as it is.
14366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14367$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14369$as_echo_n "checking for NICE... " >&6; }
14370          if test ! -x "$tool_specified"; then
14371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14372$as_echo "not found" >&6; }
14373            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14374          fi
14375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14376$as_echo "$tool_specified" >&6; }
14377        fi
14378      fi
14379    fi
14380
14381  fi
14382
14383
14384
14385
14386# Now we can determine OpenJDK build and target platforms. This is required to
14387# have early on.
14388# Make sure we can run config.sub.
14389$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14390  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14391
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14393$as_echo_n "checking build system type... " >&6; }
14394if ${ac_cv_build+:} false; then :
14395  $as_echo_n "(cached) " >&6
14396else
14397  ac_build_alias=$build_alias
14398test "x$ac_build_alias" = x &&
14399  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14400test "x$ac_build_alias" = x &&
14401  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14402ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14403  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14404
14405fi
14406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14407$as_echo "$ac_cv_build" >&6; }
14408case $ac_cv_build in
14409*-*-*) ;;
14410*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14411esac
14412build=$ac_cv_build
14413ac_save_IFS=$IFS; IFS='-'
14414set x $ac_cv_build
14415shift
14416build_cpu=$1
14417build_vendor=$2
14418shift; shift
14419# Remember, the first character of IFS is used to create $*,
14420# except with old shells:
14421build_os=$*
14422IFS=$ac_save_IFS
14423case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14424
14425
14426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14427$as_echo_n "checking host system type... " >&6; }
14428if ${ac_cv_host+:} false; then :
14429  $as_echo_n "(cached) " >&6
14430else
14431  if test "x$host_alias" = x; then
14432  ac_cv_host=$ac_cv_build
14433else
14434  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14435    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14436fi
14437
14438fi
14439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14440$as_echo "$ac_cv_host" >&6; }
14441case $ac_cv_host in
14442*-*-*) ;;
14443*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14444esac
14445host=$ac_cv_host
14446ac_save_IFS=$IFS; IFS='-'
14447set x $ac_cv_host
14448shift
14449host_cpu=$1
14450host_vendor=$2
14451shift; shift
14452# Remember, the first character of IFS is used to create $*,
14453# except with old shells:
14454host_os=$*
14455IFS=$ac_save_IFS
14456case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14457
14458
14459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14460$as_echo_n "checking target system type... " >&6; }
14461if ${ac_cv_target+:} false; then :
14462  $as_echo_n "(cached) " >&6
14463else
14464  if test "x$target_alias" = x; then
14465  ac_cv_target=$ac_cv_host
14466else
14467  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14468    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14469fi
14470
14471fi
14472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14473$as_echo "$ac_cv_target" >&6; }
14474case $ac_cv_target in
14475*-*-*) ;;
14476*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14477esac
14478target=$ac_cv_target
14479ac_save_IFS=$IFS; IFS='-'
14480set x $ac_cv_target
14481shift
14482target_cpu=$1
14483target_vendor=$2
14484shift; shift
14485# Remember, the first character of IFS is used to create $*,
14486# except with old shells:
14487target_os=$*
14488IFS=$ac_save_IFS
14489case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14490
14491
14492# The aliases save the names the user supplied, while $host etc.
14493# will get canonicalized.
14494test -n "$target_alias" &&
14495  test "$program_prefix$program_suffix$program_transform_name" = \
14496    NONENONEs,x,x, &&
14497  program_prefix=${target_alias}-
14498
14499  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14500  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14501  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14502  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14503  # to use the configure naming style.
14504
14505
14506
14507
14508
14509  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14510  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14511  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14512  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14513  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14514  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14515
14516
14517
14518  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14519
14520  case "$build_os" in
14521    *linux*)
14522      VAR_OS=linux
14523      VAR_OS_TYPE=unix
14524      ;;
14525    *solaris*)
14526      VAR_OS=solaris
14527      VAR_OS_TYPE=unix
14528      ;;
14529    *darwin*)
14530      VAR_OS=macosx
14531      VAR_OS_TYPE=unix
14532      ;;
14533    *bsd*)
14534      VAR_OS=bsd
14535      VAR_OS_TYPE=unix
14536      ;;
14537    *cygwin*)
14538      VAR_OS=windows
14539      VAR_OS_ENV=windows.cygwin
14540      ;;
14541    *mingw*)
14542      VAR_OS=windows
14543      VAR_OS_ENV=windows.msys
14544      ;;
14545    *aix*)
14546      VAR_OS=aix
14547      VAR_OS_TYPE=unix
14548      ;;
14549    *)
14550      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14551      ;;
14552  esac
14553
14554
14555  # First argument is the cpu name from the trip/quad
14556  case "$build_cpu" in
14557    x86_64)
14558      VAR_CPU=x86_64
14559      VAR_CPU_ARCH=x86
14560      VAR_CPU_BITS=64
14561      VAR_CPU_ENDIAN=little
14562      ;;
14563    i?86)
14564      VAR_CPU=x86
14565      VAR_CPU_ARCH=x86
14566      VAR_CPU_BITS=32
14567      VAR_CPU_ENDIAN=little
14568      ;;
14569    arm*)
14570      VAR_CPU=arm
14571      VAR_CPU_ARCH=arm
14572      VAR_CPU_BITS=32
14573      VAR_CPU_ENDIAN=little
14574      ;;
14575    aarch64)
14576      VAR_CPU=aarch64
14577      VAR_CPU_ARCH=aarch64
14578      VAR_CPU_BITS=64
14579      VAR_CPU_ENDIAN=little
14580      ;;
14581    powerpc)
14582      VAR_CPU=ppc
14583      VAR_CPU_ARCH=ppc
14584      VAR_CPU_BITS=32
14585      VAR_CPU_ENDIAN=big
14586      ;;
14587    powerpc64)
14588      VAR_CPU=ppc64
14589      VAR_CPU_ARCH=ppc
14590      VAR_CPU_BITS=64
14591      VAR_CPU_ENDIAN=big
14592      ;;
14593    powerpc64le)
14594      VAR_CPU=ppc64
14595      VAR_CPU_ARCH=ppc
14596      VAR_CPU_BITS=64
14597      VAR_CPU_ENDIAN=little
14598      ;;
14599    s390)
14600      VAR_CPU=s390
14601      VAR_CPU_ARCH=s390
14602      VAR_CPU_BITS=32
14603      VAR_CPU_ENDIAN=big
14604      ;;
14605    s390x)
14606      VAR_CPU=s390x
14607      VAR_CPU_ARCH=s390
14608      VAR_CPU_BITS=64
14609      VAR_CPU_ENDIAN=big
14610      ;;
14611    sparc)
14612      VAR_CPU=sparc
14613      VAR_CPU_ARCH=sparc
14614      VAR_CPU_BITS=32
14615      VAR_CPU_ENDIAN=big
14616      ;;
14617    sparcv9|sparc64)
14618      VAR_CPU=sparcv9
14619      VAR_CPU_ARCH=sparc
14620      VAR_CPU_BITS=64
14621      VAR_CPU_ENDIAN=big
14622      ;;
14623    *)
14624      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14625      ;;
14626  esac
14627
14628  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14629  OPENJDK_BUILD_OS="$VAR_OS"
14630  if test "x$VAR_OS_TYPE" != x; then
14631    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14632  else
14633    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14634  fi
14635  if test "x$VAR_OS_ENV" != x; then
14636    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14637  else
14638    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14639  fi
14640  OPENJDK_BUILD_CPU="$VAR_CPU"
14641  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14642  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14643  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14644
14645
14646
14647
14648
14649
14650
14651
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14653$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14655$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14656
14657  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14658
14659  case "$host_os" in
14660    *linux*)
14661      VAR_OS=linux
14662      VAR_OS_TYPE=unix
14663      ;;
14664    *solaris*)
14665      VAR_OS=solaris
14666      VAR_OS_TYPE=unix
14667      ;;
14668    *darwin*)
14669      VAR_OS=macosx
14670      VAR_OS_TYPE=unix
14671      ;;
14672    *bsd*)
14673      VAR_OS=bsd
14674      VAR_OS_TYPE=unix
14675      ;;
14676    *cygwin*)
14677      VAR_OS=windows
14678      VAR_OS_ENV=windows.cygwin
14679      ;;
14680    *mingw*)
14681      VAR_OS=windows
14682      VAR_OS_ENV=windows.msys
14683      ;;
14684    *aix*)
14685      VAR_OS=aix
14686      VAR_OS_TYPE=unix
14687      ;;
14688    *)
14689      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14690      ;;
14691  esac
14692
14693
14694  # First argument is the cpu name from the trip/quad
14695  case "$host_cpu" in
14696    x86_64)
14697      VAR_CPU=x86_64
14698      VAR_CPU_ARCH=x86
14699      VAR_CPU_BITS=64
14700      VAR_CPU_ENDIAN=little
14701      ;;
14702    i?86)
14703      VAR_CPU=x86
14704      VAR_CPU_ARCH=x86
14705      VAR_CPU_BITS=32
14706      VAR_CPU_ENDIAN=little
14707      ;;
14708    arm*)
14709      VAR_CPU=arm
14710      VAR_CPU_ARCH=arm
14711      VAR_CPU_BITS=32
14712      VAR_CPU_ENDIAN=little
14713      ;;
14714    aarch64)
14715      VAR_CPU=aarch64
14716      VAR_CPU_ARCH=aarch64
14717      VAR_CPU_BITS=64
14718      VAR_CPU_ENDIAN=little
14719      ;;
14720    powerpc)
14721      VAR_CPU=ppc
14722      VAR_CPU_ARCH=ppc
14723      VAR_CPU_BITS=32
14724      VAR_CPU_ENDIAN=big
14725      ;;
14726    powerpc64)
14727      VAR_CPU=ppc64
14728      VAR_CPU_ARCH=ppc
14729      VAR_CPU_BITS=64
14730      VAR_CPU_ENDIAN=big
14731      ;;
14732    powerpc64le)
14733      VAR_CPU=ppc64
14734      VAR_CPU_ARCH=ppc
14735      VAR_CPU_BITS=64
14736      VAR_CPU_ENDIAN=little
14737      ;;
14738    s390)
14739      VAR_CPU=s390
14740      VAR_CPU_ARCH=s390
14741      VAR_CPU_BITS=32
14742      VAR_CPU_ENDIAN=big
14743      ;;
14744    s390x)
14745      VAR_CPU=s390x
14746      VAR_CPU_ARCH=s390
14747      VAR_CPU_BITS=64
14748      VAR_CPU_ENDIAN=big
14749      ;;
14750    sparc)
14751      VAR_CPU=sparc
14752      VAR_CPU_ARCH=sparc
14753      VAR_CPU_BITS=32
14754      VAR_CPU_ENDIAN=big
14755      ;;
14756    sparcv9|sparc64)
14757      VAR_CPU=sparcv9
14758      VAR_CPU_ARCH=sparc
14759      VAR_CPU_BITS=64
14760      VAR_CPU_ENDIAN=big
14761      ;;
14762    *)
14763      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14764      ;;
14765  esac
14766
14767  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14768  OPENJDK_TARGET_OS="$VAR_OS"
14769  if test "x$VAR_OS_TYPE" != x; then
14770    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14771  else
14772    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14773  fi
14774  if test "x$VAR_OS_ENV" != x; then
14775    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14776  else
14777    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14778  fi
14779  OPENJDK_TARGET_CPU="$VAR_CPU"
14780  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14781  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14782  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14783
14784
14785
14786
14787
14788
14789
14790
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14792$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14794$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14795
14796
14797
14798# Check whether --with-target-bits was given.
14799if test "${with_target_bits+set}" = set; then :
14800  withval=$with_target_bits;
14801fi
14802
14803
14804  # We have three types of compiles:
14805  # native  == normal compilation, target system == build system
14806  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14807  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14808  #
14809  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14810    # We're doing a proper cross-compilation
14811    COMPILE_TYPE="cross"
14812  else
14813    COMPILE_TYPE="native"
14814  fi
14815
14816  if test "x$with_target_bits" != x; then
14817    if test "x$COMPILE_TYPE" = "xcross"; then
14818      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14819    fi
14820
14821    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14822      # A reduced build is requested
14823      COMPILE_TYPE="reduced"
14824      OPENJDK_TARGET_CPU_BITS=32
14825      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14826        OPENJDK_TARGET_CPU=x86
14827      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14828        OPENJDK_TARGET_CPU=sparc
14829      else
14830        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14831      fi
14832    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14833      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
14834    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14835      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14836$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14837    else
14838      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14839    fi
14840  fi
14841
14842
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14844$as_echo_n "checking compilation type... " >&6; }
14845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14846$as_echo "$COMPILE_TYPE" >&6; }
14847
14848
14849  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14850    REQUIRED_OS_NAME=SunOS
14851    REQUIRED_OS_VERSION=5.10
14852  fi
14853  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14854    REQUIRED_OS_NAME=Linux
14855    REQUIRED_OS_VERSION=2.6
14856  fi
14857  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14858    REQUIRED_OS_NAME=Windows
14859    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14860      REQUIRED_OS_VERSION=5.2
14861    else
14862      REQUIRED_OS_VERSION=5.1
14863    fi
14864  fi
14865  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14866    REQUIRED_OS_NAME=Darwin
14867    REQUIRED_OS_VERSION=11.2
14868  fi
14869
14870
14871
14872
14873
14874  # Also store the legacy naming of the cpu.
14875  # Ie i586 and amd64 instead of x86 and x86_64
14876  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14877  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14878    OPENJDK_TARGET_CPU_LEGACY="i586"
14879  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14880    # On all platforms except MacOSX replace x86_64 with amd64.
14881    OPENJDK_TARGET_CPU_LEGACY="amd64"
14882  fi
14883
14884
14885  # And the second legacy naming of the cpu.
14886  # Ie i386 and amd64 instead of x86 and x86_64.
14887  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14888  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14889    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14890  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14891    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14892  fi
14893
14894
14895  # This is the name of the cpu (but using i386 and amd64 instead of
14896  # x86 and x86_64, respectively), preceeded by a /, to be used when
14897  # locating libraries. On macosx, it's empty, though.
14898  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14899  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14900    OPENJDK_TARGET_CPU_LIBDIR=""
14901  fi
14902
14903
14904  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14905  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14906  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14907  OPENJDK_TARGET_CPU_ISADIR=""
14908  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14909    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14910      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14911    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14912      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14913    fi
14914  fi
14915
14916
14917  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14918  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14919  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14920    # On linux only, we replace x86 with i386.
14921    OPENJDK_TARGET_CPU_OSARCH="i386"
14922  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14923    # On all platforms except macosx, we replace x86_64 with amd64.
14924    OPENJDK_TARGET_CPU_OSARCH="amd64"
14925  fi
14926
14927
14928  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14929  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14930    OPENJDK_TARGET_CPU_JLI="i386"
14931  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14932    # On all platforms except macosx, we replace x86_64 with amd64.
14933    OPENJDK_TARGET_CPU_JLI="amd64"
14934  fi
14935  # Now setup the -D flags for building libjli.
14936  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14938    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14939      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14940    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14941      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14942    fi
14943  fi
14944
14945
14946  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14947      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14948  else
14949      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14950  fi
14951
14952
14953  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14954    A_LP64="LP64:="
14955    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14956    # unpack200.exe
14957    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14958      ADD_LP64="-D_LP64=1"
14959    fi
14960  fi
14961  LP64=$A_LP64
14962
14963
14964  if test "x$COMPILE_TYPE" = "xcross"; then
14965    # FIXME: ... or should this include reduced builds..?
14966    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14967  else
14968    DEFINE_CROSS_COMPILE_ARCH=""
14969  fi
14970
14971
14972  # ZERO_ARCHDEF is used to enable architecture-specific code
14973  case "${OPENJDK_TARGET_CPU}" in
14974    ppc)     ZERO_ARCHDEF=PPC32 ;;
14975    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14976    s390*)   ZERO_ARCHDEF=S390  ;;
14977    sparc*)  ZERO_ARCHDEF=SPARC ;;
14978    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14979    x86)     ZERO_ARCHDEF=IA32  ;;
14980    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14981  esac
14982
14983
14984
14985
14986# Continue setting up basic stuff. Most remaining code require fundamental tools.
14987
14988  # Save the current directory this script was started from
14989  CURDIR="$PWD"
14990
14991  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14992  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14993  # was not available at that time.
14994  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14995  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14996    ORIGINAL_PATH="$REWRITTEN_PATH"
14997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14998$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14999  fi
15000
15001  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15002    PATH_SEP=";"
15003
15004  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15005  if test $SRC_ROOT_LENGTH -gt 100; then
15006    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15007  fi
15008
15009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15011$as_echo_n "checking cygwin release... " >&6; }
15012    CYGWIN_VERSION=`$UNAME -r`
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15014$as_echo "$CYGWIN_VERSION" >&6; }
15015    WINDOWS_ENV_VENDOR='cygwin'
15016    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15017
15018    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15019    if test "x$CYGWIN_VERSION_OLD" != x; then
15020      { $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
15021$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;}
15022      as_fn_error $? "Cannot continue" "$LINENO" 5
15023    fi
15024    if test "x$CYGPATH" = x; then
15025      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15026    fi
15027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15028$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15029    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15030    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15031    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15032    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15034$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15035    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15036    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15037    if test "x$test_cygdrive_prefix" = x; then
15038      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15039    fi
15040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15042$as_echo_n "checking msys release... " >&6; }
15043    MSYS_VERSION=`$UNAME -r`
15044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15045$as_echo "$MSYS_VERSION" >&6; }
15046
15047    WINDOWS_ENV_VENDOR='msys'
15048    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15049
15050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15051$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15052    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15053    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15054
15055  windows_path="$MSYS_ROOT_PATH"
15056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15057    unix_path=`$CYGPATH -u "$windows_path"`
15058    MSYS_ROOT_PATH="$unix_path"
15059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15061    MSYS_ROOT_PATH="$unix_path"
15062  fi
15063
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15065$as_echo "$MSYS_ROOT_PATH" >&6; }
15066    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15067  else
15068    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15069  fi
15070
15071  # Test if windows or unix (cygwin/msys) find is first in path.
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15073$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15074  FIND_BINARY_OUTPUT=`find --version 2>&1`
15075  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15077$as_echo "unix style" >&6; }
15078  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15080$as_echo "Windows" >&6; }
15081    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15082$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15083    { $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
15084$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15085    as_fn_error $? "Cannot continue" "$LINENO" 5
15086  else
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15088$as_echo "unknown" >&6; }
15089    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15090$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15091  fi
15092
15093  else
15094    PATH_SEP=":"
15095  fi
15096
15097
15098  # We get the top-level directory from the supporting wrappers.
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15100$as_echo_n "checking for top-level directory... " >&6; }
15101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15102$as_echo "$TOPDIR" >&6; }
15103
15104
15105  # Save the original version of TOPDIR for string comparisons
15106  ORIGINAL_TOPDIR="$TOPDIR"
15107
15108
15109  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15110
15111  # Only process if variable expands to non-empty
15112
15113  if test "x$CURDIR" != x; then
15114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15115
15116  # Input might be given as Windows format, start by converting to
15117  # unix format.
15118  path="$CURDIR"
15119  new_path=`$CYGPATH -u "$path"`
15120
15121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15124  # "foo.exe" is OK but "foo" is an error.
15125  #
15126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15127  # It is also a way to make sure we got the proper file name for the real test later on.
15128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15129  if test "x$test_shortpath" = x; then
15130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15131$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15132    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15133  fi
15134
15135  # Call helper function which possibly converts this using DOS-style short mode.
15136  # If so, the updated path is stored in $new_path.
15137
15138  input_path="$new_path"
15139  # Check if we need to convert this using DOS-style short mode. If the path
15140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15141  # take no chances and rewrite it.
15142  # Note: m4 eats our [], so we need to use [ and ] instead.
15143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15144  if test "x$has_forbidden_chars" != x; then
15145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15149      # Going to short mode and back again did indeed matter. Since short mode is
15150      # case insensitive, let's make it lowercase to improve readability.
15151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15152      # Now convert it back to Unix-style (cygpath)
15153      input_path=`$CYGPATH -u "$shortmode_path"`
15154      new_path="$input_path"
15155    fi
15156  fi
15157
15158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15159  if test "x$test_cygdrive_prefix" = x; then
15160    # As a simple fix, exclude /usr/bin since it's not a real path.
15161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15163      # a path prefixed by /cygdrive for fixpath to work.
15164      new_path="$CYGWIN_ROOT_PATH$input_path"
15165    fi
15166  fi
15167
15168
15169  if test "x$path" != "x$new_path"; then
15170    CURDIR="$new_path"
15171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15172$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15173  fi
15174
15175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15176
15177  path="$CURDIR"
15178  has_colon=`$ECHO $path | $GREP ^.:`
15179  new_path="$path"
15180  if test "x$has_colon" = x; then
15181    # Not in mixed or Windows style, start by that.
15182    new_path=`cmd //c echo $path`
15183  fi
15184
15185
15186  input_path="$new_path"
15187  # Check if we need to convert this using DOS-style short mode. If the path
15188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15189  # take no chances and rewrite it.
15190  # Note: m4 eats our [], so we need to use [ and ] instead.
15191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15192  if test "x$has_forbidden_chars" != x; then
15193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15195  fi
15196
15197
15198  windows_path="$new_path"
15199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15200    unix_path=`$CYGPATH -u "$windows_path"`
15201    new_path="$unix_path"
15202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15204    new_path="$unix_path"
15205  fi
15206
15207  if test "x$path" != "x$new_path"; then
15208    CURDIR="$new_path"
15209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15210$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15211  fi
15212
15213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15215
15216    else
15217      # We're on a unix platform. Hooray! :)
15218      path="$CURDIR"
15219      has_space=`$ECHO "$path" | $GREP " "`
15220      if test "x$has_space" != x; then
15221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15222$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15224      fi
15225
15226      # Use eval to expand a potential ~
15227      eval path="$path"
15228      if test ! -f "$path" && test ! -d "$path"; then
15229        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15230      fi
15231
15232      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15233    fi
15234  fi
15235
15236
15237  # Only process if variable expands to non-empty
15238
15239  if test "x$TOPDIR" != x; then
15240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15241
15242  # Input might be given as Windows format, start by converting to
15243  # unix format.
15244  path="$TOPDIR"
15245  new_path=`$CYGPATH -u "$path"`
15246
15247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15250  # "foo.exe" is OK but "foo" is an error.
15251  #
15252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15253  # It is also a way to make sure we got the proper file name for the real test later on.
15254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15255  if test "x$test_shortpath" = x; then
15256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15257$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15258    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15259  fi
15260
15261  # Call helper function which possibly converts this using DOS-style short mode.
15262  # If so, the updated path is stored in $new_path.
15263
15264  input_path="$new_path"
15265  # Check if we need to convert this using DOS-style short mode. If the path
15266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15267  # take no chances and rewrite it.
15268  # Note: m4 eats our [], so we need to use [ and ] instead.
15269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15270  if test "x$has_forbidden_chars" != x; then
15271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15275      # Going to short mode and back again did indeed matter. Since short mode is
15276      # case insensitive, let's make it lowercase to improve readability.
15277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15278      # Now convert it back to Unix-style (cygpath)
15279      input_path=`$CYGPATH -u "$shortmode_path"`
15280      new_path="$input_path"
15281    fi
15282  fi
15283
15284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15285  if test "x$test_cygdrive_prefix" = x; then
15286    # As a simple fix, exclude /usr/bin since it's not a real path.
15287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15289      # a path prefixed by /cygdrive for fixpath to work.
15290      new_path="$CYGWIN_ROOT_PATH$input_path"
15291    fi
15292  fi
15293
15294
15295  if test "x$path" != "x$new_path"; then
15296    TOPDIR="$new_path"
15297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15298$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15299  fi
15300
15301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15302
15303  path="$TOPDIR"
15304  has_colon=`$ECHO $path | $GREP ^.:`
15305  new_path="$path"
15306  if test "x$has_colon" = x; then
15307    # Not in mixed or Windows style, start by that.
15308    new_path=`cmd //c echo $path`
15309  fi
15310
15311
15312  input_path="$new_path"
15313  # Check if we need to convert this using DOS-style short mode. If the path
15314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15315  # take no chances and rewrite it.
15316  # Note: m4 eats our [], so we need to use [ and ] instead.
15317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15318  if test "x$has_forbidden_chars" != x; then
15319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15321  fi
15322
15323
15324  windows_path="$new_path"
15325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15326    unix_path=`$CYGPATH -u "$windows_path"`
15327    new_path="$unix_path"
15328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15330    new_path="$unix_path"
15331  fi
15332
15333  if test "x$path" != "x$new_path"; then
15334    TOPDIR="$new_path"
15335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15336$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15337  fi
15338
15339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15341
15342    else
15343      # We're on a unix platform. Hooray! :)
15344      path="$TOPDIR"
15345      has_space=`$ECHO "$path" | $GREP " "`
15346      if test "x$has_space" != x; then
15347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15348$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15350      fi
15351
15352      # Use eval to expand a potential ~
15353      eval path="$path"
15354      if test ! -f "$path" && test ! -d "$path"; then
15355        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15356      fi
15357
15358      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15359    fi
15360  fi
15361
15362  # SRC_ROOT is a traditional alias for TOPDIR.
15363  SRC_ROOT=$TOPDIR
15364
15365  # Calculate a canonical version of TOPDIR for string comparisons
15366  CANONICAL_TOPDIR=$TOPDIR
15367
15368  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15369    # Follow a chain of symbolic links. Use readlink
15370    # where it exists, else fall back to horribly
15371    # complicated shell code.
15372    if test "x$READLINK_TESTED" != yes; then
15373      # On MacOSX there is a readlink tool with a different
15374      # purpose than the GNU readlink tool. Check the found readlink.
15375      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15376      if test "x$ISGNU" = x; then
15377        # A readlink that we do not know how to use.
15378        # Are there other non-GNU readlinks out there?
15379        READLINK_TESTED=yes
15380        READLINK=
15381      fi
15382    fi
15383
15384    if test "x$READLINK" != x; then
15385      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15386    else
15387      # Save the current directory for restoring afterwards
15388      STARTDIR=$PWD
15389      COUNTER=0
15390      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15391      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15392      cd $sym_link_dir
15393      # Use -P flag to resolve symlinks in directories.
15394      cd `$THEPWDCMD -P`
15395      sym_link_dir=`$THEPWDCMD -P`
15396      # Resolve file symlinks
15397      while test $COUNTER -lt 20; do
15398        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15399        if test "x$ISLINK" == x; then
15400          # This is not a symbolic link! We are done!
15401          break
15402        fi
15403        # Again resolve directory symlinks since the target of the just found
15404        # link could be in a different directory
15405        cd `$DIRNAME $ISLINK`
15406        sym_link_dir=`$THEPWDCMD -P`
15407        sym_link_file=`$BASENAME $ISLINK`
15408        let COUNTER=COUNTER+1
15409      done
15410      cd $STARTDIR
15411      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15412    fi
15413  fi
15414
15415
15416
15417  # Locate the directory of this script.
15418  AUTOCONF_DIR=$TOPDIR/common/autoconf
15419
15420
15421# Check if it's a pure open build or if custom sources are to be used.
15422
15423  # Check whether --enable-openjdk-only was given.
15424if test "${enable_openjdk_only+set}" = set; then :
15425  enableval=$enable_openjdk_only;
15426else
15427  enable_openjdk_only="no"
15428fi
15429
15430
15431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15432$as_echo_n "checking for presence of closed sources... " >&6; }
15433  if test -d "$SRC_ROOT/jdk/src/closed"; then
15434    CLOSED_SOURCE_PRESENT=yes
15435  else
15436    CLOSED_SOURCE_PRESENT=no
15437  fi
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15439$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15440
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15442$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15443  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15445$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15446
15447  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15448    OPENJDK=true
15449    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15450      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15451$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15452    fi
15453  else
15454    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15455      OPENJDK=true
15456    else
15457      OPENJDK=false
15458    fi
15459  fi
15460
15461  if test "x$OPENJDK" = "xtrue"; then
15462    SET_OPENJDK="OPENJDK=true"
15463  fi
15464
15465
15466
15467  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15468  # the IncludeCustomExtension macro.
15469
15470
15471# Check whether --with-custom-make-dir was given.
15472if test "${with_custom_make_dir+set}" = set; then :
15473  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
15474$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15475fi
15476
15477
15478
15479
15480# These are needed to be able to create a configuration name (and thus the output directory)
15481
15482  ###############################################################################
15483  #
15484  # Check which variant of the JDK that we want to build.
15485  # Currently we have:
15486  #    normal:   standard edition
15487  # but the custom make system may add other variants
15488  #
15489  # Effectively the JDK variant gives a name to a specific set of
15490  # modules to compile into the JDK. In the future, these modules
15491  # might even be Jigsaw modules.
15492  #
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15494$as_echo_n "checking which variant of the JDK to build... " >&6; }
15495
15496# Check whether --with-jdk-variant was given.
15497if test "${with_jdk_variant+set}" = set; then :
15498  withval=$with_jdk_variant;
15499fi
15500
15501
15502  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15503    JDK_VARIANT="normal"
15504  else
15505    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15506  fi
15507
15508
15509
15510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15511$as_echo "$JDK_VARIANT" >&6; }
15512
15513
15514###############################################################################
15515#
15516# Check which interpreter of the JVM we want to build.
15517# Currently we have:
15518#    template: Template interpreter (the default)
15519#    cpp     : C++ interpreter
15520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15521$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15522
15523# Check whether --with-jvm-interpreter was given.
15524if test "${with_jvm_interpreter+set}" = set; then :
15525  withval=$with_jvm_interpreter;
15526fi
15527
15528
15529if test "x$with_jvm_interpreter" = x; then
15530     with_jvm_interpreter="template"
15531fi
15532
15533JVM_INTERPRETER="$with_jvm_interpreter"
15534
15535if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15536   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15537fi
15538
15539
15540
15541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15542$as_echo "$with_jvm_interpreter" >&6; }
15543
15544
15545
15546  ###############################################################################
15547  #
15548  # Check which variants of the JVM that we want to build.
15549  # Currently we have:
15550  #    server: normal interpreter and a tiered C1/C2 compiler
15551  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15552  #    minimal1: reduced form of client with optional VM services and features stripped out
15553  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15554  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15555  #    zero: no machine code interpreter, no compiler
15556  #    zeroshark: zero interpreter and shark/llvm compiler backend
15557#    core: interpreter only, no compiler (only works on some platforms)
15558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15559$as_echo_n "checking which variants of the JVM to build... " >&6; }
15560
15561# Check whether --with-jvm-variants was given.
15562if test "${with_jvm_variants+set}" = set; then :
15563  withval=$with_jvm_variants;
15564fi
15565
15566
15567  if test "x$with_jvm_variants" = x; then
15568    with_jvm_variants="server"
15569  fi
15570
15571  JVM_VARIANTS=",$with_jvm_variants,"
15572  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15573
15574  if test "x$TEST_VARIANTS" != "x,"; then
15575     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15576  fi
15577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15578$as_echo "$with_jvm_variants" >&6; }
15579
15580  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15581  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15582  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15583  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15584  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15585  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15586  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15587
15588  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15589    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15590      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15591    fi
15592  fi
15593  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15594    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15595      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15596    fi
15597  fi
15598  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15599    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15600      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15601    fi
15602  fi
15603
15604  # Replace the commas with AND for use in the build directory name.
15605  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15606  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15607  if test "x$COUNT_VARIANTS" != "x,1"; then
15608    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15609  else
15610    BUILDING_MULTIPLE_JVM_VARIANTS=no
15611  fi
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622  INCLUDE_SA=true
15623  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15624    INCLUDE_SA=false
15625  fi
15626  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15627    INCLUDE_SA=false
15628  fi
15629  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15630    INCLUDE_SA=false
15631  fi
15632  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15633    INCLUDE_SA=false
15634  fi
15635
15636
15637  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15638    MACOSX_UNIVERSAL="true"
15639  fi
15640
15641
15642
15643
15644  ###############################################################################
15645  #
15646  # Set the debug level
15647  #    release: no debug information, all optimizations, no asserts.
15648  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15649  #    fastdebug: debug information (-g), all optimizations, all asserts
15650  #    slowdebug: debug information (-g), no optimizations, all asserts
15651  #
15652  DEBUG_LEVEL="release"
15653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15654$as_echo_n "checking which debug level to use... " >&6; }
15655  # Check whether --enable-debug was given.
15656if test "${enable_debug+set}" = set; then :
15657  enableval=$enable_debug;
15658        ENABLE_DEBUG="${enableval}"
15659        DEBUG_LEVEL="fastdebug"
15660
15661else
15662  ENABLE_DEBUG="no"
15663fi
15664
15665
15666
15667# Check whether --with-debug-level was given.
15668if test "${with_debug_level+set}" = set; then :
15669  withval=$with_debug_level;
15670        DEBUG_LEVEL="${withval}"
15671        if test "x$ENABLE_DEBUG" = xyes; then
15672          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15673        fi
15674
15675fi
15676
15677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15678$as_echo "$DEBUG_LEVEL" >&6; }
15679
15680  if test "x$DEBUG_LEVEL" != xrelease && \
15681      test "x$DEBUG_LEVEL" != xoptimized && \
15682      test "x$DEBUG_LEVEL" != xfastdebug && \
15683      test "x$DEBUG_LEVEL" != xslowdebug; then
15684    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15685  fi
15686
15687
15688  ###############################################################################
15689  #
15690  # Setup legacy vars/targets and new vars to deal with different debug levels.
15691  #
15692
15693  case $DEBUG_LEVEL in
15694    release )
15695      VARIANT="OPT"
15696      FASTDEBUG="false"
15697      DEBUG_CLASSFILES="false"
15698      BUILD_VARIANT_RELEASE=""
15699      HOTSPOT_DEBUG_LEVEL="product"
15700      HOTSPOT_EXPORT="product"
15701      ;;
15702    fastdebug )
15703      VARIANT="DBG"
15704      FASTDEBUG="true"
15705      DEBUG_CLASSFILES="true"
15706      BUILD_VARIANT_RELEASE="-fastdebug"
15707      HOTSPOT_DEBUG_LEVEL="fastdebug"
15708      HOTSPOT_EXPORT="fastdebug"
15709      ;;
15710    slowdebug )
15711      VARIANT="DBG"
15712      FASTDEBUG="false"
15713      DEBUG_CLASSFILES="true"
15714      BUILD_VARIANT_RELEASE="-debug"
15715      HOTSPOT_DEBUG_LEVEL="debug"
15716      HOTSPOT_EXPORT="debug"
15717      ;;
15718    optimized )
15719      VARIANT="OPT"
15720      FASTDEBUG="false"
15721      DEBUG_CLASSFILES="false"
15722      BUILD_VARIANT_RELEASE="-optimized"
15723      HOTSPOT_DEBUG_LEVEL="optimized"
15724      HOTSPOT_EXPORT="optimized"
15725      ;;
15726  esac
15727
15728  # The debug level 'optimized' is a little special because it is currently only
15729  # applicable to the HotSpot build where it means to build a completely
15730  # optimized version of the VM without any debugging code (like for the
15731  # 'release' debug level which is called 'product' in the HotSpot build) but
15732  # with the exception that it can contain additional code which is otherwise
15733  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15734  # test new and/or experimental features which are not intended for customer
15735  # shipment. Because these new features need to be tested and benchmarked in
15736  # real world scenarios, we want to build the containing JDK at the 'release'
15737  # debug level.
15738  if test "x$DEBUG_LEVEL" = xoptimized; then
15739    DEBUG_LEVEL="release"
15740  fi
15741
15742  #####
15743  # Generate the legacy makefile targets for hotspot.
15744  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15745  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15746  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15747  # But until then ...
15748  HOTSPOT_TARGET=""
15749
15750  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15752  fi
15753
15754  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15756  fi
15757
15758  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15760  fi
15761
15762  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15764  fi
15765
15766  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15767    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15768  fi
15769
15770  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15771    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15772  fi
15773
15774  if test "x$JVM_VARIANT_CORE" = xtrue; then
15775    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15776  fi
15777
15778  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15779
15780  # On Macosx universal binaries are produced, but they only contain
15781  # 64 bit intel. This invalidates control of which jvms are built
15782  # from configure, but only server is valid anyway. Fix this
15783  # when hotspot makefiles are rewritten.
15784  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15785    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15786  fi
15787
15788  #####
15789
15790
15791
15792
15793
15794
15795
15796
15797# With basic setup done, call the custom early hook.
15798
15799
15800# Check if we have devkits, extra paths or sysroot set.
15801
15802
15803# Check whether --with-devkit was given.
15804if test "${with_devkit+set}" = set; then :
15805  withval=$with_devkit;
15806
15807  # Only process if variable expands to non-empty
15808
15809  if test "x$with_devkit" != x; then
15810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15811
15812  # Input might be given as Windows format, start by converting to
15813  # unix format.
15814  path="$with_devkit"
15815  new_path=`$CYGPATH -u "$path"`
15816
15817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15820  # "foo.exe" is OK but "foo" is an error.
15821  #
15822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15823  # It is also a way to make sure we got the proper file name for the real test later on.
15824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15825  if test "x$test_shortpath" = x; then
15826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15827$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15828    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15829  fi
15830
15831  # Call helper function which possibly converts this using DOS-style short mode.
15832  # If so, the updated path is stored in $new_path.
15833
15834  input_path="$new_path"
15835  # Check if we need to convert this using DOS-style short mode. If the path
15836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15837  # take no chances and rewrite it.
15838  # Note: m4 eats our [], so we need to use [ and ] instead.
15839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15840  if test "x$has_forbidden_chars" != x; then
15841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15845      # Going to short mode and back again did indeed matter. Since short mode is
15846      # case insensitive, let's make it lowercase to improve readability.
15847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15848      # Now convert it back to Unix-style (cygpath)
15849      input_path=`$CYGPATH -u "$shortmode_path"`
15850      new_path="$input_path"
15851    fi
15852  fi
15853
15854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15855  if test "x$test_cygdrive_prefix" = x; then
15856    # As a simple fix, exclude /usr/bin since it's not a real path.
15857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15859      # a path prefixed by /cygdrive for fixpath to work.
15860      new_path="$CYGWIN_ROOT_PATH$input_path"
15861    fi
15862  fi
15863
15864
15865  if test "x$path" != "x$new_path"; then
15866    with_devkit="$new_path"
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15868$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15869  fi
15870
15871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15872
15873  path="$with_devkit"
15874  has_colon=`$ECHO $path | $GREP ^.:`
15875  new_path="$path"
15876  if test "x$has_colon" = x; then
15877    # Not in mixed or Windows style, start by that.
15878    new_path=`cmd //c echo $path`
15879  fi
15880
15881
15882  input_path="$new_path"
15883  # Check if we need to convert this using DOS-style short mode. If the path
15884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15885  # take no chances and rewrite it.
15886  # Note: m4 eats our [], so we need to use [ and ] instead.
15887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15888  if test "x$has_forbidden_chars" != x; then
15889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15891  fi
15892
15893
15894  windows_path="$new_path"
15895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15896    unix_path=`$CYGPATH -u "$windows_path"`
15897    new_path="$unix_path"
15898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15900    new_path="$unix_path"
15901  fi
15902
15903  if test "x$path" != "x$new_path"; then
15904    with_devkit="$new_path"
15905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15906$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15907  fi
15908
15909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15911
15912    else
15913      # We're on a unix platform. Hooray! :)
15914      path="$with_devkit"
15915      has_space=`$ECHO "$path" | $GREP " "`
15916      if test "x$has_space" != x; then
15917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15918$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15920      fi
15921
15922      # Use eval to expand a potential ~
15923      eval path="$path"
15924      if test ! -f "$path" && test ! -d "$path"; then
15925        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15926      fi
15927
15928      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15929    fi
15930  fi
15931
15932        DEVKIT_ROOT="$with_devkit"
15933        # Check for a meta data info file in the root of the devkit
15934        if test -f "$DEVKIT_ROOT/devkit.info"; then
15935          . $DEVKIT_ROOT/devkit.info
15936          # This potentially sets the following:
15937          # A descriptive name of the devkit
15938
15939  if test "x$DEVKIT_NAME" = x; then
15940    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15941  fi
15942
15943          # Corresponds to --with-extra-path
15944
15945  if test "x$DEVKIT_EXTRA_PATH" = x; then
15946    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15947  fi
15948
15949          # Corresponds to --with-toolchain-path
15950
15951  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15952    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15953  fi
15954
15955          # Corresponds to --with-sysroot
15956
15957  if test "x$DEVKIT_SYSROOT" = x; then
15958    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15959  fi
15960
15961
15962          # Identifies the Visual Studio version in the devkit
15963
15964  if test "x$DEVKIT_VS_VERSION" = x; then
15965    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15966  fi
15967
15968          # The Visual Studio include environment variable
15969
15970  if test "x$DEVKIT_VS_INCLUDE" = x; then
15971    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15972  fi
15973
15974          # The Visual Studio lib environment variable
15975
15976  if test "x$DEVKIT_VS_LIB" = x; then
15977    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15978  fi
15979
15980          # Corresponds to --with-msvcr-dll
15981
15982  if test "x$DEVKIT_MSVCR_DLL" = x; then
15983    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15984  fi
15985
15986          # Corresponds to --with-msvcp-dll
15987
15988  if test "x$DEVKIT_MSVCP_DLL" = x; then
15989    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15990  fi
15991
15992        fi
15993
15994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15995$as_echo_n "checking for devkit... " >&6; }
15996        if test "x$DEVKIT_NAME" != x; then
15997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15998$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15999        else
16000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16001$as_echo "$DEVKIT_ROOT" >&6; }
16002        fi
16003
16004
16005  if test "x$DEVKIT_EXTRA_PATH" != x; then
16006    if test "x$EXTRA_PATH" = x; then
16007      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16008    else
16009      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16010    fi
16011  fi
16012
16013
16014        # Fallback default of just /bin if DEVKIT_PATH is not defined
16015        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16016          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16017        fi
16018
16019  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16020    if test "x$TOOLCHAIN_PATH" = x; then
16021      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16022    else
16023      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16024    fi
16025  fi
16026
16027
16028        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16029        # places for backwards compatiblity.
16030        if test "x$DEVKIT_SYSROOT" != x; then
16031          SYSROOT="$DEVKIT_SYSROOT"
16032        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16033          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16034        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16035          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16036        fi
16037
16038
16039fi
16040
16041
16042  # You can force the sysroot if the sysroot encoded into the compiler tools
16043  # is not correct.
16044
16045# Check whether --with-sys-root was given.
16046if test "${with_sys_root+set}" = set; then :
16047  withval=$with_sys_root; SYSROOT=$with_sys_root
16048
16049fi
16050
16051
16052
16053# Check whether --with-sysroot was given.
16054if test "${with_sysroot+set}" = set; then :
16055  withval=$with_sysroot; SYSROOT=$with_sysroot
16056
16057fi
16058
16059
16060
16061# Check whether --with-tools-dir was given.
16062if test "${with_tools_dir+set}" = set; then :
16063  withval=$with_tools_dir;
16064  if test "x$with_tools_dir" != x; then
16065    if test "x$TOOLCHAIN_PATH" = x; then
16066      TOOLCHAIN_PATH="$with_tools_dir"
16067    else
16068      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16069    fi
16070  fi
16071
16072
16073fi
16074
16075
16076
16077# Check whether --with-toolchain-path was given.
16078if test "${with_toolchain_path+set}" = set; then :
16079  withval=$with_toolchain_path;
16080  if test "x$with_toolchain_path" != x; then
16081    if test "x$TOOLCHAIN_PATH" = x; then
16082      TOOLCHAIN_PATH="$with_toolchain_path"
16083    else
16084      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16085    fi
16086  fi
16087
16088
16089fi
16090
16091
16092
16093# Check whether --with-extra-path was given.
16094if test "${with_extra_path+set}" = set; then :
16095  withval=$with_extra_path;
16096  if test "x$with_extra_path" != x; then
16097    if test "x$EXTRA_PATH" = x; then
16098      EXTRA_PATH="$with_extra_path"
16099    else
16100      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16101    fi
16102  fi
16103
16104
16105fi
16106
16107
16108  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16109    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16110    # If not, detect if Xcode is installed by running xcodebuild -version
16111    # if no Xcode installed, xcodebuild exits with 1
16112    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16113    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16114      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16115      # fall back on the stub binary in /usr/bin/xcodebuild
16116      # Extract the first word of "xcodebuild", so it can be a program name with args.
16117set dummy xcodebuild; ac_word=$2
16118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16119$as_echo_n "checking for $ac_word... " >&6; }
16120if ${ac_cv_path_XCODEBUILD+:} false; then :
16121  $as_echo_n "(cached) " >&6
16122else
16123  case $XCODEBUILD in
16124  [\\/]* | ?:[\\/]*)
16125  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16126  ;;
16127  *)
16128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16129for as_dir in $TOOLCHAIN_PATH
16130do
16131  IFS=$as_save_IFS
16132  test -z "$as_dir" && as_dir=.
16133    for ac_exec_ext in '' $ac_executable_extensions; do
16134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16135    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16137    break 2
16138  fi
16139done
16140  done
16141IFS=$as_save_IFS
16142
16143  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16144  ;;
16145esac
16146fi
16147XCODEBUILD=$ac_cv_path_XCODEBUILD
16148if test -n "$XCODEBUILD"; then
16149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16150$as_echo "$XCODEBUILD" >&6; }
16151else
16152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16153$as_echo "no" >&6; }
16154fi
16155
16156
16157    else
16158      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16159      # when only the command line tools are installed there are no SDKs, so headers
16160      # are copied into the system frameworks
16161      XCODEBUILD=
16162
16163    fi
16164
16165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16166$as_echo_n "checking for sdk name... " >&6; }
16167
16168# Check whether --with-sdk-name was given.
16169if test "${with_sdk_name+set}" = set; then :
16170  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16171
16172fi
16173
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16175$as_echo "$SDKNAME" >&6; }
16176
16177    # if toolchain path is specified then don't rely on system headers, they may not compile
16178    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16179    test -z "$TOOLCHAIN_PATH" && \
16180      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16181
16182    if test -z "$SYSROOT"; then
16183      if test -n "$XCODEBUILD"; then
16184        # if we don't have system headers, use default SDK name (last resort)
16185        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16186          SDKNAME=${SDKNAME:-macosx}
16187        fi
16188
16189        if test -n "$SDKNAME"; then
16190          # Call xcodebuild to determine SYSROOT
16191          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16192        fi
16193      else
16194        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16195          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
16196        fi
16197      fi
16198    else
16199      # warn user if --with-sdk-name was also set
16200      if test -n "$with_sdk_name"; then
16201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16202$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16203      fi
16204    fi
16205
16206    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16207      # If no system framework headers, then SYSROOT must be set, or we won't build
16208      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
16209    fi
16210
16211    # Perform a basic sanity test
16212    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16213      if test -z "$SYSROOT"; then
16214        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
16215      else
16216        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16217      fi
16218    fi
16219
16220    # set SDKROOT too, Xcode tools will pick it up
16221    SDKROOT=$SYSROOT
16222
16223  fi
16224
16225  # Prepend the extra path to the global path
16226
16227  if test "x$EXTRA_PATH" != x; then
16228    if test "x$PATH" = x; then
16229      PATH="$EXTRA_PATH"
16230    else
16231      PATH="$EXTRA_PATH:$PATH"
16232    fi
16233  fi
16234
16235
16236  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16237    # Add extra search paths on solaris for utilities like ar and as etc...
16238    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16239  fi
16240
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16242$as_echo_n "checking for sysroot... " >&6; }
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16244$as_echo "$SYSROOT" >&6; }
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16246$as_echo_n "checking for toolchain path... " >&6; }
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16248$as_echo "$TOOLCHAIN_PATH" >&6; }
16249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16250$as_echo_n "checking for extra path... " >&6; }
16251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16252$as_echo "$EXTRA_PATH" >&6; }
16253
16254
16255# To properly create a configuration name, we need to have the OpenJDK target
16256# and options (variants and debug level) parsed.
16257
16258
16259
16260# Check whether --with-conf-name was given.
16261if test "${with_conf_name+set}" = set; then :
16262  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16263fi
16264
16265
16266  # Test from where we are running configure, in or outside of src root.
16267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16268$as_echo_n "checking where to store configuration... " >&6; }
16269  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16270      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16271      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16272    # We are running configure from the src root.
16273    # Create a default ./build/target-variant-debuglevel output root.
16274    if test "x${CONF_NAME}" = x; then
16275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16276$as_echo "in default location" >&6; }
16277      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16278    else
16279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16280$as_echo "in build directory with custom name" >&6; }
16281    fi
16282    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16283    $MKDIR -p "$OUTPUT_ROOT"
16284    if test ! -d "$OUTPUT_ROOT"; then
16285      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16286    fi
16287  else
16288    # We are running configure from outside of the src dir.
16289    # Then use the current directory as output dir!
16290    # If configuration is situated in normal build directory, just use the build
16291    # directory name as configuration name, otherwise use the complete path.
16292    if test "x${CONF_NAME}" = x; then
16293      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16294    fi
16295    OUTPUT_ROOT="$CURDIR"
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16297$as_echo "in current directory" >&6; }
16298
16299    # WARNING: This might be a bad thing to do. You need to be sure you want to
16300    # have a configuration in this directory. Do some sanity checks!
16301
16302    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16303      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16304      # other files
16305      files_present=`$LS $OUTPUT_ROOT`
16306      # Configure has already touched config.log and confdefs.h in the current dir when this check
16307      # is performed.
16308      filtered_files=`$ECHO "$files_present" \
16309          | $SED -e 's/config.log//g' \
16310              -e 's/configure.log//g' \
16311              -e 's/confdefs.h//g' \
16312              -e 's/ //g' \
16313          | $TR -d '\n'`
16314      if test "x$filtered_files" != x; then
16315        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16316$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16317        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16318$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16320$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16322$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16323        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16324$as_echo "$as_me: seriously mess up just about everything." >&6;}
16325        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16326$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16328$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16329        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16330      fi
16331    fi
16332  fi
16333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16334$as_echo_n "checking what configuration name to use... " >&6; }
16335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16336$as_echo "$CONF_NAME" >&6; }
16337
16338
16339  # Only process if variable expands to non-empty
16340
16341  if test "x$OUTPUT_ROOT" != x; then
16342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16343
16344  # Input might be given as Windows format, start by converting to
16345  # unix format.
16346  path="$OUTPUT_ROOT"
16347  new_path=`$CYGPATH -u "$path"`
16348
16349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16352  # "foo.exe" is OK but "foo" is an error.
16353  #
16354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16355  # It is also a way to make sure we got the proper file name for the real test later on.
16356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16357  if test "x$test_shortpath" = x; then
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16359$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16360    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16361  fi
16362
16363  # Call helper function which possibly converts this using DOS-style short mode.
16364  # If so, the updated path is stored in $new_path.
16365
16366  input_path="$new_path"
16367  # Check if we need to convert this using DOS-style short mode. If the path
16368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16369  # take no chances and rewrite it.
16370  # Note: m4 eats our [], so we need to use [ and ] instead.
16371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16372  if test "x$has_forbidden_chars" != x; then
16373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16377      # Going to short mode and back again did indeed matter. Since short mode is
16378      # case insensitive, let's make it lowercase to improve readability.
16379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16380      # Now convert it back to Unix-style (cygpath)
16381      input_path=`$CYGPATH -u "$shortmode_path"`
16382      new_path="$input_path"
16383    fi
16384  fi
16385
16386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16387  if test "x$test_cygdrive_prefix" = x; then
16388    # As a simple fix, exclude /usr/bin since it's not a real path.
16389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16391      # a path prefixed by /cygdrive for fixpath to work.
16392      new_path="$CYGWIN_ROOT_PATH$input_path"
16393    fi
16394  fi
16395
16396
16397  if test "x$path" != "x$new_path"; then
16398    OUTPUT_ROOT="$new_path"
16399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16400$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16401  fi
16402
16403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16404
16405  path="$OUTPUT_ROOT"
16406  has_colon=`$ECHO $path | $GREP ^.:`
16407  new_path="$path"
16408  if test "x$has_colon" = x; then
16409    # Not in mixed or Windows style, start by that.
16410    new_path=`cmd //c echo $path`
16411  fi
16412
16413
16414  input_path="$new_path"
16415  # Check if we need to convert this using DOS-style short mode. If the path
16416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16417  # take no chances and rewrite it.
16418  # Note: m4 eats our [], so we need to use [ and ] instead.
16419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16420  if test "x$has_forbidden_chars" != x; then
16421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16423  fi
16424
16425
16426  windows_path="$new_path"
16427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16428    unix_path=`$CYGPATH -u "$windows_path"`
16429    new_path="$unix_path"
16430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16432    new_path="$unix_path"
16433  fi
16434
16435  if test "x$path" != "x$new_path"; then
16436    OUTPUT_ROOT="$new_path"
16437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16438$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16439  fi
16440
16441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16443
16444    else
16445      # We're on a unix platform. Hooray! :)
16446      path="$OUTPUT_ROOT"
16447      has_space=`$ECHO "$path" | $GREP " "`
16448      if test "x$has_space" != x; then
16449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16450$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16452      fi
16453
16454      # Use eval to expand a potential ~
16455      eval path="$path"
16456      if test ! -f "$path" && test ! -d "$path"; then
16457        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16458      fi
16459
16460      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16461    fi
16462  fi
16463
16464
16465  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16466  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16467
16468  SPEC=$OUTPUT_ROOT/spec.gmk
16469
16470  CONF_NAME=$CONF_NAME
16471
16472  OUTPUT_ROOT=$OUTPUT_ROOT
16473
16474
16475
16476  # The spec.gmk file contains all variables for the make system.
16477  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16478
16479  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16480  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16481
16482  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16483  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16484
16485  # The compare.sh is used to compare the build output to other builds.
16486  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16487
16488  # The generated Makefile knows where the spec.gmk is and where the source is.
16489  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16490  # which will look for generated configurations
16491  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16492
16493
16494
16495# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16496
16497  for ac_prog in apt-get yum port pkgutil pkgadd
16498do
16499  # Extract the first word of "$ac_prog", so it can be a program name with args.
16500set dummy $ac_prog; ac_word=$2
16501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16502$as_echo_n "checking for $ac_word... " >&6; }
16503if ${ac_cv_prog_PKGHANDLER+:} false; then :
16504  $as_echo_n "(cached) " >&6
16505else
16506  if test -n "$PKGHANDLER"; then
16507  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16508else
16509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16510for as_dir in $PATH
16511do
16512  IFS=$as_save_IFS
16513  test -z "$as_dir" && as_dir=.
16514    for ac_exec_ext in '' $ac_executable_extensions; do
16515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16516    ac_cv_prog_PKGHANDLER="$ac_prog"
16517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16518    break 2
16519  fi
16520done
16521  done
16522IFS=$as_save_IFS
16523
16524fi
16525fi
16526PKGHANDLER=$ac_cv_prog_PKGHANDLER
16527if test -n "$PKGHANDLER"; then
16528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16529$as_echo "$PKGHANDLER" >&6; }
16530else
16531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16532$as_echo "no" >&6; }
16533fi
16534
16535
16536  test -n "$PKGHANDLER" && break
16537done
16538
16539
16540
16541# Setup tools that requires more complex handling, or that is not needed by the configure script.
16542
16543
16544
16545  # Publish this variable in the help.
16546
16547
16548  if [ -z "${MAKE+x}" ]; then
16549    # The variable is not set by user, try to locate tool using the code snippet
16550
16551    # Try our hardest to locate a correct version of GNU make
16552    for ac_prog in gmake
16553do
16554  # Extract the first word of "$ac_prog", so it can be a program name with args.
16555set dummy $ac_prog; ac_word=$2
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16557$as_echo_n "checking for $ac_word... " >&6; }
16558if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16559  $as_echo_n "(cached) " >&6
16560else
16561  case $CHECK_GMAKE in
16562  [\\/]* | ?:[\\/]*)
16563  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16564  ;;
16565  *)
16566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16567for as_dir in $PATH
16568do
16569  IFS=$as_save_IFS
16570  test -z "$as_dir" && as_dir=.
16571    for ac_exec_ext in '' $ac_executable_extensions; do
16572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16573    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16575    break 2
16576  fi
16577done
16578  done
16579IFS=$as_save_IFS
16580
16581  ;;
16582esac
16583fi
16584CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16585if test -n "$CHECK_GMAKE"; then
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16587$as_echo "$CHECK_GMAKE" >&6; }
16588else
16589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16590$as_echo "no" >&6; }
16591fi
16592
16593
16594  test -n "$CHECK_GMAKE" && break
16595done
16596
16597
16598  MAKE_CANDIDATE=""$CHECK_GMAKE""
16599  DESCRIPTION="gmake in PATH"
16600
16601  # On Cygwin, we require a newer version of make than on other platforms
16602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16603    MAKE_VERSION_EXPR="-e 4\."
16604    MAKE_REQUIRED_VERSION="4.0"
16605   else
16606    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16607    MAKE_REQUIRED_VERSION="3.81"
16608  fi
16609
16610  if test "x$MAKE_CANDIDATE" != x; then
16611    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16612$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16613    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16614    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16615    if test "x$IS_GNU_MAKE" = x; then
16616      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16617$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16618    else
16619      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16620      if test "x$IS_MODERN_MAKE" = x; then
16621        { $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
16622$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;}
16623      else
16624        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16625          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16626            MAKE_EXPECTED_ENV='cygwin'
16627          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16628            MAKE_EXPECTED_ENV='msys'
16629          else
16630            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16631          fi
16632          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16633          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16634        else
16635          # Not relevant for non-Windows
16636          IS_MAKE_CORRECT_ENV=true
16637        fi
16638        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16639          { $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
16640$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;}
16641        else
16642          FOUND_MAKE=$MAKE_CANDIDATE
16643
16644  # Only process if variable expands to non-empty
16645
16646  if test "x$FOUND_MAKE" != x; then
16647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16648
16649  # First separate the path from the arguments. This will split at the first
16650  # space.
16651  complete="$FOUND_MAKE"
16652  path="${complete%% *}"
16653  tmp="$complete EOL"
16654  arguments="${tmp#* }"
16655
16656  # Input might be given as Windows format, start by converting to
16657  # unix format.
16658  new_path=`$CYGPATH -u "$path"`
16659
16660  # Now try to locate executable using which
16661  new_path=`$WHICH "$new_path" 2> /dev/null`
16662  # bat and cmd files are not always considered executable in cygwin causing which
16663  # to not find them
16664  if test "x$new_path" = x \
16665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16667    new_path=`$CYGPATH -u "$path"`
16668  fi
16669  if test "x$new_path" = x; then
16670    # Oops. Which didn't find the executable.
16671    # The splitting of arguments from the executable at a space might have been incorrect,
16672    # since paths with space are more likely in Windows. Give it another try with the whole
16673    # argument.
16674    path="$complete"
16675    arguments="EOL"
16676    new_path=`$CYGPATH -u "$path"`
16677    new_path=`$WHICH "$new_path" 2> /dev/null`
16678    # bat and cmd files are not always considered executable in cygwin causing which
16679    # to not find them
16680    if test "x$new_path" = x \
16681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16683      new_path=`$CYGPATH -u "$path"`
16684    fi
16685    if test "x$new_path" = x; then
16686      # It's still not found. Now this is an unrecoverable error.
16687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16689      has_space=`$ECHO "$complete" | $GREP " "`
16690      if test "x$has_space" != x; then
16691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16693      fi
16694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16695    fi
16696  fi
16697
16698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16701  # "foo.exe" is OK but "foo" is an error.
16702  #
16703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16704  # It is also a way to make sure we got the proper file name for the real test later on.
16705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16706  if test "x$test_shortpath" = x; then
16707    # Short path failed, file does not exist as specified.
16708    # Try adding .exe or .cmd
16709    if test -f "${new_path}.exe"; then
16710      input_to_shortpath="${new_path}.exe"
16711    elif test -f "${new_path}.cmd"; then
16712      input_to_shortpath="${new_path}.cmd"
16713    else
16714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16718      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16719    fi
16720  else
16721    input_to_shortpath="$new_path"
16722  fi
16723
16724  # Call helper function which possibly converts this using DOS-style short mode.
16725  # If so, the updated path is stored in $new_path.
16726  new_path="$input_to_shortpath"
16727
16728  input_path="$input_to_shortpath"
16729  # Check if we need to convert this using DOS-style short mode. If the path
16730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16731  # take no chances and rewrite it.
16732  # Note: m4 eats our [], so we need to use [ and ] instead.
16733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16734  if test "x$has_forbidden_chars" != x; then
16735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16739      # Going to short mode and back again did indeed matter. Since short mode is
16740      # case insensitive, let's make it lowercase to improve readability.
16741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16742      # Now convert it back to Unix-style (cygpath)
16743      input_path=`$CYGPATH -u "$shortmode_path"`
16744      new_path="$input_path"
16745    fi
16746  fi
16747
16748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16749  if test "x$test_cygdrive_prefix" = x; then
16750    # As a simple fix, exclude /usr/bin since it's not a real path.
16751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16753      # a path prefixed by /cygdrive for fixpath to work.
16754      new_path="$CYGWIN_ROOT_PATH$input_path"
16755    fi
16756  fi
16757
16758  # remove trailing .exe if any
16759  new_path="${new_path/%.exe/}"
16760
16761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762
16763  # First separate the path from the arguments. This will split at the first
16764  # space.
16765  complete="$FOUND_MAKE"
16766  path="${complete%% *}"
16767  tmp="$complete EOL"
16768  arguments="${tmp#* }"
16769
16770  # Input might be given as Windows format, start by converting to
16771  # unix format.
16772  new_path="$path"
16773
16774  windows_path="$new_path"
16775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16776    unix_path=`$CYGPATH -u "$windows_path"`
16777    new_path="$unix_path"
16778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16780    new_path="$unix_path"
16781  fi
16782
16783
16784  # Now try to locate executable using which
16785  new_path=`$WHICH "$new_path" 2> /dev/null`
16786
16787  if test "x$new_path" = x; then
16788    # Oops. Which didn't find the executable.
16789    # The splitting of arguments from the executable at a space might have been incorrect,
16790    # since paths with space are more likely in Windows. Give it another try with the whole
16791    # argument.
16792    path="$complete"
16793    arguments="EOL"
16794    new_path="$path"
16795
16796  windows_path="$new_path"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    new_path="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    new_path="$unix_path"
16803  fi
16804
16805
16806    new_path=`$WHICH "$new_path" 2> /dev/null`
16807    # bat and cmd files are not always considered executable in MSYS causing which
16808    # to not find them
16809    if test "x$new_path" = x \
16810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16812      new_path="$path"
16813
16814  windows_path="$new_path"
16815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16816    unix_path=`$CYGPATH -u "$windows_path"`
16817    new_path="$unix_path"
16818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16820    new_path="$unix_path"
16821  fi
16822
16823    fi
16824
16825    if test "x$new_path" = x; then
16826      # It's still not found. Now this is an unrecoverable error.
16827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16829      has_space=`$ECHO "$complete" | $GREP " "`
16830      if test "x$has_space" != x; then
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16833      fi
16834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16835    fi
16836  fi
16837
16838  # Now new_path has a complete unix path to the binary
16839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16840    # Keep paths in /bin as-is, but remove trailing .exe if any
16841    new_path="${new_path/%.exe/}"
16842    # Do not save /bin paths to all_fixpath_prefixes!
16843  else
16844    # Not in mixed or Windows style, start by that.
16845    new_path=`cmd //c echo $new_path`
16846
16847  input_path="$new_path"
16848  # Check if we need to convert this using DOS-style short mode. If the path
16849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16850  # take no chances and rewrite it.
16851  # Note: m4 eats our [], so we need to use [ and ] instead.
16852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16853  if test "x$has_forbidden_chars" != x; then
16854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16856  fi
16857
16858    # Output is in $new_path
16859
16860  windows_path="$new_path"
16861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862    unix_path=`$CYGPATH -u "$windows_path"`
16863    new_path="$unix_path"
16864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16866    new_path="$unix_path"
16867  fi
16868
16869    # remove trailing .exe if any
16870    new_path="${new_path/%.exe/}"
16871
16872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16874  fi
16875
16876    else
16877      # We're on a unix platform. Hooray! :)
16878      # First separate the path from the arguments. This will split at the first
16879      # space.
16880      complete="$FOUND_MAKE"
16881      path="${complete%% *}"
16882      tmp="$complete EOL"
16883      arguments="${tmp#* }"
16884
16885      # Cannot rely on the command "which" here since it doesn't always work.
16886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16887      if test -z "$is_absolute_path"; then
16888        # Path to executable is not absolute. Find it.
16889        IFS_save="$IFS"
16890        IFS=:
16891        for p in $PATH; do
16892          if test -f "$p/$path" && test -x "$p/$path"; then
16893            new_path="$p/$path"
16894            break
16895          fi
16896        done
16897        IFS="$IFS_save"
16898      else
16899        # This is an absolute path, we can use it without further modifications.
16900        new_path="$path"
16901      fi
16902
16903      if test "x$new_path" = x; then
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16906        has_space=`$ECHO "$complete" | $GREP " "`
16907        if test "x$has_space" != x; then
16908          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16909$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16910        fi
16911        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16912      fi
16913    fi
16914
16915    # Now join together the path and the arguments once again
16916    if test "x$arguments" != xEOL; then
16917      new_complete="$new_path ${arguments% *}"
16918    else
16919      new_complete="$new_path"
16920    fi
16921
16922    if test "x$complete" != "x$new_complete"; then
16923      FOUND_MAKE="$new_complete"
16924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16925$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16926    fi
16927  fi
16928
16929        fi
16930      fi
16931    fi
16932  fi
16933
16934
16935    if test "x$FOUND_MAKE" = x; then
16936      for ac_prog in make
16937do
16938  # Extract the first word of "$ac_prog", so it can be a program name with args.
16939set dummy $ac_prog; ac_word=$2
16940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16941$as_echo_n "checking for $ac_word... " >&6; }
16942if ${ac_cv_path_CHECK_MAKE+:} false; then :
16943  $as_echo_n "(cached) " >&6
16944else
16945  case $CHECK_MAKE in
16946  [\\/]* | ?:[\\/]*)
16947  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16948  ;;
16949  *)
16950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16951for as_dir in $PATH
16952do
16953  IFS=$as_save_IFS
16954  test -z "$as_dir" && as_dir=.
16955    for ac_exec_ext in '' $ac_executable_extensions; do
16956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16957    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16959    break 2
16960  fi
16961done
16962  done
16963IFS=$as_save_IFS
16964
16965  ;;
16966esac
16967fi
16968CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16969if test -n "$CHECK_MAKE"; then
16970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16971$as_echo "$CHECK_MAKE" >&6; }
16972else
16973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16974$as_echo "no" >&6; }
16975fi
16976
16977
16978  test -n "$CHECK_MAKE" && break
16979done
16980
16981
16982  MAKE_CANDIDATE=""$CHECK_MAKE""
16983  DESCRIPTION="make in PATH"
16984
16985  # On Cygwin, we require a newer version of make than on other platforms
16986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987    MAKE_VERSION_EXPR="-e 4\."
16988    MAKE_REQUIRED_VERSION="4.0"
16989   else
16990    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16991    MAKE_REQUIRED_VERSION="3.81"
16992  fi
16993
16994  if test "x$MAKE_CANDIDATE" != x; then
16995    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16996$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16997    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16998    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16999    if test "x$IS_GNU_MAKE" = x; then
17000      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17001$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17002    else
17003      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17004      if test "x$IS_MODERN_MAKE" = x; then
17005        { $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
17006$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;}
17007      else
17008        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17009          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17010            MAKE_EXPECTED_ENV='cygwin'
17011          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17012            MAKE_EXPECTED_ENV='msys'
17013          else
17014            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17015          fi
17016          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17017          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17018        else
17019          # Not relevant for non-Windows
17020          IS_MAKE_CORRECT_ENV=true
17021        fi
17022        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17023          { $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
17024$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;}
17025        else
17026          FOUND_MAKE=$MAKE_CANDIDATE
17027
17028  # Only process if variable expands to non-empty
17029
17030  if test "x$FOUND_MAKE" != x; then
17031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17032
17033  # First separate the path from the arguments. This will split at the first
17034  # space.
17035  complete="$FOUND_MAKE"
17036  path="${complete%% *}"
17037  tmp="$complete EOL"
17038  arguments="${tmp#* }"
17039
17040  # Input might be given as Windows format, start by converting to
17041  # unix format.
17042  new_path=`$CYGPATH -u "$path"`
17043
17044  # Now try to locate executable using which
17045  new_path=`$WHICH "$new_path" 2> /dev/null`
17046  # bat and cmd files are not always considered executable in cygwin causing which
17047  # to not find them
17048  if test "x$new_path" = x \
17049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17051    new_path=`$CYGPATH -u "$path"`
17052  fi
17053  if test "x$new_path" = x; then
17054    # Oops. Which didn't find the executable.
17055    # The splitting of arguments from the executable at a space might have been incorrect,
17056    # since paths with space are more likely in Windows. Give it another try with the whole
17057    # argument.
17058    path="$complete"
17059    arguments="EOL"
17060    new_path=`$CYGPATH -u "$path"`
17061    new_path=`$WHICH "$new_path" 2> /dev/null`
17062    # bat and cmd files are not always considered executable in cygwin causing which
17063    # to not find them
17064    if test "x$new_path" = x \
17065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17067      new_path=`$CYGPATH -u "$path"`
17068    fi
17069    if test "x$new_path" = x; then
17070      # It's still not found. Now this is an unrecoverable error.
17071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17072$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17073      has_space=`$ECHO "$complete" | $GREP " "`
17074      if test "x$has_space" != x; then
17075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17077      fi
17078      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17079    fi
17080  fi
17081
17082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17085  # "foo.exe" is OK but "foo" is an error.
17086  #
17087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17088  # It is also a way to make sure we got the proper file name for the real test later on.
17089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17090  if test "x$test_shortpath" = x; then
17091    # Short path failed, file does not exist as specified.
17092    # Try adding .exe or .cmd
17093    if test -f "${new_path}.exe"; then
17094      input_to_shortpath="${new_path}.exe"
17095    elif test -f "${new_path}.cmd"; then
17096      input_to_shortpath="${new_path}.cmd"
17097    else
17098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17099$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17102      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17103    fi
17104  else
17105    input_to_shortpath="$new_path"
17106  fi
17107
17108  # Call helper function which possibly converts this using DOS-style short mode.
17109  # If so, the updated path is stored in $new_path.
17110  new_path="$input_to_shortpath"
17111
17112  input_path="$input_to_shortpath"
17113  # Check if we need to convert this using DOS-style short mode. If the path
17114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17115  # take no chances and rewrite it.
17116  # Note: m4 eats our [], so we need to use [ and ] instead.
17117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17118  if test "x$has_forbidden_chars" != x; then
17119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17123      # Going to short mode and back again did indeed matter. Since short mode is
17124      # case insensitive, let's make it lowercase to improve readability.
17125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17126      # Now convert it back to Unix-style (cygpath)
17127      input_path=`$CYGPATH -u "$shortmode_path"`
17128      new_path="$input_path"
17129    fi
17130  fi
17131
17132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17133  if test "x$test_cygdrive_prefix" = x; then
17134    # As a simple fix, exclude /usr/bin since it's not a real path.
17135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17137      # a path prefixed by /cygdrive for fixpath to work.
17138      new_path="$CYGWIN_ROOT_PATH$input_path"
17139    fi
17140  fi
17141
17142  # remove trailing .exe if any
17143  new_path="${new_path/%.exe/}"
17144
17145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17146
17147  # First separate the path from the arguments. This will split at the first
17148  # space.
17149  complete="$FOUND_MAKE"
17150  path="${complete%% *}"
17151  tmp="$complete EOL"
17152  arguments="${tmp#* }"
17153
17154  # Input might be given as Windows format, start by converting to
17155  # unix format.
17156  new_path="$path"
17157
17158  windows_path="$new_path"
17159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17160    unix_path=`$CYGPATH -u "$windows_path"`
17161    new_path="$unix_path"
17162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17164    new_path="$unix_path"
17165  fi
17166
17167
17168  # Now try to locate executable using which
17169  new_path=`$WHICH "$new_path" 2> /dev/null`
17170
17171  if test "x$new_path" = x; then
17172    # Oops. Which didn't find the executable.
17173    # The splitting of arguments from the executable at a space might have been incorrect,
17174    # since paths with space are more likely in Windows. Give it another try with the whole
17175    # argument.
17176    path="$complete"
17177    arguments="EOL"
17178    new_path="$path"
17179
17180  windows_path="$new_path"
17181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17182    unix_path=`$CYGPATH -u "$windows_path"`
17183    new_path="$unix_path"
17184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17186    new_path="$unix_path"
17187  fi
17188
17189
17190    new_path=`$WHICH "$new_path" 2> /dev/null`
17191    # bat and cmd files are not always considered executable in MSYS causing which
17192    # to not find them
17193    if test "x$new_path" = x \
17194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17196      new_path="$path"
17197
17198  windows_path="$new_path"
17199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17200    unix_path=`$CYGPATH -u "$windows_path"`
17201    new_path="$unix_path"
17202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17204    new_path="$unix_path"
17205  fi
17206
17207    fi
17208
17209    if test "x$new_path" = x; then
17210      # It's still not found. Now this is an unrecoverable error.
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17213      has_space=`$ECHO "$complete" | $GREP " "`
17214      if test "x$has_space" != x; then
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17217      fi
17218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17219    fi
17220  fi
17221
17222  # Now new_path has a complete unix path to the binary
17223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17224    # Keep paths in /bin as-is, but remove trailing .exe if any
17225    new_path="${new_path/%.exe/}"
17226    # Do not save /bin paths to all_fixpath_prefixes!
17227  else
17228    # Not in mixed or Windows style, start by that.
17229    new_path=`cmd //c echo $new_path`
17230
17231  input_path="$new_path"
17232  # Check if we need to convert this using DOS-style short mode. If the path
17233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17234  # take no chances and rewrite it.
17235  # Note: m4 eats our [], so we need to use [ and ] instead.
17236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17237  if test "x$has_forbidden_chars" != x; then
17238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17240  fi
17241
17242    # Output is in $new_path
17243
17244  windows_path="$new_path"
17245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17246    unix_path=`$CYGPATH -u "$windows_path"`
17247    new_path="$unix_path"
17248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17250    new_path="$unix_path"
17251  fi
17252
17253    # remove trailing .exe if any
17254    new_path="${new_path/%.exe/}"
17255
17256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17258  fi
17259
17260    else
17261      # We're on a unix platform. Hooray! :)
17262      # First separate the path from the arguments. This will split at the first
17263      # space.
17264      complete="$FOUND_MAKE"
17265      path="${complete%% *}"
17266      tmp="$complete EOL"
17267      arguments="${tmp#* }"
17268
17269      # Cannot rely on the command "which" here since it doesn't always work.
17270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17271      if test -z "$is_absolute_path"; then
17272        # Path to executable is not absolute. Find it.
17273        IFS_save="$IFS"
17274        IFS=:
17275        for p in $PATH; do
17276          if test -f "$p/$path" && test -x "$p/$path"; then
17277            new_path="$p/$path"
17278            break
17279          fi
17280        done
17281        IFS="$IFS_save"
17282      else
17283        # This is an absolute path, we can use it without further modifications.
17284        new_path="$path"
17285      fi
17286
17287      if test "x$new_path" = x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17289$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17290        has_space=`$ECHO "$complete" | $GREP " "`
17291        if test "x$has_space" != x; then
17292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17294        fi
17295        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17296      fi
17297    fi
17298
17299    # Now join together the path and the arguments once again
17300    if test "x$arguments" != xEOL; then
17301      new_complete="$new_path ${arguments% *}"
17302    else
17303      new_complete="$new_path"
17304    fi
17305
17306    if test "x$complete" != "x$new_complete"; then
17307      FOUND_MAKE="$new_complete"
17308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17309$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17310    fi
17311  fi
17312
17313        fi
17314      fi
17315    fi
17316  fi
17317
17318    fi
17319
17320    if test "x$FOUND_MAKE" = x; then
17321      if test "x$TOOLCHAIN_PATH" != x; then
17322        # We have a toolchain path, check that as well before giving up.
17323        OLD_PATH=$PATH
17324        PATH=$TOOLCHAIN_PATH:$PATH
17325        for ac_prog in gmake
17326do
17327  # Extract the first word of "$ac_prog", so it can be a program name with args.
17328set dummy $ac_prog; ac_word=$2
17329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17330$as_echo_n "checking for $ac_word... " >&6; }
17331if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17332  $as_echo_n "(cached) " >&6
17333else
17334  case $CHECK_TOOLSDIR_GMAKE in
17335  [\\/]* | ?:[\\/]*)
17336  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17337  ;;
17338  *)
17339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17340for as_dir in $PATH
17341do
17342  IFS=$as_save_IFS
17343  test -z "$as_dir" && as_dir=.
17344    for ac_exec_ext in '' $ac_executable_extensions; do
17345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17346    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17348    break 2
17349  fi
17350done
17351  done
17352IFS=$as_save_IFS
17353
17354  ;;
17355esac
17356fi
17357CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17358if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17360$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17361else
17362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17363$as_echo "no" >&6; }
17364fi
17365
17366
17367  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17368done
17369
17370
17371  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17372  DESCRIPTION="gmake in tools-dir"
17373
17374  # On Cygwin, we require a newer version of make than on other platforms
17375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17376    MAKE_VERSION_EXPR="-e 4\."
17377    MAKE_REQUIRED_VERSION="4.0"
17378   else
17379    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17380    MAKE_REQUIRED_VERSION="3.81"
17381  fi
17382
17383  if test "x$MAKE_CANDIDATE" != x; then
17384    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17385$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17386    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17387    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17388    if test "x$IS_GNU_MAKE" = x; then
17389      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17390$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17391    else
17392      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17393      if test "x$IS_MODERN_MAKE" = x; then
17394        { $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
17395$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;}
17396      else
17397        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17398          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17399            MAKE_EXPECTED_ENV='cygwin'
17400          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17401            MAKE_EXPECTED_ENV='msys'
17402          else
17403            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17404          fi
17405          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17406          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17407        else
17408          # Not relevant for non-Windows
17409          IS_MAKE_CORRECT_ENV=true
17410        fi
17411        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17412          { $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
17413$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;}
17414        else
17415          FOUND_MAKE=$MAKE_CANDIDATE
17416
17417  # Only process if variable expands to non-empty
17418
17419  if test "x$FOUND_MAKE" != x; then
17420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17421
17422  # First separate the path from the arguments. This will split at the first
17423  # space.
17424  complete="$FOUND_MAKE"
17425  path="${complete%% *}"
17426  tmp="$complete EOL"
17427  arguments="${tmp#* }"
17428
17429  # Input might be given as Windows format, start by converting to
17430  # unix format.
17431  new_path=`$CYGPATH -u "$path"`
17432
17433  # Now try to locate executable using which
17434  new_path=`$WHICH "$new_path" 2> /dev/null`
17435  # bat and cmd files are not always considered executable in cygwin causing which
17436  # to not find them
17437  if test "x$new_path" = x \
17438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17440    new_path=`$CYGPATH -u "$path"`
17441  fi
17442  if test "x$new_path" = x; then
17443    # Oops. Which didn't find the executable.
17444    # The splitting of arguments from the executable at a space might have been incorrect,
17445    # since paths with space are more likely in Windows. Give it another try with the whole
17446    # argument.
17447    path="$complete"
17448    arguments="EOL"
17449    new_path=`$CYGPATH -u "$path"`
17450    new_path=`$WHICH "$new_path" 2> /dev/null`
17451    # bat and cmd files are not always considered executable in cygwin causing which
17452    # to not find them
17453    if test "x$new_path" = x \
17454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17456      new_path=`$CYGPATH -u "$path"`
17457    fi
17458    if test "x$new_path" = x; then
17459      # It's still not found. Now this is an unrecoverable error.
17460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17462      has_space=`$ECHO "$complete" | $GREP " "`
17463      if test "x$has_space" != x; then
17464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17466      fi
17467      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17468    fi
17469  fi
17470
17471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17474  # "foo.exe" is OK but "foo" is an error.
17475  #
17476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17477  # It is also a way to make sure we got the proper file name for the real test later on.
17478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17479  if test "x$test_shortpath" = x; then
17480    # Short path failed, file does not exist as specified.
17481    # Try adding .exe or .cmd
17482    if test -f "${new_path}.exe"; then
17483      input_to_shortpath="${new_path}.exe"
17484    elif test -f "${new_path}.cmd"; then
17485      input_to_shortpath="${new_path}.cmd"
17486    else
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17491      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17492    fi
17493  else
17494    input_to_shortpath="$new_path"
17495  fi
17496
17497  # Call helper function which possibly converts this using DOS-style short mode.
17498  # If so, the updated path is stored in $new_path.
17499  new_path="$input_to_shortpath"
17500
17501  input_path="$input_to_shortpath"
17502  # Check if we need to convert this using DOS-style short mode. If the path
17503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17504  # take no chances and rewrite it.
17505  # Note: m4 eats our [], so we need to use [ and ] instead.
17506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17507  if test "x$has_forbidden_chars" != x; then
17508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17512      # Going to short mode and back again did indeed matter. Since short mode is
17513      # case insensitive, let's make it lowercase to improve readability.
17514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17515      # Now convert it back to Unix-style (cygpath)
17516      input_path=`$CYGPATH -u "$shortmode_path"`
17517      new_path="$input_path"
17518    fi
17519  fi
17520
17521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17522  if test "x$test_cygdrive_prefix" = x; then
17523    # As a simple fix, exclude /usr/bin since it's not a real path.
17524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17526      # a path prefixed by /cygdrive for fixpath to work.
17527      new_path="$CYGWIN_ROOT_PATH$input_path"
17528    fi
17529  fi
17530
17531  # remove trailing .exe if any
17532  new_path="${new_path/%.exe/}"
17533
17534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17535
17536  # First separate the path from the arguments. This will split at the first
17537  # space.
17538  complete="$FOUND_MAKE"
17539  path="${complete%% *}"
17540  tmp="$complete EOL"
17541  arguments="${tmp#* }"
17542
17543  # Input might be given as Windows format, start by converting to
17544  # unix format.
17545  new_path="$path"
17546
17547  windows_path="$new_path"
17548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17549    unix_path=`$CYGPATH -u "$windows_path"`
17550    new_path="$unix_path"
17551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17553    new_path="$unix_path"
17554  fi
17555
17556
17557  # Now try to locate executable using which
17558  new_path=`$WHICH "$new_path" 2> /dev/null`
17559
17560  if test "x$new_path" = x; then
17561    # Oops. Which didn't find the executable.
17562    # The splitting of arguments from the executable at a space might have been incorrect,
17563    # since paths with space are more likely in Windows. Give it another try with the whole
17564    # argument.
17565    path="$complete"
17566    arguments="EOL"
17567    new_path="$path"
17568
17569  windows_path="$new_path"
17570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17571    unix_path=`$CYGPATH -u "$windows_path"`
17572    new_path="$unix_path"
17573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17575    new_path="$unix_path"
17576  fi
17577
17578
17579    new_path=`$WHICH "$new_path" 2> /dev/null`
17580    # bat and cmd files are not always considered executable in MSYS causing which
17581    # to not find them
17582    if test "x$new_path" = x \
17583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17585      new_path="$path"
17586
17587  windows_path="$new_path"
17588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17589    unix_path=`$CYGPATH -u "$windows_path"`
17590    new_path="$unix_path"
17591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17593    new_path="$unix_path"
17594  fi
17595
17596    fi
17597
17598    if test "x$new_path" = x; then
17599      # It's still not found. Now this is an unrecoverable error.
17600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17602      has_space=`$ECHO "$complete" | $GREP " "`
17603      if test "x$has_space" != x; then
17604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17606      fi
17607      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17608    fi
17609  fi
17610
17611  # Now new_path has a complete unix path to the binary
17612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17613    # Keep paths in /bin as-is, but remove trailing .exe if any
17614    new_path="${new_path/%.exe/}"
17615    # Do not save /bin paths to all_fixpath_prefixes!
17616  else
17617    # Not in mixed or Windows style, start by that.
17618    new_path=`cmd //c echo $new_path`
17619
17620  input_path="$new_path"
17621  # Check if we need to convert this using DOS-style short mode. If the path
17622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17623  # take no chances and rewrite it.
17624  # Note: m4 eats our [], so we need to use [ and ] instead.
17625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17626  if test "x$has_forbidden_chars" != x; then
17627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17629  fi
17630
17631    # Output is in $new_path
17632
17633  windows_path="$new_path"
17634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635    unix_path=`$CYGPATH -u "$windows_path"`
17636    new_path="$unix_path"
17637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17639    new_path="$unix_path"
17640  fi
17641
17642    # remove trailing .exe if any
17643    new_path="${new_path/%.exe/}"
17644
17645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17647  fi
17648
17649    else
17650      # We're on a unix platform. Hooray! :)
17651      # First separate the path from the arguments. This will split at the first
17652      # space.
17653      complete="$FOUND_MAKE"
17654      path="${complete%% *}"
17655      tmp="$complete EOL"
17656      arguments="${tmp#* }"
17657
17658      # Cannot rely on the command "which" here since it doesn't always work.
17659      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17660      if test -z "$is_absolute_path"; then
17661        # Path to executable is not absolute. Find it.
17662        IFS_save="$IFS"
17663        IFS=:
17664        for p in $PATH; do
17665          if test -f "$p/$path" && test -x "$p/$path"; then
17666            new_path="$p/$path"
17667            break
17668          fi
17669        done
17670        IFS="$IFS_save"
17671      else
17672        # This is an absolute path, we can use it without further modifications.
17673        new_path="$path"
17674      fi
17675
17676      if test "x$new_path" = x; then
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17678$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17679        has_space=`$ECHO "$complete" | $GREP " "`
17680        if test "x$has_space" != x; then
17681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17683        fi
17684        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17685      fi
17686    fi
17687
17688    # Now join together the path and the arguments once again
17689    if test "x$arguments" != xEOL; then
17690      new_complete="$new_path ${arguments% *}"
17691    else
17692      new_complete="$new_path"
17693    fi
17694
17695    if test "x$complete" != "x$new_complete"; then
17696      FOUND_MAKE="$new_complete"
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17698$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17699    fi
17700  fi
17701
17702        fi
17703      fi
17704    fi
17705  fi
17706
17707        if test "x$FOUND_MAKE" = x; then
17708          for ac_prog in make
17709do
17710  # Extract the first word of "$ac_prog", so it can be a program name with args.
17711set dummy $ac_prog; ac_word=$2
17712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17713$as_echo_n "checking for $ac_word... " >&6; }
17714if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17715  $as_echo_n "(cached) " >&6
17716else
17717  case $CHECK_TOOLSDIR_MAKE in
17718  [\\/]* | ?:[\\/]*)
17719  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17720  ;;
17721  *)
17722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17723for as_dir in $PATH
17724do
17725  IFS=$as_save_IFS
17726  test -z "$as_dir" && as_dir=.
17727    for ac_exec_ext in '' $ac_executable_extensions; do
17728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17729    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17731    break 2
17732  fi
17733done
17734  done
17735IFS=$as_save_IFS
17736
17737  ;;
17738esac
17739fi
17740CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17741if test -n "$CHECK_TOOLSDIR_MAKE"; then
17742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17743$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17744else
17745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17746$as_echo "no" >&6; }
17747fi
17748
17749
17750  test -n "$CHECK_TOOLSDIR_MAKE" && break
17751done
17752
17753
17754  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17755  DESCRIPTION="make in tools-dir"
17756
17757  # On Cygwin, we require a newer version of make than on other platforms
17758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17759    MAKE_VERSION_EXPR="-e 4\."
17760    MAKE_REQUIRED_VERSION="4.0"
17761   else
17762    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17763    MAKE_REQUIRED_VERSION="3.81"
17764  fi
17765
17766  if test "x$MAKE_CANDIDATE" != x; then
17767    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17768$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17769    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17770    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17771    if test "x$IS_GNU_MAKE" = x; then
17772      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17773$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17774    else
17775      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17776      if test "x$IS_MODERN_MAKE" = x; then
17777        { $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
17778$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;}
17779      else
17780        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17781          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17782            MAKE_EXPECTED_ENV='cygwin'
17783          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784            MAKE_EXPECTED_ENV='msys'
17785          else
17786            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17787          fi
17788          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17789          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17790        else
17791          # Not relevant for non-Windows
17792          IS_MAKE_CORRECT_ENV=true
17793        fi
17794        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17795          { $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
17796$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;}
17797        else
17798          FOUND_MAKE=$MAKE_CANDIDATE
17799
17800  # Only process if variable expands to non-empty
17801
17802  if test "x$FOUND_MAKE" != x; then
17803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17804
17805  # First separate the path from the arguments. This will split at the first
17806  # space.
17807  complete="$FOUND_MAKE"
17808  path="${complete%% *}"
17809  tmp="$complete EOL"
17810  arguments="${tmp#* }"
17811
17812  # Input might be given as Windows format, start by converting to
17813  # unix format.
17814  new_path=`$CYGPATH -u "$path"`
17815
17816  # Now try to locate executable using which
17817  new_path=`$WHICH "$new_path" 2> /dev/null`
17818  # bat and cmd files are not always considered executable in cygwin causing which
17819  # to not find them
17820  if test "x$new_path" = x \
17821      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17822      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17823    new_path=`$CYGPATH -u "$path"`
17824  fi
17825  if test "x$new_path" = x; then
17826    # Oops. Which didn't find the executable.
17827    # The splitting of arguments from the executable at a space might have been incorrect,
17828    # since paths with space are more likely in Windows. Give it another try with the whole
17829    # argument.
17830    path="$complete"
17831    arguments="EOL"
17832    new_path=`$CYGPATH -u "$path"`
17833    new_path=`$WHICH "$new_path" 2> /dev/null`
17834    # bat and cmd files are not always considered executable in cygwin causing which
17835    # to not find them
17836    if test "x$new_path" = x \
17837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17839      new_path=`$CYGPATH -u "$path"`
17840    fi
17841    if test "x$new_path" = x; then
17842      # It's still not found. Now this is an unrecoverable error.
17843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17844$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17845      has_space=`$ECHO "$complete" | $GREP " "`
17846      if test "x$has_space" != x; then
17847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17849      fi
17850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17851    fi
17852  fi
17853
17854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17857  # "foo.exe" is OK but "foo" is an error.
17858  #
17859  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17860  # It is also a way to make sure we got the proper file name for the real test later on.
17861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17862  if test "x$test_shortpath" = x; then
17863    # Short path failed, file does not exist as specified.
17864    # Try adding .exe or .cmd
17865    if test -f "${new_path}.exe"; then
17866      input_to_shortpath="${new_path}.exe"
17867    elif test -f "${new_path}.cmd"; then
17868      input_to_shortpath="${new_path}.cmd"
17869    else
17870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17871$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17872      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17873$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17874      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17875    fi
17876  else
17877    input_to_shortpath="$new_path"
17878  fi
17879
17880  # Call helper function which possibly converts this using DOS-style short mode.
17881  # If so, the updated path is stored in $new_path.
17882  new_path="$input_to_shortpath"
17883
17884  input_path="$input_to_shortpath"
17885  # Check if we need to convert this using DOS-style short mode. If the path
17886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17887  # take no chances and rewrite it.
17888  # Note: m4 eats our [], so we need to use [ and ] instead.
17889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17890  if test "x$has_forbidden_chars" != x; then
17891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17895      # Going to short mode and back again did indeed matter. Since short mode is
17896      # case insensitive, let's make it lowercase to improve readability.
17897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17898      # Now convert it back to Unix-style (cygpath)
17899      input_path=`$CYGPATH -u "$shortmode_path"`
17900      new_path="$input_path"
17901    fi
17902  fi
17903
17904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17905  if test "x$test_cygdrive_prefix" = x; then
17906    # As a simple fix, exclude /usr/bin since it's not a real path.
17907    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17909      # a path prefixed by /cygdrive for fixpath to work.
17910      new_path="$CYGWIN_ROOT_PATH$input_path"
17911    fi
17912  fi
17913
17914  # remove trailing .exe if any
17915  new_path="${new_path/%.exe/}"
17916
17917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17918
17919  # First separate the path from the arguments. This will split at the first
17920  # space.
17921  complete="$FOUND_MAKE"
17922  path="${complete%% *}"
17923  tmp="$complete EOL"
17924  arguments="${tmp#* }"
17925
17926  # Input might be given as Windows format, start by converting to
17927  # unix format.
17928  new_path="$path"
17929
17930  windows_path="$new_path"
17931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932    unix_path=`$CYGPATH -u "$windows_path"`
17933    new_path="$unix_path"
17934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17936    new_path="$unix_path"
17937  fi
17938
17939
17940  # Now try to locate executable using which
17941  new_path=`$WHICH "$new_path" 2> /dev/null`
17942
17943  if test "x$new_path" = x; then
17944    # Oops. Which didn't find the executable.
17945    # The splitting of arguments from the executable at a space might have been incorrect,
17946    # since paths with space are more likely in Windows. Give it another try with the whole
17947    # argument.
17948    path="$complete"
17949    arguments="EOL"
17950    new_path="$path"
17951
17952  windows_path="$new_path"
17953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17954    unix_path=`$CYGPATH -u "$windows_path"`
17955    new_path="$unix_path"
17956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17958    new_path="$unix_path"
17959  fi
17960
17961
17962    new_path=`$WHICH "$new_path" 2> /dev/null`
17963    # bat and cmd files are not always considered executable in MSYS causing which
17964    # to not find them
17965    if test "x$new_path" = x \
17966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17968      new_path="$path"
17969
17970  windows_path="$new_path"
17971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17972    unix_path=`$CYGPATH -u "$windows_path"`
17973    new_path="$unix_path"
17974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17976    new_path="$unix_path"
17977  fi
17978
17979    fi
17980
17981    if test "x$new_path" = x; then
17982      # It's still not found. Now this is an unrecoverable error.
17983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17984$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17985      has_space=`$ECHO "$complete" | $GREP " "`
17986      if test "x$has_space" != x; then
17987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17989      fi
17990      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17991    fi
17992  fi
17993
17994  # Now new_path has a complete unix path to the binary
17995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17996    # Keep paths in /bin as-is, but remove trailing .exe if any
17997    new_path="${new_path/%.exe/}"
17998    # Do not save /bin paths to all_fixpath_prefixes!
17999  else
18000    # Not in mixed or Windows style, start by that.
18001    new_path=`cmd //c echo $new_path`
18002
18003  input_path="$new_path"
18004  # Check if we need to convert this using DOS-style short mode. If the path
18005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18006  # take no chances and rewrite it.
18007  # Note: m4 eats our [], so we need to use [ and ] instead.
18008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18009  if test "x$has_forbidden_chars" != x; then
18010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18012  fi
18013
18014    # Output is in $new_path
18015
18016  windows_path="$new_path"
18017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018    unix_path=`$CYGPATH -u "$windows_path"`
18019    new_path="$unix_path"
18020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18022    new_path="$unix_path"
18023  fi
18024
18025    # remove trailing .exe if any
18026    new_path="${new_path/%.exe/}"
18027
18028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18030  fi
18031
18032    else
18033      # We're on a unix platform. Hooray! :)
18034      # First separate the path from the arguments. This will split at the first
18035      # space.
18036      complete="$FOUND_MAKE"
18037      path="${complete%% *}"
18038      tmp="$complete EOL"
18039      arguments="${tmp#* }"
18040
18041      # Cannot rely on the command "which" here since it doesn't always work.
18042      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18043      if test -z "$is_absolute_path"; then
18044        # Path to executable is not absolute. Find it.
18045        IFS_save="$IFS"
18046        IFS=:
18047        for p in $PATH; do
18048          if test -f "$p/$path" && test -x "$p/$path"; then
18049            new_path="$p/$path"
18050            break
18051          fi
18052        done
18053        IFS="$IFS_save"
18054      else
18055        # This is an absolute path, we can use it without further modifications.
18056        new_path="$path"
18057      fi
18058
18059      if test "x$new_path" = x; then
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18062        has_space=`$ECHO "$complete" | $GREP " "`
18063        if test "x$has_space" != x; then
18064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18066        fi
18067        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18068      fi
18069    fi
18070
18071    # Now join together the path and the arguments once again
18072    if test "x$arguments" != xEOL; then
18073      new_complete="$new_path ${arguments% *}"
18074    else
18075      new_complete="$new_path"
18076    fi
18077
18078    if test "x$complete" != "x$new_complete"; then
18079      FOUND_MAKE="$new_complete"
18080      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18081$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18082    fi
18083  fi
18084
18085        fi
18086      fi
18087    fi
18088  fi
18089
18090        fi
18091        PATH=$OLD_PATH
18092      fi
18093    fi
18094
18095    if test "x$FOUND_MAKE" = x; then
18096      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
18097    fi
18098
18099  else
18100    # The variable is set, but is it from the command line or the environment?
18101
18102    # Try to remove the string !MAKE! from our list.
18103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18105      # If it failed, the variable was not from the command line. Ignore it,
18106      # but warn the user (except for BASH, which is always set by the calling BASH).
18107      if test "xMAKE" != xBASH; then
18108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18109$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18110      fi
18111      # Try to locate tool using the code snippet
18112
18113    # Try our hardest to locate a correct version of GNU make
18114    for ac_prog in gmake
18115do
18116  # Extract the first word of "$ac_prog", so it can be a program name with args.
18117set dummy $ac_prog; ac_word=$2
18118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18119$as_echo_n "checking for $ac_word... " >&6; }
18120if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18121  $as_echo_n "(cached) " >&6
18122else
18123  case $CHECK_GMAKE in
18124  [\\/]* | ?:[\\/]*)
18125  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18126  ;;
18127  *)
18128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18129for as_dir in $PATH
18130do
18131  IFS=$as_save_IFS
18132  test -z "$as_dir" && as_dir=.
18133    for ac_exec_ext in '' $ac_executable_extensions; do
18134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18135    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18137    break 2
18138  fi
18139done
18140  done
18141IFS=$as_save_IFS
18142
18143  ;;
18144esac
18145fi
18146CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18147if test -n "$CHECK_GMAKE"; then
18148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18149$as_echo "$CHECK_GMAKE" >&6; }
18150else
18151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18152$as_echo "no" >&6; }
18153fi
18154
18155
18156  test -n "$CHECK_GMAKE" && break
18157done
18158
18159
18160  MAKE_CANDIDATE=""$CHECK_GMAKE""
18161  DESCRIPTION="gmake in PATH"
18162
18163  # On Cygwin, we require a newer version of make than on other platforms
18164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165    MAKE_VERSION_EXPR="-e 4\."
18166    MAKE_REQUIRED_VERSION="4.0"
18167   else
18168    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18169    MAKE_REQUIRED_VERSION="3.81"
18170  fi
18171
18172  if test "x$MAKE_CANDIDATE" != x; then
18173    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18174$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18175    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18176    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18177    if test "x$IS_GNU_MAKE" = x; then
18178      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18179$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18180    else
18181      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18182      if test "x$IS_MODERN_MAKE" = x; then
18183        { $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
18184$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;}
18185      else
18186        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18187          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18188            MAKE_EXPECTED_ENV='cygwin'
18189          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190            MAKE_EXPECTED_ENV='msys'
18191          else
18192            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18193          fi
18194          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18195          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18196        else
18197          # Not relevant for non-Windows
18198          IS_MAKE_CORRECT_ENV=true
18199        fi
18200        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18201          { $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
18202$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;}
18203        else
18204          FOUND_MAKE=$MAKE_CANDIDATE
18205
18206  # Only process if variable expands to non-empty
18207
18208  if test "x$FOUND_MAKE" != x; then
18209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18210
18211  # First separate the path from the arguments. This will split at the first
18212  # space.
18213  complete="$FOUND_MAKE"
18214  path="${complete%% *}"
18215  tmp="$complete EOL"
18216  arguments="${tmp#* }"
18217
18218  # Input might be given as Windows format, start by converting to
18219  # unix format.
18220  new_path=`$CYGPATH -u "$path"`
18221
18222  # Now try to locate executable using which
18223  new_path=`$WHICH "$new_path" 2> /dev/null`
18224  # bat and cmd files are not always considered executable in cygwin causing which
18225  # to not find them
18226  if test "x$new_path" = x \
18227      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18228      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18229    new_path=`$CYGPATH -u "$path"`
18230  fi
18231  if test "x$new_path" = x; then
18232    # Oops. Which didn't find the executable.
18233    # The splitting of arguments from the executable at a space might have been incorrect,
18234    # since paths with space are more likely in Windows. Give it another try with the whole
18235    # argument.
18236    path="$complete"
18237    arguments="EOL"
18238    new_path=`$CYGPATH -u "$path"`
18239    new_path=`$WHICH "$new_path" 2> /dev/null`
18240    # bat and cmd files are not always considered executable in cygwin causing which
18241    # to not find them
18242    if test "x$new_path" = x \
18243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18245      new_path=`$CYGPATH -u "$path"`
18246    fi
18247    if test "x$new_path" = x; then
18248      # It's still not found. Now this is an unrecoverable error.
18249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18251      has_space=`$ECHO "$complete" | $GREP " "`
18252      if test "x$has_space" != x; then
18253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18255      fi
18256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18257    fi
18258  fi
18259
18260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18263  # "foo.exe" is OK but "foo" is an error.
18264  #
18265  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18266  # It is also a way to make sure we got the proper file name for the real test later on.
18267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18268  if test "x$test_shortpath" = x; then
18269    # Short path failed, file does not exist as specified.
18270    # Try adding .exe or .cmd
18271    if test -f "${new_path}.exe"; then
18272      input_to_shortpath="${new_path}.exe"
18273    elif test -f "${new_path}.cmd"; then
18274      input_to_shortpath="${new_path}.cmd"
18275    else
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18281    fi
18282  else
18283    input_to_shortpath="$new_path"
18284  fi
18285
18286  # Call helper function which possibly converts this using DOS-style short mode.
18287  # If so, the updated path is stored in $new_path.
18288  new_path="$input_to_shortpath"
18289
18290  input_path="$input_to_shortpath"
18291  # Check if we need to convert this using DOS-style short mode. If the path
18292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18293  # take no chances and rewrite it.
18294  # Note: m4 eats our [], so we need to use [ and ] instead.
18295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18296  if test "x$has_forbidden_chars" != x; then
18297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18301      # Going to short mode and back again did indeed matter. Since short mode is
18302      # case insensitive, let's make it lowercase to improve readability.
18303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18304      # Now convert it back to Unix-style (cygpath)
18305      input_path=`$CYGPATH -u "$shortmode_path"`
18306      new_path="$input_path"
18307    fi
18308  fi
18309
18310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18311  if test "x$test_cygdrive_prefix" = x; then
18312    # As a simple fix, exclude /usr/bin since it's not a real path.
18313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18315      # a path prefixed by /cygdrive for fixpath to work.
18316      new_path="$CYGWIN_ROOT_PATH$input_path"
18317    fi
18318  fi
18319
18320  # remove trailing .exe if any
18321  new_path="${new_path/%.exe/}"
18322
18323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18324
18325  # First separate the path from the arguments. This will split at the first
18326  # space.
18327  complete="$FOUND_MAKE"
18328  path="${complete%% *}"
18329  tmp="$complete EOL"
18330  arguments="${tmp#* }"
18331
18332  # Input might be given as Windows format, start by converting to
18333  # unix format.
18334  new_path="$path"
18335
18336  windows_path="$new_path"
18337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18338    unix_path=`$CYGPATH -u "$windows_path"`
18339    new_path="$unix_path"
18340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18342    new_path="$unix_path"
18343  fi
18344
18345
18346  # Now try to locate executable using which
18347  new_path=`$WHICH "$new_path" 2> /dev/null`
18348
18349  if test "x$new_path" = x; then
18350    # Oops. Which didn't find the executable.
18351    # The splitting of arguments from the executable at a space might have been incorrect,
18352    # since paths with space are more likely in Windows. Give it another try with the whole
18353    # argument.
18354    path="$complete"
18355    arguments="EOL"
18356    new_path="$path"
18357
18358  windows_path="$new_path"
18359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18360    unix_path=`$CYGPATH -u "$windows_path"`
18361    new_path="$unix_path"
18362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18364    new_path="$unix_path"
18365  fi
18366
18367
18368    new_path=`$WHICH "$new_path" 2> /dev/null`
18369    # bat and cmd files are not always considered executable in MSYS causing which
18370    # to not find them
18371    if test "x$new_path" = x \
18372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18374      new_path="$path"
18375
18376  windows_path="$new_path"
18377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378    unix_path=`$CYGPATH -u "$windows_path"`
18379    new_path="$unix_path"
18380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18382    new_path="$unix_path"
18383  fi
18384
18385    fi
18386
18387    if test "x$new_path" = x; then
18388      # It's still not found. Now this is an unrecoverable error.
18389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18390$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18391      has_space=`$ECHO "$complete" | $GREP " "`
18392      if test "x$has_space" != x; then
18393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18395      fi
18396      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18397    fi
18398  fi
18399
18400  # Now new_path has a complete unix path to the binary
18401  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18402    # Keep paths in /bin as-is, but remove trailing .exe if any
18403    new_path="${new_path/%.exe/}"
18404    # Do not save /bin paths to all_fixpath_prefixes!
18405  else
18406    # Not in mixed or Windows style, start by that.
18407    new_path=`cmd //c echo $new_path`
18408
18409  input_path="$new_path"
18410  # Check if we need to convert this using DOS-style short mode. If the path
18411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18412  # take no chances and rewrite it.
18413  # Note: m4 eats our [], so we need to use [ and ] instead.
18414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18415  if test "x$has_forbidden_chars" != x; then
18416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18418  fi
18419
18420    # Output is in $new_path
18421
18422  windows_path="$new_path"
18423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18424    unix_path=`$CYGPATH -u "$windows_path"`
18425    new_path="$unix_path"
18426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18428    new_path="$unix_path"
18429  fi
18430
18431    # remove trailing .exe if any
18432    new_path="${new_path/%.exe/}"
18433
18434    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18435    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18436  fi
18437
18438    else
18439      # We're on a unix platform. Hooray! :)
18440      # First separate the path from the arguments. This will split at the first
18441      # space.
18442      complete="$FOUND_MAKE"
18443      path="${complete%% *}"
18444      tmp="$complete EOL"
18445      arguments="${tmp#* }"
18446
18447      # Cannot rely on the command "which" here since it doesn't always work.
18448      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18449      if test -z "$is_absolute_path"; then
18450        # Path to executable is not absolute. Find it.
18451        IFS_save="$IFS"
18452        IFS=:
18453        for p in $PATH; do
18454          if test -f "$p/$path" && test -x "$p/$path"; then
18455            new_path="$p/$path"
18456            break
18457          fi
18458        done
18459        IFS="$IFS_save"
18460      else
18461        # This is an absolute path, we can use it without further modifications.
18462        new_path="$path"
18463      fi
18464
18465      if test "x$new_path" = x; then
18466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18468        has_space=`$ECHO "$complete" | $GREP " "`
18469        if test "x$has_space" != x; then
18470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18472        fi
18473        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18474      fi
18475    fi
18476
18477    # Now join together the path and the arguments once again
18478    if test "x$arguments" != xEOL; then
18479      new_complete="$new_path ${arguments% *}"
18480    else
18481      new_complete="$new_path"
18482    fi
18483
18484    if test "x$complete" != "x$new_complete"; then
18485      FOUND_MAKE="$new_complete"
18486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18487$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18488    fi
18489  fi
18490
18491        fi
18492      fi
18493    fi
18494  fi
18495
18496
18497    if test "x$FOUND_MAKE" = x; then
18498      for ac_prog in make
18499do
18500  # Extract the first word of "$ac_prog", so it can be a program name with args.
18501set dummy $ac_prog; ac_word=$2
18502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18503$as_echo_n "checking for $ac_word... " >&6; }
18504if ${ac_cv_path_CHECK_MAKE+:} false; then :
18505  $as_echo_n "(cached) " >&6
18506else
18507  case $CHECK_MAKE in
18508  [\\/]* | ?:[\\/]*)
18509  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18510  ;;
18511  *)
18512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18513for as_dir in $PATH
18514do
18515  IFS=$as_save_IFS
18516  test -z "$as_dir" && as_dir=.
18517    for ac_exec_ext in '' $ac_executable_extensions; do
18518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18519    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18521    break 2
18522  fi
18523done
18524  done
18525IFS=$as_save_IFS
18526
18527  ;;
18528esac
18529fi
18530CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18531if test -n "$CHECK_MAKE"; then
18532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18533$as_echo "$CHECK_MAKE" >&6; }
18534else
18535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18536$as_echo "no" >&6; }
18537fi
18538
18539
18540  test -n "$CHECK_MAKE" && break
18541done
18542
18543
18544  MAKE_CANDIDATE=""$CHECK_MAKE""
18545  DESCRIPTION="make in PATH"
18546
18547  # On Cygwin, we require a newer version of make than on other platforms
18548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18549    MAKE_VERSION_EXPR="-e 4\."
18550    MAKE_REQUIRED_VERSION="4.0"
18551   else
18552    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18553    MAKE_REQUIRED_VERSION="3.81"
18554  fi
18555
18556  if test "x$MAKE_CANDIDATE" != x; then
18557    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18558$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18559    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18560    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18561    if test "x$IS_GNU_MAKE" = x; then
18562      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18563$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18564    else
18565      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18566      if test "x$IS_MODERN_MAKE" = x; then
18567        { $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
18568$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;}
18569      else
18570        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18571          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18572            MAKE_EXPECTED_ENV='cygwin'
18573          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18574            MAKE_EXPECTED_ENV='msys'
18575          else
18576            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18577          fi
18578          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18579          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18580        else
18581          # Not relevant for non-Windows
18582          IS_MAKE_CORRECT_ENV=true
18583        fi
18584        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18585          { $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
18586$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;}
18587        else
18588          FOUND_MAKE=$MAKE_CANDIDATE
18589
18590  # Only process if variable expands to non-empty
18591
18592  if test "x$FOUND_MAKE" != x; then
18593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18594
18595  # First separate the path from the arguments. This will split at the first
18596  # space.
18597  complete="$FOUND_MAKE"
18598  path="${complete%% *}"
18599  tmp="$complete EOL"
18600  arguments="${tmp#* }"
18601
18602  # Input might be given as Windows format, start by converting to
18603  # unix format.
18604  new_path=`$CYGPATH -u "$path"`
18605
18606  # Now try to locate executable using which
18607  new_path=`$WHICH "$new_path" 2> /dev/null`
18608  # bat and cmd files are not always considered executable in cygwin causing which
18609  # to not find them
18610  if test "x$new_path" = x \
18611      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18612      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18613    new_path=`$CYGPATH -u "$path"`
18614  fi
18615  if test "x$new_path" = x; then
18616    # Oops. Which didn't find the executable.
18617    # The splitting of arguments from the executable at a space might have been incorrect,
18618    # since paths with space are more likely in Windows. Give it another try with the whole
18619    # argument.
18620    path="$complete"
18621    arguments="EOL"
18622    new_path=`$CYGPATH -u "$path"`
18623    new_path=`$WHICH "$new_path" 2> /dev/null`
18624    # bat and cmd files are not always considered executable in cygwin causing which
18625    # to not find them
18626    if test "x$new_path" = x \
18627        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18628        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18629      new_path=`$CYGPATH -u "$path"`
18630    fi
18631    if test "x$new_path" = x; then
18632      # It's still not found. Now this is an unrecoverable error.
18633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18634$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18635      has_space=`$ECHO "$complete" | $GREP " "`
18636      if test "x$has_space" != x; then
18637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18639      fi
18640      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18641    fi
18642  fi
18643
18644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18647  # "foo.exe" is OK but "foo" is an error.
18648  #
18649  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18650  # It is also a way to make sure we got the proper file name for the real test later on.
18651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18652  if test "x$test_shortpath" = x; then
18653    # Short path failed, file does not exist as specified.
18654    # Try adding .exe or .cmd
18655    if test -f "${new_path}.exe"; then
18656      input_to_shortpath="${new_path}.exe"
18657    elif test -f "${new_path}.cmd"; then
18658      input_to_shortpath="${new_path}.cmd"
18659    else
18660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18662      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18663$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18664      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18665    fi
18666  else
18667    input_to_shortpath="$new_path"
18668  fi
18669
18670  # Call helper function which possibly converts this using DOS-style short mode.
18671  # If so, the updated path is stored in $new_path.
18672  new_path="$input_to_shortpath"
18673
18674  input_path="$input_to_shortpath"
18675  # Check if we need to convert this using DOS-style short mode. If the path
18676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18677  # take no chances and rewrite it.
18678  # Note: m4 eats our [], so we need to use [ and ] instead.
18679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18680  if test "x$has_forbidden_chars" != x; then
18681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18685      # Going to short mode and back again did indeed matter. Since short mode is
18686      # case insensitive, let's make it lowercase to improve readability.
18687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18688      # Now convert it back to Unix-style (cygpath)
18689      input_path=`$CYGPATH -u "$shortmode_path"`
18690      new_path="$input_path"
18691    fi
18692  fi
18693
18694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18695  if test "x$test_cygdrive_prefix" = x; then
18696    # As a simple fix, exclude /usr/bin since it's not a real path.
18697    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18699      # a path prefixed by /cygdrive for fixpath to work.
18700      new_path="$CYGWIN_ROOT_PATH$input_path"
18701    fi
18702  fi
18703
18704  # remove trailing .exe if any
18705  new_path="${new_path/%.exe/}"
18706
18707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18708
18709  # First separate the path from the arguments. This will split at the first
18710  # space.
18711  complete="$FOUND_MAKE"
18712  path="${complete%% *}"
18713  tmp="$complete EOL"
18714  arguments="${tmp#* }"
18715
18716  # Input might be given as Windows format, start by converting to
18717  # unix format.
18718  new_path="$path"
18719
18720  windows_path="$new_path"
18721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18722    unix_path=`$CYGPATH -u "$windows_path"`
18723    new_path="$unix_path"
18724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18726    new_path="$unix_path"
18727  fi
18728
18729
18730  # Now try to locate executable using which
18731  new_path=`$WHICH "$new_path" 2> /dev/null`
18732
18733  if test "x$new_path" = x; then
18734    # Oops. Which didn't find the executable.
18735    # The splitting of arguments from the executable at a space might have been incorrect,
18736    # since paths with space are more likely in Windows. Give it another try with the whole
18737    # argument.
18738    path="$complete"
18739    arguments="EOL"
18740    new_path="$path"
18741
18742  windows_path="$new_path"
18743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18744    unix_path=`$CYGPATH -u "$windows_path"`
18745    new_path="$unix_path"
18746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18748    new_path="$unix_path"
18749  fi
18750
18751
18752    new_path=`$WHICH "$new_path" 2> /dev/null`
18753    # bat and cmd files are not always considered executable in MSYS causing which
18754    # to not find them
18755    if test "x$new_path" = x \
18756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18758      new_path="$path"
18759
18760  windows_path="$new_path"
18761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18762    unix_path=`$CYGPATH -u "$windows_path"`
18763    new_path="$unix_path"
18764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18766    new_path="$unix_path"
18767  fi
18768
18769    fi
18770
18771    if test "x$new_path" = x; then
18772      # It's still not found. Now this is an unrecoverable error.
18773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18775      has_space=`$ECHO "$complete" | $GREP " "`
18776      if test "x$has_space" != x; then
18777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18779      fi
18780      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18781    fi
18782  fi
18783
18784  # Now new_path has a complete unix path to the binary
18785  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18786    # Keep paths in /bin as-is, but remove trailing .exe if any
18787    new_path="${new_path/%.exe/}"
18788    # Do not save /bin paths to all_fixpath_prefixes!
18789  else
18790    # Not in mixed or Windows style, start by that.
18791    new_path=`cmd //c echo $new_path`
18792
18793  input_path="$new_path"
18794  # Check if we need to convert this using DOS-style short mode. If the path
18795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18796  # take no chances and rewrite it.
18797  # Note: m4 eats our [], so we need to use [ and ] instead.
18798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18799  if test "x$has_forbidden_chars" != x; then
18800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18802  fi
18803
18804    # Output is in $new_path
18805
18806  windows_path="$new_path"
18807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18808    unix_path=`$CYGPATH -u "$windows_path"`
18809    new_path="$unix_path"
18810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18812    new_path="$unix_path"
18813  fi
18814
18815    # remove trailing .exe if any
18816    new_path="${new_path/%.exe/}"
18817
18818    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18819    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18820  fi
18821
18822    else
18823      # We're on a unix platform. Hooray! :)
18824      # First separate the path from the arguments. This will split at the first
18825      # space.
18826      complete="$FOUND_MAKE"
18827      path="${complete%% *}"
18828      tmp="$complete EOL"
18829      arguments="${tmp#* }"
18830
18831      # Cannot rely on the command "which" here since it doesn't always work.
18832      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18833      if test -z "$is_absolute_path"; then
18834        # Path to executable is not absolute. Find it.
18835        IFS_save="$IFS"
18836        IFS=:
18837        for p in $PATH; do
18838          if test -f "$p/$path" && test -x "$p/$path"; then
18839            new_path="$p/$path"
18840            break
18841          fi
18842        done
18843        IFS="$IFS_save"
18844      else
18845        # This is an absolute path, we can use it without further modifications.
18846        new_path="$path"
18847      fi
18848
18849      if test "x$new_path" = x; then
18850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18851$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18852        has_space=`$ECHO "$complete" | $GREP " "`
18853        if test "x$has_space" != x; then
18854          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18855$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18856        fi
18857        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18858      fi
18859    fi
18860
18861    # Now join together the path and the arguments once again
18862    if test "x$arguments" != xEOL; then
18863      new_complete="$new_path ${arguments% *}"
18864    else
18865      new_complete="$new_path"
18866    fi
18867
18868    if test "x$complete" != "x$new_complete"; then
18869      FOUND_MAKE="$new_complete"
18870      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18871$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18872    fi
18873  fi
18874
18875        fi
18876      fi
18877    fi
18878  fi
18879
18880    fi
18881
18882    if test "x$FOUND_MAKE" = x; then
18883      if test "x$TOOLCHAIN_PATH" != x; then
18884        # We have a toolchain path, check that as well before giving up.
18885        OLD_PATH=$PATH
18886        PATH=$TOOLCHAIN_PATH:$PATH
18887        for ac_prog in gmake
18888do
18889  # Extract the first word of "$ac_prog", so it can be a program name with args.
18890set dummy $ac_prog; ac_word=$2
18891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18892$as_echo_n "checking for $ac_word... " >&6; }
18893if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18894  $as_echo_n "(cached) " >&6
18895else
18896  case $CHECK_TOOLSDIR_GMAKE in
18897  [\\/]* | ?:[\\/]*)
18898  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18899  ;;
18900  *)
18901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18902for as_dir in $PATH
18903do
18904  IFS=$as_save_IFS
18905  test -z "$as_dir" && as_dir=.
18906    for ac_exec_ext in '' $ac_executable_extensions; do
18907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18908    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18910    break 2
18911  fi
18912done
18913  done
18914IFS=$as_save_IFS
18915
18916  ;;
18917esac
18918fi
18919CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18920if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18922$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18923else
18924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18925$as_echo "no" >&6; }
18926fi
18927
18928
18929  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18930done
18931
18932
18933  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18934  DESCRIPTION="gmake in tools-dir"
18935
18936  # On Cygwin, we require a newer version of make than on other platforms
18937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18938    MAKE_VERSION_EXPR="-e 4\."
18939    MAKE_REQUIRED_VERSION="4.0"
18940   else
18941    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18942    MAKE_REQUIRED_VERSION="3.81"
18943  fi
18944
18945  if test "x$MAKE_CANDIDATE" != x; then
18946    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18947$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18948    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18949    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18950    if test "x$IS_GNU_MAKE" = x; then
18951      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18952$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18953    else
18954      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18955      if test "x$IS_MODERN_MAKE" = x; then
18956        { $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
18957$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;}
18958      else
18959        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18960          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18961            MAKE_EXPECTED_ENV='cygwin'
18962          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18963            MAKE_EXPECTED_ENV='msys'
18964          else
18965            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18966          fi
18967          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18968          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18969        else
18970          # Not relevant for non-Windows
18971          IS_MAKE_CORRECT_ENV=true
18972        fi
18973        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18974          { $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
18975$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;}
18976        else
18977          FOUND_MAKE=$MAKE_CANDIDATE
18978
18979  # Only process if variable expands to non-empty
18980
18981  if test "x$FOUND_MAKE" != x; then
18982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18983
18984  # First separate the path from the arguments. This will split at the first
18985  # space.
18986  complete="$FOUND_MAKE"
18987  path="${complete%% *}"
18988  tmp="$complete EOL"
18989  arguments="${tmp#* }"
18990
18991  # Input might be given as Windows format, start by converting to
18992  # unix format.
18993  new_path=`$CYGPATH -u "$path"`
18994
18995  # Now try to locate executable using which
18996  new_path=`$WHICH "$new_path" 2> /dev/null`
18997  # bat and cmd files are not always considered executable in cygwin causing which
18998  # to not find them
18999  if test "x$new_path" = x \
19000      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19001      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19002    new_path=`$CYGPATH -u "$path"`
19003  fi
19004  if test "x$new_path" = x; then
19005    # Oops. Which didn't find the executable.
19006    # The splitting of arguments from the executable at a space might have been incorrect,
19007    # since paths with space are more likely in Windows. Give it another try with the whole
19008    # argument.
19009    path="$complete"
19010    arguments="EOL"
19011    new_path=`$CYGPATH -u "$path"`
19012    new_path=`$WHICH "$new_path" 2> /dev/null`
19013    # bat and cmd files are not always considered executable in cygwin causing which
19014    # to not find them
19015    if test "x$new_path" = x \
19016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19018      new_path=`$CYGPATH -u "$path"`
19019    fi
19020    if test "x$new_path" = x; then
19021      # It's still not found. Now this is an unrecoverable error.
19022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19023$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19024      has_space=`$ECHO "$complete" | $GREP " "`
19025      if test "x$has_space" != x; then
19026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19028      fi
19029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19030    fi
19031  fi
19032
19033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19036  # "foo.exe" is OK but "foo" is an error.
19037  #
19038  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19039  # It is also a way to make sure we got the proper file name for the real test later on.
19040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19041  if test "x$test_shortpath" = x; then
19042    # Short path failed, file does not exist as specified.
19043    # Try adding .exe or .cmd
19044    if test -f "${new_path}.exe"; then
19045      input_to_shortpath="${new_path}.exe"
19046    elif test -f "${new_path}.cmd"; then
19047      input_to_shortpath="${new_path}.cmd"
19048    else
19049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19054    fi
19055  else
19056    input_to_shortpath="$new_path"
19057  fi
19058
19059  # Call helper function which possibly converts this using DOS-style short mode.
19060  # If so, the updated path is stored in $new_path.
19061  new_path="$input_to_shortpath"
19062
19063  input_path="$input_to_shortpath"
19064  # Check if we need to convert this using DOS-style short mode. If the path
19065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19066  # take no chances and rewrite it.
19067  # Note: m4 eats our [], so we need to use [ and ] instead.
19068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19069  if test "x$has_forbidden_chars" != x; then
19070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19074      # Going to short mode and back again did indeed matter. Since short mode is
19075      # case insensitive, let's make it lowercase to improve readability.
19076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19077      # Now convert it back to Unix-style (cygpath)
19078      input_path=`$CYGPATH -u "$shortmode_path"`
19079      new_path="$input_path"
19080    fi
19081  fi
19082
19083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19084  if test "x$test_cygdrive_prefix" = x; then
19085    # As a simple fix, exclude /usr/bin since it's not a real path.
19086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19088      # a path prefixed by /cygdrive for fixpath to work.
19089      new_path="$CYGWIN_ROOT_PATH$input_path"
19090    fi
19091  fi
19092
19093  # remove trailing .exe if any
19094  new_path="${new_path/%.exe/}"
19095
19096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19097
19098  # First separate the path from the arguments. This will split at the first
19099  # space.
19100  complete="$FOUND_MAKE"
19101  path="${complete%% *}"
19102  tmp="$complete EOL"
19103  arguments="${tmp#* }"
19104
19105  # Input might be given as Windows format, start by converting to
19106  # unix format.
19107  new_path="$path"
19108
19109  windows_path="$new_path"
19110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19111    unix_path=`$CYGPATH -u "$windows_path"`
19112    new_path="$unix_path"
19113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19115    new_path="$unix_path"
19116  fi
19117
19118
19119  # Now try to locate executable using which
19120  new_path=`$WHICH "$new_path" 2> /dev/null`
19121
19122  if test "x$new_path" = x; then
19123    # Oops. Which didn't find the executable.
19124    # The splitting of arguments from the executable at a space might have been incorrect,
19125    # since paths with space are more likely in Windows. Give it another try with the whole
19126    # argument.
19127    path="$complete"
19128    arguments="EOL"
19129    new_path="$path"
19130
19131  windows_path="$new_path"
19132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133    unix_path=`$CYGPATH -u "$windows_path"`
19134    new_path="$unix_path"
19135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19137    new_path="$unix_path"
19138  fi
19139
19140
19141    new_path=`$WHICH "$new_path" 2> /dev/null`
19142    # bat and cmd files are not always considered executable in MSYS causing which
19143    # to not find them
19144    if test "x$new_path" = x \
19145        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19146        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19147      new_path="$path"
19148
19149  windows_path="$new_path"
19150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19151    unix_path=`$CYGPATH -u "$windows_path"`
19152    new_path="$unix_path"
19153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19155    new_path="$unix_path"
19156  fi
19157
19158    fi
19159
19160    if test "x$new_path" = x; then
19161      # It's still not found. Now this is an unrecoverable error.
19162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19164      has_space=`$ECHO "$complete" | $GREP " "`
19165      if test "x$has_space" != x; then
19166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19168      fi
19169      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19170    fi
19171  fi
19172
19173  # Now new_path has a complete unix path to the binary
19174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19175    # Keep paths in /bin as-is, but remove trailing .exe if any
19176    new_path="${new_path/%.exe/}"
19177    # Do not save /bin paths to all_fixpath_prefixes!
19178  else
19179    # Not in mixed or Windows style, start by that.
19180    new_path=`cmd //c echo $new_path`
19181
19182  input_path="$new_path"
19183  # Check if we need to convert this using DOS-style short mode. If the path
19184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19185  # take no chances and rewrite it.
19186  # Note: m4 eats our [], so we need to use [ and ] instead.
19187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19188  if test "x$has_forbidden_chars" != x; then
19189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19191  fi
19192
19193    # Output is in $new_path
19194
19195  windows_path="$new_path"
19196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19197    unix_path=`$CYGPATH -u "$windows_path"`
19198    new_path="$unix_path"
19199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19201    new_path="$unix_path"
19202  fi
19203
19204    # remove trailing .exe if any
19205    new_path="${new_path/%.exe/}"
19206
19207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19209  fi
19210
19211    else
19212      # We're on a unix platform. Hooray! :)
19213      # First separate the path from the arguments. This will split at the first
19214      # space.
19215      complete="$FOUND_MAKE"
19216      path="${complete%% *}"
19217      tmp="$complete EOL"
19218      arguments="${tmp#* }"
19219
19220      # Cannot rely on the command "which" here since it doesn't always work.
19221      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19222      if test -z "$is_absolute_path"; then
19223        # Path to executable is not absolute. Find it.
19224        IFS_save="$IFS"
19225        IFS=:
19226        for p in $PATH; do
19227          if test -f "$p/$path" && test -x "$p/$path"; then
19228            new_path="$p/$path"
19229            break
19230          fi
19231        done
19232        IFS="$IFS_save"
19233      else
19234        # This is an absolute path, we can use it without further modifications.
19235        new_path="$path"
19236      fi
19237
19238      if test "x$new_path" = x; then
19239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19240$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19241        has_space=`$ECHO "$complete" | $GREP " "`
19242        if test "x$has_space" != x; then
19243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19245        fi
19246        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19247      fi
19248    fi
19249
19250    # Now join together the path and the arguments once again
19251    if test "x$arguments" != xEOL; then
19252      new_complete="$new_path ${arguments% *}"
19253    else
19254      new_complete="$new_path"
19255    fi
19256
19257    if test "x$complete" != "x$new_complete"; then
19258      FOUND_MAKE="$new_complete"
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19260$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19261    fi
19262  fi
19263
19264        fi
19265      fi
19266    fi
19267  fi
19268
19269        if test "x$FOUND_MAKE" = x; then
19270          for ac_prog in make
19271do
19272  # Extract the first word of "$ac_prog", so it can be a program name with args.
19273set dummy $ac_prog; ac_word=$2
19274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19275$as_echo_n "checking for $ac_word... " >&6; }
19276if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19277  $as_echo_n "(cached) " >&6
19278else
19279  case $CHECK_TOOLSDIR_MAKE in
19280  [\\/]* | ?:[\\/]*)
19281  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19282  ;;
19283  *)
19284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19285for as_dir in $PATH
19286do
19287  IFS=$as_save_IFS
19288  test -z "$as_dir" && as_dir=.
19289    for ac_exec_ext in '' $ac_executable_extensions; do
19290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19291    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19293    break 2
19294  fi
19295done
19296  done
19297IFS=$as_save_IFS
19298
19299  ;;
19300esac
19301fi
19302CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19303if test -n "$CHECK_TOOLSDIR_MAKE"; then
19304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19305$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19306else
19307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19308$as_echo "no" >&6; }
19309fi
19310
19311
19312  test -n "$CHECK_TOOLSDIR_MAKE" && break
19313done
19314
19315
19316  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19317  DESCRIPTION="make in tools-dir"
19318
19319  # On Cygwin, we require a newer version of make than on other platforms
19320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321    MAKE_VERSION_EXPR="-e 4\."
19322    MAKE_REQUIRED_VERSION="4.0"
19323   else
19324    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19325    MAKE_REQUIRED_VERSION="3.81"
19326  fi
19327
19328  if test "x$MAKE_CANDIDATE" != x; then
19329    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19330$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19331    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19332    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19333    if test "x$IS_GNU_MAKE" = x; then
19334      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19335$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19336    else
19337      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19338      if test "x$IS_MODERN_MAKE" = x; then
19339        { $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
19340$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;}
19341      else
19342        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19343          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19344            MAKE_EXPECTED_ENV='cygwin'
19345          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346            MAKE_EXPECTED_ENV='msys'
19347          else
19348            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19349          fi
19350          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19351          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19352        else
19353          # Not relevant for non-Windows
19354          IS_MAKE_CORRECT_ENV=true
19355        fi
19356        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19357          { $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
19358$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;}
19359        else
19360          FOUND_MAKE=$MAKE_CANDIDATE
19361
19362  # Only process if variable expands to non-empty
19363
19364  if test "x$FOUND_MAKE" != x; then
19365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19366
19367  # First separate the path from the arguments. This will split at the first
19368  # space.
19369  complete="$FOUND_MAKE"
19370  path="${complete%% *}"
19371  tmp="$complete EOL"
19372  arguments="${tmp#* }"
19373
19374  # Input might be given as Windows format, start by converting to
19375  # unix format.
19376  new_path=`$CYGPATH -u "$path"`
19377
19378  # Now try to locate executable using which
19379  new_path=`$WHICH "$new_path" 2> /dev/null`
19380  # bat and cmd files are not always considered executable in cygwin causing which
19381  # to not find them
19382  if test "x$new_path" = x \
19383      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19384      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19385    new_path=`$CYGPATH -u "$path"`
19386  fi
19387  if test "x$new_path" = x; then
19388    # Oops. Which didn't find the executable.
19389    # The splitting of arguments from the executable at a space might have been incorrect,
19390    # since paths with space are more likely in Windows. Give it another try with the whole
19391    # argument.
19392    path="$complete"
19393    arguments="EOL"
19394    new_path=`$CYGPATH -u "$path"`
19395    new_path=`$WHICH "$new_path" 2> /dev/null`
19396    # bat and cmd files are not always considered executable in cygwin causing which
19397    # to not find them
19398    if test "x$new_path" = x \
19399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19401      new_path=`$CYGPATH -u "$path"`
19402    fi
19403    if test "x$new_path" = x; then
19404      # It's still not found. Now this is an unrecoverable error.
19405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19406$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19407      has_space=`$ECHO "$complete" | $GREP " "`
19408      if test "x$has_space" != x; then
19409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19411      fi
19412      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19413    fi
19414  fi
19415
19416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19419  # "foo.exe" is OK but "foo" is an error.
19420  #
19421  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19422  # It is also a way to make sure we got the proper file name for the real test later on.
19423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19424  if test "x$test_shortpath" = x; then
19425    # Short path failed, file does not exist as specified.
19426    # Try adding .exe or .cmd
19427    if test -f "${new_path}.exe"; then
19428      input_to_shortpath="${new_path}.exe"
19429    elif test -f "${new_path}.cmd"; then
19430      input_to_shortpath="${new_path}.cmd"
19431    else
19432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19436      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19437    fi
19438  else
19439    input_to_shortpath="$new_path"
19440  fi
19441
19442  # Call helper function which possibly converts this using DOS-style short mode.
19443  # If so, the updated path is stored in $new_path.
19444  new_path="$input_to_shortpath"
19445
19446  input_path="$input_to_shortpath"
19447  # Check if we need to convert this using DOS-style short mode. If the path
19448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19449  # take no chances and rewrite it.
19450  # Note: m4 eats our [], so we need to use [ and ] instead.
19451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19452  if test "x$has_forbidden_chars" != x; then
19453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19457      # Going to short mode and back again did indeed matter. Since short mode is
19458      # case insensitive, let's make it lowercase to improve readability.
19459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19460      # Now convert it back to Unix-style (cygpath)
19461      input_path=`$CYGPATH -u "$shortmode_path"`
19462      new_path="$input_path"
19463    fi
19464  fi
19465
19466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19467  if test "x$test_cygdrive_prefix" = x; then
19468    # As a simple fix, exclude /usr/bin since it's not a real path.
19469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19471      # a path prefixed by /cygdrive for fixpath to work.
19472      new_path="$CYGWIN_ROOT_PATH$input_path"
19473    fi
19474  fi
19475
19476  # remove trailing .exe if any
19477  new_path="${new_path/%.exe/}"
19478
19479    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19480
19481  # First separate the path from the arguments. This will split at the first
19482  # space.
19483  complete="$FOUND_MAKE"
19484  path="${complete%% *}"
19485  tmp="$complete EOL"
19486  arguments="${tmp#* }"
19487
19488  # Input might be given as Windows format, start by converting to
19489  # unix format.
19490  new_path="$path"
19491
19492  windows_path="$new_path"
19493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19494    unix_path=`$CYGPATH -u "$windows_path"`
19495    new_path="$unix_path"
19496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19498    new_path="$unix_path"
19499  fi
19500
19501
19502  # Now try to locate executable using which
19503  new_path=`$WHICH "$new_path" 2> /dev/null`
19504
19505  if test "x$new_path" = x; then
19506    # Oops. Which didn't find the executable.
19507    # The splitting of arguments from the executable at a space might have been incorrect,
19508    # since paths with space are more likely in Windows. Give it another try with the whole
19509    # argument.
19510    path="$complete"
19511    arguments="EOL"
19512    new_path="$path"
19513
19514  windows_path="$new_path"
19515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19516    unix_path=`$CYGPATH -u "$windows_path"`
19517    new_path="$unix_path"
19518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19520    new_path="$unix_path"
19521  fi
19522
19523
19524    new_path=`$WHICH "$new_path" 2> /dev/null`
19525    # bat and cmd files are not always considered executable in MSYS causing which
19526    # to not find them
19527    if test "x$new_path" = x \
19528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19530      new_path="$path"
19531
19532  windows_path="$new_path"
19533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19534    unix_path=`$CYGPATH -u "$windows_path"`
19535    new_path="$unix_path"
19536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19538    new_path="$unix_path"
19539  fi
19540
19541    fi
19542
19543    if test "x$new_path" = x; then
19544      # It's still not found. Now this is an unrecoverable error.
19545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19547      has_space=`$ECHO "$complete" | $GREP " "`
19548      if test "x$has_space" != x; then
19549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19551      fi
19552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19553    fi
19554  fi
19555
19556  # Now new_path has a complete unix path to the binary
19557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19558    # Keep paths in /bin as-is, but remove trailing .exe if any
19559    new_path="${new_path/%.exe/}"
19560    # Do not save /bin paths to all_fixpath_prefixes!
19561  else
19562    # Not in mixed or Windows style, start by that.
19563    new_path=`cmd //c echo $new_path`
19564
19565  input_path="$new_path"
19566  # Check if we need to convert this using DOS-style short mode. If the path
19567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19568  # take no chances and rewrite it.
19569  # Note: m4 eats our [], so we need to use [ and ] instead.
19570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19571  if test "x$has_forbidden_chars" != x; then
19572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19574  fi
19575
19576    # Output is in $new_path
19577
19578  windows_path="$new_path"
19579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580    unix_path=`$CYGPATH -u "$windows_path"`
19581    new_path="$unix_path"
19582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19584    new_path="$unix_path"
19585  fi
19586
19587    # remove trailing .exe if any
19588    new_path="${new_path/%.exe/}"
19589
19590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19592  fi
19593
19594    else
19595      # We're on a unix platform. Hooray! :)
19596      # First separate the path from the arguments. This will split at the first
19597      # space.
19598      complete="$FOUND_MAKE"
19599      path="${complete%% *}"
19600      tmp="$complete EOL"
19601      arguments="${tmp#* }"
19602
19603      # Cannot rely on the command "which" here since it doesn't always work.
19604      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19605      if test -z "$is_absolute_path"; then
19606        # Path to executable is not absolute. Find it.
19607        IFS_save="$IFS"
19608        IFS=:
19609        for p in $PATH; do
19610          if test -f "$p/$path" && test -x "$p/$path"; then
19611            new_path="$p/$path"
19612            break
19613          fi
19614        done
19615        IFS="$IFS_save"
19616      else
19617        # This is an absolute path, we can use it without further modifications.
19618        new_path="$path"
19619      fi
19620
19621      if test "x$new_path" = x; then
19622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19624        has_space=`$ECHO "$complete" | $GREP " "`
19625        if test "x$has_space" != x; then
19626          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19627$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19628        fi
19629        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19630      fi
19631    fi
19632
19633    # Now join together the path and the arguments once again
19634    if test "x$arguments" != xEOL; then
19635      new_complete="$new_path ${arguments% *}"
19636    else
19637      new_complete="$new_path"
19638    fi
19639
19640    if test "x$complete" != "x$new_complete"; then
19641      FOUND_MAKE="$new_complete"
19642      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19643$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19644    fi
19645  fi
19646
19647        fi
19648      fi
19649    fi
19650  fi
19651
19652        fi
19653        PATH=$OLD_PATH
19654      fi
19655    fi
19656
19657    if test "x$FOUND_MAKE" = x; then
19658      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
19659    fi
19660
19661    else
19662      # If it succeeded, then it was overridden by the user. We will use it
19663      # for the tool.
19664
19665      # First remove it from the list of overridden variables, so we can test
19666      # for unknown variables in the end.
19667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19668
19669      # Check if we try to supply an empty value
19670      if test "x$MAKE" = x; then
19671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19672$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19674$as_echo_n "checking for MAKE... " >&6; }
19675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19676$as_echo "disabled" >&6; }
19677      else
19678        # Check if the provided tool contains a complete path.
19679        tool_specified="$MAKE"
19680        tool_basename="${tool_specified##*/}"
19681        if test "x$tool_basename" = "x$tool_specified"; then
19682          # A command without a complete path is provided, search $PATH.
19683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19684$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19685          # Extract the first word of "$tool_basename", so it can be a program name with args.
19686set dummy $tool_basename; ac_word=$2
19687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19688$as_echo_n "checking for $ac_word... " >&6; }
19689if ${ac_cv_path_MAKE+:} false; then :
19690  $as_echo_n "(cached) " >&6
19691else
19692  case $MAKE in
19693  [\\/]* | ?:[\\/]*)
19694  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19695  ;;
19696  *)
19697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19698for as_dir in $PATH
19699do
19700  IFS=$as_save_IFS
19701  test -z "$as_dir" && as_dir=.
19702    for ac_exec_ext in '' $ac_executable_extensions; do
19703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19704    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19706    break 2
19707  fi
19708done
19709  done
19710IFS=$as_save_IFS
19711
19712  ;;
19713esac
19714fi
19715MAKE=$ac_cv_path_MAKE
19716if test -n "$MAKE"; then
19717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19718$as_echo "$MAKE" >&6; }
19719else
19720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19721$as_echo "no" >&6; }
19722fi
19723
19724
19725          if test "x$MAKE" = x; then
19726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19727          fi
19728        else
19729          # Otherwise we believe it is a complete path. Use it as it is.
19730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19731$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19733$as_echo_n "checking for MAKE... " >&6; }
19734          if test ! -x "$tool_specified"; then
19735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19736$as_echo "not found" >&6; }
19737            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19738          fi
19739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19740$as_echo "$tool_specified" >&6; }
19741        fi
19742      fi
19743    fi
19744
19745    # If MAKE was set by user, verify the version
19746
19747  MAKE_CANDIDATE=""$MAKE""
19748  DESCRIPTION="user supplied MAKE=$MAKE"
19749
19750  # On Cygwin, we require a newer version of make than on other platforms
19751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19752    MAKE_VERSION_EXPR="-e 4\."
19753    MAKE_REQUIRED_VERSION="4.0"
19754   else
19755    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19756    MAKE_REQUIRED_VERSION="3.81"
19757  fi
19758
19759  if test "x$MAKE_CANDIDATE" != x; then
19760    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19761$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19762    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19763    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19764    if test "x$IS_GNU_MAKE" = x; then
19765      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19766$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19767    else
19768      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19769      if test "x$IS_MODERN_MAKE" = x; then
19770        { $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
19771$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;}
19772      else
19773        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19774          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19775            MAKE_EXPECTED_ENV='cygwin'
19776          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19777            MAKE_EXPECTED_ENV='msys'
19778          else
19779            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19780          fi
19781          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19782          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19783        else
19784          # Not relevant for non-Windows
19785          IS_MAKE_CORRECT_ENV=true
19786        fi
19787        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19788          { $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
19789$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;}
19790        else
19791          FOUND_MAKE=$MAKE_CANDIDATE
19792
19793  # Only process if variable expands to non-empty
19794
19795  if test "x$FOUND_MAKE" != x; then
19796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19797
19798  # First separate the path from the arguments. This will split at the first
19799  # space.
19800  complete="$FOUND_MAKE"
19801  path="${complete%% *}"
19802  tmp="$complete EOL"
19803  arguments="${tmp#* }"
19804
19805  # Input might be given as Windows format, start by converting to
19806  # unix format.
19807  new_path=`$CYGPATH -u "$path"`
19808
19809  # Now try to locate executable using which
19810  new_path=`$WHICH "$new_path" 2> /dev/null`
19811  # bat and cmd files are not always considered executable in cygwin causing which
19812  # to not find them
19813  if test "x$new_path" = x \
19814      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19815      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19816    new_path=`$CYGPATH -u "$path"`
19817  fi
19818  if test "x$new_path" = x; then
19819    # Oops. Which didn't find the executable.
19820    # The splitting of arguments from the executable at a space might have been incorrect,
19821    # since paths with space are more likely in Windows. Give it another try with the whole
19822    # argument.
19823    path="$complete"
19824    arguments="EOL"
19825    new_path=`$CYGPATH -u "$path"`
19826    new_path=`$WHICH "$new_path" 2> /dev/null`
19827    # bat and cmd files are not always considered executable in cygwin causing which
19828    # to not find them
19829    if test "x$new_path" = x \
19830        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19831        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19832      new_path=`$CYGPATH -u "$path"`
19833    fi
19834    if test "x$new_path" = x; then
19835      # It's still not found. Now this is an unrecoverable error.
19836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19838      has_space=`$ECHO "$complete" | $GREP " "`
19839      if test "x$has_space" != x; then
19840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19842      fi
19843      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19844    fi
19845  fi
19846
19847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19850  # "foo.exe" is OK but "foo" is an error.
19851  #
19852  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19853  # It is also a way to make sure we got the proper file name for the real test later on.
19854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19855  if test "x$test_shortpath" = x; then
19856    # Short path failed, file does not exist as specified.
19857    # Try adding .exe or .cmd
19858    if test -f "${new_path}.exe"; then
19859      input_to_shortpath="${new_path}.exe"
19860    elif test -f "${new_path}.cmd"; then
19861      input_to_shortpath="${new_path}.cmd"
19862    else
19863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19867      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19868    fi
19869  else
19870    input_to_shortpath="$new_path"
19871  fi
19872
19873  # Call helper function which possibly converts this using DOS-style short mode.
19874  # If so, the updated path is stored in $new_path.
19875  new_path="$input_to_shortpath"
19876
19877  input_path="$input_to_shortpath"
19878  # Check if we need to convert this using DOS-style short mode. If the path
19879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19880  # take no chances and rewrite it.
19881  # Note: m4 eats our [], so we need to use [ and ] instead.
19882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19883  if test "x$has_forbidden_chars" != x; then
19884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19888      # Going to short mode and back again did indeed matter. Since short mode is
19889      # case insensitive, let's make it lowercase to improve readability.
19890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19891      # Now convert it back to Unix-style (cygpath)
19892      input_path=`$CYGPATH -u "$shortmode_path"`
19893      new_path="$input_path"
19894    fi
19895  fi
19896
19897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19898  if test "x$test_cygdrive_prefix" = x; then
19899    # As a simple fix, exclude /usr/bin since it's not a real path.
19900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19902      # a path prefixed by /cygdrive for fixpath to work.
19903      new_path="$CYGWIN_ROOT_PATH$input_path"
19904    fi
19905  fi
19906
19907  # remove trailing .exe if any
19908  new_path="${new_path/%.exe/}"
19909
19910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19911
19912  # First separate the path from the arguments. This will split at the first
19913  # space.
19914  complete="$FOUND_MAKE"
19915  path="${complete%% *}"
19916  tmp="$complete EOL"
19917  arguments="${tmp#* }"
19918
19919  # Input might be given as Windows format, start by converting to
19920  # unix format.
19921  new_path="$path"
19922
19923  windows_path="$new_path"
19924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19925    unix_path=`$CYGPATH -u "$windows_path"`
19926    new_path="$unix_path"
19927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19929    new_path="$unix_path"
19930  fi
19931
19932
19933  # Now try to locate executable using which
19934  new_path=`$WHICH "$new_path" 2> /dev/null`
19935
19936  if test "x$new_path" = x; then
19937    # Oops. Which didn't find the executable.
19938    # The splitting of arguments from the executable at a space might have been incorrect,
19939    # since paths with space are more likely in Windows. Give it another try with the whole
19940    # argument.
19941    path="$complete"
19942    arguments="EOL"
19943    new_path="$path"
19944
19945  windows_path="$new_path"
19946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19947    unix_path=`$CYGPATH -u "$windows_path"`
19948    new_path="$unix_path"
19949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19951    new_path="$unix_path"
19952  fi
19953
19954
19955    new_path=`$WHICH "$new_path" 2> /dev/null`
19956    # bat and cmd files are not always considered executable in MSYS causing which
19957    # to not find them
19958    if test "x$new_path" = x \
19959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19961      new_path="$path"
19962
19963  windows_path="$new_path"
19964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19965    unix_path=`$CYGPATH -u "$windows_path"`
19966    new_path="$unix_path"
19967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19969    new_path="$unix_path"
19970  fi
19971
19972    fi
19973
19974    if test "x$new_path" = x; then
19975      # It's still not found. Now this is an unrecoverable error.
19976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19978      has_space=`$ECHO "$complete" | $GREP " "`
19979      if test "x$has_space" != x; then
19980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19982      fi
19983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19984    fi
19985  fi
19986
19987  # Now new_path has a complete unix path to the binary
19988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19989    # Keep paths in /bin as-is, but remove trailing .exe if any
19990    new_path="${new_path/%.exe/}"
19991    # Do not save /bin paths to all_fixpath_prefixes!
19992  else
19993    # Not in mixed or Windows style, start by that.
19994    new_path=`cmd //c echo $new_path`
19995
19996  input_path="$new_path"
19997  # Check if we need to convert this using DOS-style short mode. If the path
19998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19999  # take no chances and rewrite it.
20000  # Note: m4 eats our [], so we need to use [ and ] instead.
20001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20002  if test "x$has_forbidden_chars" != x; then
20003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20005  fi
20006
20007    # Output is in $new_path
20008
20009  windows_path="$new_path"
20010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20011    unix_path=`$CYGPATH -u "$windows_path"`
20012    new_path="$unix_path"
20013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20015    new_path="$unix_path"
20016  fi
20017
20018    # remove trailing .exe if any
20019    new_path="${new_path/%.exe/}"
20020
20021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20023  fi
20024
20025    else
20026      # We're on a unix platform. Hooray! :)
20027      # First separate the path from the arguments. This will split at the first
20028      # space.
20029      complete="$FOUND_MAKE"
20030      path="${complete%% *}"
20031      tmp="$complete EOL"
20032      arguments="${tmp#* }"
20033
20034      # Cannot rely on the command "which" here since it doesn't always work.
20035      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20036      if test -z "$is_absolute_path"; then
20037        # Path to executable is not absolute. Find it.
20038        IFS_save="$IFS"
20039        IFS=:
20040        for p in $PATH; do
20041          if test -f "$p/$path" && test -x "$p/$path"; then
20042            new_path="$p/$path"
20043            break
20044          fi
20045        done
20046        IFS="$IFS_save"
20047      else
20048        # This is an absolute path, we can use it without further modifications.
20049        new_path="$path"
20050      fi
20051
20052      if test "x$new_path" = x; then
20053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20054$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20055        has_space=`$ECHO "$complete" | $GREP " "`
20056        if test "x$has_space" != x; then
20057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20059        fi
20060        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20061      fi
20062    fi
20063
20064    # Now join together the path and the arguments once again
20065    if test "x$arguments" != xEOL; then
20066      new_complete="$new_path ${arguments% *}"
20067    else
20068      new_complete="$new_path"
20069    fi
20070
20071    if test "x$complete" != "x$new_complete"; then
20072      FOUND_MAKE="$new_complete"
20073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20074$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20075    fi
20076  fi
20077
20078        fi
20079      fi
20080    fi
20081  fi
20082
20083    if test "x$FOUND_MAKE" = x; then
20084      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20085    fi
20086
20087  fi
20088
20089
20090  MAKE=$FOUND_MAKE
20091
20092  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20093$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20094
20095
20096  # Check if make supports the output sync option and if so, setup using it.
20097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20098$as_echo_n "checking if make --output-sync is supported... " >&6; }
20099  if $MAKE --version -O > /dev/null 2>&1; then
20100    OUTPUT_SYNC_SUPPORTED=true
20101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20102$as_echo "yes" >&6; }
20103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20104$as_echo_n "checking for output-sync value... " >&6; }
20105
20106# Check whether --with-output-sync was given.
20107if test "${with_output_sync+set}" = set; then :
20108  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20109fi
20110
20111    if test "x$OUTPUT_SYNC" = "x"; then
20112      OUTPUT_SYNC=none
20113    fi
20114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20115$as_echo "$OUTPUT_SYNC" >&6; }
20116    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20117      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20118    fi
20119  else
20120    OUTPUT_SYNC_SUPPORTED=false
20121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20122$as_echo "no" >&6; }
20123  fi
20124
20125
20126
20127
20128
20129
20130  # Test if find supports -delete
20131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20132$as_echo_n "checking if find supports -delete... " >&6; }
20133  FIND_DELETE="-delete"
20134
20135  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20136
20137  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20138
20139  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20140  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20141    # No, it does not.
20142    rm $DELETEDIR/TestIfFindSupportsDelete
20143    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20144      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20145      FIND_DELETE="-print | xargs rm"
20146    else
20147      FIND_DELETE="-exec rm \{\} \+"
20148    fi
20149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20150$as_echo "no" >&6; }
20151  else
20152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20153$as_echo "yes" >&6; }
20154  fi
20155  rmdir $DELETEDIR
20156
20157
20158
20159  # These tools might not be installed by default,
20160  # need hint on how to install them.
20161
20162
20163
20164  # Publish this variable in the help.
20165
20166
20167  if [ -z "${UNZIP+x}" ]; then
20168    # The variable is not set by user, try to locate tool using the code snippet
20169    for ac_prog in unzip
20170do
20171  # Extract the first word of "$ac_prog", so it can be a program name with args.
20172set dummy $ac_prog; ac_word=$2
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20174$as_echo_n "checking for $ac_word... " >&6; }
20175if ${ac_cv_path_UNZIP+:} false; then :
20176  $as_echo_n "(cached) " >&6
20177else
20178  case $UNZIP in
20179  [\\/]* | ?:[\\/]*)
20180  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20181  ;;
20182  *)
20183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20184for as_dir in $PATH
20185do
20186  IFS=$as_save_IFS
20187  test -z "$as_dir" && as_dir=.
20188    for ac_exec_ext in '' $ac_executable_extensions; do
20189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20190    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20192    break 2
20193  fi
20194done
20195  done
20196IFS=$as_save_IFS
20197
20198  ;;
20199esac
20200fi
20201UNZIP=$ac_cv_path_UNZIP
20202if test -n "$UNZIP"; then
20203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20204$as_echo "$UNZIP" >&6; }
20205else
20206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20207$as_echo "no" >&6; }
20208fi
20209
20210
20211  test -n "$UNZIP" && break
20212done
20213
20214  else
20215    # The variable is set, but is it from the command line or the environment?
20216
20217    # Try to remove the string !UNZIP! from our list.
20218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20220      # If it failed, the variable was not from the command line. Ignore it,
20221      # but warn the user (except for BASH, which is always set by the calling BASH).
20222      if test "xUNZIP" != xBASH; then
20223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20224$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20225      fi
20226      # Try to locate tool using the code snippet
20227      for ac_prog in unzip
20228do
20229  # Extract the first word of "$ac_prog", so it can be a program name with args.
20230set dummy $ac_prog; ac_word=$2
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20232$as_echo_n "checking for $ac_word... " >&6; }
20233if ${ac_cv_path_UNZIP+:} false; then :
20234  $as_echo_n "(cached) " >&6
20235else
20236  case $UNZIP in
20237  [\\/]* | ?:[\\/]*)
20238  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20239  ;;
20240  *)
20241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20242for as_dir in $PATH
20243do
20244  IFS=$as_save_IFS
20245  test -z "$as_dir" && as_dir=.
20246    for ac_exec_ext in '' $ac_executable_extensions; do
20247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20248    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20250    break 2
20251  fi
20252done
20253  done
20254IFS=$as_save_IFS
20255
20256  ;;
20257esac
20258fi
20259UNZIP=$ac_cv_path_UNZIP
20260if test -n "$UNZIP"; then
20261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20262$as_echo "$UNZIP" >&6; }
20263else
20264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20265$as_echo "no" >&6; }
20266fi
20267
20268
20269  test -n "$UNZIP" && break
20270done
20271
20272    else
20273      # If it succeeded, then it was overridden by the user. We will use it
20274      # for the tool.
20275
20276      # First remove it from the list of overridden variables, so we can test
20277      # for unknown variables in the end.
20278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20279
20280      # Check if we try to supply an empty value
20281      if test "x$UNZIP" = x; then
20282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20283$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20285$as_echo_n "checking for UNZIP... " >&6; }
20286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20287$as_echo "disabled" >&6; }
20288      else
20289        # Check if the provided tool contains a complete path.
20290        tool_specified="$UNZIP"
20291        tool_basename="${tool_specified##*/}"
20292        if test "x$tool_basename" = "x$tool_specified"; then
20293          # A command without a complete path is provided, search $PATH.
20294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20295$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20296          # Extract the first word of "$tool_basename", so it can be a program name with args.
20297set dummy $tool_basename; ac_word=$2
20298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20299$as_echo_n "checking for $ac_word... " >&6; }
20300if ${ac_cv_path_UNZIP+:} false; then :
20301  $as_echo_n "(cached) " >&6
20302else
20303  case $UNZIP in
20304  [\\/]* | ?:[\\/]*)
20305  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20306  ;;
20307  *)
20308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20309for as_dir in $PATH
20310do
20311  IFS=$as_save_IFS
20312  test -z "$as_dir" && as_dir=.
20313    for ac_exec_ext in '' $ac_executable_extensions; do
20314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20315    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20317    break 2
20318  fi
20319done
20320  done
20321IFS=$as_save_IFS
20322
20323  ;;
20324esac
20325fi
20326UNZIP=$ac_cv_path_UNZIP
20327if test -n "$UNZIP"; then
20328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20329$as_echo "$UNZIP" >&6; }
20330else
20331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20332$as_echo "no" >&6; }
20333fi
20334
20335
20336          if test "x$UNZIP" = x; then
20337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20338          fi
20339        else
20340          # Otherwise we believe it is a complete path. Use it as it is.
20341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20342$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20344$as_echo_n "checking for UNZIP... " >&6; }
20345          if test ! -x "$tool_specified"; then
20346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20347$as_echo "not found" >&6; }
20348            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20349          fi
20350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20351$as_echo "$tool_specified" >&6; }
20352        fi
20353      fi
20354    fi
20355
20356  fi
20357
20358
20359
20360  if test "x$UNZIP" = x; then
20361    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20362  fi
20363
20364
20365
20366
20367
20368  # Publish this variable in the help.
20369
20370
20371  if [ -z "${ZIP+x}" ]; then
20372    # The variable is not set by user, try to locate tool using the code snippet
20373    for ac_prog in zip
20374do
20375  # Extract the first word of "$ac_prog", so it can be a program name with args.
20376set dummy $ac_prog; ac_word=$2
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20378$as_echo_n "checking for $ac_word... " >&6; }
20379if ${ac_cv_path_ZIP+:} false; then :
20380  $as_echo_n "(cached) " >&6
20381else
20382  case $ZIP in
20383  [\\/]* | ?:[\\/]*)
20384  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20385  ;;
20386  *)
20387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20388for as_dir in $PATH
20389do
20390  IFS=$as_save_IFS
20391  test -z "$as_dir" && as_dir=.
20392    for ac_exec_ext in '' $ac_executable_extensions; do
20393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20394    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20396    break 2
20397  fi
20398done
20399  done
20400IFS=$as_save_IFS
20401
20402  ;;
20403esac
20404fi
20405ZIP=$ac_cv_path_ZIP
20406if test -n "$ZIP"; then
20407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20408$as_echo "$ZIP" >&6; }
20409else
20410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20411$as_echo "no" >&6; }
20412fi
20413
20414
20415  test -n "$ZIP" && break
20416done
20417
20418  else
20419    # The variable is set, but is it from the command line or the environment?
20420
20421    # Try to remove the string !ZIP! from our list.
20422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20424      # If it failed, the variable was not from the command line. Ignore it,
20425      # but warn the user (except for BASH, which is always set by the calling BASH).
20426      if test "xZIP" != xBASH; then
20427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20428$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20429      fi
20430      # Try to locate tool using the code snippet
20431      for ac_prog in zip
20432do
20433  # Extract the first word of "$ac_prog", so it can be a program name with args.
20434set dummy $ac_prog; ac_word=$2
20435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20436$as_echo_n "checking for $ac_word... " >&6; }
20437if ${ac_cv_path_ZIP+:} false; then :
20438  $as_echo_n "(cached) " >&6
20439else
20440  case $ZIP in
20441  [\\/]* | ?:[\\/]*)
20442  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20443  ;;
20444  *)
20445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20446for as_dir in $PATH
20447do
20448  IFS=$as_save_IFS
20449  test -z "$as_dir" && as_dir=.
20450    for ac_exec_ext in '' $ac_executable_extensions; do
20451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20452    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20454    break 2
20455  fi
20456done
20457  done
20458IFS=$as_save_IFS
20459
20460  ;;
20461esac
20462fi
20463ZIP=$ac_cv_path_ZIP
20464if test -n "$ZIP"; then
20465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20466$as_echo "$ZIP" >&6; }
20467else
20468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20469$as_echo "no" >&6; }
20470fi
20471
20472
20473  test -n "$ZIP" && break
20474done
20475
20476    else
20477      # If it succeeded, then it was overridden by the user. We will use it
20478      # for the tool.
20479
20480      # First remove it from the list of overridden variables, so we can test
20481      # for unknown variables in the end.
20482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20483
20484      # Check if we try to supply an empty value
20485      if test "x$ZIP" = x; then
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20487$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20489$as_echo_n "checking for ZIP... " >&6; }
20490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20491$as_echo "disabled" >&6; }
20492      else
20493        # Check if the provided tool contains a complete path.
20494        tool_specified="$ZIP"
20495        tool_basename="${tool_specified##*/}"
20496        if test "x$tool_basename" = "x$tool_specified"; then
20497          # A command without a complete path is provided, search $PATH.
20498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20499$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20500          # Extract the first word of "$tool_basename", so it can be a program name with args.
20501set dummy $tool_basename; ac_word=$2
20502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20503$as_echo_n "checking for $ac_word... " >&6; }
20504if ${ac_cv_path_ZIP+:} false; then :
20505  $as_echo_n "(cached) " >&6
20506else
20507  case $ZIP in
20508  [\\/]* | ?:[\\/]*)
20509  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20510  ;;
20511  *)
20512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20513for as_dir in $PATH
20514do
20515  IFS=$as_save_IFS
20516  test -z "$as_dir" && as_dir=.
20517    for ac_exec_ext in '' $ac_executable_extensions; do
20518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20519    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20521    break 2
20522  fi
20523done
20524  done
20525IFS=$as_save_IFS
20526
20527  ;;
20528esac
20529fi
20530ZIP=$ac_cv_path_ZIP
20531if test -n "$ZIP"; then
20532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20533$as_echo "$ZIP" >&6; }
20534else
20535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20536$as_echo "no" >&6; }
20537fi
20538
20539
20540          if test "x$ZIP" = x; then
20541            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20542          fi
20543        else
20544          # Otherwise we believe it is a complete path. Use it as it is.
20545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20546$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20547          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20548$as_echo_n "checking for ZIP... " >&6; }
20549          if test ! -x "$tool_specified"; then
20550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20551$as_echo "not found" >&6; }
20552            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20553          fi
20554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20555$as_echo "$tool_specified" >&6; }
20556        fi
20557      fi
20558    fi
20559
20560  fi
20561
20562
20563
20564  if test "x$ZIP" = x; then
20565    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20566  fi
20567
20568
20569
20570  # Non-required basic tools
20571
20572
20573
20574  # Publish this variable in the help.
20575
20576
20577  if [ -z "${LDD+x}" ]; then
20578    # The variable is not set by user, try to locate tool using the code snippet
20579    for ac_prog in ldd
20580do
20581  # Extract the first word of "$ac_prog", so it can be a program name with args.
20582set dummy $ac_prog; ac_word=$2
20583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20584$as_echo_n "checking for $ac_word... " >&6; }
20585if ${ac_cv_path_LDD+:} false; then :
20586  $as_echo_n "(cached) " >&6
20587else
20588  case $LDD in
20589  [\\/]* | ?:[\\/]*)
20590  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20591  ;;
20592  *)
20593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20594for as_dir in $PATH
20595do
20596  IFS=$as_save_IFS
20597  test -z "$as_dir" && as_dir=.
20598    for ac_exec_ext in '' $ac_executable_extensions; do
20599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20600    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20602    break 2
20603  fi
20604done
20605  done
20606IFS=$as_save_IFS
20607
20608  ;;
20609esac
20610fi
20611LDD=$ac_cv_path_LDD
20612if test -n "$LDD"; then
20613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20614$as_echo "$LDD" >&6; }
20615else
20616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20617$as_echo "no" >&6; }
20618fi
20619
20620
20621  test -n "$LDD" && break
20622done
20623
20624  else
20625    # The variable is set, but is it from the command line or the environment?
20626
20627    # Try to remove the string !LDD! from our list.
20628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20630      # If it failed, the variable was not from the command line. Ignore it,
20631      # but warn the user (except for BASH, which is always set by the calling BASH).
20632      if test "xLDD" != xBASH; then
20633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20634$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20635      fi
20636      # Try to locate tool using the code snippet
20637      for ac_prog in ldd
20638do
20639  # Extract the first word of "$ac_prog", so it can be a program name with args.
20640set dummy $ac_prog; ac_word=$2
20641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20642$as_echo_n "checking for $ac_word... " >&6; }
20643if ${ac_cv_path_LDD+:} false; then :
20644  $as_echo_n "(cached) " >&6
20645else
20646  case $LDD in
20647  [\\/]* | ?:[\\/]*)
20648  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20649  ;;
20650  *)
20651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20652for as_dir in $PATH
20653do
20654  IFS=$as_save_IFS
20655  test -z "$as_dir" && as_dir=.
20656    for ac_exec_ext in '' $ac_executable_extensions; do
20657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20658    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20660    break 2
20661  fi
20662done
20663  done
20664IFS=$as_save_IFS
20665
20666  ;;
20667esac
20668fi
20669LDD=$ac_cv_path_LDD
20670if test -n "$LDD"; then
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20672$as_echo "$LDD" >&6; }
20673else
20674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20675$as_echo "no" >&6; }
20676fi
20677
20678
20679  test -n "$LDD" && break
20680done
20681
20682    else
20683      # If it succeeded, then it was overridden by the user. We will use it
20684      # for the tool.
20685
20686      # First remove it from the list of overridden variables, so we can test
20687      # for unknown variables in the end.
20688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20689
20690      # Check if we try to supply an empty value
20691      if test "x$LDD" = x; then
20692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20693$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20695$as_echo_n "checking for LDD... " >&6; }
20696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20697$as_echo "disabled" >&6; }
20698      else
20699        # Check if the provided tool contains a complete path.
20700        tool_specified="$LDD"
20701        tool_basename="${tool_specified##*/}"
20702        if test "x$tool_basename" = "x$tool_specified"; then
20703          # A command without a complete path is provided, search $PATH.
20704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20705$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20706          # Extract the first word of "$tool_basename", so it can be a program name with args.
20707set dummy $tool_basename; ac_word=$2
20708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20709$as_echo_n "checking for $ac_word... " >&6; }
20710if ${ac_cv_path_LDD+:} false; then :
20711  $as_echo_n "(cached) " >&6
20712else
20713  case $LDD in
20714  [\\/]* | ?:[\\/]*)
20715  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20716  ;;
20717  *)
20718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20719for as_dir in $PATH
20720do
20721  IFS=$as_save_IFS
20722  test -z "$as_dir" && as_dir=.
20723    for ac_exec_ext in '' $ac_executable_extensions; do
20724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20725    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20727    break 2
20728  fi
20729done
20730  done
20731IFS=$as_save_IFS
20732
20733  ;;
20734esac
20735fi
20736LDD=$ac_cv_path_LDD
20737if test -n "$LDD"; then
20738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20739$as_echo "$LDD" >&6; }
20740else
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20742$as_echo "no" >&6; }
20743fi
20744
20745
20746          if test "x$LDD" = x; then
20747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20748          fi
20749        else
20750          # Otherwise we believe it is a complete path. Use it as it is.
20751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20752$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20754$as_echo_n "checking for LDD... " >&6; }
20755          if test ! -x "$tool_specified"; then
20756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20757$as_echo "not found" >&6; }
20758            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20759          fi
20760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20761$as_echo "$tool_specified" >&6; }
20762        fi
20763      fi
20764    fi
20765
20766  fi
20767
20768
20769  if test "x$LDD" = "x"; then
20770    # List shared lib dependencies is used for
20771    # debug output and checking for forbidden dependencies.
20772    # We can build without it.
20773    LDD="true"
20774  fi
20775
20776
20777  # Publish this variable in the help.
20778
20779
20780  if [ -z "${OTOOL+x}" ]; then
20781    # The variable is not set by user, try to locate tool using the code snippet
20782    for ac_prog in otool
20783do
20784  # Extract the first word of "$ac_prog", so it can be a program name with args.
20785set dummy $ac_prog; ac_word=$2
20786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20787$as_echo_n "checking for $ac_word... " >&6; }
20788if ${ac_cv_path_OTOOL+:} false; then :
20789  $as_echo_n "(cached) " >&6
20790else
20791  case $OTOOL in
20792  [\\/]* | ?:[\\/]*)
20793  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20794  ;;
20795  *)
20796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20797for as_dir in $PATH
20798do
20799  IFS=$as_save_IFS
20800  test -z "$as_dir" && as_dir=.
20801    for ac_exec_ext in '' $ac_executable_extensions; do
20802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20803    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20805    break 2
20806  fi
20807done
20808  done
20809IFS=$as_save_IFS
20810
20811  ;;
20812esac
20813fi
20814OTOOL=$ac_cv_path_OTOOL
20815if test -n "$OTOOL"; then
20816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20817$as_echo "$OTOOL" >&6; }
20818else
20819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20820$as_echo "no" >&6; }
20821fi
20822
20823
20824  test -n "$OTOOL" && break
20825done
20826
20827  else
20828    # The variable is set, but is it from the command line or the environment?
20829
20830    # Try to remove the string !OTOOL! from our list.
20831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20833      # If it failed, the variable was not from the command line. Ignore it,
20834      # but warn the user (except for BASH, which is always set by the calling BASH).
20835      if test "xOTOOL" != xBASH; then
20836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20837$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20838      fi
20839      # Try to locate tool using the code snippet
20840      for ac_prog in otool
20841do
20842  # Extract the first word of "$ac_prog", so it can be a program name with args.
20843set dummy $ac_prog; ac_word=$2
20844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20845$as_echo_n "checking for $ac_word... " >&6; }
20846if ${ac_cv_path_OTOOL+:} false; then :
20847  $as_echo_n "(cached) " >&6
20848else
20849  case $OTOOL in
20850  [\\/]* | ?:[\\/]*)
20851  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20852  ;;
20853  *)
20854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20855for as_dir in $PATH
20856do
20857  IFS=$as_save_IFS
20858  test -z "$as_dir" && as_dir=.
20859    for ac_exec_ext in '' $ac_executable_extensions; do
20860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20861    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20863    break 2
20864  fi
20865done
20866  done
20867IFS=$as_save_IFS
20868
20869  ;;
20870esac
20871fi
20872OTOOL=$ac_cv_path_OTOOL
20873if test -n "$OTOOL"; then
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20875$as_echo "$OTOOL" >&6; }
20876else
20877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20878$as_echo "no" >&6; }
20879fi
20880
20881
20882  test -n "$OTOOL" && break
20883done
20884
20885    else
20886      # If it succeeded, then it was overridden by the user. We will use it
20887      # for the tool.
20888
20889      # First remove it from the list of overridden variables, so we can test
20890      # for unknown variables in the end.
20891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20892
20893      # Check if we try to supply an empty value
20894      if test "x$OTOOL" = x; then
20895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20896$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20898$as_echo_n "checking for OTOOL... " >&6; }
20899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20900$as_echo "disabled" >&6; }
20901      else
20902        # Check if the provided tool contains a complete path.
20903        tool_specified="$OTOOL"
20904        tool_basename="${tool_specified##*/}"
20905        if test "x$tool_basename" = "x$tool_specified"; then
20906          # A command without a complete path is provided, search $PATH.
20907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20908$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20909          # Extract the first word of "$tool_basename", so it can be a program name with args.
20910set dummy $tool_basename; ac_word=$2
20911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20912$as_echo_n "checking for $ac_word... " >&6; }
20913if ${ac_cv_path_OTOOL+:} false; then :
20914  $as_echo_n "(cached) " >&6
20915else
20916  case $OTOOL in
20917  [\\/]* | ?:[\\/]*)
20918  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20919  ;;
20920  *)
20921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20922for as_dir in $PATH
20923do
20924  IFS=$as_save_IFS
20925  test -z "$as_dir" && as_dir=.
20926    for ac_exec_ext in '' $ac_executable_extensions; do
20927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20928    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20930    break 2
20931  fi
20932done
20933  done
20934IFS=$as_save_IFS
20935
20936  ;;
20937esac
20938fi
20939OTOOL=$ac_cv_path_OTOOL
20940if test -n "$OTOOL"; then
20941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20942$as_echo "$OTOOL" >&6; }
20943else
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20945$as_echo "no" >&6; }
20946fi
20947
20948
20949          if test "x$OTOOL" = x; then
20950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20951          fi
20952        else
20953          # Otherwise we believe it is a complete path. Use it as it is.
20954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20955$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20957$as_echo_n "checking for OTOOL... " >&6; }
20958          if test ! -x "$tool_specified"; then
20959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20960$as_echo "not found" >&6; }
20961            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20962          fi
20963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20964$as_echo "$tool_specified" >&6; }
20965        fi
20966      fi
20967    fi
20968
20969  fi
20970
20971
20972  if test "x$OTOOL" = "x"; then
20973    OTOOL="true"
20974  fi
20975
20976
20977  # Publish this variable in the help.
20978
20979
20980  if [ -z "${READELF+x}" ]; then
20981    # The variable is not set by user, try to locate tool using the code snippet
20982    for ac_prog in greadelf readelf
20983do
20984  # Extract the first word of "$ac_prog", so it can be a program name with args.
20985set dummy $ac_prog; ac_word=$2
20986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20987$as_echo_n "checking for $ac_word... " >&6; }
20988if ${ac_cv_path_READELF+:} false; then :
20989  $as_echo_n "(cached) " >&6
20990else
20991  case $READELF in
20992  [\\/]* | ?:[\\/]*)
20993  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20994  ;;
20995  *)
20996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20997for as_dir in $PATH
20998do
20999  IFS=$as_save_IFS
21000  test -z "$as_dir" && as_dir=.
21001    for ac_exec_ext in '' $ac_executable_extensions; do
21002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21003    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21005    break 2
21006  fi
21007done
21008  done
21009IFS=$as_save_IFS
21010
21011  ;;
21012esac
21013fi
21014READELF=$ac_cv_path_READELF
21015if test -n "$READELF"; then
21016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21017$as_echo "$READELF" >&6; }
21018else
21019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21020$as_echo "no" >&6; }
21021fi
21022
21023
21024  test -n "$READELF" && break
21025done
21026
21027  else
21028    # The variable is set, but is it from the command line or the environment?
21029
21030    # Try to remove the string !READELF! from our list.
21031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21033      # If it failed, the variable was not from the command line. Ignore it,
21034      # but warn the user (except for BASH, which is always set by the calling BASH).
21035      if test "xREADELF" != xBASH; then
21036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21037$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21038      fi
21039      # Try to locate tool using the code snippet
21040      for ac_prog in greadelf readelf
21041do
21042  # Extract the first word of "$ac_prog", so it can be a program name with args.
21043set dummy $ac_prog; ac_word=$2
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21045$as_echo_n "checking for $ac_word... " >&6; }
21046if ${ac_cv_path_READELF+:} false; then :
21047  $as_echo_n "(cached) " >&6
21048else
21049  case $READELF in
21050  [\\/]* | ?:[\\/]*)
21051  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21052  ;;
21053  *)
21054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21055for as_dir in $PATH
21056do
21057  IFS=$as_save_IFS
21058  test -z "$as_dir" && as_dir=.
21059    for ac_exec_ext in '' $ac_executable_extensions; do
21060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21061    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21063    break 2
21064  fi
21065done
21066  done
21067IFS=$as_save_IFS
21068
21069  ;;
21070esac
21071fi
21072READELF=$ac_cv_path_READELF
21073if test -n "$READELF"; then
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21075$as_echo "$READELF" >&6; }
21076else
21077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21078$as_echo "no" >&6; }
21079fi
21080
21081
21082  test -n "$READELF" && break
21083done
21084
21085    else
21086      # If it succeeded, then it was overridden by the user. We will use it
21087      # for the tool.
21088
21089      # First remove it from the list of overridden variables, so we can test
21090      # for unknown variables in the end.
21091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21092
21093      # Check if we try to supply an empty value
21094      if test "x$READELF" = x; then
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21096$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21098$as_echo_n "checking for READELF... " >&6; }
21099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21100$as_echo "disabled" >&6; }
21101      else
21102        # Check if the provided tool contains a complete path.
21103        tool_specified="$READELF"
21104        tool_basename="${tool_specified##*/}"
21105        if test "x$tool_basename" = "x$tool_specified"; then
21106          # A command without a complete path is provided, search $PATH.
21107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21108$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21109          # Extract the first word of "$tool_basename", so it can be a program name with args.
21110set dummy $tool_basename; ac_word=$2
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112$as_echo_n "checking for $ac_word... " >&6; }
21113if ${ac_cv_path_READELF+:} false; then :
21114  $as_echo_n "(cached) " >&6
21115else
21116  case $READELF in
21117  [\\/]* | ?:[\\/]*)
21118  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21119  ;;
21120  *)
21121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21122for as_dir in $PATH
21123do
21124  IFS=$as_save_IFS
21125  test -z "$as_dir" && as_dir=.
21126    for ac_exec_ext in '' $ac_executable_extensions; do
21127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21128    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21130    break 2
21131  fi
21132done
21133  done
21134IFS=$as_save_IFS
21135
21136  ;;
21137esac
21138fi
21139READELF=$ac_cv_path_READELF
21140if test -n "$READELF"; then
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21142$as_echo "$READELF" >&6; }
21143else
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21145$as_echo "no" >&6; }
21146fi
21147
21148
21149          if test "x$READELF" = x; then
21150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21151          fi
21152        else
21153          # Otherwise we believe it is a complete path. Use it as it is.
21154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21155$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21157$as_echo_n "checking for READELF... " >&6; }
21158          if test ! -x "$tool_specified"; then
21159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21160$as_echo "not found" >&6; }
21161            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21162          fi
21163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21164$as_echo "$tool_specified" >&6; }
21165        fi
21166      fi
21167    fi
21168
21169  fi
21170
21171
21172
21173
21174  # Publish this variable in the help.
21175
21176
21177  if [ -z "${HG+x}" ]; then
21178    # The variable is not set by user, try to locate tool using the code snippet
21179    for ac_prog in hg
21180do
21181  # Extract the first word of "$ac_prog", so it can be a program name with args.
21182set dummy $ac_prog; ac_word=$2
21183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21184$as_echo_n "checking for $ac_word... " >&6; }
21185if ${ac_cv_path_HG+:} false; then :
21186  $as_echo_n "(cached) " >&6
21187else
21188  case $HG in
21189  [\\/]* | ?:[\\/]*)
21190  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21191  ;;
21192  *)
21193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21194for as_dir in $PATH
21195do
21196  IFS=$as_save_IFS
21197  test -z "$as_dir" && as_dir=.
21198    for ac_exec_ext in '' $ac_executable_extensions; do
21199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21200    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21202    break 2
21203  fi
21204done
21205  done
21206IFS=$as_save_IFS
21207
21208  ;;
21209esac
21210fi
21211HG=$ac_cv_path_HG
21212if test -n "$HG"; then
21213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21214$as_echo "$HG" >&6; }
21215else
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21217$as_echo "no" >&6; }
21218fi
21219
21220
21221  test -n "$HG" && break
21222done
21223
21224  else
21225    # The variable is set, but is it from the command line or the environment?
21226
21227    # Try to remove the string !HG! from our list.
21228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21230      # If it failed, the variable was not from the command line. Ignore it,
21231      # but warn the user (except for BASH, which is always set by the calling BASH).
21232      if test "xHG" != xBASH; then
21233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21234$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21235      fi
21236      # Try to locate tool using the code snippet
21237      for ac_prog in hg
21238do
21239  # Extract the first word of "$ac_prog", so it can be a program name with args.
21240set dummy $ac_prog; ac_word=$2
21241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21242$as_echo_n "checking for $ac_word... " >&6; }
21243if ${ac_cv_path_HG+:} false; then :
21244  $as_echo_n "(cached) " >&6
21245else
21246  case $HG in
21247  [\\/]* | ?:[\\/]*)
21248  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21249  ;;
21250  *)
21251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21252for as_dir in $PATH
21253do
21254  IFS=$as_save_IFS
21255  test -z "$as_dir" && as_dir=.
21256    for ac_exec_ext in '' $ac_executable_extensions; do
21257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21258    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21260    break 2
21261  fi
21262done
21263  done
21264IFS=$as_save_IFS
21265
21266  ;;
21267esac
21268fi
21269HG=$ac_cv_path_HG
21270if test -n "$HG"; then
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21272$as_echo "$HG" >&6; }
21273else
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21275$as_echo "no" >&6; }
21276fi
21277
21278
21279  test -n "$HG" && break
21280done
21281
21282    else
21283      # If it succeeded, then it was overridden by the user. We will use it
21284      # for the tool.
21285
21286      # First remove it from the list of overridden variables, so we can test
21287      # for unknown variables in the end.
21288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21289
21290      # Check if we try to supply an empty value
21291      if test "x$HG" = x; then
21292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21293$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21295$as_echo_n "checking for HG... " >&6; }
21296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21297$as_echo "disabled" >&6; }
21298      else
21299        # Check if the provided tool contains a complete path.
21300        tool_specified="$HG"
21301        tool_basename="${tool_specified##*/}"
21302        if test "x$tool_basename" = "x$tool_specified"; then
21303          # A command without a complete path is provided, search $PATH.
21304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21305$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21306          # Extract the first word of "$tool_basename", so it can be a program name with args.
21307set dummy $tool_basename; ac_word=$2
21308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21309$as_echo_n "checking for $ac_word... " >&6; }
21310if ${ac_cv_path_HG+:} false; then :
21311  $as_echo_n "(cached) " >&6
21312else
21313  case $HG in
21314  [\\/]* | ?:[\\/]*)
21315  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21316  ;;
21317  *)
21318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21319for as_dir in $PATH
21320do
21321  IFS=$as_save_IFS
21322  test -z "$as_dir" && as_dir=.
21323    for ac_exec_ext in '' $ac_executable_extensions; do
21324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21325    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21327    break 2
21328  fi
21329done
21330  done
21331IFS=$as_save_IFS
21332
21333  ;;
21334esac
21335fi
21336HG=$ac_cv_path_HG
21337if test -n "$HG"; then
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21339$as_echo "$HG" >&6; }
21340else
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343fi
21344
21345
21346          if test "x$HG" = x; then
21347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21348          fi
21349        else
21350          # Otherwise we believe it is a complete path. Use it as it is.
21351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21352$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21354$as_echo_n "checking for HG... " >&6; }
21355          if test ! -x "$tool_specified"; then
21356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21357$as_echo "not found" >&6; }
21358            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21359          fi
21360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21361$as_echo "$tool_specified" >&6; }
21362        fi
21363      fi
21364    fi
21365
21366  fi
21367
21368
21369
21370
21371  # Publish this variable in the help.
21372
21373
21374  if [ -z "${STAT+x}" ]; then
21375    # The variable is not set by user, try to locate tool using the code snippet
21376    for ac_prog in stat
21377do
21378  # Extract the first word of "$ac_prog", so it can be a program name with args.
21379set dummy $ac_prog; ac_word=$2
21380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21381$as_echo_n "checking for $ac_word... " >&6; }
21382if ${ac_cv_path_STAT+:} false; then :
21383  $as_echo_n "(cached) " >&6
21384else
21385  case $STAT in
21386  [\\/]* | ?:[\\/]*)
21387  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21388  ;;
21389  *)
21390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21391for as_dir in $PATH
21392do
21393  IFS=$as_save_IFS
21394  test -z "$as_dir" && as_dir=.
21395    for ac_exec_ext in '' $ac_executable_extensions; do
21396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21397    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21399    break 2
21400  fi
21401done
21402  done
21403IFS=$as_save_IFS
21404
21405  ;;
21406esac
21407fi
21408STAT=$ac_cv_path_STAT
21409if test -n "$STAT"; then
21410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21411$as_echo "$STAT" >&6; }
21412else
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21414$as_echo "no" >&6; }
21415fi
21416
21417
21418  test -n "$STAT" && break
21419done
21420
21421  else
21422    # The variable is set, but is it from the command line or the environment?
21423
21424    # Try to remove the string !STAT! from our list.
21425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21427      # If it failed, the variable was not from the command line. Ignore it,
21428      # but warn the user (except for BASH, which is always set by the calling BASH).
21429      if test "xSTAT" != xBASH; then
21430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21431$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21432      fi
21433      # Try to locate tool using the code snippet
21434      for ac_prog in stat
21435do
21436  # Extract the first word of "$ac_prog", so it can be a program name with args.
21437set dummy $ac_prog; ac_word=$2
21438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21439$as_echo_n "checking for $ac_word... " >&6; }
21440if ${ac_cv_path_STAT+:} false; then :
21441  $as_echo_n "(cached) " >&6
21442else
21443  case $STAT in
21444  [\\/]* | ?:[\\/]*)
21445  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21446  ;;
21447  *)
21448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21449for as_dir in $PATH
21450do
21451  IFS=$as_save_IFS
21452  test -z "$as_dir" && as_dir=.
21453    for ac_exec_ext in '' $ac_executable_extensions; do
21454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21455    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21457    break 2
21458  fi
21459done
21460  done
21461IFS=$as_save_IFS
21462
21463  ;;
21464esac
21465fi
21466STAT=$ac_cv_path_STAT
21467if test -n "$STAT"; then
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21469$as_echo "$STAT" >&6; }
21470else
21471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21472$as_echo "no" >&6; }
21473fi
21474
21475
21476  test -n "$STAT" && break
21477done
21478
21479    else
21480      # If it succeeded, then it was overridden by the user. We will use it
21481      # for the tool.
21482
21483      # First remove it from the list of overridden variables, so we can test
21484      # for unknown variables in the end.
21485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21486
21487      # Check if we try to supply an empty value
21488      if test "x$STAT" = x; then
21489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21490$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21492$as_echo_n "checking for STAT... " >&6; }
21493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21494$as_echo "disabled" >&6; }
21495      else
21496        # Check if the provided tool contains a complete path.
21497        tool_specified="$STAT"
21498        tool_basename="${tool_specified##*/}"
21499        if test "x$tool_basename" = "x$tool_specified"; then
21500          # A command without a complete path is provided, search $PATH.
21501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21502$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21503          # Extract the first word of "$tool_basename", so it can be a program name with args.
21504set dummy $tool_basename; ac_word=$2
21505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21506$as_echo_n "checking for $ac_word... " >&6; }
21507if ${ac_cv_path_STAT+:} false; then :
21508  $as_echo_n "(cached) " >&6
21509else
21510  case $STAT in
21511  [\\/]* | ?:[\\/]*)
21512  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21513  ;;
21514  *)
21515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21516for as_dir in $PATH
21517do
21518  IFS=$as_save_IFS
21519  test -z "$as_dir" && as_dir=.
21520    for ac_exec_ext in '' $ac_executable_extensions; do
21521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21522    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21524    break 2
21525  fi
21526done
21527  done
21528IFS=$as_save_IFS
21529
21530  ;;
21531esac
21532fi
21533STAT=$ac_cv_path_STAT
21534if test -n "$STAT"; then
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21536$as_echo "$STAT" >&6; }
21537else
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539$as_echo "no" >&6; }
21540fi
21541
21542
21543          if test "x$STAT" = x; then
21544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21545          fi
21546        else
21547          # Otherwise we believe it is a complete path. Use it as it is.
21548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21549$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21551$as_echo_n "checking for STAT... " >&6; }
21552          if test ! -x "$tool_specified"; then
21553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21554$as_echo "not found" >&6; }
21555            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21556          fi
21557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21558$as_echo "$tool_specified" >&6; }
21559        fi
21560      fi
21561    fi
21562
21563  fi
21564
21565
21566
21567
21568  # Publish this variable in the help.
21569
21570
21571  if [ -z "${TIME+x}" ]; then
21572    # The variable is not set by user, try to locate tool using the code snippet
21573    for ac_prog in time
21574do
21575  # Extract the first word of "$ac_prog", so it can be a program name with args.
21576set dummy $ac_prog; ac_word=$2
21577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21578$as_echo_n "checking for $ac_word... " >&6; }
21579if ${ac_cv_path_TIME+:} false; then :
21580  $as_echo_n "(cached) " >&6
21581else
21582  case $TIME in
21583  [\\/]* | ?:[\\/]*)
21584  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21585  ;;
21586  *)
21587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21588for as_dir in $PATH
21589do
21590  IFS=$as_save_IFS
21591  test -z "$as_dir" && as_dir=.
21592    for ac_exec_ext in '' $ac_executable_extensions; do
21593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21594    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21596    break 2
21597  fi
21598done
21599  done
21600IFS=$as_save_IFS
21601
21602  ;;
21603esac
21604fi
21605TIME=$ac_cv_path_TIME
21606if test -n "$TIME"; then
21607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21608$as_echo "$TIME" >&6; }
21609else
21610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21611$as_echo "no" >&6; }
21612fi
21613
21614
21615  test -n "$TIME" && break
21616done
21617
21618  else
21619    # The variable is set, but is it from the command line or the environment?
21620
21621    # Try to remove the string !TIME! from our list.
21622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21624      # If it failed, the variable was not from the command line. Ignore it,
21625      # but warn the user (except for BASH, which is always set by the calling BASH).
21626      if test "xTIME" != xBASH; then
21627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21628$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21629      fi
21630      # Try to locate tool using the code snippet
21631      for ac_prog in time
21632do
21633  # Extract the first word of "$ac_prog", so it can be a program name with args.
21634set dummy $ac_prog; ac_word=$2
21635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21636$as_echo_n "checking for $ac_word... " >&6; }
21637if ${ac_cv_path_TIME+:} false; then :
21638  $as_echo_n "(cached) " >&6
21639else
21640  case $TIME in
21641  [\\/]* | ?:[\\/]*)
21642  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21643  ;;
21644  *)
21645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21646for as_dir in $PATH
21647do
21648  IFS=$as_save_IFS
21649  test -z "$as_dir" && as_dir=.
21650    for ac_exec_ext in '' $ac_executable_extensions; do
21651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21652    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21654    break 2
21655  fi
21656done
21657  done
21658IFS=$as_save_IFS
21659
21660  ;;
21661esac
21662fi
21663TIME=$ac_cv_path_TIME
21664if test -n "$TIME"; then
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21666$as_echo "$TIME" >&6; }
21667else
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21669$as_echo "no" >&6; }
21670fi
21671
21672
21673  test -n "$TIME" && break
21674done
21675
21676    else
21677      # If it succeeded, then it was overridden by the user. We will use it
21678      # for the tool.
21679
21680      # First remove it from the list of overridden variables, so we can test
21681      # for unknown variables in the end.
21682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21683
21684      # Check if we try to supply an empty value
21685      if test "x$TIME" = x; then
21686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21687$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21689$as_echo_n "checking for TIME... " >&6; }
21690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21691$as_echo "disabled" >&6; }
21692      else
21693        # Check if the provided tool contains a complete path.
21694        tool_specified="$TIME"
21695        tool_basename="${tool_specified##*/}"
21696        if test "x$tool_basename" = "x$tool_specified"; then
21697          # A command without a complete path is provided, search $PATH.
21698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21699$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21700          # Extract the first word of "$tool_basename", so it can be a program name with args.
21701set dummy $tool_basename; ac_word=$2
21702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21703$as_echo_n "checking for $ac_word... " >&6; }
21704if ${ac_cv_path_TIME+:} false; then :
21705  $as_echo_n "(cached) " >&6
21706else
21707  case $TIME in
21708  [\\/]* | ?:[\\/]*)
21709  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21710  ;;
21711  *)
21712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21713for as_dir in $PATH
21714do
21715  IFS=$as_save_IFS
21716  test -z "$as_dir" && as_dir=.
21717    for ac_exec_ext in '' $ac_executable_extensions; do
21718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21719    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21721    break 2
21722  fi
21723done
21724  done
21725IFS=$as_save_IFS
21726
21727  ;;
21728esac
21729fi
21730TIME=$ac_cv_path_TIME
21731if test -n "$TIME"; then
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21733$as_echo "$TIME" >&6; }
21734else
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21736$as_echo "no" >&6; }
21737fi
21738
21739
21740          if test "x$TIME" = x; then
21741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21742          fi
21743        else
21744          # Otherwise we believe it is a complete path. Use it as it is.
21745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21746$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21748$as_echo_n "checking for TIME... " >&6; }
21749          if test ! -x "$tool_specified"; then
21750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21751$as_echo "not found" >&6; }
21752            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21753          fi
21754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21755$as_echo "$tool_specified" >&6; }
21756        fi
21757      fi
21758    fi
21759
21760  fi
21761
21762
21763
21764
21765  # Publish this variable in the help.
21766
21767
21768  if [ -z "${PATCH+x}" ]; then
21769    # The variable is not set by user, try to locate tool using the code snippet
21770    for ac_prog in gpatch patch
21771do
21772  # Extract the first word of "$ac_prog", so it can be a program name with args.
21773set dummy $ac_prog; ac_word=$2
21774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21775$as_echo_n "checking for $ac_word... " >&6; }
21776if ${ac_cv_path_PATCH+:} false; then :
21777  $as_echo_n "(cached) " >&6
21778else
21779  case $PATCH in
21780  [\\/]* | ?:[\\/]*)
21781  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21782  ;;
21783  *)
21784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21785for as_dir in $PATH
21786do
21787  IFS=$as_save_IFS
21788  test -z "$as_dir" && as_dir=.
21789    for ac_exec_ext in '' $ac_executable_extensions; do
21790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21791    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21793    break 2
21794  fi
21795done
21796  done
21797IFS=$as_save_IFS
21798
21799  ;;
21800esac
21801fi
21802PATCH=$ac_cv_path_PATCH
21803if test -n "$PATCH"; then
21804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21805$as_echo "$PATCH" >&6; }
21806else
21807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21808$as_echo "no" >&6; }
21809fi
21810
21811
21812  test -n "$PATCH" && break
21813done
21814
21815  else
21816    # The variable is set, but is it from the command line or the environment?
21817
21818    # Try to remove the string !PATCH! from our list.
21819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21821      # If it failed, the variable was not from the command line. Ignore it,
21822      # but warn the user (except for BASH, which is always set by the calling BASH).
21823      if test "xPATCH" != xBASH; then
21824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21825$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21826      fi
21827      # Try to locate tool using the code snippet
21828      for ac_prog in gpatch patch
21829do
21830  # Extract the first word of "$ac_prog", so it can be a program name with args.
21831set dummy $ac_prog; ac_word=$2
21832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21833$as_echo_n "checking for $ac_word... " >&6; }
21834if ${ac_cv_path_PATCH+:} false; then :
21835  $as_echo_n "(cached) " >&6
21836else
21837  case $PATCH in
21838  [\\/]* | ?:[\\/]*)
21839  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21840  ;;
21841  *)
21842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21843for as_dir in $PATH
21844do
21845  IFS=$as_save_IFS
21846  test -z "$as_dir" && as_dir=.
21847    for ac_exec_ext in '' $ac_executable_extensions; do
21848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21849    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21851    break 2
21852  fi
21853done
21854  done
21855IFS=$as_save_IFS
21856
21857  ;;
21858esac
21859fi
21860PATCH=$ac_cv_path_PATCH
21861if test -n "$PATCH"; then
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21863$as_echo "$PATCH" >&6; }
21864else
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21866$as_echo "no" >&6; }
21867fi
21868
21869
21870  test -n "$PATCH" && break
21871done
21872
21873    else
21874      # If it succeeded, then it was overridden by the user. We will use it
21875      # for the tool.
21876
21877      # First remove it from the list of overridden variables, so we can test
21878      # for unknown variables in the end.
21879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21880
21881      # Check if we try to supply an empty value
21882      if test "x$PATCH" = x; then
21883        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21884$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21886$as_echo_n "checking for PATCH... " >&6; }
21887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21888$as_echo "disabled" >&6; }
21889      else
21890        # Check if the provided tool contains a complete path.
21891        tool_specified="$PATCH"
21892        tool_basename="${tool_specified##*/}"
21893        if test "x$tool_basename" = "x$tool_specified"; then
21894          # A command without a complete path is provided, search $PATH.
21895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21896$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21897          # Extract the first word of "$tool_basename", so it can be a program name with args.
21898set dummy $tool_basename; ac_word=$2
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21900$as_echo_n "checking for $ac_word... " >&6; }
21901if ${ac_cv_path_PATCH+:} false; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  case $PATCH in
21905  [\\/]* | ?:[\\/]*)
21906  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21907  ;;
21908  *)
21909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21910for as_dir in $PATH
21911do
21912  IFS=$as_save_IFS
21913  test -z "$as_dir" && as_dir=.
21914    for ac_exec_ext in '' $ac_executable_extensions; do
21915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21916    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21918    break 2
21919  fi
21920done
21921  done
21922IFS=$as_save_IFS
21923
21924  ;;
21925esac
21926fi
21927PATCH=$ac_cv_path_PATCH
21928if test -n "$PATCH"; then
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21930$as_echo "$PATCH" >&6; }
21931else
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21933$as_echo "no" >&6; }
21934fi
21935
21936
21937          if test "x$PATCH" = x; then
21938            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21939          fi
21940        else
21941          # Otherwise we believe it is a complete path. Use it as it is.
21942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21943$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21944          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21945$as_echo_n "checking for PATCH... " >&6; }
21946          if test ! -x "$tool_specified"; then
21947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21948$as_echo "not found" >&6; }
21949            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21950          fi
21951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21952$as_echo "$tool_specified" >&6; }
21953        fi
21954      fi
21955    fi
21956
21957  fi
21958
21959
21960  # Check if it's GNU time
21961  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21962  if test "x$IS_GNU_TIME" != x; then
21963    IS_GNU_TIME=yes
21964  else
21965    IS_GNU_TIME=no
21966  fi
21967
21968
21969  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21970
21971
21972
21973  # Publish this variable in the help.
21974
21975
21976  if [ -z "${DSYMUTIL+x}" ]; then
21977    # The variable is not set by user, try to locate tool using the code snippet
21978    for ac_prog in dsymutil
21979do
21980  # Extract the first word of "$ac_prog", so it can be a program name with args.
21981set dummy $ac_prog; ac_word=$2
21982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21983$as_echo_n "checking for $ac_word... " >&6; }
21984if ${ac_cv_path_DSYMUTIL+:} false; then :
21985  $as_echo_n "(cached) " >&6
21986else
21987  case $DSYMUTIL in
21988  [\\/]* | ?:[\\/]*)
21989  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21990  ;;
21991  *)
21992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21993for as_dir in $PATH
21994do
21995  IFS=$as_save_IFS
21996  test -z "$as_dir" && as_dir=.
21997    for ac_exec_ext in '' $ac_executable_extensions; do
21998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21999    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22001    break 2
22002  fi
22003done
22004  done
22005IFS=$as_save_IFS
22006
22007  ;;
22008esac
22009fi
22010DSYMUTIL=$ac_cv_path_DSYMUTIL
22011if test -n "$DSYMUTIL"; then
22012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22013$as_echo "$DSYMUTIL" >&6; }
22014else
22015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22016$as_echo "no" >&6; }
22017fi
22018
22019
22020  test -n "$DSYMUTIL" && break
22021done
22022
22023  else
22024    # The variable is set, but is it from the command line or the environment?
22025
22026    # Try to remove the string !DSYMUTIL! from our list.
22027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22029      # If it failed, the variable was not from the command line. Ignore it,
22030      # but warn the user (except for BASH, which is always set by the calling BASH).
22031      if test "xDSYMUTIL" != xBASH; then
22032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22033$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22034      fi
22035      # Try to locate tool using the code snippet
22036      for ac_prog in dsymutil
22037do
22038  # Extract the first word of "$ac_prog", so it can be a program name with args.
22039set dummy $ac_prog; ac_word=$2
22040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22041$as_echo_n "checking for $ac_word... " >&6; }
22042if ${ac_cv_path_DSYMUTIL+:} false; then :
22043  $as_echo_n "(cached) " >&6
22044else
22045  case $DSYMUTIL in
22046  [\\/]* | ?:[\\/]*)
22047  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22048  ;;
22049  *)
22050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22051for as_dir in $PATH
22052do
22053  IFS=$as_save_IFS
22054  test -z "$as_dir" && as_dir=.
22055    for ac_exec_ext in '' $ac_executable_extensions; do
22056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22057    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22059    break 2
22060  fi
22061done
22062  done
22063IFS=$as_save_IFS
22064
22065  ;;
22066esac
22067fi
22068DSYMUTIL=$ac_cv_path_DSYMUTIL
22069if test -n "$DSYMUTIL"; then
22070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22071$as_echo "$DSYMUTIL" >&6; }
22072else
22073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22074$as_echo "no" >&6; }
22075fi
22076
22077
22078  test -n "$DSYMUTIL" && break
22079done
22080
22081    else
22082      # If it succeeded, then it was overridden by the user. We will use it
22083      # for the tool.
22084
22085      # First remove it from the list of overridden variables, so we can test
22086      # for unknown variables in the end.
22087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22088
22089      # Check if we try to supply an empty value
22090      if test "x$DSYMUTIL" = x; then
22091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22092$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22094$as_echo_n "checking for DSYMUTIL... " >&6; }
22095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22096$as_echo "disabled" >&6; }
22097      else
22098        # Check if the provided tool contains a complete path.
22099        tool_specified="$DSYMUTIL"
22100        tool_basename="${tool_specified##*/}"
22101        if test "x$tool_basename" = "x$tool_specified"; then
22102          # A command without a complete path is provided, search $PATH.
22103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22104$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22105          # Extract the first word of "$tool_basename", so it can be a program name with args.
22106set dummy $tool_basename; ac_word=$2
22107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22108$as_echo_n "checking for $ac_word... " >&6; }
22109if ${ac_cv_path_DSYMUTIL+:} false; then :
22110  $as_echo_n "(cached) " >&6
22111else
22112  case $DSYMUTIL in
22113  [\\/]* | ?:[\\/]*)
22114  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22115  ;;
22116  *)
22117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22118for as_dir in $PATH
22119do
22120  IFS=$as_save_IFS
22121  test -z "$as_dir" && as_dir=.
22122    for ac_exec_ext in '' $ac_executable_extensions; do
22123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22124    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22126    break 2
22127  fi
22128done
22129  done
22130IFS=$as_save_IFS
22131
22132  ;;
22133esac
22134fi
22135DSYMUTIL=$ac_cv_path_DSYMUTIL
22136if test -n "$DSYMUTIL"; then
22137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22138$as_echo "$DSYMUTIL" >&6; }
22139else
22140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22141$as_echo "no" >&6; }
22142fi
22143
22144
22145          if test "x$DSYMUTIL" = x; then
22146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22147          fi
22148        else
22149          # Otherwise we believe it is a complete path. Use it as it is.
22150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22151$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22153$as_echo_n "checking for DSYMUTIL... " >&6; }
22154          if test ! -x "$tool_specified"; then
22155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22156$as_echo "not found" >&6; }
22157            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22158          fi
22159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22160$as_echo "$tool_specified" >&6; }
22161        fi
22162      fi
22163    fi
22164
22165  fi
22166
22167
22168
22169  if test "x$DSYMUTIL" = x; then
22170    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22171  fi
22172
22173
22174
22175
22176
22177  # Publish this variable in the help.
22178
22179
22180  if [ -z "${XATTR+x}" ]; then
22181    # The variable is not set by user, try to locate tool using the code snippet
22182    for ac_prog in xattr
22183do
22184  # Extract the first word of "$ac_prog", so it can be a program name with args.
22185set dummy $ac_prog; ac_word=$2
22186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22187$as_echo_n "checking for $ac_word... " >&6; }
22188if ${ac_cv_path_XATTR+:} false; then :
22189  $as_echo_n "(cached) " >&6
22190else
22191  case $XATTR in
22192  [\\/]* | ?:[\\/]*)
22193  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22194  ;;
22195  *)
22196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22197for as_dir in $PATH
22198do
22199  IFS=$as_save_IFS
22200  test -z "$as_dir" && as_dir=.
22201    for ac_exec_ext in '' $ac_executable_extensions; do
22202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22203    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22205    break 2
22206  fi
22207done
22208  done
22209IFS=$as_save_IFS
22210
22211  ;;
22212esac
22213fi
22214XATTR=$ac_cv_path_XATTR
22215if test -n "$XATTR"; then
22216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22217$as_echo "$XATTR" >&6; }
22218else
22219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22220$as_echo "no" >&6; }
22221fi
22222
22223
22224  test -n "$XATTR" && break
22225done
22226
22227  else
22228    # The variable is set, but is it from the command line or the environment?
22229
22230    # Try to remove the string !XATTR! from our list.
22231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22233      # If it failed, the variable was not from the command line. Ignore it,
22234      # but warn the user (except for BASH, which is always set by the calling BASH).
22235      if test "xXATTR" != xBASH; then
22236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22237$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22238      fi
22239      # Try to locate tool using the code snippet
22240      for ac_prog in xattr
22241do
22242  # Extract the first word of "$ac_prog", so it can be a program name with args.
22243set dummy $ac_prog; ac_word=$2
22244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22245$as_echo_n "checking for $ac_word... " >&6; }
22246if ${ac_cv_path_XATTR+:} false; then :
22247  $as_echo_n "(cached) " >&6
22248else
22249  case $XATTR in
22250  [\\/]* | ?:[\\/]*)
22251  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22252  ;;
22253  *)
22254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22255for as_dir in $PATH
22256do
22257  IFS=$as_save_IFS
22258  test -z "$as_dir" && as_dir=.
22259    for ac_exec_ext in '' $ac_executable_extensions; do
22260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22261    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22263    break 2
22264  fi
22265done
22266  done
22267IFS=$as_save_IFS
22268
22269  ;;
22270esac
22271fi
22272XATTR=$ac_cv_path_XATTR
22273if test -n "$XATTR"; then
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22275$as_echo "$XATTR" >&6; }
22276else
22277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22278$as_echo "no" >&6; }
22279fi
22280
22281
22282  test -n "$XATTR" && break
22283done
22284
22285    else
22286      # If it succeeded, then it was overridden by the user. We will use it
22287      # for the tool.
22288
22289      # First remove it from the list of overridden variables, so we can test
22290      # for unknown variables in the end.
22291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22292
22293      # Check if we try to supply an empty value
22294      if test "x$XATTR" = x; then
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22296$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22298$as_echo_n "checking for XATTR... " >&6; }
22299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22300$as_echo "disabled" >&6; }
22301      else
22302        # Check if the provided tool contains a complete path.
22303        tool_specified="$XATTR"
22304        tool_basename="${tool_specified##*/}"
22305        if test "x$tool_basename" = "x$tool_specified"; then
22306          # A command without a complete path is provided, search $PATH.
22307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22308$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22309          # Extract the first word of "$tool_basename", so it can be a program name with args.
22310set dummy $tool_basename; ac_word=$2
22311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22312$as_echo_n "checking for $ac_word... " >&6; }
22313if ${ac_cv_path_XATTR+:} false; then :
22314  $as_echo_n "(cached) " >&6
22315else
22316  case $XATTR in
22317  [\\/]* | ?:[\\/]*)
22318  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22319  ;;
22320  *)
22321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22322for as_dir in $PATH
22323do
22324  IFS=$as_save_IFS
22325  test -z "$as_dir" && as_dir=.
22326    for ac_exec_ext in '' $ac_executable_extensions; do
22327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22328    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22330    break 2
22331  fi
22332done
22333  done
22334IFS=$as_save_IFS
22335
22336  ;;
22337esac
22338fi
22339XATTR=$ac_cv_path_XATTR
22340if test -n "$XATTR"; then
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22342$as_echo "$XATTR" >&6; }
22343else
22344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22345$as_echo "no" >&6; }
22346fi
22347
22348
22349          if test "x$XATTR" = x; then
22350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22351          fi
22352        else
22353          # Otherwise we believe it is a complete path. Use it as it is.
22354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22355$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22357$as_echo_n "checking for XATTR... " >&6; }
22358          if test ! -x "$tool_specified"; then
22359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22360$as_echo "not found" >&6; }
22361            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22362          fi
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22364$as_echo "$tool_specified" >&6; }
22365        fi
22366      fi
22367    fi
22368
22369  fi
22370
22371
22372
22373  if test "x$XATTR" = x; then
22374    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22375  fi
22376
22377
22378
22379
22380  # Publish this variable in the help.
22381
22382
22383  if [ -z "${CODESIGN+x}" ]; then
22384    # The variable is not set by user, try to locate tool using the code snippet
22385    for ac_prog in codesign
22386do
22387  # Extract the first word of "$ac_prog", so it can be a program name with args.
22388set dummy $ac_prog; ac_word=$2
22389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22390$as_echo_n "checking for $ac_word... " >&6; }
22391if ${ac_cv_path_CODESIGN+:} false; then :
22392  $as_echo_n "(cached) " >&6
22393else
22394  case $CODESIGN in
22395  [\\/]* | ?:[\\/]*)
22396  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22397  ;;
22398  *)
22399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22400for as_dir in $PATH
22401do
22402  IFS=$as_save_IFS
22403  test -z "$as_dir" && as_dir=.
22404    for ac_exec_ext in '' $ac_executable_extensions; do
22405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22406    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22408    break 2
22409  fi
22410done
22411  done
22412IFS=$as_save_IFS
22413
22414  ;;
22415esac
22416fi
22417CODESIGN=$ac_cv_path_CODESIGN
22418if test -n "$CODESIGN"; then
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22420$as_echo "$CODESIGN" >&6; }
22421else
22422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22423$as_echo "no" >&6; }
22424fi
22425
22426
22427  test -n "$CODESIGN" && break
22428done
22429
22430  else
22431    # The variable is set, but is it from the command line or the environment?
22432
22433    # Try to remove the string !CODESIGN! from our list.
22434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22436      # If it failed, the variable was not from the command line. Ignore it,
22437      # but warn the user (except for BASH, which is always set by the calling BASH).
22438      if test "xCODESIGN" != xBASH; then
22439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22440$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22441      fi
22442      # Try to locate tool using the code snippet
22443      for ac_prog in codesign
22444do
22445  # Extract the first word of "$ac_prog", so it can be a program name with args.
22446set dummy $ac_prog; ac_word=$2
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22448$as_echo_n "checking for $ac_word... " >&6; }
22449if ${ac_cv_path_CODESIGN+:} false; then :
22450  $as_echo_n "(cached) " >&6
22451else
22452  case $CODESIGN in
22453  [\\/]* | ?:[\\/]*)
22454  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22455  ;;
22456  *)
22457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22458for as_dir in $PATH
22459do
22460  IFS=$as_save_IFS
22461  test -z "$as_dir" && as_dir=.
22462    for ac_exec_ext in '' $ac_executable_extensions; do
22463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22464    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22466    break 2
22467  fi
22468done
22469  done
22470IFS=$as_save_IFS
22471
22472  ;;
22473esac
22474fi
22475CODESIGN=$ac_cv_path_CODESIGN
22476if test -n "$CODESIGN"; then
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22478$as_echo "$CODESIGN" >&6; }
22479else
22480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22481$as_echo "no" >&6; }
22482fi
22483
22484
22485  test -n "$CODESIGN" && break
22486done
22487
22488    else
22489      # If it succeeded, then it was overridden by the user. We will use it
22490      # for the tool.
22491
22492      # First remove it from the list of overridden variables, so we can test
22493      # for unknown variables in the end.
22494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22495
22496      # Check if we try to supply an empty value
22497      if test "x$CODESIGN" = x; then
22498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22499$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22501$as_echo_n "checking for CODESIGN... " >&6; }
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22503$as_echo "disabled" >&6; }
22504      else
22505        # Check if the provided tool contains a complete path.
22506        tool_specified="$CODESIGN"
22507        tool_basename="${tool_specified##*/}"
22508        if test "x$tool_basename" = "x$tool_specified"; then
22509          # A command without a complete path is provided, search $PATH.
22510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22511$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22512          # Extract the first word of "$tool_basename", so it can be a program name with args.
22513set dummy $tool_basename; ac_word=$2
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22515$as_echo_n "checking for $ac_word... " >&6; }
22516if ${ac_cv_path_CODESIGN+:} false; then :
22517  $as_echo_n "(cached) " >&6
22518else
22519  case $CODESIGN in
22520  [\\/]* | ?:[\\/]*)
22521  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22522  ;;
22523  *)
22524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22525for as_dir in $PATH
22526do
22527  IFS=$as_save_IFS
22528  test -z "$as_dir" && as_dir=.
22529    for ac_exec_ext in '' $ac_executable_extensions; do
22530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22531    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22533    break 2
22534  fi
22535done
22536  done
22537IFS=$as_save_IFS
22538
22539  ;;
22540esac
22541fi
22542CODESIGN=$ac_cv_path_CODESIGN
22543if test -n "$CODESIGN"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22545$as_echo "$CODESIGN" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551
22552          if test "x$CODESIGN" = x; then
22553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22554          fi
22555        else
22556          # Otherwise we believe it is a complete path. Use it as it is.
22557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22558$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22560$as_echo_n "checking for CODESIGN... " >&6; }
22561          if test ! -x "$tool_specified"; then
22562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22563$as_echo "not found" >&6; }
22564            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22565          fi
22566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22567$as_echo "$tool_specified" >&6; }
22568        fi
22569      fi
22570    fi
22571
22572  fi
22573
22574
22575    if test "x$CODESIGN" != "x"; then
22576      # Verify that the openjdk_codesign certificate is present
22577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22578$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22579      rm -f codesign-testfile
22580      touch codesign-testfile
22581      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22582      rm -f codesign-testfile
22583      if test "x$CODESIGN" = x; then
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22585$as_echo "no" >&6; }
22586      else
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22588$as_echo "yes" >&6; }
22589      fi
22590    fi
22591
22592
22593
22594  # Publish this variable in the help.
22595
22596
22597  if [ -z "${SETFILE+x}" ]; then
22598    # The variable is not set by user, try to locate tool using the code snippet
22599    for ac_prog in SetFile
22600do
22601  # Extract the first word of "$ac_prog", so it can be a program name with args.
22602set dummy $ac_prog; ac_word=$2
22603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22604$as_echo_n "checking for $ac_word... " >&6; }
22605if ${ac_cv_path_SETFILE+:} false; then :
22606  $as_echo_n "(cached) " >&6
22607else
22608  case $SETFILE in
22609  [\\/]* | ?:[\\/]*)
22610  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22611  ;;
22612  *)
22613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22614for as_dir in $PATH
22615do
22616  IFS=$as_save_IFS
22617  test -z "$as_dir" && as_dir=.
22618    for ac_exec_ext in '' $ac_executable_extensions; do
22619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22620    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22622    break 2
22623  fi
22624done
22625  done
22626IFS=$as_save_IFS
22627
22628  ;;
22629esac
22630fi
22631SETFILE=$ac_cv_path_SETFILE
22632if test -n "$SETFILE"; then
22633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22634$as_echo "$SETFILE" >&6; }
22635else
22636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22637$as_echo "no" >&6; }
22638fi
22639
22640
22641  test -n "$SETFILE" && break
22642done
22643
22644  else
22645    # The variable is set, but is it from the command line or the environment?
22646
22647    # Try to remove the string !SETFILE! from our list.
22648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22650      # If it failed, the variable was not from the command line. Ignore it,
22651      # but warn the user (except for BASH, which is always set by the calling BASH).
22652      if test "xSETFILE" != xBASH; then
22653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22654$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22655      fi
22656      # Try to locate tool using the code snippet
22657      for ac_prog in SetFile
22658do
22659  # Extract the first word of "$ac_prog", so it can be a program name with args.
22660set dummy $ac_prog; ac_word=$2
22661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22662$as_echo_n "checking for $ac_word... " >&6; }
22663if ${ac_cv_path_SETFILE+:} false; then :
22664  $as_echo_n "(cached) " >&6
22665else
22666  case $SETFILE in
22667  [\\/]* | ?:[\\/]*)
22668  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22669  ;;
22670  *)
22671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22672for as_dir in $PATH
22673do
22674  IFS=$as_save_IFS
22675  test -z "$as_dir" && as_dir=.
22676    for ac_exec_ext in '' $ac_executable_extensions; do
22677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22678    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22680    break 2
22681  fi
22682done
22683  done
22684IFS=$as_save_IFS
22685
22686  ;;
22687esac
22688fi
22689SETFILE=$ac_cv_path_SETFILE
22690if test -n "$SETFILE"; then
22691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22692$as_echo "$SETFILE" >&6; }
22693else
22694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22695$as_echo "no" >&6; }
22696fi
22697
22698
22699  test -n "$SETFILE" && break
22700done
22701
22702    else
22703      # If it succeeded, then it was overridden by the user. We will use it
22704      # for the tool.
22705
22706      # First remove it from the list of overridden variables, so we can test
22707      # for unknown variables in the end.
22708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22709
22710      # Check if we try to supply an empty value
22711      if test "x$SETFILE" = x; then
22712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22713$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22715$as_echo_n "checking for SETFILE... " >&6; }
22716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22717$as_echo "disabled" >&6; }
22718      else
22719        # Check if the provided tool contains a complete path.
22720        tool_specified="$SETFILE"
22721        tool_basename="${tool_specified##*/}"
22722        if test "x$tool_basename" = "x$tool_specified"; then
22723          # A command without a complete path is provided, search $PATH.
22724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22725$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22726          # Extract the first word of "$tool_basename", so it can be a program name with args.
22727set dummy $tool_basename; ac_word=$2
22728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22729$as_echo_n "checking for $ac_word... " >&6; }
22730if ${ac_cv_path_SETFILE+:} false; then :
22731  $as_echo_n "(cached) " >&6
22732else
22733  case $SETFILE in
22734  [\\/]* | ?:[\\/]*)
22735  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22736  ;;
22737  *)
22738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22739for as_dir in $PATH
22740do
22741  IFS=$as_save_IFS
22742  test -z "$as_dir" && as_dir=.
22743    for ac_exec_ext in '' $ac_executable_extensions; do
22744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22745    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22747    break 2
22748  fi
22749done
22750  done
22751IFS=$as_save_IFS
22752
22753  ;;
22754esac
22755fi
22756SETFILE=$ac_cv_path_SETFILE
22757if test -n "$SETFILE"; then
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22759$as_echo "$SETFILE" >&6; }
22760else
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22762$as_echo "no" >&6; }
22763fi
22764
22765
22766          if test "x$SETFILE" = x; then
22767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22768          fi
22769        else
22770          # Otherwise we believe it is a complete path. Use it as it is.
22771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22772$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22774$as_echo_n "checking for SETFILE... " >&6; }
22775          if test ! -x "$tool_specified"; then
22776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22777$as_echo "not found" >&6; }
22778            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22779          fi
22780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22781$as_echo "$tool_specified" >&6; }
22782        fi
22783      fi
22784    fi
22785
22786  fi
22787
22788
22789
22790  if test "x$SETFILE" = x; then
22791    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22792  fi
22793
22794
22795  fi
22796
22797
22798  # Test if bash supports pipefail.
22799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22800$as_echo_n "checking if bash supports pipefail... " >&6; }
22801  if ${BASH} -c 'set -o pipefail'; then
22802    BASH_ARGS="$BASH_ARGS -o pipefail"
22803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22804$as_echo "yes" >&6; }
22805  else
22806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22807$as_echo "no" >&6; }
22808  fi
22809
22810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22811$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22812  if ${BASH} -e -c 'true'; then
22813    BASH_ARGS="$BASH_ARGS -e"
22814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22815$as_echo "yes" >&6; }
22816  else
22817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22818$as_echo "no" >&6; }
22819  fi
22820
22821
22822
22823
22824# Check if pkg-config is available.
22825
22826
22827if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22828	if test -n "$ac_tool_prefix"; then
22829  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22830set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22832$as_echo_n "checking for $ac_word... " >&6; }
22833if ${ac_cv_path_PKG_CONFIG+:} false; then :
22834  $as_echo_n "(cached) " >&6
22835else
22836  case $PKG_CONFIG in
22837  [\\/]* | ?:[\\/]*)
22838  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22839  ;;
22840  *)
22841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22842for as_dir in $PATH
22843do
22844  IFS=$as_save_IFS
22845  test -z "$as_dir" && as_dir=.
22846    for ac_exec_ext in '' $ac_executable_extensions; do
22847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22848    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22850    break 2
22851  fi
22852done
22853  done
22854IFS=$as_save_IFS
22855
22856  ;;
22857esac
22858fi
22859PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22860if test -n "$PKG_CONFIG"; then
22861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22862$as_echo "$PKG_CONFIG" >&6; }
22863else
22864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22865$as_echo "no" >&6; }
22866fi
22867
22868
22869fi
22870if test -z "$ac_cv_path_PKG_CONFIG"; then
22871  ac_pt_PKG_CONFIG=$PKG_CONFIG
22872  # Extract the first word of "pkg-config", so it can be a program name with args.
22873set dummy pkg-config; ac_word=$2
22874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22875$as_echo_n "checking for $ac_word... " >&6; }
22876if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22877  $as_echo_n "(cached) " >&6
22878else
22879  case $ac_pt_PKG_CONFIG in
22880  [\\/]* | ?:[\\/]*)
22881  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22882  ;;
22883  *)
22884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22885for as_dir in $PATH
22886do
22887  IFS=$as_save_IFS
22888  test -z "$as_dir" && as_dir=.
22889    for ac_exec_ext in '' $ac_executable_extensions; do
22890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22891    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22893    break 2
22894  fi
22895done
22896  done
22897IFS=$as_save_IFS
22898
22899  ;;
22900esac
22901fi
22902ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22903if test -n "$ac_pt_PKG_CONFIG"; then
22904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22905$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22906else
22907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22908$as_echo "no" >&6; }
22909fi
22910
22911  if test "x$ac_pt_PKG_CONFIG" = x; then
22912    PKG_CONFIG=""
22913  else
22914    case $cross_compiling:$ac_tool_warned in
22915yes:)
22916{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22917$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22918ac_tool_warned=yes ;;
22919esac
22920    PKG_CONFIG=$ac_pt_PKG_CONFIG
22921  fi
22922else
22923  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22924fi
22925
22926fi
22927if test -n "$PKG_CONFIG"; then
22928	_pkg_min_version=0.9.0
22929	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22930$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22931	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22932		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22933$as_echo "yes" >&6; }
22934	else
22935		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22936$as_echo "no" >&6; }
22937		PKG_CONFIG=""
22938	fi
22939
22940fi
22941
22942# After basic tools have been setup, we can check build os specific details.
22943
22944  ###############################################################################
22945
22946  # Note that this is the build platform OS version!
22947
22948  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22949  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22950  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22951  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22952
22953
22954
22955
22956
22957###############################################################################
22958#
22959# Determine OpenJDK variants, options and version numbers.
22960#
22961###############################################################################
22962
22963# We need build & target for this.
22964
22965
22966  ###############################################################################
22967  #
22968  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22969  # We always build headless support.
22970  #
22971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22972$as_echo_n "checking headful support... " >&6; }
22973  # Check whether --enable-headful was given.
22974if test "${enable_headful+set}" = set; then :
22975  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22976else
22977  SUPPORT_HEADFUL=yes
22978fi
22979
22980
22981  SUPPORT_HEADLESS=yes
22982  BUILD_HEADLESS="BUILD_HEADLESS:=true"
22983
22984  if test "x$SUPPORT_HEADFUL" = xyes; then
22985    # We are building both headful and headless.
22986    headful_msg="include support for both headful and headless"
22987  fi
22988
22989  if test "x$SUPPORT_HEADFUL" = xno; then
22990    # Thus we are building headless only.
22991    BUILD_HEADLESS="BUILD_HEADLESS:=true"
22992    headful_msg="headless only"
22993  fi
22994
22995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22996$as_echo "$headful_msg" >&6; }
22997
22998
22999
23000
23001
23002  # Control wether Hotspot runs Queens test after build.
23003  # Check whether --enable-hotspot-test-in-build was given.
23004if test "${enable_hotspot_test_in_build+set}" = set; then :
23005  enableval=$enable_hotspot_test_in_build;
23006else
23007  enable_hotspot_test_in_build=no
23008fi
23009
23010  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23011    TEST_IN_BUILD=true
23012  else
23013    TEST_IN_BUILD=false
23014  fi
23015
23016
23017  ###############################################################################
23018  #
23019  # Choose cacerts source file
23020  #
23021
23022# Check whether --with-cacerts-file was given.
23023if test "${with_cacerts_file+set}" = set; then :
23024  withval=$with_cacerts_file;
23025fi
23026
23027  if test "x$with_cacerts_file" != x; then
23028    CACERTS_FILE=$with_cacerts_file
23029  fi
23030
23031
23032  ###############################################################################
23033  #
23034  # Enable or disable unlimited crypto
23035  #
23036  # Check whether --enable-unlimited-crypto was given.
23037if test "${enable_unlimited_crypto+set}" = set; then :
23038  enableval=$enable_unlimited_crypto;
23039else
23040  enable_unlimited_crypto=no
23041fi
23042
23043  if test "x$enable_unlimited_crypto" = "xyes"; then
23044    UNLIMITED_CRYPTO=true
23045  else
23046    UNLIMITED_CRYPTO=false
23047  fi
23048
23049
23050  ###############################################################################
23051  #
23052  # Enable or disable the elliptic curve crypto implementation
23053  #
23054
23055
23056  ###############################################################################
23057  #
23058  # Compress jars
23059  #
23060  COMPRESS_JARS=false
23061
23062
23063
23064
23065  # Source the version numbers
23066  . $AUTOCONF_DIR/version-numbers
23067
23068  # Get the settings from parameters
23069
23070# Check whether --with-milestone was given.
23071if test "${with_milestone+set}" = set; then :
23072  withval=$with_milestone;
23073fi
23074
23075  if test "x$with_milestone" = xyes; then
23076    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23077  elif test "x$with_milestone" != x; then
23078    MILESTONE="$with_milestone"
23079  fi
23080  if test "x$MILESTONE" = x; then
23081    MILESTONE=internal
23082  fi
23083
23084
23085# Check whether --with-update-version was given.
23086if test "${with_update_version+set}" = set; then :
23087  withval=$with_update_version;
23088fi
23089
23090  if test "x$with_update_version" = xyes; then
23091    as_fn_error $? "Update version must have a value" "$LINENO" 5
23092  elif test "x$with_update_version" != x; then
23093    JDK_UPDATE_VERSION="$with_update_version"
23094    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23095    # to a bug in expr (which reduces it to just X). To work around this, we
23096    # always add a 0 to one digit update versions.
23097    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23098      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23099    fi
23100  fi
23101
23102
23103# Check whether --with-user-release-suffix was given.
23104if test "${with_user_release_suffix+set}" = set; then :
23105  withval=$with_user_release_suffix;
23106fi
23107
23108  if test "x$with_user_release_suffix" = xyes; then
23109    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23110  elif test "x$with_user_release_suffix" != x; then
23111    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23112  fi
23113
23114
23115# Check whether --with-build-number was given.
23116if test "${with_build_number+set}" = set; then :
23117  withval=$with_build_number;
23118fi
23119
23120  if test "x$with_build_number" = xyes; then
23121    as_fn_error $? "Build number must have a value" "$LINENO" 5
23122  elif test "x$with_build_number" != x; then
23123    JDK_BUILD_NUMBER="$with_build_number"
23124  fi
23125  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23126  if test "x$JDK_BUILD_NUMBER" = x; then
23127    JDK_BUILD_NUMBER=b00
23128    if test "x$USER_RELEASE_SUFFIX" = x; then
23129      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23130      # Avoid [:alnum:] since it depends on the locale.
23131      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23132      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23133    fi
23134  fi
23135
23136  # Now set the JDK version, milestone, build number etc.
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153# Check whether --with-copyright-year was given.
23154if test "${with_copyright_year+set}" = set; then :
23155  withval=$with_copyright_year;
23156fi
23157
23158  if test "x$with_copyright_year" = xyes; then
23159    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23160  elif test "x$with_copyright_year" != x; then
23161    COPYRIGHT_YEAR="$with_copyright_year"
23162  else
23163    COPYRIGHT_YEAR=`date +'%Y'`
23164  fi
23165
23166
23167  if test "x$JDK_UPDATE_VERSION" != x; then
23168    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23169  else
23170    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23171  fi
23172
23173
23174  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23175
23176
23177
23178###############################################################################
23179#
23180# Setup BootJDK, used to bootstrap the build.
23181#
23182###############################################################################
23183
23184
23185  BOOT_JDK_FOUND=no
23186
23187# Check whether --with-boot-jdk was given.
23188if test "${with_boot_jdk+set}" = set; then :
23189  withval=$with_boot_jdk;
23190fi
23191
23192
23193  # We look for the Boot JDK through various means, going from more certain to
23194  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23195  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23196  # must check if this is indeed valid; otherwise we'll continue looking.
23197
23198  # Test: Is bootjdk explicitely set by command line arguments?
23199
23200  if test "x$BOOT_JDK_FOUND" = xno; then
23201    # Now execute the test
23202
23203  if test "x$with_boot_jdk" != x; then
23204    BOOT_JDK=$with_boot_jdk
23205    BOOT_JDK_FOUND=maybe
23206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23207$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23208  fi
23209
23210
23211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23213      # Do we have a bin/java?
23214      if test ! -x "$BOOT_JDK/bin/java"; then
23215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23217        BOOT_JDK_FOUND=no
23218      else
23219        # Do we have a bin/javac?
23220        if test ! -x "$BOOT_JDK/bin/javac"; then
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23225          BOOT_JDK_FOUND=no
23226        else
23227          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23228          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23229
23230          # Extra M4 quote needed to protect [] in grep expression.
23231          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23232          if test "x$FOUND_CORRECT_VERSION" = x; then
23233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23235            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23236$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23237            BOOT_JDK_FOUND=no
23238          else
23239            # We're done! :-)
23240            BOOT_JDK_FOUND=yes
23241
23242  # Only process if variable expands to non-empty
23243
23244  if test "x$BOOT_JDK" != x; then
23245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23246
23247  # Input might be given as Windows format, start by converting to
23248  # unix format.
23249  path="$BOOT_JDK"
23250  new_path=`$CYGPATH -u "$path"`
23251
23252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23255  # "foo.exe" is OK but "foo" is an error.
23256  #
23257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23258  # It is also a way to make sure we got the proper file name for the real test later on.
23259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23260  if test "x$test_shortpath" = x; then
23261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23263    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23264  fi
23265
23266  # Call helper function which possibly converts this using DOS-style short mode.
23267  # If so, the updated path is stored in $new_path.
23268
23269  input_path="$new_path"
23270  # Check if we need to convert this using DOS-style short mode. If the path
23271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272  # take no chances and rewrite it.
23273  # Note: m4 eats our [], so we need to use [ and ] instead.
23274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23275  if test "x$has_forbidden_chars" != x; then
23276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23280      # Going to short mode and back again did indeed matter. Since short mode is
23281      # case insensitive, let's make it lowercase to improve readability.
23282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23283      # Now convert it back to Unix-style (cygpath)
23284      input_path=`$CYGPATH -u "$shortmode_path"`
23285      new_path="$input_path"
23286    fi
23287  fi
23288
23289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23290  if test "x$test_cygdrive_prefix" = x; then
23291    # As a simple fix, exclude /usr/bin since it's not a real path.
23292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23294      # a path prefixed by /cygdrive for fixpath to work.
23295      new_path="$CYGWIN_ROOT_PATH$input_path"
23296    fi
23297  fi
23298
23299
23300  if test "x$path" != "x$new_path"; then
23301    BOOT_JDK="$new_path"
23302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23304  fi
23305
23306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307
23308  path="$BOOT_JDK"
23309  has_colon=`$ECHO $path | $GREP ^.:`
23310  new_path="$path"
23311  if test "x$has_colon" = x; then
23312    # Not in mixed or Windows style, start by that.
23313    new_path=`cmd //c echo $path`
23314  fi
23315
23316
23317  input_path="$new_path"
23318  # Check if we need to convert this using DOS-style short mode. If the path
23319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23320  # take no chances and rewrite it.
23321  # Note: m4 eats our [], so we need to use [ and ] instead.
23322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23323  if test "x$has_forbidden_chars" != x; then
23324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23326  fi
23327
23328
23329  windows_path="$new_path"
23330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23331    unix_path=`$CYGPATH -u "$windows_path"`
23332    new_path="$unix_path"
23333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23335    new_path="$unix_path"
23336  fi
23337
23338  if test "x$path" != "x$new_path"; then
23339    BOOT_JDK="$new_path"
23340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23342  fi
23343
23344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23346
23347    else
23348      # We're on a unix platform. Hooray! :)
23349      path="$BOOT_JDK"
23350      has_space=`$ECHO "$path" | $GREP " "`
23351      if test "x$has_space" != x; then
23352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23353$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23354        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23355      fi
23356
23357      # Use eval to expand a potential ~
23358      eval path="$path"
23359      if test ! -f "$path" && test ! -d "$path"; then
23360        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23361      fi
23362
23363      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23364    fi
23365  fi
23366
23367            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23368$as_echo_n "checking for Boot JDK... " >&6; }
23369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23370$as_echo "$BOOT_JDK" >&6; }
23371            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23372$as_echo_n "checking Boot JDK version... " >&6; }
23373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23375$as_echo "$BOOT_JDK_VERSION" >&6; }
23376          fi # end check jdk version
23377        fi # end check javac
23378      fi # end check java
23379    fi # end check boot jdk found
23380  fi
23381
23382  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23383    # Having specified an argument which is incorrect will produce an instant failure;
23384    # we should not go on looking
23385    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23386  fi
23387
23388  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23389
23390  if test "x$BOOT_JDK_FOUND" = xno; then
23391    # Now execute the test
23392
23393  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23394    # First check at user selected default
23395
23396  if test "x$BOOT_JDK_FOUND" = xno; then
23397    # Now execute the test
23398
23399  if test -x /usr/libexec/java_home; then
23400    BOOT_JDK=`/usr/libexec/java_home `
23401    BOOT_JDK_FOUND=maybe
23402    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23403$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23404  fi
23405
23406
23407    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23408    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23409      # Do we have a bin/java?
23410      if test ! -x "$BOOT_JDK/bin/java"; then
23411        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23413        BOOT_JDK_FOUND=no
23414      else
23415        # Do we have a bin/javac?
23416        if test ! -x "$BOOT_JDK/bin/javac"; then
23417          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23419          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23420$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23421          BOOT_JDK_FOUND=no
23422        else
23423          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23424          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23425
23426          # Extra M4 quote needed to protect [] in grep expression.
23427          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23428          if test "x$FOUND_CORRECT_VERSION" = x; then
23429            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23431            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23432$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23433            BOOT_JDK_FOUND=no
23434          else
23435            # We're done! :-)
23436            BOOT_JDK_FOUND=yes
23437
23438  # Only process if variable expands to non-empty
23439
23440  if test "x$BOOT_JDK" != x; then
23441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23442
23443  # Input might be given as Windows format, start by converting to
23444  # unix format.
23445  path="$BOOT_JDK"
23446  new_path=`$CYGPATH -u "$path"`
23447
23448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23451  # "foo.exe" is OK but "foo" is an error.
23452  #
23453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23454  # It is also a way to make sure we got the proper file name for the real test later on.
23455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23456  if test "x$test_shortpath" = x; then
23457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23459    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23460  fi
23461
23462  # Call helper function which possibly converts this using DOS-style short mode.
23463  # If so, the updated path is stored in $new_path.
23464
23465  input_path="$new_path"
23466  # Check if we need to convert this using DOS-style short mode. If the path
23467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23468  # take no chances and rewrite it.
23469  # Note: m4 eats our [], so we need to use [ and ] instead.
23470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23471  if test "x$has_forbidden_chars" != x; then
23472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23476      # Going to short mode and back again did indeed matter. Since short mode is
23477      # case insensitive, let's make it lowercase to improve readability.
23478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23479      # Now convert it back to Unix-style (cygpath)
23480      input_path=`$CYGPATH -u "$shortmode_path"`
23481      new_path="$input_path"
23482    fi
23483  fi
23484
23485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23486  if test "x$test_cygdrive_prefix" = x; then
23487    # As a simple fix, exclude /usr/bin since it's not a real path.
23488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23490      # a path prefixed by /cygdrive for fixpath to work.
23491      new_path="$CYGWIN_ROOT_PATH$input_path"
23492    fi
23493  fi
23494
23495
23496  if test "x$path" != "x$new_path"; then
23497    BOOT_JDK="$new_path"
23498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23500  fi
23501
23502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23503
23504  path="$BOOT_JDK"
23505  has_colon=`$ECHO $path | $GREP ^.:`
23506  new_path="$path"
23507  if test "x$has_colon" = x; then
23508    # Not in mixed or Windows style, start by that.
23509    new_path=`cmd //c echo $path`
23510  fi
23511
23512
23513  input_path="$new_path"
23514  # Check if we need to convert this using DOS-style short mode. If the path
23515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23516  # take no chances and rewrite it.
23517  # Note: m4 eats our [], so we need to use [ and ] instead.
23518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23519  if test "x$has_forbidden_chars" != x; then
23520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23522  fi
23523
23524
23525  windows_path="$new_path"
23526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23527    unix_path=`$CYGPATH -u "$windows_path"`
23528    new_path="$unix_path"
23529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23531    new_path="$unix_path"
23532  fi
23533
23534  if test "x$path" != "x$new_path"; then
23535    BOOT_JDK="$new_path"
23536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23538  fi
23539
23540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23542
23543    else
23544      # We're on a unix platform. Hooray! :)
23545      path="$BOOT_JDK"
23546      has_space=`$ECHO "$path" | $GREP " "`
23547      if test "x$has_space" != x; then
23548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23551      fi
23552
23553      # Use eval to expand a potential ~
23554      eval path="$path"
23555      if test ! -f "$path" && test ! -d "$path"; then
23556        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23557      fi
23558
23559      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23560    fi
23561  fi
23562
23563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23564$as_echo_n "checking for Boot JDK... " >&6; }
23565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23566$as_echo "$BOOT_JDK" >&6; }
23567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23568$as_echo_n "checking Boot JDK version... " >&6; }
23569            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23571$as_echo "$BOOT_JDK_VERSION" >&6; }
23572          fi # end check jdk version
23573        fi # end check javac
23574      fi # end check java
23575    fi # end check boot jdk found
23576  fi
23577
23578    # If that did not work out (e.g. too old), try explicit versions instead
23579
23580  if test "x$BOOT_JDK_FOUND" = xno; then
23581    # Now execute the test
23582
23583  if test -x /usr/libexec/java_home; then
23584    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23585    BOOT_JDK_FOUND=maybe
23586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23587$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23588  fi
23589
23590
23591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23593      # Do we have a bin/java?
23594      if test ! -x "$BOOT_JDK/bin/java"; then
23595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23597        BOOT_JDK_FOUND=no
23598      else
23599        # Do we have a bin/javac?
23600        if test ! -x "$BOOT_JDK/bin/javac"; then
23601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23605          BOOT_JDK_FOUND=no
23606        else
23607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23609
23610          # Extra M4 quote needed to protect [] in grep expression.
23611          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23612          if test "x$FOUND_CORRECT_VERSION" = x; then
23613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23617            BOOT_JDK_FOUND=no
23618          else
23619            # We're done! :-)
23620            BOOT_JDK_FOUND=yes
23621
23622  # Only process if variable expands to non-empty
23623
23624  if test "x$BOOT_JDK" != x; then
23625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23626
23627  # Input might be given as Windows format, start by converting to
23628  # unix format.
23629  path="$BOOT_JDK"
23630  new_path=`$CYGPATH -u "$path"`
23631
23632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23635  # "foo.exe" is OK but "foo" is an error.
23636  #
23637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23638  # It is also a way to make sure we got the proper file name for the real test later on.
23639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23640  if test "x$test_shortpath" = x; then
23641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23644  fi
23645
23646  # Call helper function which possibly converts this using DOS-style short mode.
23647  # If so, the updated path is stored in $new_path.
23648
23649  input_path="$new_path"
23650  # Check if we need to convert this using DOS-style short mode. If the path
23651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23652  # take no chances and rewrite it.
23653  # Note: m4 eats our [], so we need to use [ and ] instead.
23654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23655  if test "x$has_forbidden_chars" != x; then
23656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23660      # Going to short mode and back again did indeed matter. Since short mode is
23661      # case insensitive, let's make it lowercase to improve readability.
23662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23663      # Now convert it back to Unix-style (cygpath)
23664      input_path=`$CYGPATH -u "$shortmode_path"`
23665      new_path="$input_path"
23666    fi
23667  fi
23668
23669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23670  if test "x$test_cygdrive_prefix" = x; then
23671    # As a simple fix, exclude /usr/bin since it's not a real path.
23672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23674      # a path prefixed by /cygdrive for fixpath to work.
23675      new_path="$CYGWIN_ROOT_PATH$input_path"
23676    fi
23677  fi
23678
23679
23680  if test "x$path" != "x$new_path"; then
23681    BOOT_JDK="$new_path"
23682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23684  fi
23685
23686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687
23688  path="$BOOT_JDK"
23689  has_colon=`$ECHO $path | $GREP ^.:`
23690  new_path="$path"
23691  if test "x$has_colon" = x; then
23692    # Not in mixed or Windows style, start by that.
23693    new_path=`cmd //c echo $path`
23694  fi
23695
23696
23697  input_path="$new_path"
23698  # Check if we need to convert this using DOS-style short mode. If the path
23699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23700  # take no chances and rewrite it.
23701  # Note: m4 eats our [], so we need to use [ and ] instead.
23702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23703  if test "x$has_forbidden_chars" != x; then
23704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23706  fi
23707
23708
23709  windows_path="$new_path"
23710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23711    unix_path=`$CYGPATH -u "$windows_path"`
23712    new_path="$unix_path"
23713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23715    new_path="$unix_path"
23716  fi
23717
23718  if test "x$path" != "x$new_path"; then
23719    BOOT_JDK="$new_path"
23720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23722  fi
23723
23724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23726
23727    else
23728      # We're on a unix platform. Hooray! :)
23729      path="$BOOT_JDK"
23730      has_space=`$ECHO "$path" | $GREP " "`
23731      if test "x$has_space" != x; then
23732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23735      fi
23736
23737      # Use eval to expand a potential ~
23738      eval path="$path"
23739      if test ! -f "$path" && test ! -d "$path"; then
23740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23741      fi
23742
23743      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23744    fi
23745  fi
23746
23747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23748$as_echo_n "checking for Boot JDK... " >&6; }
23749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23750$as_echo "$BOOT_JDK" >&6; }
23751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23752$as_echo_n "checking Boot JDK version... " >&6; }
23753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23755$as_echo "$BOOT_JDK_VERSION" >&6; }
23756          fi # end check jdk version
23757        fi # end check javac
23758      fi # end check java
23759    fi # end check boot jdk found
23760  fi
23761
23762
23763  if test "x$BOOT_JDK_FOUND" = xno; then
23764    # Now execute the test
23765
23766  if test -x /usr/libexec/java_home; then
23767    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23768    BOOT_JDK_FOUND=maybe
23769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23770$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23771  fi
23772
23773
23774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23776      # Do we have a bin/java?
23777      if test ! -x "$BOOT_JDK/bin/java"; then
23778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23780        BOOT_JDK_FOUND=no
23781      else
23782        # Do we have a bin/javac?
23783        if test ! -x "$BOOT_JDK/bin/javac"; then
23784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23788          BOOT_JDK_FOUND=no
23789        else
23790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23792
23793          # Extra M4 quote needed to protect [] in grep expression.
23794          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23795          if test "x$FOUND_CORRECT_VERSION" = x; then
23796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23800            BOOT_JDK_FOUND=no
23801          else
23802            # We're done! :-)
23803            BOOT_JDK_FOUND=yes
23804
23805  # Only process if variable expands to non-empty
23806
23807  if test "x$BOOT_JDK" != x; then
23808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23809
23810  # Input might be given as Windows format, start by converting to
23811  # unix format.
23812  path="$BOOT_JDK"
23813  new_path=`$CYGPATH -u "$path"`
23814
23815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23818  # "foo.exe" is OK but "foo" is an error.
23819  #
23820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23821  # It is also a way to make sure we got the proper file name for the real test later on.
23822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23823  if test "x$test_shortpath" = x; then
23824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23827  fi
23828
23829  # Call helper function which possibly converts this using DOS-style short mode.
23830  # If so, the updated path is stored in $new_path.
23831
23832  input_path="$new_path"
23833  # Check if we need to convert this using DOS-style short mode. If the path
23834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23835  # take no chances and rewrite it.
23836  # Note: m4 eats our [], so we need to use [ and ] instead.
23837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23838  if test "x$has_forbidden_chars" != x; then
23839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23843      # Going to short mode and back again did indeed matter. Since short mode is
23844      # case insensitive, let's make it lowercase to improve readability.
23845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23846      # Now convert it back to Unix-style (cygpath)
23847      input_path=`$CYGPATH -u "$shortmode_path"`
23848      new_path="$input_path"
23849    fi
23850  fi
23851
23852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23853  if test "x$test_cygdrive_prefix" = x; then
23854    # As a simple fix, exclude /usr/bin since it's not a real path.
23855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23857      # a path prefixed by /cygdrive for fixpath to work.
23858      new_path="$CYGWIN_ROOT_PATH$input_path"
23859    fi
23860  fi
23861
23862
23863  if test "x$path" != "x$new_path"; then
23864    BOOT_JDK="$new_path"
23865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23867  fi
23868
23869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23870
23871  path="$BOOT_JDK"
23872  has_colon=`$ECHO $path | $GREP ^.:`
23873  new_path="$path"
23874  if test "x$has_colon" = x; then
23875    # Not in mixed or Windows style, start by that.
23876    new_path=`cmd //c echo $path`
23877  fi
23878
23879
23880  input_path="$new_path"
23881  # Check if we need to convert this using DOS-style short mode. If the path
23882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23883  # take no chances and rewrite it.
23884  # Note: m4 eats our [], so we need to use [ and ] instead.
23885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23886  if test "x$has_forbidden_chars" != x; then
23887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23889  fi
23890
23891
23892  windows_path="$new_path"
23893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23894    unix_path=`$CYGPATH -u "$windows_path"`
23895    new_path="$unix_path"
23896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23898    new_path="$unix_path"
23899  fi
23900
23901  if test "x$path" != "x$new_path"; then
23902    BOOT_JDK="$new_path"
23903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23905  fi
23906
23907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23909
23910    else
23911      # We're on a unix platform. Hooray! :)
23912      path="$BOOT_JDK"
23913      has_space=`$ECHO "$path" | $GREP " "`
23914      if test "x$has_space" != x; then
23915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23918      fi
23919
23920      # Use eval to expand a potential ~
23921      eval path="$path"
23922      if test ! -f "$path" && test ! -d "$path"; then
23923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23924      fi
23925
23926      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23927    fi
23928  fi
23929
23930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23931$as_echo_n "checking for Boot JDK... " >&6; }
23932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23933$as_echo "$BOOT_JDK" >&6; }
23934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23935$as_echo_n "checking Boot JDK version... " >&6; }
23936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23938$as_echo "$BOOT_JDK_VERSION" >&6; }
23939          fi # end check jdk version
23940        fi # end check javac
23941      fi # end check java
23942    fi # end check boot jdk found
23943  fi
23944
23945
23946  if test "x$BOOT_JDK_FOUND" = xno; then
23947    # Now execute the test
23948
23949  if test -x /usr/libexec/java_home; then
23950    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23951    BOOT_JDK_FOUND=maybe
23952    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23953$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23954  fi
23955
23956
23957    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23958    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23959      # Do we have a bin/java?
23960      if test ! -x "$BOOT_JDK/bin/java"; then
23961        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23963        BOOT_JDK_FOUND=no
23964      else
23965        # Do we have a bin/javac?
23966        if test ! -x "$BOOT_JDK/bin/javac"; then
23967          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23970$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23971          BOOT_JDK_FOUND=no
23972        else
23973          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23974          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23975
23976          # Extra M4 quote needed to protect [] in grep expression.
23977          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23978          if test "x$FOUND_CORRECT_VERSION" = x; then
23979            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23982$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23983            BOOT_JDK_FOUND=no
23984          else
23985            # We're done! :-)
23986            BOOT_JDK_FOUND=yes
23987
23988  # Only process if variable expands to non-empty
23989
23990  if test "x$BOOT_JDK" != x; then
23991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992
23993  # Input might be given as Windows format, start by converting to
23994  # unix format.
23995  path="$BOOT_JDK"
23996  new_path=`$CYGPATH -u "$path"`
23997
23998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001  # "foo.exe" is OK but "foo" is an error.
24002  #
24003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24004  # It is also a way to make sure we got the proper file name for the real test later on.
24005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006  if test "x$test_shortpath" = x; then
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24010  fi
24011
24012  # Call helper function which possibly converts this using DOS-style short mode.
24013  # If so, the updated path is stored in $new_path.
24014
24015  input_path="$new_path"
24016  # Check if we need to convert this using DOS-style short mode. If the path
24017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24018  # take no chances and rewrite it.
24019  # Note: m4 eats our [], so we need to use [ and ] instead.
24020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24021  if test "x$has_forbidden_chars" != x; then
24022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24026      # Going to short mode and back again did indeed matter. Since short mode is
24027      # case insensitive, let's make it lowercase to improve readability.
24028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029      # Now convert it back to Unix-style (cygpath)
24030      input_path=`$CYGPATH -u "$shortmode_path"`
24031      new_path="$input_path"
24032    fi
24033  fi
24034
24035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24036  if test "x$test_cygdrive_prefix" = x; then
24037    # As a simple fix, exclude /usr/bin since it's not a real path.
24038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24040      # a path prefixed by /cygdrive for fixpath to work.
24041      new_path="$CYGWIN_ROOT_PATH$input_path"
24042    fi
24043  fi
24044
24045
24046  if test "x$path" != "x$new_path"; then
24047    BOOT_JDK="$new_path"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24050  fi
24051
24052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  path="$BOOT_JDK"
24055  has_colon=`$ECHO $path | $GREP ^.:`
24056  new_path="$path"
24057  if test "x$has_colon" = x; then
24058    # Not in mixed or Windows style, start by that.
24059    new_path=`cmd //c echo $path`
24060  fi
24061
24062
24063  input_path="$new_path"
24064  # Check if we need to convert this using DOS-style short mode. If the path
24065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066  # take no chances and rewrite it.
24067  # Note: m4 eats our [], so we need to use [ and ] instead.
24068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069  if test "x$has_forbidden_chars" != x; then
24070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072  fi
24073
24074
24075  windows_path="$new_path"
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077    unix_path=`$CYGPATH -u "$windows_path"`
24078    new_path="$unix_path"
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081    new_path="$unix_path"
24082  fi
24083
24084  if test "x$path" != "x$new_path"; then
24085    BOOT_JDK="$new_path"
24086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24088  fi
24089
24090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092
24093    else
24094      # We're on a unix platform. Hooray! :)
24095      path="$BOOT_JDK"
24096      has_space=`$ECHO "$path" | $GREP " "`
24097      if test "x$has_space" != x; then
24098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24101      fi
24102
24103      # Use eval to expand a potential ~
24104      eval path="$path"
24105      if test ! -f "$path" && test ! -d "$path"; then
24106        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24107      fi
24108
24109      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24110    fi
24111  fi
24112
24113            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24114$as_echo_n "checking for Boot JDK... " >&6; }
24115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24116$as_echo "$BOOT_JDK" >&6; }
24117            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24118$as_echo_n "checking Boot JDK version... " >&6; }
24119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24121$as_echo "$BOOT_JDK_VERSION" >&6; }
24122          fi # end check jdk version
24123        fi # end check javac
24124      fi # end check java
24125    fi # end check boot jdk found
24126  fi
24127
24128  fi
24129
24130
24131    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24132    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24133      # Do we have a bin/java?
24134      if test ! -x "$BOOT_JDK/bin/java"; then
24135        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24137        BOOT_JDK_FOUND=no
24138      else
24139        # Do we have a bin/javac?
24140        if test ! -x "$BOOT_JDK/bin/javac"; then
24141          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24143          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24144$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24145          BOOT_JDK_FOUND=no
24146        else
24147          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24148          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24149
24150          # Extra M4 quote needed to protect [] in grep expression.
24151          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24152          if test "x$FOUND_CORRECT_VERSION" = x; then
24153            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24155            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24156$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24157            BOOT_JDK_FOUND=no
24158          else
24159            # We're done! :-)
24160            BOOT_JDK_FOUND=yes
24161
24162  # Only process if variable expands to non-empty
24163
24164  if test "x$BOOT_JDK" != x; then
24165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24166
24167  # Input might be given as Windows format, start by converting to
24168  # unix format.
24169  path="$BOOT_JDK"
24170  new_path=`$CYGPATH -u "$path"`
24171
24172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24175  # "foo.exe" is OK but "foo" is an error.
24176  #
24177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24178  # It is also a way to make sure we got the proper file name for the real test later on.
24179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24180  if test "x$test_shortpath" = x; then
24181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24183    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24184  fi
24185
24186  # Call helper function which possibly converts this using DOS-style short mode.
24187  # If so, the updated path is stored in $new_path.
24188
24189  input_path="$new_path"
24190  # Check if we need to convert this using DOS-style short mode. If the path
24191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24192  # take no chances and rewrite it.
24193  # Note: m4 eats our [], so we need to use [ and ] instead.
24194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24195  if test "x$has_forbidden_chars" != x; then
24196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24200      # Going to short mode and back again did indeed matter. Since short mode is
24201      # case insensitive, let's make it lowercase to improve readability.
24202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24203      # Now convert it back to Unix-style (cygpath)
24204      input_path=`$CYGPATH -u "$shortmode_path"`
24205      new_path="$input_path"
24206    fi
24207  fi
24208
24209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24210  if test "x$test_cygdrive_prefix" = x; then
24211    # As a simple fix, exclude /usr/bin since it's not a real path.
24212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24214      # a path prefixed by /cygdrive for fixpath to work.
24215      new_path="$CYGWIN_ROOT_PATH$input_path"
24216    fi
24217  fi
24218
24219
24220  if test "x$path" != "x$new_path"; then
24221    BOOT_JDK="$new_path"
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24224  fi
24225
24226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24227
24228  path="$BOOT_JDK"
24229  has_colon=`$ECHO $path | $GREP ^.:`
24230  new_path="$path"
24231  if test "x$has_colon" = x; then
24232    # Not in mixed or Windows style, start by that.
24233    new_path=`cmd //c echo $path`
24234  fi
24235
24236
24237  input_path="$new_path"
24238  # Check if we need to convert this using DOS-style short mode. If the path
24239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24240  # take no chances and rewrite it.
24241  # Note: m4 eats our [], so we need to use [ and ] instead.
24242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24243  if test "x$has_forbidden_chars" != x; then
24244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24246  fi
24247
24248
24249  windows_path="$new_path"
24250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24251    unix_path=`$CYGPATH -u "$windows_path"`
24252    new_path="$unix_path"
24253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24255    new_path="$unix_path"
24256  fi
24257
24258  if test "x$path" != "x$new_path"; then
24259    BOOT_JDK="$new_path"
24260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24262  fi
24263
24264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24266
24267    else
24268      # We're on a unix platform. Hooray! :)
24269      path="$BOOT_JDK"
24270      has_space=`$ECHO "$path" | $GREP " "`
24271      if test "x$has_space" != x; then
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24275      fi
24276
24277      # Use eval to expand a potential ~
24278      eval path="$path"
24279      if test ! -f "$path" && test ! -d "$path"; then
24280        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24281      fi
24282
24283      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24284    fi
24285  fi
24286
24287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24288$as_echo_n "checking for Boot JDK... " >&6; }
24289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24290$as_echo "$BOOT_JDK" >&6; }
24291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24292$as_echo_n "checking Boot JDK version... " >&6; }
24293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24295$as_echo "$BOOT_JDK_VERSION" >&6; }
24296          fi # end check jdk version
24297        fi # end check javac
24298      fi # end check java
24299    fi # end check boot jdk found
24300  fi
24301
24302
24303  # Test: Is $JAVA_HOME set?
24304
24305  if test "x$BOOT_JDK_FOUND" = xno; then
24306    # Now execute the test
24307
24308  if test "x$JAVA_HOME" != x; then
24309    JAVA_HOME_PROCESSED="$JAVA_HOME"
24310
24311  # Only process if variable expands to non-empty
24312
24313  if test "x$JAVA_HOME_PROCESSED" != x; then
24314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24315
24316  # Input might be given as Windows format, start by converting to
24317  # unix format.
24318  path="$JAVA_HOME_PROCESSED"
24319  new_path=`$CYGPATH -u "$path"`
24320
24321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24324  # "foo.exe" is OK but "foo" is an error.
24325  #
24326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24327  # It is also a way to make sure we got the proper file name for the real test later on.
24328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24329  if test "x$test_shortpath" = x; then
24330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24331$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24332    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24333  fi
24334
24335  # Call helper function which possibly converts this using DOS-style short mode.
24336  # If so, the updated path is stored in $new_path.
24337
24338  input_path="$new_path"
24339  # Check if we need to convert this using DOS-style short mode. If the path
24340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24341  # take no chances and rewrite it.
24342  # Note: m4 eats our [], so we need to use [ and ] instead.
24343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24344  if test "x$has_forbidden_chars" != x; then
24345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24349      # Going to short mode and back again did indeed matter. Since short mode is
24350      # case insensitive, let's make it lowercase to improve readability.
24351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24352      # Now convert it back to Unix-style (cygpath)
24353      input_path=`$CYGPATH -u "$shortmode_path"`
24354      new_path="$input_path"
24355    fi
24356  fi
24357
24358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24359  if test "x$test_cygdrive_prefix" = x; then
24360    # As a simple fix, exclude /usr/bin since it's not a real path.
24361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24363      # a path prefixed by /cygdrive for fixpath to work.
24364      new_path="$CYGWIN_ROOT_PATH$input_path"
24365    fi
24366  fi
24367
24368
24369  if test "x$path" != "x$new_path"; then
24370    JAVA_HOME_PROCESSED="$new_path"
24371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24372$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24373  fi
24374
24375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376
24377  path="$JAVA_HOME_PROCESSED"
24378  has_colon=`$ECHO $path | $GREP ^.:`
24379  new_path="$path"
24380  if test "x$has_colon" = x; then
24381    # Not in mixed or Windows style, start by that.
24382    new_path=`cmd //c echo $path`
24383  fi
24384
24385
24386  input_path="$new_path"
24387  # Check if we need to convert this using DOS-style short mode. If the path
24388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24389  # take no chances and rewrite it.
24390  # Note: m4 eats our [], so we need to use [ and ] instead.
24391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24392  if test "x$has_forbidden_chars" != x; then
24393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24395  fi
24396
24397
24398  windows_path="$new_path"
24399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24400    unix_path=`$CYGPATH -u "$windows_path"`
24401    new_path="$unix_path"
24402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24404    new_path="$unix_path"
24405  fi
24406
24407  if test "x$path" != "x$new_path"; then
24408    JAVA_HOME_PROCESSED="$new_path"
24409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24410$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24411  fi
24412
24413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24415
24416    else
24417      # We're on a unix platform. Hooray! :)
24418      path="$JAVA_HOME_PROCESSED"
24419      has_space=`$ECHO "$path" | $GREP " "`
24420      if test "x$has_space" != x; then
24421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24422$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24424      fi
24425
24426      # Use eval to expand a potential ~
24427      eval path="$path"
24428      if test ! -f "$path" && test ! -d "$path"; then
24429        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24430      fi
24431
24432      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24433    fi
24434  fi
24435
24436    if test ! -d "$JAVA_HOME_PROCESSED"; then
24437      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24438$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24439    else
24440      # Aha, the user has set a JAVA_HOME
24441      # let us use that as the Boot JDK.
24442      BOOT_JDK="$JAVA_HOME_PROCESSED"
24443      BOOT_JDK_FOUND=maybe
24444      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24445$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24446    fi
24447  fi
24448
24449
24450    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24451    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24452      # Do we have a bin/java?
24453      if test ! -x "$BOOT_JDK/bin/java"; then
24454        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24456        BOOT_JDK_FOUND=no
24457      else
24458        # Do we have a bin/javac?
24459        if test ! -x "$BOOT_JDK/bin/javac"; then
24460          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24462          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24463$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24464          BOOT_JDK_FOUND=no
24465        else
24466          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24467          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24468
24469          # Extra M4 quote needed to protect [] in grep expression.
24470          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24471          if test "x$FOUND_CORRECT_VERSION" = x; then
24472            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24474            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24475$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24476            BOOT_JDK_FOUND=no
24477          else
24478            # We're done! :-)
24479            BOOT_JDK_FOUND=yes
24480
24481  # Only process if variable expands to non-empty
24482
24483  if test "x$BOOT_JDK" != x; then
24484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24485
24486  # Input might be given as Windows format, start by converting to
24487  # unix format.
24488  path="$BOOT_JDK"
24489  new_path=`$CYGPATH -u "$path"`
24490
24491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24494  # "foo.exe" is OK but "foo" is an error.
24495  #
24496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24497  # It is also a way to make sure we got the proper file name for the real test later on.
24498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24499  if test "x$test_shortpath" = x; then
24500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24502    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24503  fi
24504
24505  # Call helper function which possibly converts this using DOS-style short mode.
24506  # If so, the updated path is stored in $new_path.
24507
24508  input_path="$new_path"
24509  # Check if we need to convert this using DOS-style short mode. If the path
24510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24511  # take no chances and rewrite it.
24512  # Note: m4 eats our [], so we need to use [ and ] instead.
24513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24514  if test "x$has_forbidden_chars" != x; then
24515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24519      # Going to short mode and back again did indeed matter. Since short mode is
24520      # case insensitive, let's make it lowercase to improve readability.
24521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24522      # Now convert it back to Unix-style (cygpath)
24523      input_path=`$CYGPATH -u "$shortmode_path"`
24524      new_path="$input_path"
24525    fi
24526  fi
24527
24528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24529  if test "x$test_cygdrive_prefix" = x; then
24530    # As a simple fix, exclude /usr/bin since it's not a real path.
24531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24533      # a path prefixed by /cygdrive for fixpath to work.
24534      new_path="$CYGWIN_ROOT_PATH$input_path"
24535    fi
24536  fi
24537
24538
24539  if test "x$path" != "x$new_path"; then
24540    BOOT_JDK="$new_path"
24541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24543  fi
24544
24545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24546
24547  path="$BOOT_JDK"
24548  has_colon=`$ECHO $path | $GREP ^.:`
24549  new_path="$path"
24550  if test "x$has_colon" = x; then
24551    # Not in mixed or Windows style, start by that.
24552    new_path=`cmd //c echo $path`
24553  fi
24554
24555
24556  input_path="$new_path"
24557  # Check if we need to convert this using DOS-style short mode. If the path
24558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24559  # take no chances and rewrite it.
24560  # Note: m4 eats our [], so we need to use [ and ] instead.
24561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24562  if test "x$has_forbidden_chars" != x; then
24563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24565  fi
24566
24567
24568  windows_path="$new_path"
24569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24570    unix_path=`$CYGPATH -u "$windows_path"`
24571    new_path="$unix_path"
24572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24574    new_path="$unix_path"
24575  fi
24576
24577  if test "x$path" != "x$new_path"; then
24578    BOOT_JDK="$new_path"
24579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24581  fi
24582
24583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24585
24586    else
24587      # We're on a unix platform. Hooray! :)
24588      path="$BOOT_JDK"
24589      has_space=`$ECHO "$path" | $GREP " "`
24590      if test "x$has_space" != x; then
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24594      fi
24595
24596      # Use eval to expand a potential ~
24597      eval path="$path"
24598      if test ! -f "$path" && test ! -d "$path"; then
24599        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24600      fi
24601
24602      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24603    fi
24604  fi
24605
24606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24607$as_echo_n "checking for Boot JDK... " >&6; }
24608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24609$as_echo "$BOOT_JDK" >&6; }
24610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24611$as_echo_n "checking Boot JDK version... " >&6; }
24612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24614$as_echo "$BOOT_JDK_VERSION" >&6; }
24615          fi # end check jdk version
24616        fi # end check javac
24617      fi # end check java
24618    fi # end check boot jdk found
24619  fi
24620
24621
24622  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24623
24624  if test "x$BOOT_JDK_FOUND" = xno; then
24625    # Now execute the test
24626
24627  # Extract the first word of "javac", so it can be a program name with args.
24628set dummy javac; ac_word=$2
24629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24630$as_echo_n "checking for $ac_word... " >&6; }
24631if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24632  $as_echo_n "(cached) " >&6
24633else
24634  case $JAVAC_CHECK in
24635  [\\/]* | ?:[\\/]*)
24636  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24637  ;;
24638  *)
24639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24640for as_dir in $PATH
24641do
24642  IFS=$as_save_IFS
24643  test -z "$as_dir" && as_dir=.
24644    for ac_exec_ext in '' $ac_executable_extensions; do
24645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24646    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24648    break 2
24649  fi
24650done
24651  done
24652IFS=$as_save_IFS
24653
24654  ;;
24655esac
24656fi
24657JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24658if test -n "$JAVAC_CHECK"; then
24659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24660$as_echo "$JAVAC_CHECK" >&6; }
24661else
24662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24663$as_echo "no" >&6; }
24664fi
24665
24666
24667  # Extract the first word of "java", so it can be a program name with args.
24668set dummy java; ac_word=$2
24669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24670$as_echo_n "checking for $ac_word... " >&6; }
24671if ${ac_cv_path_JAVA_CHECK+:} false; then :
24672  $as_echo_n "(cached) " >&6
24673else
24674  case $JAVA_CHECK in
24675  [\\/]* | ?:[\\/]*)
24676  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24677  ;;
24678  *)
24679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24680for as_dir in $PATH
24681do
24682  IFS=$as_save_IFS
24683  test -z "$as_dir" && as_dir=.
24684    for ac_exec_ext in '' $ac_executable_extensions; do
24685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24686    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24688    break 2
24689  fi
24690done
24691  done
24692IFS=$as_save_IFS
24693
24694  ;;
24695esac
24696fi
24697JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24698if test -n "$JAVA_CHECK"; then
24699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24700$as_echo "$JAVA_CHECK" >&6; }
24701else
24702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24703$as_echo "no" >&6; }
24704fi
24705
24706
24707  BINARY="$JAVAC_CHECK"
24708  if test "x$JAVAC_CHECK" = x; then
24709    BINARY="$JAVA_CHECK"
24710  fi
24711  if test "x$BINARY" != x; then
24712    # So there is a java(c) binary, it might be part of a JDK.
24713    # Lets find the JDK/JRE directory by following symbolic links.
24714    # Linux/GNU systems often have links from /usr/bin/java to
24715    # /etc/alternatives/java to the real JDK binary.
24716
24717  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24718    # Follow a chain of symbolic links. Use readlink
24719    # where it exists, else fall back to horribly
24720    # complicated shell code.
24721    if test "x$READLINK_TESTED" != yes; then
24722      # On MacOSX there is a readlink tool with a different
24723      # purpose than the GNU readlink tool. Check the found readlink.
24724      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24725      if test "x$ISGNU" = x; then
24726        # A readlink that we do not know how to use.
24727        # Are there other non-GNU readlinks out there?
24728        READLINK_TESTED=yes
24729        READLINK=
24730      fi
24731    fi
24732
24733    if test "x$READLINK" != x; then
24734      BINARY=`$READLINK -f $BINARY`
24735    else
24736      # Save the current directory for restoring afterwards
24737      STARTDIR=$PWD
24738      COUNTER=0
24739      sym_link_dir=`$DIRNAME $BINARY`
24740      sym_link_file=`$BASENAME $BINARY`
24741      cd $sym_link_dir
24742      # Use -P flag to resolve symlinks in directories.
24743      cd `$THEPWDCMD -P`
24744      sym_link_dir=`$THEPWDCMD -P`
24745      # Resolve file symlinks
24746      while test $COUNTER -lt 20; do
24747        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24748        if test "x$ISLINK" == x; then
24749          # This is not a symbolic link! We are done!
24750          break
24751        fi
24752        # Again resolve directory symlinks since the target of the just found
24753        # link could be in a different directory
24754        cd `$DIRNAME $ISLINK`
24755        sym_link_dir=`$THEPWDCMD -P`
24756        sym_link_file=`$BASENAME $ISLINK`
24757        let COUNTER=COUNTER+1
24758      done
24759      cd $STARTDIR
24760      BINARY=$sym_link_dir/$sym_link_file
24761    fi
24762  fi
24763
24764    BOOT_JDK=`dirname "$BINARY"`
24765    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24766    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24767      # Looks like we found ourselves an JDK
24768      BOOT_JDK_FOUND=maybe
24769      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24770$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24771    fi
24772  fi
24773
24774
24775    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24776    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24777      # Do we have a bin/java?
24778      if test ! -x "$BOOT_JDK/bin/java"; then
24779        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24781        BOOT_JDK_FOUND=no
24782      else
24783        # Do we have a bin/javac?
24784        if test ! -x "$BOOT_JDK/bin/javac"; then
24785          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24787          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24788$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24789          BOOT_JDK_FOUND=no
24790        else
24791          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24792          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24793
24794          # Extra M4 quote needed to protect [] in grep expression.
24795          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24796          if test "x$FOUND_CORRECT_VERSION" = x; then
24797            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24799            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24800$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24801            BOOT_JDK_FOUND=no
24802          else
24803            # We're done! :-)
24804            BOOT_JDK_FOUND=yes
24805
24806  # Only process if variable expands to non-empty
24807
24808  if test "x$BOOT_JDK" != x; then
24809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24810
24811  # Input might be given as Windows format, start by converting to
24812  # unix format.
24813  path="$BOOT_JDK"
24814  new_path=`$CYGPATH -u "$path"`
24815
24816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24819  # "foo.exe" is OK but "foo" is an error.
24820  #
24821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24822  # It is also a way to make sure we got the proper file name for the real test later on.
24823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24824  if test "x$test_shortpath" = x; then
24825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24828  fi
24829
24830  # Call helper function which possibly converts this using DOS-style short mode.
24831  # If so, the updated path is stored in $new_path.
24832
24833  input_path="$new_path"
24834  # Check if we need to convert this using DOS-style short mode. If the path
24835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24836  # take no chances and rewrite it.
24837  # Note: m4 eats our [], so we need to use [ and ] instead.
24838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24839  if test "x$has_forbidden_chars" != x; then
24840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24844      # Going to short mode and back again did indeed matter. Since short mode is
24845      # case insensitive, let's make it lowercase to improve readability.
24846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24847      # Now convert it back to Unix-style (cygpath)
24848      input_path=`$CYGPATH -u "$shortmode_path"`
24849      new_path="$input_path"
24850    fi
24851  fi
24852
24853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24854  if test "x$test_cygdrive_prefix" = x; then
24855    # As a simple fix, exclude /usr/bin since it's not a real path.
24856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24858      # a path prefixed by /cygdrive for fixpath to work.
24859      new_path="$CYGWIN_ROOT_PATH$input_path"
24860    fi
24861  fi
24862
24863
24864  if test "x$path" != "x$new_path"; then
24865    BOOT_JDK="$new_path"
24866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24868  fi
24869
24870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24871
24872  path="$BOOT_JDK"
24873  has_colon=`$ECHO $path | $GREP ^.:`
24874  new_path="$path"
24875  if test "x$has_colon" = x; then
24876    # Not in mixed or Windows style, start by that.
24877    new_path=`cmd //c echo $path`
24878  fi
24879
24880
24881  input_path="$new_path"
24882  # Check if we need to convert this using DOS-style short mode. If the path
24883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24884  # take no chances and rewrite it.
24885  # Note: m4 eats our [], so we need to use [ and ] instead.
24886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24887  if test "x$has_forbidden_chars" != x; then
24888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24890  fi
24891
24892
24893  windows_path="$new_path"
24894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24895    unix_path=`$CYGPATH -u "$windows_path"`
24896    new_path="$unix_path"
24897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24899    new_path="$unix_path"
24900  fi
24901
24902  if test "x$path" != "x$new_path"; then
24903    BOOT_JDK="$new_path"
24904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24906  fi
24907
24908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24910
24911    else
24912      # We're on a unix platform. Hooray! :)
24913      path="$BOOT_JDK"
24914      has_space=`$ECHO "$path" | $GREP " "`
24915      if test "x$has_space" != x; then
24916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24919      fi
24920
24921      # Use eval to expand a potential ~
24922      eval path="$path"
24923      if test ! -f "$path" && test ! -d "$path"; then
24924        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24925      fi
24926
24927      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24928    fi
24929  fi
24930
24931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24932$as_echo_n "checking for Boot JDK... " >&6; }
24933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24934$as_echo "$BOOT_JDK" >&6; }
24935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24936$as_echo_n "checking Boot JDK version... " >&6; }
24937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24939$as_echo "$BOOT_JDK_VERSION" >&6; }
24940          fi # end check jdk version
24941        fi # end check javac
24942      fi # end check java
24943    fi # end check boot jdk found
24944  fi
24945
24946
24947  # Test: Is there a JDK installed in default, well-known locations?
24948
24949  if test "x$BOOT_JDK_FOUND" = xno; then
24950    # Now execute the test
24951
24952  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24953
24954  if test "x$BOOT_JDK_FOUND" = xno; then
24955    # Now execute the test
24956
24957  if test "x$ProgramW6432" != x; then
24958    VIRTUAL_DIR="$ProgramW6432/Java"
24959
24960  windows_path="$VIRTUAL_DIR"
24961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24962    unix_path=`$CYGPATH -u "$windows_path"`
24963    VIRTUAL_DIR="$unix_path"
24964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24966    VIRTUAL_DIR="$unix_path"
24967  fi
24968
24969
24970  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24971  BOOT_JDK_SUFFIX=""
24972  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24973  if test "x$ALL_JDKS_FOUND" != x; then
24974    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24975
24976  if test "x$BOOT_JDK_FOUND" = xno; then
24977    # Now execute the test
24978
24979        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24980        if test -d "$BOOT_JDK"; then
24981          BOOT_JDK_FOUND=maybe
24982          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24983$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24984        fi
24985
24986
24987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24989      # Do we have a bin/java?
24990      if test ! -x "$BOOT_JDK/bin/java"; then
24991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24993        BOOT_JDK_FOUND=no
24994      else
24995        # Do we have a bin/javac?
24996        if test ! -x "$BOOT_JDK/bin/javac"; then
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25001          BOOT_JDK_FOUND=no
25002        else
25003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25005
25006          # Extra M4 quote needed to protect [] in grep expression.
25007          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25008          if test "x$FOUND_CORRECT_VERSION" = x; then
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25013            BOOT_JDK_FOUND=no
25014          else
25015            # We're done! :-)
25016            BOOT_JDK_FOUND=yes
25017
25018  # Only process if variable expands to non-empty
25019
25020  if test "x$BOOT_JDK" != x; then
25021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25022
25023  # Input might be given as Windows format, start by converting to
25024  # unix format.
25025  path="$BOOT_JDK"
25026  new_path=`$CYGPATH -u "$path"`
25027
25028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25031  # "foo.exe" is OK but "foo" is an error.
25032  #
25033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25034  # It is also a way to make sure we got the proper file name for the real test later on.
25035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25036  if test "x$test_shortpath" = x; then
25037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25040  fi
25041
25042  # Call helper function which possibly converts this using DOS-style short mode.
25043  # If so, the updated path is stored in $new_path.
25044
25045  input_path="$new_path"
25046  # Check if we need to convert this using DOS-style short mode. If the path
25047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25048  # take no chances and rewrite it.
25049  # Note: m4 eats our [], so we need to use [ and ] instead.
25050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25051  if test "x$has_forbidden_chars" != x; then
25052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25056      # Going to short mode and back again did indeed matter. Since short mode is
25057      # case insensitive, let's make it lowercase to improve readability.
25058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059      # Now convert it back to Unix-style (cygpath)
25060      input_path=`$CYGPATH -u "$shortmode_path"`
25061      new_path="$input_path"
25062    fi
25063  fi
25064
25065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25066  if test "x$test_cygdrive_prefix" = x; then
25067    # As a simple fix, exclude /usr/bin since it's not a real path.
25068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25070      # a path prefixed by /cygdrive for fixpath to work.
25071      new_path="$CYGWIN_ROOT_PATH$input_path"
25072    fi
25073  fi
25074
25075
25076  if test "x$path" != "x$new_path"; then
25077    BOOT_JDK="$new_path"
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25080  fi
25081
25082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25083
25084  path="$BOOT_JDK"
25085  has_colon=`$ECHO $path | $GREP ^.:`
25086  new_path="$path"
25087  if test "x$has_colon" = x; then
25088    # Not in mixed or Windows style, start by that.
25089    new_path=`cmd //c echo $path`
25090  fi
25091
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25102  fi
25103
25104
25105  windows_path="$new_path"
25106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25107    unix_path=`$CYGPATH -u "$windows_path"`
25108    new_path="$unix_path"
25109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25111    new_path="$unix_path"
25112  fi
25113
25114  if test "x$path" != "x$new_path"; then
25115    BOOT_JDK="$new_path"
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25118  fi
25119
25120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25122
25123    else
25124      # We're on a unix platform. Hooray! :)
25125      path="$BOOT_JDK"
25126      has_space=`$ECHO "$path" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25131      fi
25132
25133      # Use eval to expand a potential ~
25134      eval path="$path"
25135      if test ! -f "$path" && test ! -d "$path"; then
25136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25137      fi
25138
25139      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25140    fi
25141  fi
25142
25143            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25144$as_echo_n "checking for Boot JDK... " >&6; }
25145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25146$as_echo "$BOOT_JDK" >&6; }
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25148$as_echo_n "checking Boot JDK version... " >&6; }
25149            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25151$as_echo "$BOOT_JDK_VERSION" >&6; }
25152          fi # end check jdk version
25153        fi # end check javac
25154      fi # end check java
25155    fi # end check boot jdk found
25156  fi
25157
25158    done
25159  fi
25160
25161  fi
25162
25163
25164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25166      # Do we have a bin/java?
25167      if test ! -x "$BOOT_JDK/bin/java"; then
25168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25170        BOOT_JDK_FOUND=no
25171      else
25172        # Do we have a bin/javac?
25173        if test ! -x "$BOOT_JDK/bin/javac"; then
25174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25178          BOOT_JDK_FOUND=no
25179        else
25180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25182
25183          # Extra M4 quote needed to protect [] in grep expression.
25184          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25185          if test "x$FOUND_CORRECT_VERSION" = x; then
25186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25190            BOOT_JDK_FOUND=no
25191          else
25192            # We're done! :-)
25193            BOOT_JDK_FOUND=yes
25194
25195  # Only process if variable expands to non-empty
25196
25197  if test "x$BOOT_JDK" != x; then
25198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25199
25200  # Input might be given as Windows format, start by converting to
25201  # unix format.
25202  path="$BOOT_JDK"
25203  new_path=`$CYGPATH -u "$path"`
25204
25205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25208  # "foo.exe" is OK but "foo" is an error.
25209  #
25210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25211  # It is also a way to make sure we got the proper file name for the real test later on.
25212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25213  if test "x$test_shortpath" = x; then
25214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25217  fi
25218
25219  # Call helper function which possibly converts this using DOS-style short mode.
25220  # If so, the updated path is stored in $new_path.
25221
25222  input_path="$new_path"
25223  # Check if we need to convert this using DOS-style short mode. If the path
25224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25225  # take no chances and rewrite it.
25226  # Note: m4 eats our [], so we need to use [ and ] instead.
25227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25228  if test "x$has_forbidden_chars" != x; then
25229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25233      # Going to short mode and back again did indeed matter. Since short mode is
25234      # case insensitive, let's make it lowercase to improve readability.
25235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25236      # Now convert it back to Unix-style (cygpath)
25237      input_path=`$CYGPATH -u "$shortmode_path"`
25238      new_path="$input_path"
25239    fi
25240  fi
25241
25242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25243  if test "x$test_cygdrive_prefix" = x; then
25244    # As a simple fix, exclude /usr/bin since it's not a real path.
25245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25247      # a path prefixed by /cygdrive for fixpath to work.
25248      new_path="$CYGWIN_ROOT_PATH$input_path"
25249    fi
25250  fi
25251
25252
25253  if test "x$path" != "x$new_path"; then
25254    BOOT_JDK="$new_path"
25255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25257  fi
25258
25259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25260
25261  path="$BOOT_JDK"
25262  has_colon=`$ECHO $path | $GREP ^.:`
25263  new_path="$path"
25264  if test "x$has_colon" = x; then
25265    # Not in mixed or Windows style, start by that.
25266    new_path=`cmd //c echo $path`
25267  fi
25268
25269
25270  input_path="$new_path"
25271  # Check if we need to convert this using DOS-style short mode. If the path
25272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25273  # take no chances and rewrite it.
25274  # Note: m4 eats our [], so we need to use [ and ] instead.
25275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25276  if test "x$has_forbidden_chars" != x; then
25277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25279  fi
25280
25281
25282  windows_path="$new_path"
25283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25284    unix_path=`$CYGPATH -u "$windows_path"`
25285    new_path="$unix_path"
25286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25288    new_path="$unix_path"
25289  fi
25290
25291  if test "x$path" != "x$new_path"; then
25292    BOOT_JDK="$new_path"
25293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25295  fi
25296
25297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25299
25300    else
25301      # We're on a unix platform. Hooray! :)
25302      path="$BOOT_JDK"
25303      has_space=`$ECHO "$path" | $GREP " "`
25304      if test "x$has_space" != x; then
25305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25308      fi
25309
25310      # Use eval to expand a potential ~
25311      eval path="$path"
25312      if test ! -f "$path" && test ! -d "$path"; then
25313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25314      fi
25315
25316      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25317    fi
25318  fi
25319
25320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25321$as_echo_n "checking for Boot JDK... " >&6; }
25322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25323$as_echo "$BOOT_JDK" >&6; }
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25325$as_echo_n "checking Boot JDK version... " >&6; }
25326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25328$as_echo "$BOOT_JDK_VERSION" >&6; }
25329          fi # end check jdk version
25330        fi # end check javac
25331      fi # end check java
25332    fi # end check boot jdk found
25333  fi
25334
25335
25336  if test "x$BOOT_JDK_FOUND" = xno; then
25337    # Now execute the test
25338
25339  if test "x$PROGRAMW6432" != x; then
25340    VIRTUAL_DIR="$PROGRAMW6432/Java"
25341
25342  windows_path="$VIRTUAL_DIR"
25343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25344    unix_path=`$CYGPATH -u "$windows_path"`
25345    VIRTUAL_DIR="$unix_path"
25346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25348    VIRTUAL_DIR="$unix_path"
25349  fi
25350
25351
25352  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25353  BOOT_JDK_SUFFIX=""
25354  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25355  if test "x$ALL_JDKS_FOUND" != x; then
25356    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25357
25358  if test "x$BOOT_JDK_FOUND" = xno; then
25359    # Now execute the test
25360
25361        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25362        if test -d "$BOOT_JDK"; then
25363          BOOT_JDK_FOUND=maybe
25364          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25365$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25366        fi
25367
25368
25369    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25370    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25371      # Do we have a bin/java?
25372      if test ! -x "$BOOT_JDK/bin/java"; then
25373        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25375        BOOT_JDK_FOUND=no
25376      else
25377        # Do we have a bin/javac?
25378        if test ! -x "$BOOT_JDK/bin/javac"; then
25379          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25381          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25382$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25383          BOOT_JDK_FOUND=no
25384        else
25385          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25386          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25387
25388          # Extra M4 quote needed to protect [] in grep expression.
25389          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25390          if test "x$FOUND_CORRECT_VERSION" = x; then
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25393            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25394$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25395            BOOT_JDK_FOUND=no
25396          else
25397            # We're done! :-)
25398            BOOT_JDK_FOUND=yes
25399
25400  # Only process if variable expands to non-empty
25401
25402  if test "x$BOOT_JDK" != x; then
25403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25404
25405  # Input might be given as Windows format, start by converting to
25406  # unix format.
25407  path="$BOOT_JDK"
25408  new_path=`$CYGPATH -u "$path"`
25409
25410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25413  # "foo.exe" is OK but "foo" is an error.
25414  #
25415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25416  # It is also a way to make sure we got the proper file name for the real test later on.
25417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25418  if test "x$test_shortpath" = x; then
25419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25422  fi
25423
25424  # Call helper function which possibly converts this using DOS-style short mode.
25425  # If so, the updated path is stored in $new_path.
25426
25427  input_path="$new_path"
25428  # Check if we need to convert this using DOS-style short mode. If the path
25429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430  # take no chances and rewrite it.
25431  # Note: m4 eats our [], so we need to use [ and ] instead.
25432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25433  if test "x$has_forbidden_chars" != x; then
25434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25438      # Going to short mode and back again did indeed matter. Since short mode is
25439      # case insensitive, let's make it lowercase to improve readability.
25440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441      # Now convert it back to Unix-style (cygpath)
25442      input_path=`$CYGPATH -u "$shortmode_path"`
25443      new_path="$input_path"
25444    fi
25445  fi
25446
25447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25448  if test "x$test_cygdrive_prefix" = x; then
25449    # As a simple fix, exclude /usr/bin since it's not a real path.
25450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25452      # a path prefixed by /cygdrive for fixpath to work.
25453      new_path="$CYGWIN_ROOT_PATH$input_path"
25454    fi
25455  fi
25456
25457
25458  if test "x$path" != "x$new_path"; then
25459    BOOT_JDK="$new_path"
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462  fi
25463
25464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25465
25466  path="$BOOT_JDK"
25467  has_colon=`$ECHO $path | $GREP ^.:`
25468  new_path="$path"
25469  if test "x$has_colon" = x; then
25470    # Not in mixed or Windows style, start by that.
25471    new_path=`cmd //c echo $path`
25472  fi
25473
25474
25475  input_path="$new_path"
25476  # Check if we need to convert this using DOS-style short mode. If the path
25477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25478  # take no chances and rewrite it.
25479  # Note: m4 eats our [], so we need to use [ and ] instead.
25480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25481  if test "x$has_forbidden_chars" != x; then
25482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25484  fi
25485
25486
25487  windows_path="$new_path"
25488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25489    unix_path=`$CYGPATH -u "$windows_path"`
25490    new_path="$unix_path"
25491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25493    new_path="$unix_path"
25494  fi
25495
25496  if test "x$path" != "x$new_path"; then
25497    BOOT_JDK="$new_path"
25498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25500  fi
25501
25502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25504
25505    else
25506      # We're on a unix platform. Hooray! :)
25507      path="$BOOT_JDK"
25508      has_space=`$ECHO "$path" | $GREP " "`
25509      if test "x$has_space" != x; then
25510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25513      fi
25514
25515      # Use eval to expand a potential ~
25516      eval path="$path"
25517      if test ! -f "$path" && test ! -d "$path"; then
25518        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25519      fi
25520
25521      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25522    fi
25523  fi
25524
25525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25526$as_echo_n "checking for Boot JDK... " >&6; }
25527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25528$as_echo "$BOOT_JDK" >&6; }
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25530$as_echo_n "checking Boot JDK version... " >&6; }
25531            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25533$as_echo "$BOOT_JDK_VERSION" >&6; }
25534          fi # end check jdk version
25535        fi # end check javac
25536      fi # end check java
25537    fi # end check boot jdk found
25538  fi
25539
25540    done
25541  fi
25542
25543  fi
25544
25545
25546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25548      # Do we have a bin/java?
25549      if test ! -x "$BOOT_JDK/bin/java"; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25552        BOOT_JDK_FOUND=no
25553      else
25554        # Do we have a bin/javac?
25555        if test ! -x "$BOOT_JDK/bin/javac"; then
25556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25560          BOOT_JDK_FOUND=no
25561        else
25562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25564
25565          # Extra M4 quote needed to protect [] in grep expression.
25566          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25567          if test "x$FOUND_CORRECT_VERSION" = x; then
25568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25572            BOOT_JDK_FOUND=no
25573          else
25574            # We're done! :-)
25575            BOOT_JDK_FOUND=yes
25576
25577  # Only process if variable expands to non-empty
25578
25579  if test "x$BOOT_JDK" != x; then
25580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25581
25582  # Input might be given as Windows format, start by converting to
25583  # unix format.
25584  path="$BOOT_JDK"
25585  new_path=`$CYGPATH -u "$path"`
25586
25587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25590  # "foo.exe" is OK but "foo" is an error.
25591  #
25592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25593  # It is also a way to make sure we got the proper file name for the real test later on.
25594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25595  if test "x$test_shortpath" = x; then
25596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25599  fi
25600
25601  # Call helper function which possibly converts this using DOS-style short mode.
25602  # If so, the updated path is stored in $new_path.
25603
25604  input_path="$new_path"
25605  # Check if we need to convert this using DOS-style short mode. If the path
25606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25607  # take no chances and rewrite it.
25608  # Note: m4 eats our [], so we need to use [ and ] instead.
25609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25610  if test "x$has_forbidden_chars" != x; then
25611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25615      # Going to short mode and back again did indeed matter. Since short mode is
25616      # case insensitive, let's make it lowercase to improve readability.
25617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25618      # Now convert it back to Unix-style (cygpath)
25619      input_path=`$CYGPATH -u "$shortmode_path"`
25620      new_path="$input_path"
25621    fi
25622  fi
25623
25624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25625  if test "x$test_cygdrive_prefix" = x; then
25626    # As a simple fix, exclude /usr/bin since it's not a real path.
25627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25629      # a path prefixed by /cygdrive for fixpath to work.
25630      new_path="$CYGWIN_ROOT_PATH$input_path"
25631    fi
25632  fi
25633
25634
25635  if test "x$path" != "x$new_path"; then
25636    BOOT_JDK="$new_path"
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25639  fi
25640
25641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25642
25643  path="$BOOT_JDK"
25644  has_colon=`$ECHO $path | $GREP ^.:`
25645  new_path="$path"
25646  if test "x$has_colon" = x; then
25647    # Not in mixed or Windows style, start by that.
25648    new_path=`cmd //c echo $path`
25649  fi
25650
25651
25652  input_path="$new_path"
25653  # Check if we need to convert this using DOS-style short mode. If the path
25654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655  # take no chances and rewrite it.
25656  # Note: m4 eats our [], so we need to use [ and ] instead.
25657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25658  if test "x$has_forbidden_chars" != x; then
25659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25661  fi
25662
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25681
25682    else
25683      # We're on a unix platform. Hooray! :)
25684      path="$BOOT_JDK"
25685      has_space=`$ECHO "$path" | $GREP " "`
25686      if test "x$has_space" != x; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25690      fi
25691
25692      # Use eval to expand a potential ~
25693      eval path="$path"
25694      if test ! -f "$path" && test ! -d "$path"; then
25695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25696      fi
25697
25698      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25699    fi
25700  fi
25701
25702            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25703$as_echo_n "checking for Boot JDK... " >&6; }
25704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25705$as_echo "$BOOT_JDK" >&6; }
25706            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25707$as_echo_n "checking Boot JDK version... " >&6; }
25708            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25710$as_echo "$BOOT_JDK_VERSION" >&6; }
25711          fi # end check jdk version
25712        fi # end check javac
25713      fi # end check java
25714    fi # end check boot jdk found
25715  fi
25716
25717
25718  if test "x$BOOT_JDK_FOUND" = xno; then
25719    # Now execute the test
25720
25721  if test "x$PROGRAMFILES" != x; then
25722    VIRTUAL_DIR="$PROGRAMFILES/Java"
25723
25724  windows_path="$VIRTUAL_DIR"
25725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25726    unix_path=`$CYGPATH -u "$windows_path"`
25727    VIRTUAL_DIR="$unix_path"
25728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25730    VIRTUAL_DIR="$unix_path"
25731  fi
25732
25733
25734  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25735  BOOT_JDK_SUFFIX=""
25736  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25737  if test "x$ALL_JDKS_FOUND" != x; then
25738    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25739
25740  if test "x$BOOT_JDK_FOUND" = xno; then
25741    # Now execute the test
25742
25743        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25744        if test -d "$BOOT_JDK"; then
25745          BOOT_JDK_FOUND=maybe
25746          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25747$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25748        fi
25749
25750
25751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25753      # Do we have a bin/java?
25754      if test ! -x "$BOOT_JDK/bin/java"; then
25755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25757        BOOT_JDK_FOUND=no
25758      else
25759        # Do we have a bin/javac?
25760        if test ! -x "$BOOT_JDK/bin/javac"; then
25761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25765          BOOT_JDK_FOUND=no
25766        else
25767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25769
25770          # Extra M4 quote needed to protect [] in grep expression.
25771          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25772          if test "x$FOUND_CORRECT_VERSION" = x; then
25773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25777            BOOT_JDK_FOUND=no
25778          else
25779            # We're done! :-)
25780            BOOT_JDK_FOUND=yes
25781
25782  # Only process if variable expands to non-empty
25783
25784  if test "x$BOOT_JDK" != x; then
25785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25786
25787  # Input might be given as Windows format, start by converting to
25788  # unix format.
25789  path="$BOOT_JDK"
25790  new_path=`$CYGPATH -u "$path"`
25791
25792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25795  # "foo.exe" is OK but "foo" is an error.
25796  #
25797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25798  # It is also a way to make sure we got the proper file name for the real test later on.
25799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25800  if test "x$test_shortpath" = x; then
25801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25804  fi
25805
25806  # Call helper function which possibly converts this using DOS-style short mode.
25807  # If so, the updated path is stored in $new_path.
25808
25809  input_path="$new_path"
25810  # Check if we need to convert this using DOS-style short mode. If the path
25811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25812  # take no chances and rewrite it.
25813  # Note: m4 eats our [], so we need to use [ and ] instead.
25814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25815  if test "x$has_forbidden_chars" != x; then
25816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25820      # Going to short mode and back again did indeed matter. Since short mode is
25821      # case insensitive, let's make it lowercase to improve readability.
25822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25823      # Now convert it back to Unix-style (cygpath)
25824      input_path=`$CYGPATH -u "$shortmode_path"`
25825      new_path="$input_path"
25826    fi
25827  fi
25828
25829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25830  if test "x$test_cygdrive_prefix" = x; then
25831    # As a simple fix, exclude /usr/bin since it's not a real path.
25832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25834      # a path prefixed by /cygdrive for fixpath to work.
25835      new_path="$CYGWIN_ROOT_PATH$input_path"
25836    fi
25837  fi
25838
25839
25840  if test "x$path" != "x$new_path"; then
25841    BOOT_JDK="$new_path"
25842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25844  fi
25845
25846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25847
25848  path="$BOOT_JDK"
25849  has_colon=`$ECHO $path | $GREP ^.:`
25850  new_path="$path"
25851  if test "x$has_colon" = x; then
25852    # Not in mixed or Windows style, start by that.
25853    new_path=`cmd //c echo $path`
25854  fi
25855
25856
25857  input_path="$new_path"
25858  # Check if we need to convert this using DOS-style short mode. If the path
25859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25860  # take no chances and rewrite it.
25861  # Note: m4 eats our [], so we need to use [ and ] instead.
25862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25863  if test "x$has_forbidden_chars" != x; then
25864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25866  fi
25867
25868
25869  windows_path="$new_path"
25870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25871    unix_path=`$CYGPATH -u "$windows_path"`
25872    new_path="$unix_path"
25873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25875    new_path="$unix_path"
25876  fi
25877
25878  if test "x$path" != "x$new_path"; then
25879    BOOT_JDK="$new_path"
25880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25882  fi
25883
25884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25886
25887    else
25888      # We're on a unix platform. Hooray! :)
25889      path="$BOOT_JDK"
25890      has_space=`$ECHO "$path" | $GREP " "`
25891      if test "x$has_space" != x; then
25892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25895      fi
25896
25897      # Use eval to expand a potential ~
25898      eval path="$path"
25899      if test ! -f "$path" && test ! -d "$path"; then
25900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25901      fi
25902
25903      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25904    fi
25905  fi
25906
25907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25908$as_echo_n "checking for Boot JDK... " >&6; }
25909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25910$as_echo "$BOOT_JDK" >&6; }
25911            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25912$as_echo_n "checking Boot JDK version... " >&6; }
25913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25915$as_echo "$BOOT_JDK_VERSION" >&6; }
25916          fi # end check jdk version
25917        fi # end check javac
25918      fi # end check java
25919    fi # end check boot jdk found
25920  fi
25921
25922    done
25923  fi
25924
25925  fi
25926
25927
25928    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25929    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25930      # Do we have a bin/java?
25931      if test ! -x "$BOOT_JDK/bin/java"; then
25932        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25934        BOOT_JDK_FOUND=no
25935      else
25936        # Do we have a bin/javac?
25937        if test ! -x "$BOOT_JDK/bin/javac"; then
25938          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25940          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25941$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25942          BOOT_JDK_FOUND=no
25943        else
25944          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25945          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25946
25947          # Extra M4 quote needed to protect [] in grep expression.
25948          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25949          if test "x$FOUND_CORRECT_VERSION" = x; then
25950            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25952            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25953$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25954            BOOT_JDK_FOUND=no
25955          else
25956            # We're done! :-)
25957            BOOT_JDK_FOUND=yes
25958
25959  # Only process if variable expands to non-empty
25960
25961  if test "x$BOOT_JDK" != x; then
25962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963
25964  # Input might be given as Windows format, start by converting to
25965  # unix format.
25966  path="$BOOT_JDK"
25967  new_path=`$CYGPATH -u "$path"`
25968
25969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25972  # "foo.exe" is OK but "foo" is an error.
25973  #
25974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25975  # It is also a way to make sure we got the proper file name for the real test later on.
25976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25977  if test "x$test_shortpath" = x; then
25978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25980    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25981  fi
25982
25983  # Call helper function which possibly converts this using DOS-style short mode.
25984  # If so, the updated path is stored in $new_path.
25985
25986  input_path="$new_path"
25987  # Check if we need to convert this using DOS-style short mode. If the path
25988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25989  # take no chances and rewrite it.
25990  # Note: m4 eats our [], so we need to use [ and ] instead.
25991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25992  if test "x$has_forbidden_chars" != x; then
25993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25997      # Going to short mode and back again did indeed matter. Since short mode is
25998      # case insensitive, let's make it lowercase to improve readability.
25999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26000      # Now convert it back to Unix-style (cygpath)
26001      input_path=`$CYGPATH -u "$shortmode_path"`
26002      new_path="$input_path"
26003    fi
26004  fi
26005
26006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26007  if test "x$test_cygdrive_prefix" = x; then
26008    # As a simple fix, exclude /usr/bin since it's not a real path.
26009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26011      # a path prefixed by /cygdrive for fixpath to work.
26012      new_path="$CYGWIN_ROOT_PATH$input_path"
26013    fi
26014  fi
26015
26016
26017  if test "x$path" != "x$new_path"; then
26018    BOOT_JDK="$new_path"
26019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26021  fi
26022
26023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26024
26025  path="$BOOT_JDK"
26026  has_colon=`$ECHO $path | $GREP ^.:`
26027  new_path="$path"
26028  if test "x$has_colon" = x; then
26029    # Not in mixed or Windows style, start by that.
26030    new_path=`cmd //c echo $path`
26031  fi
26032
26033
26034  input_path="$new_path"
26035  # Check if we need to convert this using DOS-style short mode. If the path
26036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26037  # take no chances and rewrite it.
26038  # Note: m4 eats our [], so we need to use [ and ] instead.
26039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26040  if test "x$has_forbidden_chars" != x; then
26041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26043  fi
26044
26045
26046  windows_path="$new_path"
26047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26048    unix_path=`$CYGPATH -u "$windows_path"`
26049    new_path="$unix_path"
26050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26052    new_path="$unix_path"
26053  fi
26054
26055  if test "x$path" != "x$new_path"; then
26056    BOOT_JDK="$new_path"
26057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26059  fi
26060
26061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26063
26064    else
26065      # We're on a unix platform. Hooray! :)
26066      path="$BOOT_JDK"
26067      has_space=`$ECHO "$path" | $GREP " "`
26068      if test "x$has_space" != x; then
26069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26072      fi
26073
26074      # Use eval to expand a potential ~
26075      eval path="$path"
26076      if test ! -f "$path" && test ! -d "$path"; then
26077        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26078      fi
26079
26080      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26081    fi
26082  fi
26083
26084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26085$as_echo_n "checking for Boot JDK... " >&6; }
26086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26087$as_echo "$BOOT_JDK" >&6; }
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26089$as_echo_n "checking Boot JDK version... " >&6; }
26090            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26092$as_echo "$BOOT_JDK_VERSION" >&6; }
26093          fi # end check jdk version
26094        fi # end check javac
26095      fi # end check java
26096    fi # end check boot jdk found
26097  fi
26098
26099
26100  if test "x$BOOT_JDK_FOUND" = xno; then
26101    # Now execute the test
26102
26103  if test "x$ProgramFiles" != x; then
26104    VIRTUAL_DIR="$ProgramFiles/Java"
26105
26106  windows_path="$VIRTUAL_DIR"
26107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26108    unix_path=`$CYGPATH -u "$windows_path"`
26109    VIRTUAL_DIR="$unix_path"
26110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26112    VIRTUAL_DIR="$unix_path"
26113  fi
26114
26115
26116  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26117  BOOT_JDK_SUFFIX=""
26118  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26119  if test "x$ALL_JDKS_FOUND" != x; then
26120    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26121
26122  if test "x$BOOT_JDK_FOUND" = xno; then
26123    # Now execute the test
26124
26125        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26126        if test -d "$BOOT_JDK"; then
26127          BOOT_JDK_FOUND=maybe
26128          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26129$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26130        fi
26131
26132
26133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26135      # Do we have a bin/java?
26136      if test ! -x "$BOOT_JDK/bin/java"; then
26137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26139        BOOT_JDK_FOUND=no
26140      else
26141        # Do we have a bin/javac?
26142        if test ! -x "$BOOT_JDK/bin/javac"; then
26143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26147          BOOT_JDK_FOUND=no
26148        else
26149          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26150          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26151
26152          # Extra M4 quote needed to protect [] in grep expression.
26153          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26154          if test "x$FOUND_CORRECT_VERSION" = x; then
26155            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26157            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26158$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26159            BOOT_JDK_FOUND=no
26160          else
26161            # We're done! :-)
26162            BOOT_JDK_FOUND=yes
26163
26164  # Only process if variable expands to non-empty
26165
26166  if test "x$BOOT_JDK" != x; then
26167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26168
26169  # Input might be given as Windows format, start by converting to
26170  # unix format.
26171  path="$BOOT_JDK"
26172  new_path=`$CYGPATH -u "$path"`
26173
26174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26177  # "foo.exe" is OK but "foo" is an error.
26178  #
26179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26180  # It is also a way to make sure we got the proper file name for the real test later on.
26181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26182  if test "x$test_shortpath" = x; then
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26185    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26186  fi
26187
26188  # Call helper function which possibly converts this using DOS-style short mode.
26189  # If so, the updated path is stored in $new_path.
26190
26191  input_path="$new_path"
26192  # Check if we need to convert this using DOS-style short mode. If the path
26193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26194  # take no chances and rewrite it.
26195  # Note: m4 eats our [], so we need to use [ and ] instead.
26196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26197  if test "x$has_forbidden_chars" != x; then
26198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26202      # Going to short mode and back again did indeed matter. Since short mode is
26203      # case insensitive, let's make it lowercase to improve readability.
26204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26205      # Now convert it back to Unix-style (cygpath)
26206      input_path=`$CYGPATH -u "$shortmode_path"`
26207      new_path="$input_path"
26208    fi
26209  fi
26210
26211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26212  if test "x$test_cygdrive_prefix" = x; then
26213    # As a simple fix, exclude /usr/bin since it's not a real path.
26214    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26216      # a path prefixed by /cygdrive for fixpath to work.
26217      new_path="$CYGWIN_ROOT_PATH$input_path"
26218    fi
26219  fi
26220
26221
26222  if test "x$path" != "x$new_path"; then
26223    BOOT_JDK="$new_path"
26224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26225$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26226  fi
26227
26228    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26229
26230  path="$BOOT_JDK"
26231  has_colon=`$ECHO $path | $GREP ^.:`
26232  new_path="$path"
26233  if test "x$has_colon" = x; then
26234    # Not in mixed or Windows style, start by that.
26235    new_path=`cmd //c echo $path`
26236  fi
26237
26238
26239  input_path="$new_path"
26240  # Check if we need to convert this using DOS-style short mode. If the path
26241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26242  # take no chances and rewrite it.
26243  # Note: m4 eats our [], so we need to use [ and ] instead.
26244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26245  if test "x$has_forbidden_chars" != x; then
26246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26248  fi
26249
26250
26251  windows_path="$new_path"
26252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26253    unix_path=`$CYGPATH -u "$windows_path"`
26254    new_path="$unix_path"
26255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26257    new_path="$unix_path"
26258  fi
26259
26260  if test "x$path" != "x$new_path"; then
26261    BOOT_JDK="$new_path"
26262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26264  fi
26265
26266  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26267  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26268
26269    else
26270      # We're on a unix platform. Hooray! :)
26271      path="$BOOT_JDK"
26272      has_space=`$ECHO "$path" | $GREP " "`
26273      if test "x$has_space" != x; then
26274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26276        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26277      fi
26278
26279      # Use eval to expand a potential ~
26280      eval path="$path"
26281      if test ! -f "$path" && test ! -d "$path"; then
26282        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26283      fi
26284
26285      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26286    fi
26287  fi
26288
26289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26290$as_echo_n "checking for Boot JDK... " >&6; }
26291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26292$as_echo "$BOOT_JDK" >&6; }
26293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26294$as_echo_n "checking Boot JDK version... " >&6; }
26295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26297$as_echo "$BOOT_JDK_VERSION" >&6; }
26298          fi # end check jdk version
26299        fi # end check javac
26300      fi # end check java
26301    fi # end check boot jdk found
26302  fi
26303
26304    done
26305  fi
26306
26307  fi
26308
26309
26310    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26311    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26312      # Do we have a bin/java?
26313      if test ! -x "$BOOT_JDK/bin/java"; then
26314        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26316        BOOT_JDK_FOUND=no
26317      else
26318        # Do we have a bin/javac?
26319        if test ! -x "$BOOT_JDK/bin/javac"; then
26320          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26322          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26323$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26324          BOOT_JDK_FOUND=no
26325        else
26326          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26327          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26328
26329          # Extra M4 quote needed to protect [] in grep expression.
26330          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26331          if test "x$FOUND_CORRECT_VERSION" = x; then
26332            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26334            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26335$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26336            BOOT_JDK_FOUND=no
26337          else
26338            # We're done! :-)
26339            BOOT_JDK_FOUND=yes
26340
26341  # Only process if variable expands to non-empty
26342
26343  if test "x$BOOT_JDK" != x; then
26344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26345
26346  # Input might be given as Windows format, start by converting to
26347  # unix format.
26348  path="$BOOT_JDK"
26349  new_path=`$CYGPATH -u "$path"`
26350
26351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26354  # "foo.exe" is OK but "foo" is an error.
26355  #
26356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26357  # It is also a way to make sure we got the proper file name for the real test later on.
26358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26359  if test "x$test_shortpath" = x; then
26360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26362    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26363  fi
26364
26365  # Call helper function which possibly converts this using DOS-style short mode.
26366  # If so, the updated path is stored in $new_path.
26367
26368  input_path="$new_path"
26369  # Check if we need to convert this using DOS-style short mode. If the path
26370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26371  # take no chances and rewrite it.
26372  # Note: m4 eats our [], so we need to use [ and ] instead.
26373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26374  if test "x$has_forbidden_chars" != x; then
26375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26379      # Going to short mode and back again did indeed matter. Since short mode is
26380      # case insensitive, let's make it lowercase to improve readability.
26381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26382      # Now convert it back to Unix-style (cygpath)
26383      input_path=`$CYGPATH -u "$shortmode_path"`
26384      new_path="$input_path"
26385    fi
26386  fi
26387
26388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26389  if test "x$test_cygdrive_prefix" = x; then
26390    # As a simple fix, exclude /usr/bin since it's not a real path.
26391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26393      # a path prefixed by /cygdrive for fixpath to work.
26394      new_path="$CYGWIN_ROOT_PATH$input_path"
26395    fi
26396  fi
26397
26398
26399  if test "x$path" != "x$new_path"; then
26400    BOOT_JDK="$new_path"
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26403  fi
26404
26405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26406
26407  path="$BOOT_JDK"
26408  has_colon=`$ECHO $path | $GREP ^.:`
26409  new_path="$path"
26410  if test "x$has_colon" = x; then
26411    # Not in mixed or Windows style, start by that.
26412    new_path=`cmd //c echo $path`
26413  fi
26414
26415
26416  input_path="$new_path"
26417  # Check if we need to convert this using DOS-style short mode. If the path
26418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26419  # take no chances and rewrite it.
26420  # Note: m4 eats our [], so we need to use [ and ] instead.
26421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26422  if test "x$has_forbidden_chars" != x; then
26423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26425  fi
26426
26427
26428  windows_path="$new_path"
26429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26430    unix_path=`$CYGPATH -u "$windows_path"`
26431    new_path="$unix_path"
26432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26434    new_path="$unix_path"
26435  fi
26436
26437  if test "x$path" != "x$new_path"; then
26438    BOOT_JDK="$new_path"
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26441  fi
26442
26443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26445
26446    else
26447      # We're on a unix platform. Hooray! :)
26448      path="$BOOT_JDK"
26449      has_space=`$ECHO "$path" | $GREP " "`
26450      if test "x$has_space" != x; then
26451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26454      fi
26455
26456      # Use eval to expand a potential ~
26457      eval path="$path"
26458      if test ! -f "$path" && test ! -d "$path"; then
26459        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26460      fi
26461
26462      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26463    fi
26464  fi
26465
26466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26467$as_echo_n "checking for Boot JDK... " >&6; }
26468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26469$as_echo "$BOOT_JDK" >&6; }
26470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26471$as_echo_n "checking Boot JDK version... " >&6; }
26472            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26474$as_echo "$BOOT_JDK_VERSION" >&6; }
26475          fi # end check jdk version
26476        fi # end check javac
26477      fi # end check java
26478    fi # end check boot jdk found
26479  fi
26480
26481
26482  if test "x$BOOT_JDK_FOUND" = xno; then
26483    # Now execute the test
26484
26485  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26486  BOOT_JDK_SUFFIX=""
26487  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26488  if test "x$ALL_JDKS_FOUND" != x; then
26489    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26490
26491  if test "x$BOOT_JDK_FOUND" = xno; then
26492    # Now execute the test
26493
26494        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26495        if test -d "$BOOT_JDK"; then
26496          BOOT_JDK_FOUND=maybe
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26498$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26499        fi
26500
26501
26502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26504      # Do we have a bin/java?
26505      if test ! -x "$BOOT_JDK/bin/java"; then
26506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26508        BOOT_JDK_FOUND=no
26509      else
26510        # Do we have a bin/javac?
26511        if test ! -x "$BOOT_JDK/bin/javac"; then
26512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26516          BOOT_JDK_FOUND=no
26517        else
26518          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26519          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26520
26521          # Extra M4 quote needed to protect [] in grep expression.
26522          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26523          if test "x$FOUND_CORRECT_VERSION" = x; then
26524            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26526            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26527$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26528            BOOT_JDK_FOUND=no
26529          else
26530            # We're done! :-)
26531            BOOT_JDK_FOUND=yes
26532
26533  # Only process if variable expands to non-empty
26534
26535  if test "x$BOOT_JDK" != x; then
26536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26537
26538  # Input might be given as Windows format, start by converting to
26539  # unix format.
26540  path="$BOOT_JDK"
26541  new_path=`$CYGPATH -u "$path"`
26542
26543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26546  # "foo.exe" is OK but "foo" is an error.
26547  #
26548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26549  # It is also a way to make sure we got the proper file name for the real test later on.
26550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26551  if test "x$test_shortpath" = x; then
26552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26553$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26554    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26555  fi
26556
26557  # Call helper function which possibly converts this using DOS-style short mode.
26558  # If so, the updated path is stored in $new_path.
26559
26560  input_path="$new_path"
26561  # Check if we need to convert this using DOS-style short mode. If the path
26562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26563  # take no chances and rewrite it.
26564  # Note: m4 eats our [], so we need to use [ and ] instead.
26565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26566  if test "x$has_forbidden_chars" != x; then
26567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26571      # Going to short mode and back again did indeed matter. Since short mode is
26572      # case insensitive, let's make it lowercase to improve readability.
26573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26574      # Now convert it back to Unix-style (cygpath)
26575      input_path=`$CYGPATH -u "$shortmode_path"`
26576      new_path="$input_path"
26577    fi
26578  fi
26579
26580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26581  if test "x$test_cygdrive_prefix" = x; then
26582    # As a simple fix, exclude /usr/bin since it's not a real path.
26583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26585      # a path prefixed by /cygdrive for fixpath to work.
26586      new_path="$CYGWIN_ROOT_PATH$input_path"
26587    fi
26588  fi
26589
26590
26591  if test "x$path" != "x$new_path"; then
26592    BOOT_JDK="$new_path"
26593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26595  fi
26596
26597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26598
26599  path="$BOOT_JDK"
26600  has_colon=`$ECHO $path | $GREP ^.:`
26601  new_path="$path"
26602  if test "x$has_colon" = x; then
26603    # Not in mixed or Windows style, start by that.
26604    new_path=`cmd //c echo $path`
26605  fi
26606
26607
26608  input_path="$new_path"
26609  # Check if we need to convert this using DOS-style short mode. If the path
26610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26611  # take no chances and rewrite it.
26612  # Note: m4 eats our [], so we need to use [ and ] instead.
26613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26614  if test "x$has_forbidden_chars" != x; then
26615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26617  fi
26618
26619
26620  windows_path="$new_path"
26621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26622    unix_path=`$CYGPATH -u "$windows_path"`
26623    new_path="$unix_path"
26624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26626    new_path="$unix_path"
26627  fi
26628
26629  if test "x$path" != "x$new_path"; then
26630    BOOT_JDK="$new_path"
26631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26633  fi
26634
26635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26637
26638    else
26639      # We're on a unix platform. Hooray! :)
26640      path="$BOOT_JDK"
26641      has_space=`$ECHO "$path" | $GREP " "`
26642      if test "x$has_space" != x; then
26643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26646      fi
26647
26648      # Use eval to expand a potential ~
26649      eval path="$path"
26650      if test ! -f "$path" && test ! -d "$path"; then
26651        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26652      fi
26653
26654      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26655    fi
26656  fi
26657
26658            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26659$as_echo_n "checking for Boot JDK... " >&6; }
26660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26661$as_echo "$BOOT_JDK" >&6; }
26662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26663$as_echo_n "checking Boot JDK version... " >&6; }
26664            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26666$as_echo "$BOOT_JDK_VERSION" >&6; }
26667          fi # end check jdk version
26668        fi # end check javac
26669      fi # end check java
26670    fi # end check boot jdk found
26671  fi
26672
26673    done
26674  fi
26675
26676
26677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26679      # Do we have a bin/java?
26680      if test ! -x "$BOOT_JDK/bin/java"; then
26681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26683        BOOT_JDK_FOUND=no
26684      else
26685        # Do we have a bin/javac?
26686        if test ! -x "$BOOT_JDK/bin/javac"; then
26687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26691          BOOT_JDK_FOUND=no
26692        else
26693          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26694          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26695
26696          # Extra M4 quote needed to protect [] in grep expression.
26697          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26698          if test "x$FOUND_CORRECT_VERSION" = x; then
26699            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26701            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26702$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26703            BOOT_JDK_FOUND=no
26704          else
26705            # We're done! :-)
26706            BOOT_JDK_FOUND=yes
26707
26708  # Only process if variable expands to non-empty
26709
26710  if test "x$BOOT_JDK" != x; then
26711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26712
26713  # Input might be given as Windows format, start by converting to
26714  # unix format.
26715  path="$BOOT_JDK"
26716  new_path=`$CYGPATH -u "$path"`
26717
26718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26721  # "foo.exe" is OK but "foo" is an error.
26722  #
26723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26724  # It is also a way to make sure we got the proper file name for the real test later on.
26725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26726  if test "x$test_shortpath" = x; then
26727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26730  fi
26731
26732  # Call helper function which possibly converts this using DOS-style short mode.
26733  # If so, the updated path is stored in $new_path.
26734
26735  input_path="$new_path"
26736  # Check if we need to convert this using DOS-style short mode. If the path
26737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26738  # take no chances and rewrite it.
26739  # Note: m4 eats our [], so we need to use [ and ] instead.
26740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26741  if test "x$has_forbidden_chars" != x; then
26742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26746      # Going to short mode and back again did indeed matter. Since short mode is
26747      # case insensitive, let's make it lowercase to improve readability.
26748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26749      # Now convert it back to Unix-style (cygpath)
26750      input_path=`$CYGPATH -u "$shortmode_path"`
26751      new_path="$input_path"
26752    fi
26753  fi
26754
26755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26756  if test "x$test_cygdrive_prefix" = x; then
26757    # As a simple fix, exclude /usr/bin since it's not a real path.
26758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26760      # a path prefixed by /cygdrive for fixpath to work.
26761      new_path="$CYGWIN_ROOT_PATH$input_path"
26762    fi
26763  fi
26764
26765
26766  if test "x$path" != "x$new_path"; then
26767    BOOT_JDK="$new_path"
26768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26770  fi
26771
26772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26773
26774  path="$BOOT_JDK"
26775  has_colon=`$ECHO $path | $GREP ^.:`
26776  new_path="$path"
26777  if test "x$has_colon" = x; then
26778    # Not in mixed or Windows style, start by that.
26779    new_path=`cmd //c echo $path`
26780  fi
26781
26782
26783  input_path="$new_path"
26784  # Check if we need to convert this using DOS-style short mode. If the path
26785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26786  # take no chances and rewrite it.
26787  # Note: m4 eats our [], so we need to use [ and ] instead.
26788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26789  if test "x$has_forbidden_chars" != x; then
26790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26792  fi
26793
26794
26795  windows_path="$new_path"
26796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26797    unix_path=`$CYGPATH -u "$windows_path"`
26798    new_path="$unix_path"
26799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26801    new_path="$unix_path"
26802  fi
26803
26804  if test "x$path" != "x$new_path"; then
26805    BOOT_JDK="$new_path"
26806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26808  fi
26809
26810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26812
26813    else
26814      # We're on a unix platform. Hooray! :)
26815      path="$BOOT_JDK"
26816      has_space=`$ECHO "$path" | $GREP " "`
26817      if test "x$has_space" != x; then
26818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26821      fi
26822
26823      # Use eval to expand a potential ~
26824      eval path="$path"
26825      if test ! -f "$path" && test ! -d "$path"; then
26826        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26827      fi
26828
26829      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26830    fi
26831  fi
26832
26833            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26834$as_echo_n "checking for Boot JDK... " >&6; }
26835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26836$as_echo "$BOOT_JDK" >&6; }
26837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26838$as_echo_n "checking Boot JDK version... " >&6; }
26839            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26841$as_echo "$BOOT_JDK_VERSION" >&6; }
26842          fi # end check jdk version
26843        fi # end check javac
26844      fi # end check java
26845    fi # end check boot jdk found
26846  fi
26847
26848  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26849
26850  if test "x$BOOT_JDK_FOUND" = xno; then
26851    # Now execute the test
26852
26853  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26854  BOOT_JDK_SUFFIX="/Contents/Home"
26855  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26856  if test "x$ALL_JDKS_FOUND" != x; then
26857    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26858
26859  if test "x$BOOT_JDK_FOUND" = xno; then
26860    # Now execute the test
26861
26862        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26863        if test -d "$BOOT_JDK"; then
26864          BOOT_JDK_FOUND=maybe
26865          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26866$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26867        fi
26868
26869
26870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26872      # Do we have a bin/java?
26873      if test ! -x "$BOOT_JDK/bin/java"; then
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26876        BOOT_JDK_FOUND=no
26877      else
26878        # Do we have a bin/javac?
26879        if test ! -x "$BOOT_JDK/bin/javac"; then
26880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26884          BOOT_JDK_FOUND=no
26885        else
26886          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26887          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26888
26889          # Extra M4 quote needed to protect [] in grep expression.
26890          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26891          if test "x$FOUND_CORRECT_VERSION" = x; then
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26894            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26895$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26896            BOOT_JDK_FOUND=no
26897          else
26898            # We're done! :-)
26899            BOOT_JDK_FOUND=yes
26900
26901  # Only process if variable expands to non-empty
26902
26903  if test "x$BOOT_JDK" != x; then
26904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905
26906  # Input might be given as Windows format, start by converting to
26907  # unix format.
26908  path="$BOOT_JDK"
26909  new_path=`$CYGPATH -u "$path"`
26910
26911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26914  # "foo.exe" is OK but "foo" is an error.
26915  #
26916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26917  # It is also a way to make sure we got the proper file name for the real test later on.
26918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26919  if test "x$test_shortpath" = x; then
26920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26922    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26923  fi
26924
26925  # Call helper function which possibly converts this using DOS-style short mode.
26926  # If so, the updated path is stored in $new_path.
26927
26928  input_path="$new_path"
26929  # Check if we need to convert this using DOS-style short mode. If the path
26930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26931  # take no chances and rewrite it.
26932  # Note: m4 eats our [], so we need to use [ and ] instead.
26933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26934  if test "x$has_forbidden_chars" != x; then
26935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26939      # Going to short mode and back again did indeed matter. Since short mode is
26940      # case insensitive, let's make it lowercase to improve readability.
26941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26942      # Now convert it back to Unix-style (cygpath)
26943      input_path=`$CYGPATH -u "$shortmode_path"`
26944      new_path="$input_path"
26945    fi
26946  fi
26947
26948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26949  if test "x$test_cygdrive_prefix" = x; then
26950    # As a simple fix, exclude /usr/bin since it's not a real path.
26951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26953      # a path prefixed by /cygdrive for fixpath to work.
26954      new_path="$CYGWIN_ROOT_PATH$input_path"
26955    fi
26956  fi
26957
26958
26959  if test "x$path" != "x$new_path"; then
26960    BOOT_JDK="$new_path"
26961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26963  fi
26964
26965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966
26967  path="$BOOT_JDK"
26968  has_colon=`$ECHO $path | $GREP ^.:`
26969  new_path="$path"
26970  if test "x$has_colon" = x; then
26971    # Not in mixed or Windows style, start by that.
26972    new_path=`cmd //c echo $path`
26973  fi
26974
26975
26976  input_path="$new_path"
26977  # Check if we need to convert this using DOS-style short mode. If the path
26978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26979  # take no chances and rewrite it.
26980  # Note: m4 eats our [], so we need to use [ and ] instead.
26981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26982  if test "x$has_forbidden_chars" != x; then
26983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26985  fi
26986
26987
26988  windows_path="$new_path"
26989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26990    unix_path=`$CYGPATH -u "$windows_path"`
26991    new_path="$unix_path"
26992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26994    new_path="$unix_path"
26995  fi
26996
26997  if test "x$path" != "x$new_path"; then
26998    BOOT_JDK="$new_path"
26999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27001  fi
27002
27003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27005
27006    else
27007      # We're on a unix platform. Hooray! :)
27008      path="$BOOT_JDK"
27009      has_space=`$ECHO "$path" | $GREP " "`
27010      if test "x$has_space" != x; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27014      fi
27015
27016      # Use eval to expand a potential ~
27017      eval path="$path"
27018      if test ! -f "$path" && test ! -d "$path"; then
27019        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27020      fi
27021
27022      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27023    fi
27024  fi
27025
27026            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27027$as_echo_n "checking for Boot JDK... " >&6; }
27028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27029$as_echo "$BOOT_JDK" >&6; }
27030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27031$as_echo_n "checking Boot JDK version... " >&6; }
27032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27034$as_echo "$BOOT_JDK_VERSION" >&6; }
27035          fi # end check jdk version
27036        fi # end check javac
27037      fi # end check java
27038    fi # end check boot jdk found
27039  fi
27040
27041    done
27042  fi
27043
27044
27045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27047      # Do we have a bin/java?
27048      if test ! -x "$BOOT_JDK/bin/java"; then
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27051        BOOT_JDK_FOUND=no
27052      else
27053        # Do we have a bin/javac?
27054        if test ! -x "$BOOT_JDK/bin/javac"; then
27055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27059          BOOT_JDK_FOUND=no
27060        else
27061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27063
27064          # Extra M4 quote needed to protect [] in grep expression.
27065          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27066          if test "x$FOUND_CORRECT_VERSION" = x; then
27067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27071            BOOT_JDK_FOUND=no
27072          else
27073            # We're done! :-)
27074            BOOT_JDK_FOUND=yes
27075
27076  # Only process if variable expands to non-empty
27077
27078  if test "x$BOOT_JDK" != x; then
27079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080
27081  # Input might be given as Windows format, start by converting to
27082  # unix format.
27083  path="$BOOT_JDK"
27084  new_path=`$CYGPATH -u "$path"`
27085
27086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27089  # "foo.exe" is OK but "foo" is an error.
27090  #
27091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27092  # It is also a way to make sure we got the proper file name for the real test later on.
27093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27094  if test "x$test_shortpath" = x; then
27095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27098  fi
27099
27100  # Call helper function which possibly converts this using DOS-style short mode.
27101  # If so, the updated path is stored in $new_path.
27102
27103  input_path="$new_path"
27104  # Check if we need to convert this using DOS-style short mode. If the path
27105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27106  # take no chances and rewrite it.
27107  # Note: m4 eats our [], so we need to use [ and ] instead.
27108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27109  if test "x$has_forbidden_chars" != x; then
27110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27114      # Going to short mode and back again did indeed matter. Since short mode is
27115      # case insensitive, let's make it lowercase to improve readability.
27116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27117      # Now convert it back to Unix-style (cygpath)
27118      input_path=`$CYGPATH -u "$shortmode_path"`
27119      new_path="$input_path"
27120    fi
27121  fi
27122
27123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27124  if test "x$test_cygdrive_prefix" = x; then
27125    # As a simple fix, exclude /usr/bin since it's not a real path.
27126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27128      # a path prefixed by /cygdrive for fixpath to work.
27129      new_path="$CYGWIN_ROOT_PATH$input_path"
27130    fi
27131  fi
27132
27133
27134  if test "x$path" != "x$new_path"; then
27135    BOOT_JDK="$new_path"
27136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27138  fi
27139
27140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27141
27142  path="$BOOT_JDK"
27143  has_colon=`$ECHO $path | $GREP ^.:`
27144  new_path="$path"
27145  if test "x$has_colon" = x; then
27146    # Not in mixed or Windows style, start by that.
27147    new_path=`cmd //c echo $path`
27148  fi
27149
27150
27151  input_path="$new_path"
27152  # Check if we need to convert this using DOS-style short mode. If the path
27153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27154  # take no chances and rewrite it.
27155  # Note: m4 eats our [], so we need to use [ and ] instead.
27156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27157  if test "x$has_forbidden_chars" != x; then
27158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27160  fi
27161
27162
27163  windows_path="$new_path"
27164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27165    unix_path=`$CYGPATH -u "$windows_path"`
27166    new_path="$unix_path"
27167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27169    new_path="$unix_path"
27170  fi
27171
27172  if test "x$path" != "x$new_path"; then
27173    BOOT_JDK="$new_path"
27174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27176  fi
27177
27178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27180
27181    else
27182      # We're on a unix platform. Hooray! :)
27183      path="$BOOT_JDK"
27184      has_space=`$ECHO "$path" | $GREP " "`
27185      if test "x$has_space" != x; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27189      fi
27190
27191      # Use eval to expand a potential ~
27192      eval path="$path"
27193      if test ! -f "$path" && test ! -d "$path"; then
27194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27195      fi
27196
27197      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27198    fi
27199  fi
27200
27201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27202$as_echo_n "checking for Boot JDK... " >&6; }
27203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27204$as_echo "$BOOT_JDK" >&6; }
27205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27206$as_echo_n "checking Boot JDK version... " >&6; }
27207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27209$as_echo "$BOOT_JDK_VERSION" >&6; }
27210          fi # end check jdk version
27211        fi # end check javac
27212      fi # end check java
27213    fi # end check boot jdk found
27214  fi
27215
27216
27217  if test "x$BOOT_JDK_FOUND" = xno; then
27218    # Now execute the test
27219
27220  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27221  BOOT_JDK_SUFFIX="/Contents/Home"
27222  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27223  if test "x$ALL_JDKS_FOUND" != x; then
27224    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27225
27226  if test "x$BOOT_JDK_FOUND" = xno; then
27227    # Now execute the test
27228
27229        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27230        if test -d "$BOOT_JDK"; then
27231          BOOT_JDK_FOUND=maybe
27232          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27233$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27234        fi
27235
27236
27237    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27238    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27239      # Do we have a bin/java?
27240      if test ! -x "$BOOT_JDK/bin/java"; then
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27243        BOOT_JDK_FOUND=no
27244      else
27245        # Do we have a bin/javac?
27246        if test ! -x "$BOOT_JDK/bin/javac"; then
27247          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27249          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27250$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27251          BOOT_JDK_FOUND=no
27252        else
27253          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27254          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27255
27256          # Extra M4 quote needed to protect [] in grep expression.
27257          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27258          if test "x$FOUND_CORRECT_VERSION" = x; then
27259            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27261            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27262$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27263            BOOT_JDK_FOUND=no
27264          else
27265            # We're done! :-)
27266            BOOT_JDK_FOUND=yes
27267
27268  # Only process if variable expands to non-empty
27269
27270  if test "x$BOOT_JDK" != x; then
27271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27272
27273  # Input might be given as Windows format, start by converting to
27274  # unix format.
27275  path="$BOOT_JDK"
27276  new_path=`$CYGPATH -u "$path"`
27277
27278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27281  # "foo.exe" is OK but "foo" is an error.
27282  #
27283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27284  # It is also a way to make sure we got the proper file name for the real test later on.
27285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27286  if test "x$test_shortpath" = x; then
27287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27289    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27290  fi
27291
27292  # Call helper function which possibly converts this using DOS-style short mode.
27293  # If so, the updated path is stored in $new_path.
27294
27295  input_path="$new_path"
27296  # Check if we need to convert this using DOS-style short mode. If the path
27297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27298  # take no chances and rewrite it.
27299  # Note: m4 eats our [], so we need to use [ and ] instead.
27300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27301  if test "x$has_forbidden_chars" != x; then
27302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27306      # Going to short mode and back again did indeed matter. Since short mode is
27307      # case insensitive, let's make it lowercase to improve readability.
27308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27309      # Now convert it back to Unix-style (cygpath)
27310      input_path=`$CYGPATH -u "$shortmode_path"`
27311      new_path="$input_path"
27312    fi
27313  fi
27314
27315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27316  if test "x$test_cygdrive_prefix" = x; then
27317    # As a simple fix, exclude /usr/bin since it's not a real path.
27318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27320      # a path prefixed by /cygdrive for fixpath to work.
27321      new_path="$CYGWIN_ROOT_PATH$input_path"
27322    fi
27323  fi
27324
27325
27326  if test "x$path" != "x$new_path"; then
27327    BOOT_JDK="$new_path"
27328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27330  fi
27331
27332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27333
27334  path="$BOOT_JDK"
27335  has_colon=`$ECHO $path | $GREP ^.:`
27336  new_path="$path"
27337  if test "x$has_colon" = x; then
27338    # Not in mixed or Windows style, start by that.
27339    new_path=`cmd //c echo $path`
27340  fi
27341
27342
27343  input_path="$new_path"
27344  # Check if we need to convert this using DOS-style short mode. If the path
27345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27346  # take no chances and rewrite it.
27347  # Note: m4 eats our [], so we need to use [ and ] instead.
27348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27349  if test "x$has_forbidden_chars" != x; then
27350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27352  fi
27353
27354
27355  windows_path="$new_path"
27356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27357    unix_path=`$CYGPATH -u "$windows_path"`
27358    new_path="$unix_path"
27359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27361    new_path="$unix_path"
27362  fi
27363
27364  if test "x$path" != "x$new_path"; then
27365    BOOT_JDK="$new_path"
27366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27368  fi
27369
27370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27372
27373    else
27374      # We're on a unix platform. Hooray! :)
27375      path="$BOOT_JDK"
27376      has_space=`$ECHO "$path" | $GREP " "`
27377      if test "x$has_space" != x; then
27378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27381      fi
27382
27383      # Use eval to expand a potential ~
27384      eval path="$path"
27385      if test ! -f "$path" && test ! -d "$path"; then
27386        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27387      fi
27388
27389      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27390    fi
27391  fi
27392
27393            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27394$as_echo_n "checking for Boot JDK... " >&6; }
27395            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27396$as_echo "$BOOT_JDK" >&6; }
27397            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27398$as_echo_n "checking Boot JDK version... " >&6; }
27399            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27401$as_echo "$BOOT_JDK_VERSION" >&6; }
27402          fi # end check jdk version
27403        fi # end check javac
27404      fi # end check java
27405    fi # end check boot jdk found
27406  fi
27407
27408    done
27409  fi
27410
27411
27412    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27413    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27414      # Do we have a bin/java?
27415      if test ! -x "$BOOT_JDK/bin/java"; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27418        BOOT_JDK_FOUND=no
27419      else
27420        # Do we have a bin/javac?
27421        if test ! -x "$BOOT_JDK/bin/javac"; then
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27424          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27425$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27426          BOOT_JDK_FOUND=no
27427        else
27428          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27429          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27430
27431          # Extra M4 quote needed to protect [] in grep expression.
27432          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27433          if test "x$FOUND_CORRECT_VERSION" = x; then
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27436            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27437$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27438            BOOT_JDK_FOUND=no
27439          else
27440            # We're done! :-)
27441            BOOT_JDK_FOUND=yes
27442
27443  # Only process if variable expands to non-empty
27444
27445  if test "x$BOOT_JDK" != x; then
27446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447
27448  # Input might be given as Windows format, start by converting to
27449  # unix format.
27450  path="$BOOT_JDK"
27451  new_path=`$CYGPATH -u "$path"`
27452
27453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27456  # "foo.exe" is OK but "foo" is an error.
27457  #
27458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27459  # It is also a way to make sure we got the proper file name for the real test later on.
27460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27461  if test "x$test_shortpath" = x; then
27462    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27464    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27465  fi
27466
27467  # Call helper function which possibly converts this using DOS-style short mode.
27468  # If so, the updated path is stored in $new_path.
27469
27470  input_path="$new_path"
27471  # Check if we need to convert this using DOS-style short mode. If the path
27472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27473  # take no chances and rewrite it.
27474  # Note: m4 eats our [], so we need to use [ and ] instead.
27475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27476  if test "x$has_forbidden_chars" != x; then
27477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27481      # Going to short mode and back again did indeed matter. Since short mode is
27482      # case insensitive, let's make it lowercase to improve readability.
27483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27484      # Now convert it back to Unix-style (cygpath)
27485      input_path=`$CYGPATH -u "$shortmode_path"`
27486      new_path="$input_path"
27487    fi
27488  fi
27489
27490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27491  if test "x$test_cygdrive_prefix" = x; then
27492    # As a simple fix, exclude /usr/bin since it's not a real path.
27493    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27495      # a path prefixed by /cygdrive for fixpath to work.
27496      new_path="$CYGWIN_ROOT_PATH$input_path"
27497    fi
27498  fi
27499
27500
27501  if test "x$path" != "x$new_path"; then
27502    BOOT_JDK="$new_path"
27503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27504$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27505  fi
27506
27507    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27508
27509  path="$BOOT_JDK"
27510  has_colon=`$ECHO $path | $GREP ^.:`
27511  new_path="$path"
27512  if test "x$has_colon" = x; then
27513    # Not in mixed or Windows style, start by that.
27514    new_path=`cmd //c echo $path`
27515  fi
27516
27517
27518  input_path="$new_path"
27519  # Check if we need to convert this using DOS-style short mode. If the path
27520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27521  # take no chances and rewrite it.
27522  # Note: m4 eats our [], so we need to use [ and ] instead.
27523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27524  if test "x$has_forbidden_chars" != x; then
27525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27527  fi
27528
27529
27530  windows_path="$new_path"
27531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27532    unix_path=`$CYGPATH -u "$windows_path"`
27533    new_path="$unix_path"
27534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27536    new_path="$unix_path"
27537  fi
27538
27539  if test "x$path" != "x$new_path"; then
27540    BOOT_JDK="$new_path"
27541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27543  fi
27544
27545  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27546  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27547
27548    else
27549      # We're on a unix platform. Hooray! :)
27550      path="$BOOT_JDK"
27551      has_space=`$ECHO "$path" | $GREP " "`
27552      if test "x$has_space" != x; then
27553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27555        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27556      fi
27557
27558      # Use eval to expand a potential ~
27559      eval path="$path"
27560      if test ! -f "$path" && test ! -d "$path"; then
27561        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27562      fi
27563
27564      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27565    fi
27566  fi
27567
27568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27569$as_echo_n "checking for Boot JDK... " >&6; }
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27571$as_echo "$BOOT_JDK" >&6; }
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27573$as_echo_n "checking Boot JDK version... " >&6; }
27574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27576$as_echo "$BOOT_JDK_VERSION" >&6; }
27577          fi # end check jdk version
27578        fi # end check javac
27579      fi # end check java
27580    fi # end check boot jdk found
27581  fi
27582
27583  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27584
27585  if test "x$BOOT_JDK_FOUND" = xno; then
27586    # Now execute the test
27587
27588  BOOT_JDK_PREFIX="/usr/lib/jvm"
27589  BOOT_JDK_SUFFIX=""
27590  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27591  if test "x$ALL_JDKS_FOUND" != x; then
27592    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27593
27594  if test "x$BOOT_JDK_FOUND" = xno; then
27595    # Now execute the test
27596
27597        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27598        if test -d "$BOOT_JDK"; then
27599          BOOT_JDK_FOUND=maybe
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27601$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27602        fi
27603
27604
27605    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27606    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27607      # Do we have a bin/java?
27608      if test ! -x "$BOOT_JDK/bin/java"; then
27609        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27611        BOOT_JDK_FOUND=no
27612      else
27613        # Do we have a bin/javac?
27614        if test ! -x "$BOOT_JDK/bin/javac"; then
27615          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27617          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27618$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27619          BOOT_JDK_FOUND=no
27620        else
27621          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27622          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27623
27624          # Extra M4 quote needed to protect [] in grep expression.
27625          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27626          if test "x$FOUND_CORRECT_VERSION" = x; then
27627            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27629            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27630$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27631            BOOT_JDK_FOUND=no
27632          else
27633            # We're done! :-)
27634            BOOT_JDK_FOUND=yes
27635
27636  # Only process if variable expands to non-empty
27637
27638  if test "x$BOOT_JDK" != x; then
27639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27640
27641  # Input might be given as Windows format, start by converting to
27642  # unix format.
27643  path="$BOOT_JDK"
27644  new_path=`$CYGPATH -u "$path"`
27645
27646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27649  # "foo.exe" is OK but "foo" is an error.
27650  #
27651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27652  # It is also a way to make sure we got the proper file name for the real test later on.
27653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27654  if test "x$test_shortpath" = x; then
27655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27658  fi
27659
27660  # Call helper function which possibly converts this using DOS-style short mode.
27661  # If so, the updated path is stored in $new_path.
27662
27663  input_path="$new_path"
27664  # Check if we need to convert this using DOS-style short mode. If the path
27665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27666  # take no chances and rewrite it.
27667  # Note: m4 eats our [], so we need to use [ and ] instead.
27668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27669  if test "x$has_forbidden_chars" != x; then
27670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27674      # Going to short mode and back again did indeed matter. Since short mode is
27675      # case insensitive, let's make it lowercase to improve readability.
27676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27677      # Now convert it back to Unix-style (cygpath)
27678      input_path=`$CYGPATH -u "$shortmode_path"`
27679      new_path="$input_path"
27680    fi
27681  fi
27682
27683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27684  if test "x$test_cygdrive_prefix" = x; then
27685    # As a simple fix, exclude /usr/bin since it's not a real path.
27686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27688      # a path prefixed by /cygdrive for fixpath to work.
27689      new_path="$CYGWIN_ROOT_PATH$input_path"
27690    fi
27691  fi
27692
27693
27694  if test "x$path" != "x$new_path"; then
27695    BOOT_JDK="$new_path"
27696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27698  fi
27699
27700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27701
27702  path="$BOOT_JDK"
27703  has_colon=`$ECHO $path | $GREP ^.:`
27704  new_path="$path"
27705  if test "x$has_colon" = x; then
27706    # Not in mixed or Windows style, start by that.
27707    new_path=`cmd //c echo $path`
27708  fi
27709
27710
27711  input_path="$new_path"
27712  # Check if we need to convert this using DOS-style short mode. If the path
27713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27714  # take no chances and rewrite it.
27715  # Note: m4 eats our [], so we need to use [ and ] instead.
27716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27717  if test "x$has_forbidden_chars" != x; then
27718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27720  fi
27721
27722
27723  windows_path="$new_path"
27724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27725    unix_path=`$CYGPATH -u "$windows_path"`
27726    new_path="$unix_path"
27727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27729    new_path="$unix_path"
27730  fi
27731
27732  if test "x$path" != "x$new_path"; then
27733    BOOT_JDK="$new_path"
27734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27736  fi
27737
27738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27740
27741    else
27742      # We're on a unix platform. Hooray! :)
27743      path="$BOOT_JDK"
27744      has_space=`$ECHO "$path" | $GREP " "`
27745      if test "x$has_space" != x; then
27746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27748        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27749      fi
27750
27751      # Use eval to expand a potential ~
27752      eval path="$path"
27753      if test ! -f "$path" && test ! -d "$path"; then
27754        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27755      fi
27756
27757      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27758    fi
27759  fi
27760
27761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27762$as_echo_n "checking for Boot JDK... " >&6; }
27763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27764$as_echo "$BOOT_JDK" >&6; }
27765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27766$as_echo_n "checking Boot JDK version... " >&6; }
27767            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27769$as_echo "$BOOT_JDK_VERSION" >&6; }
27770          fi # end check jdk version
27771        fi # end check javac
27772      fi # end check java
27773    fi # end check boot jdk found
27774  fi
27775
27776    done
27777  fi
27778
27779
27780    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27781    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27782      # Do we have a bin/java?
27783      if test ! -x "$BOOT_JDK/bin/java"; then
27784        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27786        BOOT_JDK_FOUND=no
27787      else
27788        # Do we have a bin/javac?
27789        if test ! -x "$BOOT_JDK/bin/javac"; then
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27792          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27793$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27794          BOOT_JDK_FOUND=no
27795        else
27796          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27797          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27798
27799          # Extra M4 quote needed to protect [] in grep expression.
27800          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27801          if test "x$FOUND_CORRECT_VERSION" = x; then
27802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27804            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27805$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27806            BOOT_JDK_FOUND=no
27807          else
27808            # We're done! :-)
27809            BOOT_JDK_FOUND=yes
27810
27811  # Only process if variable expands to non-empty
27812
27813  if test "x$BOOT_JDK" != x; then
27814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27815
27816  # Input might be given as Windows format, start by converting to
27817  # unix format.
27818  path="$BOOT_JDK"
27819  new_path=`$CYGPATH -u "$path"`
27820
27821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27824  # "foo.exe" is OK but "foo" is an error.
27825  #
27826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27827  # It is also a way to make sure we got the proper file name for the real test later on.
27828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27829  if test "x$test_shortpath" = x; then
27830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27833  fi
27834
27835  # Call helper function which possibly converts this using DOS-style short mode.
27836  # If so, the updated path is stored in $new_path.
27837
27838  input_path="$new_path"
27839  # Check if we need to convert this using DOS-style short mode. If the path
27840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27841  # take no chances and rewrite it.
27842  # Note: m4 eats our [], so we need to use [ and ] instead.
27843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27844  if test "x$has_forbidden_chars" != x; then
27845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27849      # Going to short mode and back again did indeed matter. Since short mode is
27850      # case insensitive, let's make it lowercase to improve readability.
27851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27852      # Now convert it back to Unix-style (cygpath)
27853      input_path=`$CYGPATH -u "$shortmode_path"`
27854      new_path="$input_path"
27855    fi
27856  fi
27857
27858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27859  if test "x$test_cygdrive_prefix" = x; then
27860    # As a simple fix, exclude /usr/bin since it's not a real path.
27861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27863      # a path prefixed by /cygdrive for fixpath to work.
27864      new_path="$CYGWIN_ROOT_PATH$input_path"
27865    fi
27866  fi
27867
27868
27869  if test "x$path" != "x$new_path"; then
27870    BOOT_JDK="$new_path"
27871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27873  fi
27874
27875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876
27877  path="$BOOT_JDK"
27878  has_colon=`$ECHO $path | $GREP ^.:`
27879  new_path="$path"
27880  if test "x$has_colon" = x; then
27881    # Not in mixed or Windows style, start by that.
27882    new_path=`cmd //c echo $path`
27883  fi
27884
27885
27886  input_path="$new_path"
27887  # Check if we need to convert this using DOS-style short mode. If the path
27888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27889  # take no chances and rewrite it.
27890  # Note: m4 eats our [], so we need to use [ and ] instead.
27891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27892  if test "x$has_forbidden_chars" != x; then
27893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895  fi
27896
27897
27898  windows_path="$new_path"
27899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27900    unix_path=`$CYGPATH -u "$windows_path"`
27901    new_path="$unix_path"
27902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27904    new_path="$unix_path"
27905  fi
27906
27907  if test "x$path" != "x$new_path"; then
27908    BOOT_JDK="$new_path"
27909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27911  fi
27912
27913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27915
27916    else
27917      # We're on a unix platform. Hooray! :)
27918      path="$BOOT_JDK"
27919      has_space=`$ECHO "$path" | $GREP " "`
27920      if test "x$has_space" != x; then
27921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27924      fi
27925
27926      # Use eval to expand a potential ~
27927      eval path="$path"
27928      if test ! -f "$path" && test ! -d "$path"; then
27929        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27930      fi
27931
27932      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27933    fi
27934  fi
27935
27936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27937$as_echo_n "checking for Boot JDK... " >&6; }
27938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27939$as_echo "$BOOT_JDK" >&6; }
27940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27941$as_echo_n "checking Boot JDK version... " >&6; }
27942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27944$as_echo "$BOOT_JDK_VERSION" >&6; }
27945          fi # end check jdk version
27946        fi # end check javac
27947      fi # end check java
27948    fi # end check boot jdk found
27949  fi
27950
27951  fi
27952
27953
27954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27956      # Do we have a bin/java?
27957      if test ! -x "$BOOT_JDK/bin/java"; then
27958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27960        BOOT_JDK_FOUND=no
27961      else
27962        # Do we have a bin/javac?
27963        if test ! -x "$BOOT_JDK/bin/javac"; then
27964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27968          BOOT_JDK_FOUND=no
27969        else
27970          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27971          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27972
27973          # Extra M4 quote needed to protect [] in grep expression.
27974          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27975          if test "x$FOUND_CORRECT_VERSION" = x; then
27976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27978            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27979$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27980            BOOT_JDK_FOUND=no
27981          else
27982            # We're done! :-)
27983            BOOT_JDK_FOUND=yes
27984
27985  # Only process if variable expands to non-empty
27986
27987  if test "x$BOOT_JDK" != x; then
27988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27989
27990  # Input might be given as Windows format, start by converting to
27991  # unix format.
27992  path="$BOOT_JDK"
27993  new_path=`$CYGPATH -u "$path"`
27994
27995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27998  # "foo.exe" is OK but "foo" is an error.
27999  #
28000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28001  # It is also a way to make sure we got the proper file name for the real test later on.
28002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28003  if test "x$test_shortpath" = x; then
28004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28006    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28007  fi
28008
28009  # Call helper function which possibly converts this using DOS-style short mode.
28010  # If so, the updated path is stored in $new_path.
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28023      # Going to short mode and back again did indeed matter. Since short mode is
28024      # case insensitive, let's make it lowercase to improve readability.
28025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28026      # Now convert it back to Unix-style (cygpath)
28027      input_path=`$CYGPATH -u "$shortmode_path"`
28028      new_path="$input_path"
28029    fi
28030  fi
28031
28032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28033  if test "x$test_cygdrive_prefix" = x; then
28034    # As a simple fix, exclude /usr/bin since it's not a real path.
28035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28037      # a path prefixed by /cygdrive for fixpath to work.
28038      new_path="$CYGWIN_ROOT_PATH$input_path"
28039    fi
28040  fi
28041
28042
28043  if test "x$path" != "x$new_path"; then
28044    BOOT_JDK="$new_path"
28045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28047  fi
28048
28049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28050
28051  path="$BOOT_JDK"
28052  has_colon=`$ECHO $path | $GREP ^.:`
28053  new_path="$path"
28054  if test "x$has_colon" = x; then
28055    # Not in mixed or Windows style, start by that.
28056    new_path=`cmd //c echo $path`
28057  fi
28058
28059
28060  input_path="$new_path"
28061  # Check if we need to convert this using DOS-style short mode. If the path
28062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28063  # take no chances and rewrite it.
28064  # Note: m4 eats our [], so we need to use [ and ] instead.
28065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28066  if test "x$has_forbidden_chars" != x; then
28067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28069  fi
28070
28071
28072  windows_path="$new_path"
28073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28074    unix_path=`$CYGPATH -u "$windows_path"`
28075    new_path="$unix_path"
28076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28078    new_path="$unix_path"
28079  fi
28080
28081  if test "x$path" != "x$new_path"; then
28082    BOOT_JDK="$new_path"
28083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28085  fi
28086
28087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28089
28090    else
28091      # We're on a unix platform. Hooray! :)
28092      path="$BOOT_JDK"
28093      has_space=`$ECHO "$path" | $GREP " "`
28094      if test "x$has_space" != x; then
28095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28098      fi
28099
28100      # Use eval to expand a potential ~
28101      eval path="$path"
28102      if test ! -f "$path" && test ! -d "$path"; then
28103        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28104      fi
28105
28106      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28107    fi
28108  fi
28109
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28111$as_echo_n "checking for Boot JDK... " >&6; }
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28113$as_echo "$BOOT_JDK" >&6; }
28114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28115$as_echo_n "checking Boot JDK version... " >&6; }
28116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28118$as_echo "$BOOT_JDK_VERSION" >&6; }
28119          fi # end check jdk version
28120        fi # end check javac
28121      fi # end check java
28122    fi # end check boot jdk found
28123  fi
28124
28125
28126  # If we haven't found anything yet, we've truly lost. Give up.
28127  if test "x$BOOT_JDK_FOUND" = xno; then
28128
28129  # Print a helpful message on how to acquire the necessary build dependency.
28130  # openjdk is the help tag: freetype, cups, alsa etc
28131  MISSING_DEPENDENCY=openjdk
28132
28133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28134    cygwin_help $MISSING_DEPENDENCY
28135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28136    msys_help $MISSING_DEPENDENCY
28137  else
28138    PKGHANDLER_COMMAND=
28139
28140    case $PKGHANDLER in
28141      apt-get)
28142        apt_help     $MISSING_DEPENDENCY ;;
28143      yum)
28144        yum_help     $MISSING_DEPENDENCY ;;
28145      port)
28146        port_help    $MISSING_DEPENDENCY ;;
28147      pkgutil)
28148        pkgutil_help $MISSING_DEPENDENCY ;;
28149      pkgadd)
28150        pkgadd_help  $MISSING_DEPENDENCY ;;
28151    esac
28152
28153    if test "x$PKGHANDLER_COMMAND" != x; then
28154      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28155    fi
28156  fi
28157
28158    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28159$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28160    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28161$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28162    as_fn_error $? "Cannot continue" "$LINENO" 5
28163  fi
28164
28165
28166
28167  # Setup tools from the Boot JDK.
28168
28169  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28170
28171  # Publish this variable in the help.
28172
28173
28174  if [ -z "${JAVA+x}" ]; then
28175    # The variable is not set by user, try to locate tool using the code snippet
28176
28177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28178$as_echo_n "checking for java in Boot JDK... " >&6; }
28179      JAVA=$BOOT_JDK/bin/java
28180      if test ! -x $JAVA; then
28181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28182$as_echo "not found" >&6; }
28183        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28184$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28185        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28186      fi
28187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28188$as_echo "ok" >&6; }
28189
28190
28191  else
28192    # The variable is set, but is it from the command line or the environment?
28193
28194    # Try to remove the string !JAVA! from our list.
28195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28197      # If it failed, the variable was not from the command line. Ignore it,
28198      # but warn the user (except for BASH, which is always set by the calling BASH).
28199      if test "xJAVA" != xBASH; then
28200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28201$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28202      fi
28203      # Try to locate tool using the code snippet
28204
28205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28206$as_echo_n "checking for java in Boot JDK... " >&6; }
28207      JAVA=$BOOT_JDK/bin/java
28208      if test ! -x $JAVA; then
28209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28210$as_echo "not found" >&6; }
28211        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28212$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28213        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28214      fi
28215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28216$as_echo "ok" >&6; }
28217
28218
28219    else
28220      # If it succeeded, then it was overridden by the user. We will use it
28221      # for the tool.
28222
28223      # First remove it from the list of overridden variables, so we can test
28224      # for unknown variables in the end.
28225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28226
28227      # Check if we try to supply an empty value
28228      if test "x$JAVA" = x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28230$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28232$as_echo_n "checking for JAVA... " >&6; }
28233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28234$as_echo "disabled" >&6; }
28235      else
28236        # Check if the provided tool contains a complete path.
28237        tool_specified="$JAVA"
28238        tool_basename="${tool_specified##*/}"
28239        if test "x$tool_basename" = "x$tool_specified"; then
28240          # A command without a complete path is provided, search $PATH.
28241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28242$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28243          # Extract the first word of "$tool_basename", so it can be a program name with args.
28244set dummy $tool_basename; ac_word=$2
28245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28246$as_echo_n "checking for $ac_word... " >&6; }
28247if ${ac_cv_path_JAVA+:} false; then :
28248  $as_echo_n "(cached) " >&6
28249else
28250  case $JAVA in
28251  [\\/]* | ?:[\\/]*)
28252  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28253  ;;
28254  *)
28255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28256for as_dir in $PATH
28257do
28258  IFS=$as_save_IFS
28259  test -z "$as_dir" && as_dir=.
28260    for ac_exec_ext in '' $ac_executable_extensions; do
28261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28262    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28264    break 2
28265  fi
28266done
28267  done
28268IFS=$as_save_IFS
28269
28270  ;;
28271esac
28272fi
28273JAVA=$ac_cv_path_JAVA
28274if test -n "$JAVA"; then
28275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28276$as_echo "$JAVA" >&6; }
28277else
28278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28279$as_echo "no" >&6; }
28280fi
28281
28282
28283          if test "x$JAVA" = x; then
28284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28285          fi
28286        else
28287          # Otherwise we believe it is a complete path. Use it as it is.
28288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28289$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28291$as_echo_n "checking for JAVA... " >&6; }
28292          if test ! -x "$tool_specified"; then
28293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28294$as_echo "not found" >&6; }
28295            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28296          fi
28297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28298$as_echo "$tool_specified" >&6; }
28299        fi
28300      fi
28301    fi
28302
28303  fi
28304
28305
28306
28307  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28308
28309  # Publish this variable in the help.
28310
28311
28312  if [ -z "${JAVAC+x}" ]; then
28313    # The variable is not set by user, try to locate tool using the code snippet
28314
28315      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28316$as_echo_n "checking for javac in Boot JDK... " >&6; }
28317      JAVAC=$BOOT_JDK/bin/javac
28318      if test ! -x $JAVAC; then
28319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28320$as_echo "not found" >&6; }
28321        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28322$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28323        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28324      fi
28325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28326$as_echo "ok" >&6; }
28327
28328
28329  else
28330    # The variable is set, but is it from the command line or the environment?
28331
28332    # Try to remove the string !JAVAC! from our list.
28333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28335      # If it failed, the variable was not from the command line. Ignore it,
28336      # but warn the user (except for BASH, which is always set by the calling BASH).
28337      if test "xJAVAC" != xBASH; then
28338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28339$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28340      fi
28341      # Try to locate tool using the code snippet
28342
28343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28344$as_echo_n "checking for javac in Boot JDK... " >&6; }
28345      JAVAC=$BOOT_JDK/bin/javac
28346      if test ! -x $JAVAC; then
28347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28348$as_echo "not found" >&6; }
28349        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28350$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28351        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28352      fi
28353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28354$as_echo "ok" >&6; }
28355
28356
28357    else
28358      # If it succeeded, then it was overridden by the user. We will use it
28359      # for the tool.
28360
28361      # First remove it from the list of overridden variables, so we can test
28362      # for unknown variables in the end.
28363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28364
28365      # Check if we try to supply an empty value
28366      if test "x$JAVAC" = x; then
28367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28368$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28370$as_echo_n "checking for JAVAC... " >&6; }
28371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28372$as_echo "disabled" >&6; }
28373      else
28374        # Check if the provided tool contains a complete path.
28375        tool_specified="$JAVAC"
28376        tool_basename="${tool_specified##*/}"
28377        if test "x$tool_basename" = "x$tool_specified"; then
28378          # A command without a complete path is provided, search $PATH.
28379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28380$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28381          # Extract the first word of "$tool_basename", so it can be a program name with args.
28382set dummy $tool_basename; ac_word=$2
28383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28384$as_echo_n "checking for $ac_word... " >&6; }
28385if ${ac_cv_path_JAVAC+:} false; then :
28386  $as_echo_n "(cached) " >&6
28387else
28388  case $JAVAC in
28389  [\\/]* | ?:[\\/]*)
28390  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28391  ;;
28392  *)
28393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28394for as_dir in $PATH
28395do
28396  IFS=$as_save_IFS
28397  test -z "$as_dir" && as_dir=.
28398    for ac_exec_ext in '' $ac_executable_extensions; do
28399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28400    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28402    break 2
28403  fi
28404done
28405  done
28406IFS=$as_save_IFS
28407
28408  ;;
28409esac
28410fi
28411JAVAC=$ac_cv_path_JAVAC
28412if test -n "$JAVAC"; then
28413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28414$as_echo "$JAVAC" >&6; }
28415else
28416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28417$as_echo "no" >&6; }
28418fi
28419
28420
28421          if test "x$JAVAC" = x; then
28422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28423          fi
28424        else
28425          # Otherwise we believe it is a complete path. Use it as it is.
28426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28427$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28429$as_echo_n "checking for JAVAC... " >&6; }
28430          if test ! -x "$tool_specified"; then
28431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28432$as_echo "not found" >&6; }
28433            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28434          fi
28435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28436$as_echo "$tool_specified" >&6; }
28437        fi
28438      fi
28439    fi
28440
28441  fi
28442
28443
28444
28445  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28446
28447  # Publish this variable in the help.
28448
28449
28450  if [ -z "${JAVAH+x}" ]; then
28451    # The variable is not set by user, try to locate tool using the code snippet
28452
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28454$as_echo_n "checking for javah in Boot JDK... " >&6; }
28455      JAVAH=$BOOT_JDK/bin/javah
28456      if test ! -x $JAVAH; then
28457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28458$as_echo "not found" >&6; }
28459        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28460$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28461        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28462      fi
28463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28464$as_echo "ok" >&6; }
28465
28466
28467  else
28468    # The variable is set, but is it from the command line or the environment?
28469
28470    # Try to remove the string !JAVAH! from our list.
28471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28473      # If it failed, the variable was not from the command line. Ignore it,
28474      # but warn the user (except for BASH, which is always set by the calling BASH).
28475      if test "xJAVAH" != xBASH; then
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28477$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28478      fi
28479      # Try to locate tool using the code snippet
28480
28481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28482$as_echo_n "checking for javah in Boot JDK... " >&6; }
28483      JAVAH=$BOOT_JDK/bin/javah
28484      if test ! -x $JAVAH; then
28485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28486$as_echo "not found" >&6; }
28487        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28488$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28489        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28490      fi
28491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28492$as_echo "ok" >&6; }
28493
28494
28495    else
28496      # If it succeeded, then it was overridden by the user. We will use it
28497      # for the tool.
28498
28499      # First remove it from the list of overridden variables, so we can test
28500      # for unknown variables in the end.
28501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28502
28503      # Check if we try to supply an empty value
28504      if test "x$JAVAH" = x; then
28505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28506$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28508$as_echo_n "checking for JAVAH... " >&6; }
28509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28510$as_echo "disabled" >&6; }
28511      else
28512        # Check if the provided tool contains a complete path.
28513        tool_specified="$JAVAH"
28514        tool_basename="${tool_specified##*/}"
28515        if test "x$tool_basename" = "x$tool_specified"; then
28516          # A command without a complete path is provided, search $PATH.
28517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28518$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28519          # Extract the first word of "$tool_basename", so it can be a program name with args.
28520set dummy $tool_basename; ac_word=$2
28521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28522$as_echo_n "checking for $ac_word... " >&6; }
28523if ${ac_cv_path_JAVAH+:} false; then :
28524  $as_echo_n "(cached) " >&6
28525else
28526  case $JAVAH in
28527  [\\/]* | ?:[\\/]*)
28528  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28529  ;;
28530  *)
28531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28532for as_dir in $PATH
28533do
28534  IFS=$as_save_IFS
28535  test -z "$as_dir" && as_dir=.
28536    for ac_exec_ext in '' $ac_executable_extensions; do
28537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28538    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28540    break 2
28541  fi
28542done
28543  done
28544IFS=$as_save_IFS
28545
28546  ;;
28547esac
28548fi
28549JAVAH=$ac_cv_path_JAVAH
28550if test -n "$JAVAH"; then
28551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28552$as_echo "$JAVAH" >&6; }
28553else
28554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28555$as_echo "no" >&6; }
28556fi
28557
28558
28559          if test "x$JAVAH" = x; then
28560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28561          fi
28562        else
28563          # Otherwise we believe it is a complete path. Use it as it is.
28564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28565$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28567$as_echo_n "checking for JAVAH... " >&6; }
28568          if test ! -x "$tool_specified"; then
28569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28570$as_echo "not found" >&6; }
28571            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28572          fi
28573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28574$as_echo "$tool_specified" >&6; }
28575        fi
28576      fi
28577    fi
28578
28579  fi
28580
28581
28582
28583  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28584
28585  # Publish this variable in the help.
28586
28587
28588  if [ -z "${JAR+x}" ]; then
28589    # The variable is not set by user, try to locate tool using the code snippet
28590
28591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28592$as_echo_n "checking for jar in Boot JDK... " >&6; }
28593      JAR=$BOOT_JDK/bin/jar
28594      if test ! -x $JAR; then
28595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28596$as_echo "not found" >&6; }
28597        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28598$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28599        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28600      fi
28601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28602$as_echo "ok" >&6; }
28603
28604
28605  else
28606    # The variable is set, but is it from the command line or the environment?
28607
28608    # Try to remove the string !JAR! from our list.
28609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28611      # If it failed, the variable was not from the command line. Ignore it,
28612      # but warn the user (except for BASH, which is always set by the calling BASH).
28613      if test "xJAR" != xBASH; then
28614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28615$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28616      fi
28617      # Try to locate tool using the code snippet
28618
28619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28620$as_echo_n "checking for jar in Boot JDK... " >&6; }
28621      JAR=$BOOT_JDK/bin/jar
28622      if test ! -x $JAR; then
28623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28624$as_echo "not found" >&6; }
28625        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28626$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28627        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28628      fi
28629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28630$as_echo "ok" >&6; }
28631
28632
28633    else
28634      # If it succeeded, then it was overridden by the user. We will use it
28635      # for the tool.
28636
28637      # First remove it from the list of overridden variables, so we can test
28638      # for unknown variables in the end.
28639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28640
28641      # Check if we try to supply an empty value
28642      if test "x$JAR" = x; then
28643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28644$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28646$as_echo_n "checking for JAR... " >&6; }
28647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28648$as_echo "disabled" >&6; }
28649      else
28650        # Check if the provided tool contains a complete path.
28651        tool_specified="$JAR"
28652        tool_basename="${tool_specified##*/}"
28653        if test "x$tool_basename" = "x$tool_specified"; then
28654          # A command without a complete path is provided, search $PATH.
28655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28656$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28657          # Extract the first word of "$tool_basename", so it can be a program name with args.
28658set dummy $tool_basename; ac_word=$2
28659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28660$as_echo_n "checking for $ac_word... " >&6; }
28661if ${ac_cv_path_JAR+:} false; then :
28662  $as_echo_n "(cached) " >&6
28663else
28664  case $JAR in
28665  [\\/]* | ?:[\\/]*)
28666  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28667  ;;
28668  *)
28669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28670for as_dir in $PATH
28671do
28672  IFS=$as_save_IFS
28673  test -z "$as_dir" && as_dir=.
28674    for ac_exec_ext in '' $ac_executable_extensions; do
28675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28676    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28678    break 2
28679  fi
28680done
28681  done
28682IFS=$as_save_IFS
28683
28684  ;;
28685esac
28686fi
28687JAR=$ac_cv_path_JAR
28688if test -n "$JAR"; then
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28690$as_echo "$JAR" >&6; }
28691else
28692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28693$as_echo "no" >&6; }
28694fi
28695
28696
28697          if test "x$JAR" = x; then
28698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28699          fi
28700        else
28701          # Otherwise we believe it is a complete path. Use it as it is.
28702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28703$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28705$as_echo_n "checking for JAR... " >&6; }
28706          if test ! -x "$tool_specified"; then
28707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28708$as_echo "not found" >&6; }
28709            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28710          fi
28711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28712$as_echo "$tool_specified" >&6; }
28713        fi
28714      fi
28715    fi
28716
28717  fi
28718
28719
28720
28721  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28722
28723  # Publish this variable in the help.
28724
28725
28726  if [ -z "${JARSIGNER+x}" ]; then
28727    # The variable is not set by user, try to locate tool using the code snippet
28728
28729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28730$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28731      JARSIGNER=$BOOT_JDK/bin/jarsigner
28732      if test ! -x $JARSIGNER; then
28733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28734$as_echo "not found" >&6; }
28735        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28736$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28737        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28738      fi
28739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28740$as_echo "ok" >&6; }
28741
28742
28743  else
28744    # The variable is set, but is it from the command line or the environment?
28745
28746    # Try to remove the string !JARSIGNER! from our list.
28747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28749      # If it failed, the variable was not from the command line. Ignore it,
28750      # but warn the user (except for BASH, which is always set by the calling BASH).
28751      if test "xJARSIGNER" != xBASH; then
28752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28753$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28754      fi
28755      # Try to locate tool using the code snippet
28756
28757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28758$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28759      JARSIGNER=$BOOT_JDK/bin/jarsigner
28760      if test ! -x $JARSIGNER; then
28761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28762$as_echo "not found" >&6; }
28763        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28764$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28765        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28766      fi
28767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28768$as_echo "ok" >&6; }
28769
28770
28771    else
28772      # If it succeeded, then it was overridden by the user. We will use it
28773      # for the tool.
28774
28775      # First remove it from the list of overridden variables, so we can test
28776      # for unknown variables in the end.
28777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28778
28779      # Check if we try to supply an empty value
28780      if test "x$JARSIGNER" = x; then
28781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28782$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28784$as_echo_n "checking for JARSIGNER... " >&6; }
28785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28786$as_echo "disabled" >&6; }
28787      else
28788        # Check if the provided tool contains a complete path.
28789        tool_specified="$JARSIGNER"
28790        tool_basename="${tool_specified##*/}"
28791        if test "x$tool_basename" = "x$tool_specified"; then
28792          # A command without a complete path is provided, search $PATH.
28793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28794$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28795          # Extract the first word of "$tool_basename", so it can be a program name with args.
28796set dummy $tool_basename; ac_word=$2
28797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28798$as_echo_n "checking for $ac_word... " >&6; }
28799if ${ac_cv_path_JARSIGNER+:} false; then :
28800  $as_echo_n "(cached) " >&6
28801else
28802  case $JARSIGNER in
28803  [\\/]* | ?:[\\/]*)
28804  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28805  ;;
28806  *)
28807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28808for as_dir in $PATH
28809do
28810  IFS=$as_save_IFS
28811  test -z "$as_dir" && as_dir=.
28812    for ac_exec_ext in '' $ac_executable_extensions; do
28813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28814    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28816    break 2
28817  fi
28818done
28819  done
28820IFS=$as_save_IFS
28821
28822  ;;
28823esac
28824fi
28825JARSIGNER=$ac_cv_path_JARSIGNER
28826if test -n "$JARSIGNER"; then
28827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28828$as_echo "$JARSIGNER" >&6; }
28829else
28830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28831$as_echo "no" >&6; }
28832fi
28833
28834
28835          if test "x$JARSIGNER" = x; then
28836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28837          fi
28838        else
28839          # Otherwise we believe it is a complete path. Use it as it is.
28840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28841$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28843$as_echo_n "checking for JARSIGNER... " >&6; }
28844          if test ! -x "$tool_specified"; then
28845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28846$as_echo "not found" >&6; }
28847            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28848          fi
28849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28850$as_echo "$tool_specified" >&6; }
28851        fi
28852      fi
28853    fi
28854
28855  fi
28856
28857
28858
28859  # Finally, set some other options...
28860
28861  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28862  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28863
28864
28865
28866  # Check if the boot jdk is 32 or 64 bit
28867  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28868    BOOT_JDK_BITS="64"
28869  else
28870    BOOT_JDK_BITS="32"
28871  fi
28872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28873$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28875$as_echo "$BOOT_JDK_BITS" >&6; }
28876
28877
28878
28879###############################################################################
28880#
28881# Configure the sources to use. We can add or override individual directories.
28882#
28883###############################################################################
28884
28885
28886  # Where are the sources.
28887  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28888  CORBA_TOPDIR="$SRC_ROOT/corba"
28889  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28890  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28891  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28892  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28893  JDK_TOPDIR="$SRC_ROOT/jdk"
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903  # This feature is no longer supported.
28904
28905
28906
28907# Check whether --with-add-source-root was given.
28908if test "${with_add_source_root+set}" = set; then :
28909  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
28910$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28911fi
28912
28913
28914
28915
28916# Check whether --with-override-source-root was given.
28917if test "${with_override_source_root+set}" = set; then :
28918  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
28919$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28920fi
28921
28922
28923
28924
28925# Check whether --with-adds-and-overrides was given.
28926if test "${with_adds_and_overrides+set}" = set; then :
28927  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
28928$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28929fi
28930
28931
28932
28933
28934# Check whether --with-override-langtools was given.
28935if test "${with_override_langtools+set}" = set; then :
28936  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28937$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28938fi
28939
28940
28941
28942
28943# Check whether --with-override-corba was given.
28944if test "${with_override_corba+set}" = set; then :
28945  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28946$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28947fi
28948
28949
28950
28951
28952# Check whether --with-override-jaxp was given.
28953if test "${with_override_jaxp+set}" = set; then :
28954  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28955$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28956fi
28957
28958
28959
28960
28961# Check whether --with-override-jaxws was given.
28962if test "${with_override_jaxws+set}" = set; then :
28963  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28964$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28965fi
28966
28967
28968
28969
28970# Check whether --with-override-hotspot was given.
28971if test "${with_override_hotspot+set}" = set; then :
28972  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
28973$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
28974fi
28975
28976
28977
28978
28979# Check whether --with-override-nashorn was given.
28980if test "${with_override_nashorn+set}" = set; then :
28981  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
28982$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
28983fi
28984
28985
28986
28987
28988# Check whether --with-override-jdk was given.
28989if test "${with_override_jdk+set}" = set; then :
28990  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
28991$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
28992fi
28993
28994
28995
28996
28997  BUILD_OUTPUT="$OUTPUT_ROOT"
28998
28999
29000  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29001  BUILD_HOTSPOT=true
29002
29003
29004
29005# Check whether --with-import-hotspot was given.
29006if test "${with_import_hotspot+set}" = set; then :
29007  withval=$with_import_hotspot;
29008fi
29009
29010  if test "x$with_import_hotspot" != x; then
29011    CURDIR="$PWD"
29012    cd "$with_import_hotspot"
29013    HOTSPOT_DIST="`pwd`"
29014    cd "$CURDIR"
29015    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29016      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29017    fi
29018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29019$as_echo_n "checking if hotspot should be imported... " >&6; }
29020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29021$as_echo "yes from $HOTSPOT_DIST" >&6; }
29022    BUILD_HOTSPOT=false
29023  fi
29024
29025  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29026
29027
29028###############################################################################
29029#
29030# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29031# native code.
29032#
29033###############################################################################
29034
29035# See if we are doing a complete static build or not
29036
29037  # Check whether --enable-static-build was given.
29038if test "${enable_static_build+set}" = set; then :
29039  enableval=$enable_static_build;
29040fi
29041
29042  STATIC_BUILD=false
29043  if test "x$enable_static_build" = "xyes"; then
29044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29045$as_echo_n "checking if static build is enabled... " >&6; }
29046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29047$as_echo "yes" >&6; }
29048    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29049      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29050    fi
29051    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29052    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29053    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29054    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29055    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29056    STATIC_BUILD=true
29057  elif test "x$enable_static_build" = "xno"; then
29058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29059$as_echo_n "checking if static build is enabled... " >&6; }
29060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29061$as_echo "no" >&6; }
29062  elif test "x$enable_static_build" != "x"; then
29063    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29064  fi
29065
29066
29067
29068
29069# First determine the toolchain type (compiler family)
29070
29071
29072# Check whether --with-toolchain-type was given.
29073if test "${with_toolchain_type+set}" = set; then :
29074  withval=$with_toolchain_type;
29075fi
29076
29077
29078  # Use indirect variable referencing
29079  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29080  VALID_TOOLCHAINS=${!toolchain_var_name}
29081
29082  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29083    if test -n "$XCODEBUILD"; then
29084      # On Mac OS X, default toolchain to clang after Xcode 5
29085      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29086      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29087      if test $? -ne 0; then
29088        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29089      fi
29090      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29091          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29092          $CUT -f 1 -d .`
29093      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29094$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29095      if test $XCODE_MAJOR_VERSION -ge 5; then
29096          DEFAULT_TOOLCHAIN="clang"
29097      else
29098          DEFAULT_TOOLCHAIN="gcc"
29099      fi
29100    else
29101      # If Xcode is not installed, but the command line tools are
29102      # then we can't run xcodebuild. On these systems we should
29103      # default to clang
29104      DEFAULT_TOOLCHAIN="clang"
29105    fi
29106  else
29107    # First toolchain type in the list is the default
29108    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29109  fi
29110
29111  if test "x$with_toolchain_type" = xlist; then
29112    # List all toolchains
29113    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29114$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29115    for toolchain in $VALID_TOOLCHAINS; do
29116      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29117      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29118      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29119    done
29120
29121    exit 0
29122  elif test "x$with_toolchain_type" != x; then
29123    # User override; check that it is valid
29124    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29125      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29126$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29127      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29128$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29129      as_fn_error $? "Cannot continue." "$LINENO" 5
29130    fi
29131    TOOLCHAIN_TYPE=$with_toolchain_type
29132  else
29133    # No flag given, use default
29134    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29135  fi
29136
29137
29138  TOOLCHAIN_CC_BINARY_clang="clang"
29139  TOOLCHAIN_CC_BINARY_gcc="gcc"
29140  TOOLCHAIN_CC_BINARY_microsoft="cl"
29141  TOOLCHAIN_CC_BINARY_solstudio="cc"
29142  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29143
29144  TOOLCHAIN_CXX_BINARY_clang="clang++"
29145  TOOLCHAIN_CXX_BINARY_gcc="g++"
29146  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29147  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29148  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29149
29150  # Use indirect variable referencing
29151  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29152  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29153  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29154  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29155  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29156  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29157
29158
29159  # Define filename patterns
29160  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29161    LIBRARY_PREFIX=
29162    SHARED_LIBRARY_SUFFIX='.dll'
29163    STATIC_LIBRARY_SUFFIX='.lib'
29164    SHARED_LIBRARY='$1.dll'
29165    STATIC_LIBRARY='$1.lib'
29166    OBJ_SUFFIX='.obj'
29167    EXE_SUFFIX='.exe'
29168  else
29169    LIBRARY_PREFIX=lib
29170    SHARED_LIBRARY_SUFFIX='.so'
29171    STATIC_LIBRARY_SUFFIX='.a'
29172    SHARED_LIBRARY='lib$1.so'
29173    STATIC_LIBRARY='lib$1.a'
29174    OBJ_SUFFIX='.o'
29175    EXE_SUFFIX=''
29176    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29177      # For full static builds, we're overloading the SHARED_LIBRARY
29178      # variables in order to limit the amount of changes required.
29179      # It would be better to remove SHARED and just use LIBRARY and
29180      # LIBRARY_SUFFIX for libraries that can be built either
29181      # shared or static and use STATIC_* for libraries that are
29182      # always built statically.
29183      if test "x$STATIC_BUILD" = xtrue; then
29184        SHARED_LIBRARY='lib$1.a'
29185        SHARED_LIBRARY_SUFFIX='.a'
29186      else
29187        SHARED_LIBRARY='lib$1.dylib'
29188        SHARED_LIBRARY_SUFFIX='.dylib'
29189      fi
29190    fi
29191  fi
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29203    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29204$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29205  else
29206    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29207$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29208  fi
29209
29210
29211# User supplied flags should be used when configure detects compilers
29212
29213  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29214    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29215$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29216  fi
29217
29218  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29220$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29221  fi
29222
29223  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29225$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29226  fi
29227
29228
29229# Check whether --with-extra-cflags was given.
29230if test "${with_extra_cflags+set}" = set; then :
29231  withval=$with_extra_cflags;
29232fi
29233
29234
29235
29236# Check whether --with-extra-cxxflags was given.
29237if test "${with_extra_cxxflags+set}" = set; then :
29238  withval=$with_extra_cxxflags;
29239fi
29240
29241
29242
29243# Check whether --with-extra-ldflags was given.
29244if test "${with_extra_ldflags+set}" = set; then :
29245  withval=$with_extra_ldflags;
29246fi
29247
29248
29249  EXTRA_CFLAGS="$with_extra_cflags"
29250  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29251  EXTRA_LDFLAGS="$with_extra_ldflags"
29252
29253  # Hotspot needs these set in their legacy form
29254  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29255  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29256  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29257
29258
29259
29260
29261
29262  # The global CFLAGS and LDLAGS variables are used by configure tests and
29263  # should include the extra parameters
29264  CFLAGS="$EXTRA_CFLAGS"
29265  CXXFLAGS="$EXTRA_CXXFLAGS"
29266  LDFLAGS="$EXTRA_LDFLAGS"
29267  CPPFLAGS=""
29268
29269# The sysroot cflags are needed for configure to be able to run the compilers
29270
29271  if test "x$SYSROOT" != "x"; then
29272    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29273      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29274        # Solaris Studio does not have a concept of sysroot. Instead we must
29275        # make sure the default include and lib dirs are appended to each
29276        # compile and link command line.
29277        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29278        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29279            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29280            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29281      fi
29282    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29283      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29284      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29285    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29286      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29287      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29288    fi
29289    # Propagate the sysroot args to hotspot
29290    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29291    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29292    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29293    # The global CFLAGS and LDFLAGS variables need these for configure to function
29294    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29295    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29296    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29297    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29298  fi
29299
29300  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29301    # We also need -iframework<path>/System/Library/Frameworks
29302    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29303    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29304    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29305    # set this here so it doesn't have to be peppered throughout the forest
29306    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29307    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29308  fi
29309
29310
29311
29312
29313
29314# Then detect the actual binaries needed
29315
29316  # FIXME: Is this needed?
29317  ac_ext=cpp
29318ac_cpp='$CXXCPP $CPPFLAGS'
29319ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29320ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29321ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29322
29323
29324  # Store the CFLAGS etc passed to the configure script.
29325  ORG_CFLAGS="$CFLAGS"
29326  ORG_CXXFLAGS="$CXXFLAGS"
29327
29328  # autoconf magic only relies on PATH, so update it if tools dir is specified
29329  OLD_PATH="$PATH"
29330
29331  # On Windows, we need to detect the visual studio installation first.
29332  # This will change the PATH, but we need to keep that new PATH even
29333  # after toolchain detection is done, since the compiler (on x86) uses
29334  # it for DLL resolution in runtime.
29335  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29336      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29337
29338  # Store path to cygwin link.exe to help excluding it when searching for
29339  # VS linker. This must be done before changing the PATH when looking for VS.
29340  # Extract the first word of "link", so it can be a program name with args.
29341set dummy link; ac_word=$2
29342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29343$as_echo_n "checking for $ac_word... " >&6; }
29344if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29345  $as_echo_n "(cached) " >&6
29346else
29347  case $CYGWIN_LINK in
29348  [\\/]* | ?:[\\/]*)
29349  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29350  ;;
29351  *)
29352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29353for as_dir in $PATH
29354do
29355  IFS=$as_save_IFS
29356  test -z "$as_dir" && as_dir=.
29357    for ac_exec_ext in '' $ac_executable_extensions; do
29358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29359    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29361    break 2
29362  fi
29363done
29364  done
29365IFS=$as_save_IFS
29366
29367  ;;
29368esac
29369fi
29370CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29371if test -n "$CYGWIN_LINK"; then
29372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29373$as_echo "$CYGWIN_LINK" >&6; }
29374else
29375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29376$as_echo "no" >&6; }
29377fi
29378
29379
29380  if test "x$CYGWIN_LINK" != x; then
29381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29382$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29383    "$CYGWIN_LINK" --version > /dev/null
29384    if test $? -eq 0 ; then
29385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29386$as_echo "yes" >&6; }
29387    else
29388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29389$as_echo "no" >&6; }
29390      # This might be the VS linker. Don't exclude it later on.
29391      CYGWIN_LINK=""
29392    fi
29393  fi
29394
29395  # First-hand choice is to locate and run the vsvars bat file.
29396
29397
29398# Check whether --with-toolchain-version was given.
29399if test "${with_toolchain_version+set}" = set; then :
29400  withval=$with_toolchain_version;
29401fi
29402
29403
29404  if test "x$with_toolchain_version" = xlist; then
29405    # List all toolchains
29406    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29407$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29408    for version in $VALID_VS_VERSIONS; do
29409      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29410      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29411    done
29412
29413    exit 0
29414  elif test "x$DEVKIT_VS_VERSION" != x; then
29415    VS_VERSION=$DEVKIT_VS_VERSION
29416    TOOLCHAIN_VERSION=$VS_VERSION
29417    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29418    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29419    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29420    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29421    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29422    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29423
29424    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29425    # can still be exported as INCLUDE for compiler invocations without
29426    # SYSROOT_CFLAGS
29427    OLDIFS="$IFS"
29428    IFS=";"
29429    for i in $DEVKIT_VS_INCLUDE; do
29430      ipath=$i
29431
29432  unix_path="$ipath"
29433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29434    windows_path=`$CYGPATH -m "$unix_path"`
29435    ipath="$windows_path"
29436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29437    windows_path=`cmd //c echo $unix_path`
29438    ipath="$windows_path"
29439  fi
29440
29441      VS_INCLUDE="$VS_INCLUDE;$ipath"
29442    done
29443    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29444    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29445    for i in $DEVKIT_VS_LIB; do
29446      libpath=$i
29447
29448  unix_path="$libpath"
29449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29450    windows_path=`$CYGPATH -m "$unix_path"`
29451    libpath="$windows_path"
29452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29453    windows_path=`cmd //c echo $unix_path`
29454    libpath="$windows_path"
29455  fi
29456
29457      VS_LIB="$VS_LIB;$libpath"
29458    done
29459    IFS="$OLDIFS"
29460
29461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29462$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29463
29464  elif test "x$with_toolchain_version" != x; then
29465    # User override; check that it is valid
29466    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29467      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29468$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29469      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29470$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29471      as_fn_error $? "Cannot continue." "$LINENO" 5
29472    fi
29473    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29474  else
29475    # No flag given, use default
29476    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29477  fi
29478
29479  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29480
29481  VS_VERSION="$VS_VERSION"
29482  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29483  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29484  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29485  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29486
29487  # When using --with-tools-dir, assume it points to the correct and default
29488  # version of Visual Studio or that --with-toolchain-version was also set.
29489  if test "x$with_tools_dir" != x; then
29490
29491  if test "x$VS_ENV_CMD" = x; then
29492    VS_VERSION="${VS_VERSION}"
29493    VS_BASE="$with_tools_dir/../.."
29494    METHOD="--with-tools-dir"
29495
29496    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29497      VCVARSFILE="vc/bin/vcvars32.bat"
29498    else
29499      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29500    fi
29501
29502
29503  windows_path="$VS_BASE"
29504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29505    unix_path=`$CYGPATH -u "$windows_path"`
29506    VS_BASE="$unix_path"
29507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29509    VS_BASE="$unix_path"
29510  fi
29511
29512    if test -d "$VS_BASE"; then
29513      if test -f "$VS_BASE/$VCVARSFILE"; then
29514        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29515$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29516        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29517        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29518        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29519        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29520      else
29521        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29522$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29523        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29524$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29525      fi
29526    fi
29527  fi
29528
29529
29530  if test "x$VS_ENV_CMD" = x; then
29531    VS_VERSION="${VS_VERSION}"
29532    VS_BASE="$with_tools_dir/../../.."
29533    METHOD="--with-tools-dir"
29534
29535    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29536      VCVARSFILE="vc/bin/vcvars32.bat"
29537    else
29538      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29539    fi
29540
29541
29542  windows_path="$VS_BASE"
29543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29544    unix_path=`$CYGPATH -u "$windows_path"`
29545    VS_BASE="$unix_path"
29546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29548    VS_BASE="$unix_path"
29549  fi
29550
29551    if test -d "$VS_BASE"; then
29552      if test -f "$VS_BASE/$VCVARSFILE"; then
29553        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29554$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29555        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29556        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29557        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29558        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29559      else
29560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29561$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29562        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29563$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29564      fi
29565    fi
29566  fi
29567
29568    if test "x$VS_ENV_CMD" = x; then
29569      # Having specified an argument which is incorrect will produce an instant failure;
29570      # we should not go on looking
29571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29572$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29573      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29574$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29575      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29576$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29577      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29578    fi
29579  fi
29580
29581  VS_ENV_CMD=""
29582  VS_ENV_ARGS=""
29583
29584  if test "x$VS_COMNTOOLS" != x; then
29585
29586  if test "x$VS_ENV_CMD" = x; then
29587    VS_VERSION="${VS_VERSION}"
29588    VS_BASE="$VS_COMNTOOLS/../.."
29589    METHOD="$VS_COMNTOOLS_VAR variable"
29590
29591    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29592      VCVARSFILE="vc/bin/vcvars32.bat"
29593    else
29594      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29595    fi
29596
29597
29598  windows_path="$VS_BASE"
29599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29600    unix_path=`$CYGPATH -u "$windows_path"`
29601    VS_BASE="$unix_path"
29602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29604    VS_BASE="$unix_path"
29605  fi
29606
29607    if test -d "$VS_BASE"; then
29608      if test -f "$VS_BASE/$VCVARSFILE"; then
29609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29610$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29611        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29612        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29613        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29614        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29615      else
29616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29617$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29619$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29620      fi
29621    fi
29622  fi
29623
29624  fi
29625  if test "x$PROGRAMFILES" != x; then
29626
29627  if test "x$VS_ENV_CMD" = x; then
29628    VS_VERSION="${VS_VERSION}"
29629    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29630    METHOD="well-known name"
29631
29632    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29633      VCVARSFILE="vc/bin/vcvars32.bat"
29634    else
29635      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29636    fi
29637
29638
29639  windows_path="$VS_BASE"
29640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641    unix_path=`$CYGPATH -u "$windows_path"`
29642    VS_BASE="$unix_path"
29643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29645    VS_BASE="$unix_path"
29646  fi
29647
29648    if test -d "$VS_BASE"; then
29649      if test -f "$VS_BASE/$VCVARSFILE"; then
29650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29651$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29652        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29653        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29654        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29655        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29656      else
29657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29658$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29660$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29661      fi
29662    fi
29663  fi
29664
29665  fi
29666  # Work around the insanely named ProgramFiles(x86) env variable
29667  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29668  if test "x$PROGRAMFILES_X86" != x; then
29669
29670  if test "x$VS_ENV_CMD" = x; then
29671    VS_VERSION="${VS_VERSION}"
29672    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29673    METHOD="well-known name"
29674
29675    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29676      VCVARSFILE="vc/bin/vcvars32.bat"
29677    else
29678      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29679    fi
29680
29681
29682  windows_path="$VS_BASE"
29683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29684    unix_path=`$CYGPATH -u "$windows_path"`
29685    VS_BASE="$unix_path"
29686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29688    VS_BASE="$unix_path"
29689  fi
29690
29691    if test -d "$VS_BASE"; then
29692      if test -f "$VS_BASE/$VCVARSFILE"; then
29693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29694$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29695        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29696        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29697        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29698        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29699      else
29700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29701$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29703$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29704      fi
29705    fi
29706  fi
29707
29708  fi
29709
29710  if test "x$VS_ENV_CMD" = x; then
29711    VS_VERSION="${VS_VERSION}"
29712    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29713    METHOD="well-known name"
29714
29715    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29716      VCVARSFILE="vc/bin/vcvars32.bat"
29717    else
29718      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29719    fi
29720
29721
29722  windows_path="$VS_BASE"
29723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29724    unix_path=`$CYGPATH -u "$windows_path"`
29725    VS_BASE="$unix_path"
29726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29728    VS_BASE="$unix_path"
29729  fi
29730
29731    if test -d "$VS_BASE"; then
29732      if test -f "$VS_BASE/$VCVARSFILE"; then
29733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29734$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29735        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29736        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29737        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29738        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29739      else
29740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29741$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29742        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29743$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29744      fi
29745    fi
29746  fi
29747
29748
29749  if test "x$VS_ENV_CMD" = x; then
29750    VS_VERSION="${VS_VERSION}"
29751    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29752    METHOD="well-known name"
29753
29754    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29755      VCVARSFILE="vc/bin/vcvars32.bat"
29756    else
29757      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29758    fi
29759
29760
29761  windows_path="$VS_BASE"
29762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29763    unix_path=`$CYGPATH -u "$windows_path"`
29764    VS_BASE="$unix_path"
29765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29767    VS_BASE="$unix_path"
29768  fi
29769
29770    if test -d "$VS_BASE"; then
29771      if test -f "$VS_BASE/$VCVARSFILE"; then
29772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29773$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29774        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29775        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29776        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29777        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29778      else
29779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29780$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29781        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29782$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29783      fi
29784    fi
29785  fi
29786
29787
29788  if test "x$SDK_INSTALL_DIR" != x; then
29789    if test "x$ProgramW6432" != x; then
29790
29791  if test "x$VS_ENV_CMD" = x; then
29792    VS_VERSION="${VS_VERSION}"
29793    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29794    METHOD="well-known name"
29795
29796  windows_path="$WIN_SDK_BASE"
29797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29798    unix_path=`$CYGPATH -u "$windows_path"`
29799    WIN_SDK_BASE="$unix_path"
29800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29802    WIN_SDK_BASE="$unix_path"
29803  fi
29804
29805    if test -d "$WIN_SDK_BASE"; then
29806      # There have been cases of partial or broken SDK installations. A missing
29807      # lib dir is not going to work.
29808      if test ! -d "$WIN_SDK_BASE/lib"; then
29809        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29810$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29811        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29812$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29813      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29815$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29816        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29817        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29818          VS_ENV_ARGS="/x86"
29819        else
29820          VS_ENV_ARGS="/x64"
29821        fi
29822        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29823        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29824        # TODO: improve detection for other versions of SDK
29825        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29826      else
29827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29828$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29829        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29830$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29831      fi
29832    fi
29833  fi
29834
29835    fi
29836    if test "x$PROGRAMW6432" != x; then
29837
29838  if test "x$VS_ENV_CMD" = x; then
29839    VS_VERSION="${VS_VERSION}"
29840    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29841    METHOD="well-known name"
29842
29843  windows_path="$WIN_SDK_BASE"
29844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29845    unix_path=`$CYGPATH -u "$windows_path"`
29846    WIN_SDK_BASE="$unix_path"
29847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29849    WIN_SDK_BASE="$unix_path"
29850  fi
29851
29852    if test -d "$WIN_SDK_BASE"; then
29853      # There have been cases of partial or broken SDK installations. A missing
29854      # lib dir is not going to work.
29855      if test ! -d "$WIN_SDK_BASE/lib"; then
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29857$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29859$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29860      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29861        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29862$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29863        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29864        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29865          VS_ENV_ARGS="/x86"
29866        else
29867          VS_ENV_ARGS="/x64"
29868        fi
29869        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29870        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29871        # TODO: improve detection for other versions of SDK
29872        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29873      else
29874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29875$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29876        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29877$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29878      fi
29879    fi
29880  fi
29881
29882    fi
29883    if test "x$PROGRAMFILES" != x; then
29884
29885  if test "x$VS_ENV_CMD" = x; then
29886    VS_VERSION="${VS_VERSION}"
29887    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29888    METHOD="well-known name"
29889
29890  windows_path="$WIN_SDK_BASE"
29891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29892    unix_path=`$CYGPATH -u "$windows_path"`
29893    WIN_SDK_BASE="$unix_path"
29894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29896    WIN_SDK_BASE="$unix_path"
29897  fi
29898
29899    if test -d "$WIN_SDK_BASE"; then
29900      # There have been cases of partial or broken SDK installations. A missing
29901      # lib dir is not going to work.
29902      if test ! -d "$WIN_SDK_BASE/lib"; then
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29904$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29906$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29907      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29909$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29910        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29911        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29912          VS_ENV_ARGS="/x86"
29913        else
29914          VS_ENV_ARGS="/x64"
29915        fi
29916        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29917        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29918        # TODO: improve detection for other versions of SDK
29919        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29920      else
29921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29923        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29924$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29925      fi
29926    fi
29927  fi
29928
29929    fi
29930
29931  if test "x$VS_ENV_CMD" = x; then
29932    VS_VERSION="${VS_VERSION}"
29933    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29934    METHOD="well-known name"
29935
29936  windows_path="$WIN_SDK_BASE"
29937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29938    unix_path=`$CYGPATH -u "$windows_path"`
29939    WIN_SDK_BASE="$unix_path"
29940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29942    WIN_SDK_BASE="$unix_path"
29943  fi
29944
29945    if test -d "$WIN_SDK_BASE"; then
29946      # There have been cases of partial or broken SDK installations. A missing
29947      # lib dir is not going to work.
29948      if test ! -d "$WIN_SDK_BASE/lib"; then
29949        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29950$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29951        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29952$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29953      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29954        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29955$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29956        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29957        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29958          VS_ENV_ARGS="/x86"
29959        else
29960          VS_ENV_ARGS="/x64"
29961        fi
29962        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29963        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29964        # TODO: improve detection for other versions of SDK
29965        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29966      else
29967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29970$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29971      fi
29972    fi
29973  fi
29974
29975
29976  if test "x$VS_ENV_CMD" = x; then
29977    VS_VERSION="${VS_VERSION}"
29978    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
29979    METHOD="well-known name"
29980
29981  windows_path="$WIN_SDK_BASE"
29982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29983    unix_path=`$CYGPATH -u "$windows_path"`
29984    WIN_SDK_BASE="$unix_path"
29985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29987    WIN_SDK_BASE="$unix_path"
29988  fi
29989
29990    if test -d "$WIN_SDK_BASE"; then
29991      # There have been cases of partial or broken SDK installations. A missing
29992      # lib dir is not going to work.
29993      if test ! -d "$WIN_SDK_BASE/lib"; then
29994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29995$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29997$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29998      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30000$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30001        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30002        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30003          VS_ENV_ARGS="/x86"
30004        else
30005          VS_ENV_ARGS="/x64"
30006        fi
30007        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30008        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30009        # TODO: improve detection for other versions of SDK
30010        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30011      else
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30015$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30016      fi
30017    fi
30018  fi
30019
30020  fi
30021
30022    if test "x$VS_ENV_CMD" != x; then
30023      TOOLCHAIN_VERSION=$VS_VERSION
30024      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30025      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30026      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30027      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30028      # The rest of the variables are already evaled while probing
30029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30030$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30031      break
30032    fi
30033  done
30034
30035
30036  # If we have a devkit, skip all of the below.
30037  if test "x$DEVKIT_VS_VERSION" = x; then
30038    if test "x$VS_ENV_CMD" != x; then
30039      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30040
30041  # Only process if variable expands to non-empty
30042
30043  if test "x$VS_ENV_CMD" != x; then
30044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30045
30046  # First separate the path from the arguments. This will split at the first
30047  # space.
30048  complete="$VS_ENV_CMD"
30049  path="${complete%% *}"
30050  tmp="$complete EOL"
30051  arguments="${tmp#* }"
30052
30053  # Input might be given as Windows format, start by converting to
30054  # unix format.
30055  new_path=`$CYGPATH -u "$path"`
30056
30057  # Now try to locate executable using which
30058  new_path=`$WHICH "$new_path" 2> /dev/null`
30059  # bat and cmd files are not always considered executable in cygwin causing which
30060  # to not find them
30061  if test "x$new_path" = x \
30062      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30063      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30064    new_path=`$CYGPATH -u "$path"`
30065  fi
30066  if test "x$new_path" = x; then
30067    # Oops. Which didn't find the executable.
30068    # The splitting of arguments from the executable at a space might have been incorrect,
30069    # since paths with space are more likely in Windows. Give it another try with the whole
30070    # argument.
30071    path="$complete"
30072    arguments="EOL"
30073    new_path=`$CYGPATH -u "$path"`
30074    new_path=`$WHICH "$new_path" 2> /dev/null`
30075    # bat and cmd files are not always considered executable in cygwin causing which
30076    # to not find them
30077    if test "x$new_path" = x \
30078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30080      new_path=`$CYGPATH -u "$path"`
30081    fi
30082    if test "x$new_path" = x; then
30083      # It's still not found. Now this is an unrecoverable error.
30084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30085$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30086      has_space=`$ECHO "$complete" | $GREP " "`
30087      if test "x$has_space" != x; then
30088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30090      fi
30091      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30092    fi
30093  fi
30094
30095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30098  # "foo.exe" is OK but "foo" is an error.
30099  #
30100  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30101  # It is also a way to make sure we got the proper file name for the real test later on.
30102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30103  if test "x$test_shortpath" = x; then
30104    # Short path failed, file does not exist as specified.
30105    # Try adding .exe or .cmd
30106    if test -f "${new_path}.exe"; then
30107      input_to_shortpath="${new_path}.exe"
30108    elif test -f "${new_path}.cmd"; then
30109      input_to_shortpath="${new_path}.cmd"
30110    else
30111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30112$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30115      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30116    fi
30117  else
30118    input_to_shortpath="$new_path"
30119  fi
30120
30121  # Call helper function which possibly converts this using DOS-style short mode.
30122  # If so, the updated path is stored in $new_path.
30123  new_path="$input_to_shortpath"
30124
30125  input_path="$input_to_shortpath"
30126  # Check if we need to convert this using DOS-style short mode. If the path
30127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30128  # take no chances and rewrite it.
30129  # Note: m4 eats our [], so we need to use [ and ] instead.
30130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30131  if test "x$has_forbidden_chars" != x; then
30132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30136      # Going to short mode and back again did indeed matter. Since short mode is
30137      # case insensitive, let's make it lowercase to improve readability.
30138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30139      # Now convert it back to Unix-style (cygpath)
30140      input_path=`$CYGPATH -u "$shortmode_path"`
30141      new_path="$input_path"
30142    fi
30143  fi
30144
30145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30146  if test "x$test_cygdrive_prefix" = x; then
30147    # As a simple fix, exclude /usr/bin since it's not a real path.
30148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30150      # a path prefixed by /cygdrive for fixpath to work.
30151      new_path="$CYGWIN_ROOT_PATH$input_path"
30152    fi
30153  fi
30154
30155  # remove trailing .exe if any
30156  new_path="${new_path/%.exe/}"
30157
30158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30159
30160  # First separate the path from the arguments. This will split at the first
30161  # space.
30162  complete="$VS_ENV_CMD"
30163  path="${complete%% *}"
30164  tmp="$complete EOL"
30165  arguments="${tmp#* }"
30166
30167  # Input might be given as Windows format, start by converting to
30168  # unix format.
30169  new_path="$path"
30170
30171  windows_path="$new_path"
30172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30173    unix_path=`$CYGPATH -u "$windows_path"`
30174    new_path="$unix_path"
30175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30177    new_path="$unix_path"
30178  fi
30179
30180
30181  # Now try to locate executable using which
30182  new_path=`$WHICH "$new_path" 2> /dev/null`
30183
30184  if test "x$new_path" = x; then
30185    # Oops. Which didn't find the executable.
30186    # The splitting of arguments from the executable at a space might have been incorrect,
30187    # since paths with space are more likely in Windows. Give it another try with the whole
30188    # argument.
30189    path="$complete"
30190    arguments="EOL"
30191    new_path="$path"
30192
30193  windows_path="$new_path"
30194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30195    unix_path=`$CYGPATH -u "$windows_path"`
30196    new_path="$unix_path"
30197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30199    new_path="$unix_path"
30200  fi
30201
30202
30203    new_path=`$WHICH "$new_path" 2> /dev/null`
30204    # bat and cmd files are not always considered executable in MSYS causing which
30205    # to not find them
30206    if test "x$new_path" = x \
30207        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30208        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30209      new_path="$path"
30210
30211  windows_path="$new_path"
30212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30213    unix_path=`$CYGPATH -u "$windows_path"`
30214    new_path="$unix_path"
30215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30217    new_path="$unix_path"
30218  fi
30219
30220    fi
30221
30222    if test "x$new_path" = x; then
30223      # It's still not found. Now this is an unrecoverable error.
30224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30225$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30226      has_space=`$ECHO "$complete" | $GREP " "`
30227      if test "x$has_space" != x; then
30228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30230      fi
30231      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30232    fi
30233  fi
30234
30235  # Now new_path has a complete unix path to the binary
30236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30237    # Keep paths in /bin as-is, but remove trailing .exe if any
30238    new_path="${new_path/%.exe/}"
30239    # Do not save /bin paths to all_fixpath_prefixes!
30240  else
30241    # Not in mixed or Windows style, start by that.
30242    new_path=`cmd //c echo $new_path`
30243
30244  input_path="$new_path"
30245  # Check if we need to convert this using DOS-style short mode. If the path
30246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30247  # take no chances and rewrite it.
30248  # Note: m4 eats our [], so we need to use [ and ] instead.
30249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30250  if test "x$has_forbidden_chars" != x; then
30251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30253  fi
30254
30255    # Output is in $new_path
30256
30257  windows_path="$new_path"
30258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30259    unix_path=`$CYGPATH -u "$windows_path"`
30260    new_path="$unix_path"
30261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30263    new_path="$unix_path"
30264  fi
30265
30266    # remove trailing .exe if any
30267    new_path="${new_path/%.exe/}"
30268
30269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30271  fi
30272
30273    else
30274      # We're on a unix platform. Hooray! :)
30275      # First separate the path from the arguments. This will split at the first
30276      # space.
30277      complete="$VS_ENV_CMD"
30278      path="${complete%% *}"
30279      tmp="$complete EOL"
30280      arguments="${tmp#* }"
30281
30282      # Cannot rely on the command "which" here since it doesn't always work.
30283      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30284      if test -z "$is_absolute_path"; then
30285        # Path to executable is not absolute. Find it.
30286        IFS_save="$IFS"
30287        IFS=:
30288        for p in $PATH; do
30289          if test -f "$p/$path" && test -x "$p/$path"; then
30290            new_path="$p/$path"
30291            break
30292          fi
30293        done
30294        IFS="$IFS_save"
30295      else
30296        # This is an absolute path, we can use it without further modifications.
30297        new_path="$path"
30298      fi
30299
30300      if test "x$new_path" = x; then
30301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30302$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30303        has_space=`$ECHO "$complete" | $GREP " "`
30304        if test "x$has_space" != x; then
30305          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30306$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30307        fi
30308        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30309      fi
30310    fi
30311
30312    # Now join together the path and the arguments once again
30313    if test "x$arguments" != xEOL; then
30314      new_complete="$new_path ${arguments% *}"
30315    else
30316      new_complete="$new_path"
30317    fi
30318
30319    if test "x$complete" != "x$new_complete"; then
30320      VS_ENV_CMD="$new_complete"
30321      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30322$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30323    fi
30324  fi
30325
30326
30327      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30329$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30330
30331      # We need to create a couple of temporary files.
30332      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30333      $MKDIR -p $VS_ENV_TMP_DIR
30334
30335      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30336      # Instead create a shell script which will set the relevant variables when run.
30337      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30338
30339  unix_path="$WINPATH_VS_ENV_CMD"
30340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30341    windows_path=`$CYGPATH -m "$unix_path"`
30342    WINPATH_VS_ENV_CMD="$windows_path"
30343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30344    windows_path=`cmd //c echo $unix_path`
30345    WINPATH_VS_ENV_CMD="$windows_path"
30346  fi
30347
30348      WINPATH_BASH="$BASH"
30349
30350  unix_path="$WINPATH_BASH"
30351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30352    windows_path=`$CYGPATH -m "$unix_path"`
30353    WINPATH_BASH="$windows_path"
30354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30355    windows_path=`cmd //c echo $unix_path`
30356    WINPATH_BASH="$windows_path"
30357  fi
30358
30359
30360      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30361      # script (executable by bash) that will setup the important variables.
30362      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30363      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30364      # This will end up something like:
30365      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30366      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30367      # These will end up something like:
30368      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30369      # The trailing space for everyone except PATH is no typo, but is needed due
30370      # to trailing \ in the Windows paths. These will be stripped later.
30371      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30372          >> $EXTRACT_VC_ENV_BAT_FILE
30373      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30374          >> $EXTRACT_VC_ENV_BAT_FILE
30375      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30376          >> $EXTRACT_VC_ENV_BAT_FILE
30377      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30378          >> $EXTRACT_VC_ENV_BAT_FILE
30379      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30380          >> $EXTRACT_VC_ENV_BAT_FILE
30381      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30382          >> $EXTRACT_VC_ENV_BAT_FILE
30383
30384      # Now execute the newly created bat file.
30385      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30386      # Change directory so we don't need to mess with Windows paths in redirects.
30387      cd $VS_ENV_TMP_DIR
30388      cmd /c extract-vs-env.bat | $CAT
30389      cd $CURDIR
30390
30391      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30392        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30393$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30394        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30395$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30396        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30397$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30398        as_fn_error $? "Cannot continue" "$LINENO" 5
30399      fi
30400
30401      # Now set all paths and other env variables. This will allow the rest of
30402      # the configure script to find and run the compiler in the proper way.
30403      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30404$as_echo "$as_me: Setting extracted environment variables" >&6;}
30405      . $VS_ENV_TMP_DIR/set-vs-env.sh
30406      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30407      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30408    else
30409      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30410      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30411$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30412    fi
30413  fi
30414
30415  # At this point, we should have correct variables in the environment, or we can't continue.
30416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30417$as_echo_n "checking for Visual Studio variables... " >&6; }
30418
30419  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30420      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30421    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30423$as_echo "present but broken" >&6; }
30424      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30425    else
30426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30427$as_echo "ok" >&6; }
30428      # Remove any trailing "\" ";" and " " from the variables.
30429      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30430      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30431      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30432      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30433      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30434      # Remove any paths containing # (typically F#) as that messes up make. This
30435      # is needed if visual studio was installed with F# support.
30436      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30437
30438
30439
30440
30441
30442      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30443      OLDIFS="$IFS"
30444      IFS=";"
30445      for i in $VS_INCLUDE; do
30446        ipath=$i
30447        # Only process non-empty elements
30448        if test "x$ipath" != x; then
30449          IFS="$OLDIFS"
30450          # Check that directory exists before calling fixup_path
30451          testpath=$ipath
30452
30453  windows_path="$testpath"
30454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30455    unix_path=`$CYGPATH -u "$windows_path"`
30456    testpath="$unix_path"
30457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30459    testpath="$unix_path"
30460  fi
30461
30462          if test -d "$testpath"; then
30463
30464  # Only process if variable expands to non-empty
30465
30466  if test "x$ipath" != x; then
30467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30468
30469  # Input might be given as Windows format, start by converting to
30470  # unix format.
30471  path="$ipath"
30472  new_path=`$CYGPATH -u "$path"`
30473
30474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30477  # "foo.exe" is OK but "foo" is an error.
30478  #
30479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30480  # It is also a way to make sure we got the proper file name for the real test later on.
30481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30482  if test "x$test_shortpath" = x; then
30483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30484$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30485    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30486  fi
30487
30488  # Call helper function which possibly converts this using DOS-style short mode.
30489  # If so, the updated path is stored in $new_path.
30490
30491  input_path="$new_path"
30492  # Check if we need to convert this using DOS-style short mode. If the path
30493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30494  # take no chances and rewrite it.
30495  # Note: m4 eats our [], so we need to use [ and ] instead.
30496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30497  if test "x$has_forbidden_chars" != x; then
30498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30502      # Going to short mode and back again did indeed matter. Since short mode is
30503      # case insensitive, let's make it lowercase to improve readability.
30504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30505      # Now convert it back to Unix-style (cygpath)
30506      input_path=`$CYGPATH -u "$shortmode_path"`
30507      new_path="$input_path"
30508    fi
30509  fi
30510
30511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30512  if test "x$test_cygdrive_prefix" = x; then
30513    # As a simple fix, exclude /usr/bin since it's not a real path.
30514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30516      # a path prefixed by /cygdrive for fixpath to work.
30517      new_path="$CYGWIN_ROOT_PATH$input_path"
30518    fi
30519  fi
30520
30521
30522  if test "x$path" != "x$new_path"; then
30523    ipath="$new_path"
30524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30525$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30526  fi
30527
30528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30529
30530  path="$ipath"
30531  has_colon=`$ECHO $path | $GREP ^.:`
30532  new_path="$path"
30533  if test "x$has_colon" = x; then
30534    # Not in mixed or Windows style, start by that.
30535    new_path=`cmd //c echo $path`
30536  fi
30537
30538
30539  input_path="$new_path"
30540  # Check if we need to convert this using DOS-style short mode. If the path
30541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30542  # take no chances and rewrite it.
30543  # Note: m4 eats our [], so we need to use [ and ] instead.
30544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30545  if test "x$has_forbidden_chars" != x; then
30546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30548  fi
30549
30550
30551  windows_path="$new_path"
30552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30553    unix_path=`$CYGPATH -u "$windows_path"`
30554    new_path="$unix_path"
30555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30557    new_path="$unix_path"
30558  fi
30559
30560  if test "x$path" != "x$new_path"; then
30561    ipath="$new_path"
30562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30563$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30564  fi
30565
30566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30568
30569    else
30570      # We're on a unix platform. Hooray! :)
30571      path="$ipath"
30572      has_space=`$ECHO "$path" | $GREP " "`
30573      if test "x$has_space" != x; then
30574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30575$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30577      fi
30578
30579      # Use eval to expand a potential ~
30580      eval path="$path"
30581      if test ! -f "$path" && test ! -d "$path"; then
30582        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30583      fi
30584
30585      ipath="`cd "$path"; $THEPWDCMD -L`"
30586    fi
30587  fi
30588
30589            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30590          fi
30591          IFS=";"
30592        fi
30593      done
30594      # Convert VS_LIB into SYSROOT_LDFLAGS
30595      for i in $VS_LIB; do
30596        libpath=$i
30597        # Only process non-empty elements
30598        if test "x$libpath" != x; then
30599          IFS="$OLDIFS"
30600          # Check that directory exists before calling fixup_path
30601          testpath=$libpath
30602
30603  windows_path="$testpath"
30604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30605    unix_path=`$CYGPATH -u "$windows_path"`
30606    testpath="$unix_path"
30607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30609    testpath="$unix_path"
30610  fi
30611
30612          if test -d "$testpath"; then
30613
30614  # Only process if variable expands to non-empty
30615
30616  if test "x$libpath" != x; then
30617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30618
30619  # Input might be given as Windows format, start by converting to
30620  # unix format.
30621  path="$libpath"
30622  new_path=`$CYGPATH -u "$path"`
30623
30624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30627  # "foo.exe" is OK but "foo" is an error.
30628  #
30629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30630  # It is also a way to make sure we got the proper file name for the real test later on.
30631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30632  if test "x$test_shortpath" = x; then
30633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30634$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30635    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30636  fi
30637
30638  # Call helper function which possibly converts this using DOS-style short mode.
30639  # If so, the updated path is stored in $new_path.
30640
30641  input_path="$new_path"
30642  # Check if we need to convert this using DOS-style short mode. If the path
30643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30644  # take no chances and rewrite it.
30645  # Note: m4 eats our [], so we need to use [ and ] instead.
30646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30647  if test "x$has_forbidden_chars" != x; then
30648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30652      # Going to short mode and back again did indeed matter. Since short mode is
30653      # case insensitive, let's make it lowercase to improve readability.
30654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30655      # Now convert it back to Unix-style (cygpath)
30656      input_path=`$CYGPATH -u "$shortmode_path"`
30657      new_path="$input_path"
30658    fi
30659  fi
30660
30661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30662  if test "x$test_cygdrive_prefix" = x; then
30663    # As a simple fix, exclude /usr/bin since it's not a real path.
30664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30666      # a path prefixed by /cygdrive for fixpath to work.
30667      new_path="$CYGWIN_ROOT_PATH$input_path"
30668    fi
30669  fi
30670
30671
30672  if test "x$path" != "x$new_path"; then
30673    libpath="$new_path"
30674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30675$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30676  fi
30677
30678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30679
30680  path="$libpath"
30681  has_colon=`$ECHO $path | $GREP ^.:`
30682  new_path="$path"
30683  if test "x$has_colon" = x; then
30684    # Not in mixed or Windows style, start by that.
30685    new_path=`cmd //c echo $path`
30686  fi
30687
30688
30689  input_path="$new_path"
30690  # Check if we need to convert this using DOS-style short mode. If the path
30691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30692  # take no chances and rewrite it.
30693  # Note: m4 eats our [], so we need to use [ and ] instead.
30694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30695  if test "x$has_forbidden_chars" != x; then
30696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30698  fi
30699
30700
30701  windows_path="$new_path"
30702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30703    unix_path=`$CYGPATH -u "$windows_path"`
30704    new_path="$unix_path"
30705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30707    new_path="$unix_path"
30708  fi
30709
30710  if test "x$path" != "x$new_path"; then
30711    libpath="$new_path"
30712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30713$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30714  fi
30715
30716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30718
30719    else
30720      # We're on a unix platform. Hooray! :)
30721      path="$libpath"
30722      has_space=`$ECHO "$path" | $GREP " "`
30723      if test "x$has_space" != x; then
30724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30725$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30727      fi
30728
30729      # Use eval to expand a potential ~
30730      eval path="$path"
30731      if test ! -f "$path" && test ! -d "$path"; then
30732        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30733      fi
30734
30735      libpath="`cd "$path"; $THEPWDCMD -L`"
30736    fi
30737  fi
30738
30739            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30740          fi
30741          IFS=";"
30742        fi
30743      done
30744      IFS="$OLDIFS"
30745    fi
30746  else
30747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30748$as_echo "not found" >&6; }
30749
30750    if test "x$VS_ENV_CMD" = x; then
30751      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30752$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30753      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30754$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30755    else
30756      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30757$as_echo "$as_me: Running the extraction script failed." >&6;}
30758    fi
30759    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30760$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30761    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30762$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30763    as_fn_error $? "Cannot continue" "$LINENO" 5
30764  fi
30765
30766    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30767    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30768    PATH="$VS_PATH"
30769    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30770    export INCLUDE="$VS_INCLUDE"
30771    export LIB="$VS_LIB"
30772  fi
30773
30774  # For solaris we really need solaris tools, and not the GNU equivalent.
30775  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30776  # so add that to path before starting to probe.
30777  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30778  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30779    PATH="/usr/ccs/bin:$PATH"
30780  fi
30781
30782  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30783  # override all other locations.
30784  if test "x$TOOLCHAIN_PATH" != x; then
30785    PATH=$TOOLCHAIN_PATH:$PATH
30786  fi
30787
30788
30789  #
30790  # Setup the compilers (CC and CXX)
30791  #
30792
30793  COMPILER_NAME=C
30794  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30795
30796  if test "x$CC" != x; then
30797    # User has supplied compiler name already, always let that override.
30798    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30799$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30800    if test "x`basename $CC`" = "x$CC"; then
30801      # A command without a complete path is provided, search $PATH.
30802
30803      for ac_prog in $CC
30804do
30805  # Extract the first word of "$ac_prog", so it can be a program name with args.
30806set dummy $ac_prog; ac_word=$2
30807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30808$as_echo_n "checking for $ac_word... " >&6; }
30809if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30810  $as_echo_n "(cached) " >&6
30811else
30812  case $POTENTIAL_CC in
30813  [\\/]* | ?:[\\/]*)
30814  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30815  ;;
30816  *)
30817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30818for as_dir in $PATH
30819do
30820  IFS=$as_save_IFS
30821  test -z "$as_dir" && as_dir=.
30822    for ac_exec_ext in '' $ac_executable_extensions; do
30823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30824    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30826    break 2
30827  fi
30828done
30829  done
30830IFS=$as_save_IFS
30831
30832  ;;
30833esac
30834fi
30835POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30836if test -n "$POTENTIAL_CC"; then
30837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30838$as_echo "$POTENTIAL_CC" >&6; }
30839else
30840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30841$as_echo "no" >&6; }
30842fi
30843
30844
30845  test -n "$POTENTIAL_CC" && break
30846done
30847
30848      if test "x$POTENTIAL_CC" != x; then
30849        CC=$POTENTIAL_CC
30850      else
30851        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30852      fi
30853    else
30854      # Otherwise it might already be a complete path
30855      if test ! -x "$CC"; then
30856        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30857      fi
30858    fi
30859  else
30860    # No user supplied value. Locate compiler ourselves.
30861
30862    # If we are cross compiling, assume cross compilation tools follows the
30863    # cross compilation standard where they are prefixed with the autoconf
30864    # standard name for the target. For example the binary
30865    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30866    # If we are not cross compiling, then the default compiler name will be
30867    # used.
30868
30869    CC=
30870    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30871    # before checking the rest of the PATH.
30872    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30873    # step, this should not be necessary.
30874    if test -n "$TOOLCHAIN_PATH"; then
30875      PATH_save="$PATH"
30876      PATH="$TOOLCHAIN_PATH"
30877      for ac_prog in $SEARCH_LIST
30878do
30879  # Extract the first word of "$ac_prog", so it can be a program name with args.
30880set dummy $ac_prog; ac_word=$2
30881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30882$as_echo_n "checking for $ac_word... " >&6; }
30883if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30884  $as_echo_n "(cached) " >&6
30885else
30886  case $TOOLCHAIN_PATH_CC in
30887  [\\/]* | ?:[\\/]*)
30888  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30889  ;;
30890  *)
30891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30892for as_dir in $PATH
30893do
30894  IFS=$as_save_IFS
30895  test -z "$as_dir" && as_dir=.
30896    for ac_exec_ext in '' $ac_executable_extensions; do
30897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30898    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30900    break 2
30901  fi
30902done
30903  done
30904IFS=$as_save_IFS
30905
30906  ;;
30907esac
30908fi
30909TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30910if test -n "$TOOLCHAIN_PATH_CC"; then
30911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30912$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30913else
30914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30915$as_echo "no" >&6; }
30916fi
30917
30918
30919  test -n "$TOOLCHAIN_PATH_CC" && break
30920done
30921
30922      CC=$TOOLCHAIN_PATH_CC
30923      PATH="$PATH_save"
30924    fi
30925
30926    # AC_PATH_PROGS can't be run multiple times with the same variable,
30927    # so create a new name for this run.
30928    if test "x$CC" = x; then
30929      for ac_prog in $SEARCH_LIST
30930do
30931  # Extract the first word of "$ac_prog", so it can be a program name with args.
30932set dummy $ac_prog; ac_word=$2
30933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30934$as_echo_n "checking for $ac_word... " >&6; }
30935if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30936  $as_echo_n "(cached) " >&6
30937else
30938  case $POTENTIAL_CC in
30939  [\\/]* | ?:[\\/]*)
30940  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30941  ;;
30942  *)
30943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30944for as_dir in $PATH
30945do
30946  IFS=$as_save_IFS
30947  test -z "$as_dir" && as_dir=.
30948    for ac_exec_ext in '' $ac_executable_extensions; do
30949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30950    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30952    break 2
30953  fi
30954done
30955  done
30956IFS=$as_save_IFS
30957
30958  ;;
30959esac
30960fi
30961POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30962if test -n "$POTENTIAL_CC"; then
30963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30964$as_echo "$POTENTIAL_CC" >&6; }
30965else
30966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30967$as_echo "no" >&6; }
30968fi
30969
30970
30971  test -n "$POTENTIAL_CC" && break
30972done
30973
30974      CC=$POTENTIAL_CC
30975    fi
30976
30977    if test "x$CC" = x; then
30978
30979  # Print a helpful message on how to acquire the necessary build dependency.
30980  # devkit is the help tag: freetype, cups, alsa etc
30981  MISSING_DEPENDENCY=devkit
30982
30983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30984    cygwin_help $MISSING_DEPENDENCY
30985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30986    msys_help $MISSING_DEPENDENCY
30987  else
30988    PKGHANDLER_COMMAND=
30989
30990    case $PKGHANDLER in
30991      apt-get)
30992        apt_help     $MISSING_DEPENDENCY ;;
30993      yum)
30994        yum_help     $MISSING_DEPENDENCY ;;
30995      port)
30996        port_help    $MISSING_DEPENDENCY ;;
30997      pkgutil)
30998        pkgutil_help $MISSING_DEPENDENCY ;;
30999      pkgadd)
31000        pkgadd_help  $MISSING_DEPENDENCY ;;
31001    esac
31002
31003    if test "x$PKGHANDLER_COMMAND" != x; then
31004      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31005    fi
31006  fi
31007
31008      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31009    fi
31010  fi
31011
31012  # Now we have a compiler binary in CC. Make sure it's okay.
31013
31014  # Only process if variable expands to non-empty
31015
31016  if test "x$CC" != x; then
31017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31018
31019  # First separate the path from the arguments. This will split at the first
31020  # space.
31021  complete="$CC"
31022  path="${complete%% *}"
31023  tmp="$complete EOL"
31024  arguments="${tmp#* }"
31025
31026  # Input might be given as Windows format, start by converting to
31027  # unix format.
31028  new_path=`$CYGPATH -u "$path"`
31029
31030  # Now try to locate executable using which
31031  new_path=`$WHICH "$new_path" 2> /dev/null`
31032  # bat and cmd files are not always considered executable in cygwin causing which
31033  # to not find them
31034  if test "x$new_path" = x \
31035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31037    new_path=`$CYGPATH -u "$path"`
31038  fi
31039  if test "x$new_path" = x; then
31040    # Oops. Which didn't find the executable.
31041    # The splitting of arguments from the executable at a space might have been incorrect,
31042    # since paths with space are more likely in Windows. Give it another try with the whole
31043    # argument.
31044    path="$complete"
31045    arguments="EOL"
31046    new_path=`$CYGPATH -u "$path"`
31047    new_path=`$WHICH "$new_path" 2> /dev/null`
31048    # bat and cmd files are not always considered executable in cygwin causing which
31049    # to not find them
31050    if test "x$new_path" = x \
31051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31053      new_path=`$CYGPATH -u "$path"`
31054    fi
31055    if test "x$new_path" = x; then
31056      # It's still not found. Now this is an unrecoverable error.
31057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31058$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31059      has_space=`$ECHO "$complete" | $GREP " "`
31060      if test "x$has_space" != x; then
31061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31063      fi
31064      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31065    fi
31066  fi
31067
31068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31071  # "foo.exe" is OK but "foo" is an error.
31072  #
31073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31074  # It is also a way to make sure we got the proper file name for the real test later on.
31075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31076  if test "x$test_shortpath" = x; then
31077    # Short path failed, file does not exist as specified.
31078    # Try adding .exe or .cmd
31079    if test -f "${new_path}.exe"; then
31080      input_to_shortpath="${new_path}.exe"
31081    elif test -f "${new_path}.cmd"; then
31082      input_to_shortpath="${new_path}.cmd"
31083    else
31084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31085$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31088      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31089    fi
31090  else
31091    input_to_shortpath="$new_path"
31092  fi
31093
31094  # Call helper function which possibly converts this using DOS-style short mode.
31095  # If so, the updated path is stored in $new_path.
31096  new_path="$input_to_shortpath"
31097
31098  input_path="$input_to_shortpath"
31099  # Check if we need to convert this using DOS-style short mode. If the path
31100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31101  # take no chances and rewrite it.
31102  # Note: m4 eats our [], so we need to use [ and ] instead.
31103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31104  if test "x$has_forbidden_chars" != x; then
31105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31109      # Going to short mode and back again did indeed matter. Since short mode is
31110      # case insensitive, let's make it lowercase to improve readability.
31111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31112      # Now convert it back to Unix-style (cygpath)
31113      input_path=`$CYGPATH -u "$shortmode_path"`
31114      new_path="$input_path"
31115    fi
31116  fi
31117
31118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31119  if test "x$test_cygdrive_prefix" = x; then
31120    # As a simple fix, exclude /usr/bin since it's not a real path.
31121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31123      # a path prefixed by /cygdrive for fixpath to work.
31124      new_path="$CYGWIN_ROOT_PATH$input_path"
31125    fi
31126  fi
31127
31128  # remove trailing .exe if any
31129  new_path="${new_path/%.exe/}"
31130
31131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31132
31133  # First separate the path from the arguments. This will split at the first
31134  # space.
31135  complete="$CC"
31136  path="${complete%% *}"
31137  tmp="$complete EOL"
31138  arguments="${tmp#* }"
31139
31140  # Input might be given as Windows format, start by converting to
31141  # unix format.
31142  new_path="$path"
31143
31144  windows_path="$new_path"
31145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31146    unix_path=`$CYGPATH -u "$windows_path"`
31147    new_path="$unix_path"
31148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31150    new_path="$unix_path"
31151  fi
31152
31153
31154  # Now try to locate executable using which
31155  new_path=`$WHICH "$new_path" 2> /dev/null`
31156
31157  if test "x$new_path" = x; then
31158    # Oops. Which didn't find the executable.
31159    # The splitting of arguments from the executable at a space might have been incorrect,
31160    # since paths with space are more likely in Windows. Give it another try with the whole
31161    # argument.
31162    path="$complete"
31163    arguments="EOL"
31164    new_path="$path"
31165
31166  windows_path="$new_path"
31167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31168    unix_path=`$CYGPATH -u "$windows_path"`
31169    new_path="$unix_path"
31170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31172    new_path="$unix_path"
31173  fi
31174
31175
31176    new_path=`$WHICH "$new_path" 2> /dev/null`
31177    # bat and cmd files are not always considered executable in MSYS causing which
31178    # to not find them
31179    if test "x$new_path" = x \
31180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31182      new_path="$path"
31183
31184  windows_path="$new_path"
31185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31186    unix_path=`$CYGPATH -u "$windows_path"`
31187    new_path="$unix_path"
31188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31190    new_path="$unix_path"
31191  fi
31192
31193    fi
31194
31195    if test "x$new_path" = x; then
31196      # It's still not found. Now this is an unrecoverable error.
31197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31198$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31199      has_space=`$ECHO "$complete" | $GREP " "`
31200      if test "x$has_space" != x; then
31201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31203      fi
31204      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31205    fi
31206  fi
31207
31208  # Now new_path has a complete unix path to the binary
31209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31210    # Keep paths in /bin as-is, but remove trailing .exe if any
31211    new_path="${new_path/%.exe/}"
31212    # Do not save /bin paths to all_fixpath_prefixes!
31213  else
31214    # Not in mixed or Windows style, start by that.
31215    new_path=`cmd //c echo $new_path`
31216
31217  input_path="$new_path"
31218  # Check if we need to convert this using DOS-style short mode. If the path
31219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31220  # take no chances and rewrite it.
31221  # Note: m4 eats our [], so we need to use [ and ] instead.
31222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31223  if test "x$has_forbidden_chars" != x; then
31224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31226  fi
31227
31228    # Output is in $new_path
31229
31230  windows_path="$new_path"
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232    unix_path=`$CYGPATH -u "$windows_path"`
31233    new_path="$unix_path"
31234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31236    new_path="$unix_path"
31237  fi
31238
31239    # remove trailing .exe if any
31240    new_path="${new_path/%.exe/}"
31241
31242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31244  fi
31245
31246    else
31247      # We're on a unix platform. Hooray! :)
31248      # First separate the path from the arguments. This will split at the first
31249      # space.
31250      complete="$CC"
31251      path="${complete%% *}"
31252      tmp="$complete EOL"
31253      arguments="${tmp#* }"
31254
31255      # Cannot rely on the command "which" here since it doesn't always work.
31256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31257      if test -z "$is_absolute_path"; then
31258        # Path to executable is not absolute. Find it.
31259        IFS_save="$IFS"
31260        IFS=:
31261        for p in $PATH; do
31262          if test -f "$p/$path" && test -x "$p/$path"; then
31263            new_path="$p/$path"
31264            break
31265          fi
31266        done
31267        IFS="$IFS_save"
31268      else
31269        # This is an absolute path, we can use it without further modifications.
31270        new_path="$path"
31271      fi
31272
31273      if test "x$new_path" = x; then
31274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31275$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31276        has_space=`$ECHO "$complete" | $GREP " "`
31277        if test "x$has_space" != x; then
31278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31280        fi
31281        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31282      fi
31283    fi
31284
31285    # Now join together the path and the arguments once again
31286    if test "x$arguments" != xEOL; then
31287      new_complete="$new_path ${arguments% *}"
31288    else
31289      new_complete="$new_path"
31290    fi
31291
31292    if test "x$complete" != "x$new_complete"; then
31293      CC="$new_complete"
31294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31295$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31296    fi
31297  fi
31298
31299  TEST_COMPILER="$CC"
31300  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31301  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31302  if test "x$OPENJDK_BUILD_OS" != xaix; then
31303    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31305$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31306
31307  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31308    # Follow a chain of symbolic links. Use readlink
31309    # where it exists, else fall back to horribly
31310    # complicated shell code.
31311    if test "x$READLINK_TESTED" != yes; then
31312      # On MacOSX there is a readlink tool with a different
31313      # purpose than the GNU readlink tool. Check the found readlink.
31314      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31315      if test "x$ISGNU" = x; then
31316        # A readlink that we do not know how to use.
31317        # Are there other non-GNU readlinks out there?
31318        READLINK_TESTED=yes
31319        READLINK=
31320      fi
31321    fi
31322
31323    if test "x$READLINK" != x; then
31324      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31325    else
31326      # Save the current directory for restoring afterwards
31327      STARTDIR=$PWD
31328      COUNTER=0
31329      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31330      sym_link_file=`$BASENAME $TEST_COMPILER`
31331      cd $sym_link_dir
31332      # Use -P flag to resolve symlinks in directories.
31333      cd `$THEPWDCMD -P`
31334      sym_link_dir=`$THEPWDCMD -P`
31335      # Resolve file symlinks
31336      while test $COUNTER -lt 20; do
31337        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31338        if test "x$ISLINK" == x; then
31339          # This is not a symbolic link! We are done!
31340          break
31341        fi
31342        # Again resolve directory symlinks since the target of the just found
31343        # link could be in a different directory
31344        cd `$DIRNAME $ISLINK`
31345        sym_link_dir=`$THEPWDCMD -P`
31346        sym_link_file=`$BASENAME $ISLINK`
31347        let COUNTER=COUNTER+1
31348      done
31349      cd $STARTDIR
31350      TEST_COMPILER=$sym_link_dir/$sym_link_file
31351    fi
31352  fi
31353
31354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31355$as_echo "$TEST_COMPILER" >&6; }
31356  fi
31357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31358$as_echo_n "checking if CC is disguised ccache... " >&6; }
31359
31360  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31361  if test "x$COMPILER_BASENAME" = "xccache"; then
31362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31363$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31364    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31365    # We want to control ccache invocation ourselves, so ignore this cc and try
31366    # searching again.
31367
31368    # Remove the path to the fake ccache cc from the PATH
31369    RETRY_COMPILER_SAVED_PATH="$PATH"
31370    COMPILER_DIRNAME=`$DIRNAME $CC`
31371    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31372
31373    # Try again looking for our compiler
31374    if test -n "$ac_tool_prefix"; then
31375  for ac_prog in $TOOLCHAIN_CC_BINARY
31376  do
31377    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31378set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31380$as_echo_n "checking for $ac_word... " >&6; }
31381if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31382  $as_echo_n "(cached) " >&6
31383else
31384  if test -n "$PROPER_COMPILER_CC"; then
31385  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31386else
31387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31388for as_dir in $PATH
31389do
31390  IFS=$as_save_IFS
31391  test -z "$as_dir" && as_dir=.
31392    for ac_exec_ext in '' $ac_executable_extensions; do
31393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31394    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31396    break 2
31397  fi
31398done
31399  done
31400IFS=$as_save_IFS
31401
31402fi
31403fi
31404PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31405if test -n "$PROPER_COMPILER_CC"; then
31406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31407$as_echo "$PROPER_COMPILER_CC" >&6; }
31408else
31409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31410$as_echo "no" >&6; }
31411fi
31412
31413
31414    test -n "$PROPER_COMPILER_CC" && break
31415  done
31416fi
31417if test -z "$PROPER_COMPILER_CC"; then
31418  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31419  for ac_prog in $TOOLCHAIN_CC_BINARY
31420do
31421  # Extract the first word of "$ac_prog", so it can be a program name with args.
31422set dummy $ac_prog; ac_word=$2
31423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31424$as_echo_n "checking for $ac_word... " >&6; }
31425if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31426  $as_echo_n "(cached) " >&6
31427else
31428  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31429  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31430else
31431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31432for as_dir in $PATH
31433do
31434  IFS=$as_save_IFS
31435  test -z "$as_dir" && as_dir=.
31436    for ac_exec_ext in '' $ac_executable_extensions; do
31437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31438    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31440    break 2
31441  fi
31442done
31443  done
31444IFS=$as_save_IFS
31445
31446fi
31447fi
31448ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31449if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31451$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31452else
31453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31454$as_echo "no" >&6; }
31455fi
31456
31457
31458  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31459done
31460
31461  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31462    PROPER_COMPILER_CC=""
31463  else
31464    case $cross_compiling:$ac_tool_warned in
31465yes:)
31466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31468ac_tool_warned=yes ;;
31469esac
31470    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31471  fi
31472fi
31473
31474
31475  # Only process if variable expands to non-empty
31476
31477  if test "x$PROPER_COMPILER_CC" != x; then
31478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31479
31480  # First separate the path from the arguments. This will split at the first
31481  # space.
31482  complete="$PROPER_COMPILER_CC"
31483  path="${complete%% *}"
31484  tmp="$complete EOL"
31485  arguments="${tmp#* }"
31486
31487  # Input might be given as Windows format, start by converting to
31488  # unix format.
31489  new_path=`$CYGPATH -u "$path"`
31490
31491  # Now try to locate executable using which
31492  new_path=`$WHICH "$new_path" 2> /dev/null`
31493  # bat and cmd files are not always considered executable in cygwin causing which
31494  # to not find them
31495  if test "x$new_path" = x \
31496      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31497      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31498    new_path=`$CYGPATH -u "$path"`
31499  fi
31500  if test "x$new_path" = x; then
31501    # Oops. Which didn't find the executable.
31502    # The splitting of arguments from the executable at a space might have been incorrect,
31503    # since paths with space are more likely in Windows. Give it another try with the whole
31504    # argument.
31505    path="$complete"
31506    arguments="EOL"
31507    new_path=`$CYGPATH -u "$path"`
31508    new_path=`$WHICH "$new_path" 2> /dev/null`
31509    # bat and cmd files are not always considered executable in cygwin causing which
31510    # to not find them
31511    if test "x$new_path" = x \
31512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31514      new_path=`$CYGPATH -u "$path"`
31515    fi
31516    if test "x$new_path" = x; then
31517      # It's still not found. Now this is an unrecoverable error.
31518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31519$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31520      has_space=`$ECHO "$complete" | $GREP " "`
31521      if test "x$has_space" != x; then
31522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31524      fi
31525      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31526    fi
31527  fi
31528
31529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31532  # "foo.exe" is OK but "foo" is an error.
31533  #
31534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31535  # It is also a way to make sure we got the proper file name for the real test later on.
31536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31537  if test "x$test_shortpath" = x; then
31538    # Short path failed, file does not exist as specified.
31539    # Try adding .exe or .cmd
31540    if test -f "${new_path}.exe"; then
31541      input_to_shortpath="${new_path}.exe"
31542    elif test -f "${new_path}.cmd"; then
31543      input_to_shortpath="${new_path}.cmd"
31544    else
31545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31546$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31549      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31550    fi
31551  else
31552    input_to_shortpath="$new_path"
31553  fi
31554
31555  # Call helper function which possibly converts this using DOS-style short mode.
31556  # If so, the updated path is stored in $new_path.
31557  new_path="$input_to_shortpath"
31558
31559  input_path="$input_to_shortpath"
31560  # Check if we need to convert this using DOS-style short mode. If the path
31561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31562  # take no chances and rewrite it.
31563  # Note: m4 eats our [], so we need to use [ and ] instead.
31564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31565  if test "x$has_forbidden_chars" != x; then
31566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31570      # Going to short mode and back again did indeed matter. Since short mode is
31571      # case insensitive, let's make it lowercase to improve readability.
31572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31573      # Now convert it back to Unix-style (cygpath)
31574      input_path=`$CYGPATH -u "$shortmode_path"`
31575      new_path="$input_path"
31576    fi
31577  fi
31578
31579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31580  if test "x$test_cygdrive_prefix" = x; then
31581    # As a simple fix, exclude /usr/bin since it's not a real path.
31582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31584      # a path prefixed by /cygdrive for fixpath to work.
31585      new_path="$CYGWIN_ROOT_PATH$input_path"
31586    fi
31587  fi
31588
31589  # remove trailing .exe if any
31590  new_path="${new_path/%.exe/}"
31591
31592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31593
31594  # First separate the path from the arguments. This will split at the first
31595  # space.
31596  complete="$PROPER_COMPILER_CC"
31597  path="${complete%% *}"
31598  tmp="$complete EOL"
31599  arguments="${tmp#* }"
31600
31601  # Input might be given as Windows format, start by converting to
31602  # unix format.
31603  new_path="$path"
31604
31605  windows_path="$new_path"
31606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31607    unix_path=`$CYGPATH -u "$windows_path"`
31608    new_path="$unix_path"
31609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31611    new_path="$unix_path"
31612  fi
31613
31614
31615  # Now try to locate executable using which
31616  new_path=`$WHICH "$new_path" 2> /dev/null`
31617
31618  if test "x$new_path" = x; then
31619    # Oops. Which didn't find the executable.
31620    # The splitting of arguments from the executable at a space might have been incorrect,
31621    # since paths with space are more likely in Windows. Give it another try with the whole
31622    # argument.
31623    path="$complete"
31624    arguments="EOL"
31625    new_path="$path"
31626
31627  windows_path="$new_path"
31628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629    unix_path=`$CYGPATH -u "$windows_path"`
31630    new_path="$unix_path"
31631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31633    new_path="$unix_path"
31634  fi
31635
31636
31637    new_path=`$WHICH "$new_path" 2> /dev/null`
31638    # bat and cmd files are not always considered executable in MSYS causing which
31639    # to not find them
31640    if test "x$new_path" = x \
31641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31643      new_path="$path"
31644
31645  windows_path="$new_path"
31646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31647    unix_path=`$CYGPATH -u "$windows_path"`
31648    new_path="$unix_path"
31649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31651    new_path="$unix_path"
31652  fi
31653
31654    fi
31655
31656    if test "x$new_path" = x; then
31657      # It's still not found. Now this is an unrecoverable error.
31658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31659$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31660      has_space=`$ECHO "$complete" | $GREP " "`
31661      if test "x$has_space" != x; then
31662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31664      fi
31665      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31666    fi
31667  fi
31668
31669  # Now new_path has a complete unix path to the binary
31670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31671    # Keep paths in /bin as-is, but remove trailing .exe if any
31672    new_path="${new_path/%.exe/}"
31673    # Do not save /bin paths to all_fixpath_prefixes!
31674  else
31675    # Not in mixed or Windows style, start by that.
31676    new_path=`cmd //c echo $new_path`
31677
31678  input_path="$new_path"
31679  # Check if we need to convert this using DOS-style short mode. If the path
31680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31681  # take no chances and rewrite it.
31682  # Note: m4 eats our [], so we need to use [ and ] instead.
31683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31684  if test "x$has_forbidden_chars" != x; then
31685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31687  fi
31688
31689    # Output is in $new_path
31690
31691  windows_path="$new_path"
31692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31693    unix_path=`$CYGPATH -u "$windows_path"`
31694    new_path="$unix_path"
31695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31697    new_path="$unix_path"
31698  fi
31699
31700    # remove trailing .exe if any
31701    new_path="${new_path/%.exe/}"
31702
31703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31705  fi
31706
31707    else
31708      # We're on a unix platform. Hooray! :)
31709      # First separate the path from the arguments. This will split at the first
31710      # space.
31711      complete="$PROPER_COMPILER_CC"
31712      path="${complete%% *}"
31713      tmp="$complete EOL"
31714      arguments="${tmp#* }"
31715
31716      # Cannot rely on the command "which" here since it doesn't always work.
31717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31718      if test -z "$is_absolute_path"; then
31719        # Path to executable is not absolute. Find it.
31720        IFS_save="$IFS"
31721        IFS=:
31722        for p in $PATH; do
31723          if test -f "$p/$path" && test -x "$p/$path"; then
31724            new_path="$p/$path"
31725            break
31726          fi
31727        done
31728        IFS="$IFS_save"
31729      else
31730        # This is an absolute path, we can use it without further modifications.
31731        new_path="$path"
31732      fi
31733
31734      if test "x$new_path" = x; then
31735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31736$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31737        has_space=`$ECHO "$complete" | $GREP " "`
31738        if test "x$has_space" != x; then
31739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31741        fi
31742        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31743      fi
31744    fi
31745
31746    # Now join together the path and the arguments once again
31747    if test "x$arguments" != xEOL; then
31748      new_complete="$new_path ${arguments% *}"
31749    else
31750      new_complete="$new_path"
31751    fi
31752
31753    if test "x$complete" != "x$new_complete"; then
31754      PROPER_COMPILER_CC="$new_complete"
31755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31756$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31757    fi
31758  fi
31759
31760    PATH="$RETRY_COMPILER_SAVED_PATH"
31761
31762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31763$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31764
31765  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31766    # Follow a chain of symbolic links. Use readlink
31767    # where it exists, else fall back to horribly
31768    # complicated shell code.
31769    if test "x$READLINK_TESTED" != yes; then
31770      # On MacOSX there is a readlink tool with a different
31771      # purpose than the GNU readlink tool. Check the found readlink.
31772      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31773      if test "x$ISGNU" = x; then
31774        # A readlink that we do not know how to use.
31775        # Are there other non-GNU readlinks out there?
31776        READLINK_TESTED=yes
31777        READLINK=
31778      fi
31779    fi
31780
31781    if test "x$READLINK" != x; then
31782      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31783    else
31784      # Save the current directory for restoring afterwards
31785      STARTDIR=$PWD
31786      COUNTER=0
31787      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31788      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31789      cd $sym_link_dir
31790      # Use -P flag to resolve symlinks in directories.
31791      cd `$THEPWDCMD -P`
31792      sym_link_dir=`$THEPWDCMD -P`
31793      # Resolve file symlinks
31794      while test $COUNTER -lt 20; do
31795        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31796        if test "x$ISLINK" == x; then
31797          # This is not a symbolic link! We are done!
31798          break
31799        fi
31800        # Again resolve directory symlinks since the target of the just found
31801        # link could be in a different directory
31802        cd `$DIRNAME $ISLINK`
31803        sym_link_dir=`$THEPWDCMD -P`
31804        sym_link_file=`$BASENAME $ISLINK`
31805        let COUNTER=COUNTER+1
31806      done
31807      cd $STARTDIR
31808      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31809    fi
31810  fi
31811
31812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31813$as_echo "$PROPER_COMPILER_CC" >&6; }
31814    CC="$PROPER_COMPILER_CC"
31815  else
31816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31817$as_echo "no, keeping CC" >&6; }
31818  fi
31819
31820
31821  COMPILER=$CC
31822  COMPILER_NAME=$COMPILER_NAME
31823
31824  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31825    # cc -V output typically looks like
31826    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31827    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31828    # Check that this is likely to be the Solaris Studio cc.
31829    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31830    if test $? -ne 0; then
31831      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31832      { $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
31833$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31834      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31835$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31837$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31838      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31839    fi
31840    # Remove usage instructions (if present), and
31841    # collapse compiler output into a single line
31842    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31843        $SED -e 's/ *[Uu]sage:.*//'`
31844    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31845        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31846  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31847    # xlc -qversion output typically looks like
31848    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31849    #     Version: 11.01.0000.0015
31850    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31851    # Check that this is likely to be the IBM XL C compiler.
31852    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31853    if test $? -ne 0; then
31854      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31855      { $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
31856$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31857      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31858$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31859      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31860$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31861      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31862    fi
31863    # Collapse compiler output into a single line
31864    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31865    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31866        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31867  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31868    # There is no specific version flag, but all output starts with a version string.
31869    # First line typically looks something like:
31870    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31871    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31872    # Check that this is likely to be Microsoft CL.EXE.
31873    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31874    if test $? -ne 0; then
31875      { $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
31876$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31877      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31878$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31879      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31880    fi
31881    # Collapse compiler output into a single line
31882    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31883    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31884        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31885  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31886    # gcc --version output typically looks like
31887    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31888    #     Copyright (C) 2013 Free Software Foundation, Inc.
31889    #     This is free software; see the source for copying conditions.  There is NO
31890    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31891    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31892    # Check that this is likely to be GCC.
31893    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31894    if test $? -ne 0; then
31895      { $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
31896$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31897      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31898$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31899      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31900    fi
31901    # Remove Copyright and legalese from version string, and
31902    # collapse into a single line
31903    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31904        $SED -e 's/ *Copyright .*//'`
31905    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31906        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31907  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31908    # clang --version output typically looks like
31909    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31910    #    clang version 3.3 (tags/RELEASE_33/final)
31911    # or
31912    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31913    #    Target: x86_64-pc-linux-gnu
31914    #    Thread model: posix
31915    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31916    # Check that this is likely to be clang
31917    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31918    if test $? -ne 0; then
31919      { $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
31920$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31922$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31924    fi
31925    # Collapse compiler output into a single line
31926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31928        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31929  else
31930      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31931  fi
31932  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31933  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31934  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31935  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31936
31937  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31938$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31939
31940
31941  # Now that we have resolved CC ourself, let autoconf have its go at it
31942  ac_ext=c
31943ac_cpp='$CPP $CPPFLAGS'
31944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31946ac_compiler_gnu=$ac_cv_c_compiler_gnu
31947if test -n "$ac_tool_prefix"; then
31948  for ac_prog in $CC
31949  do
31950    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31951set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31953$as_echo_n "checking for $ac_word... " >&6; }
31954if ${ac_cv_prog_CC+:} false; then :
31955  $as_echo_n "(cached) " >&6
31956else
31957  if test -n "$CC"; then
31958  ac_cv_prog_CC="$CC" # Let the user override the test.
31959else
31960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31961for as_dir in $PATH
31962do
31963  IFS=$as_save_IFS
31964  test -z "$as_dir" && as_dir=.
31965    for ac_exec_ext in '' $ac_executable_extensions; do
31966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31967    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31969    break 2
31970  fi
31971done
31972  done
31973IFS=$as_save_IFS
31974
31975fi
31976fi
31977CC=$ac_cv_prog_CC
31978if test -n "$CC"; then
31979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
31980$as_echo "$CC" >&6; }
31981else
31982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31983$as_echo "no" >&6; }
31984fi
31985
31986
31987    test -n "$CC" && break
31988  done
31989fi
31990if test -z "$CC"; then
31991  ac_ct_CC=$CC
31992  for ac_prog in $CC
31993do
31994  # Extract the first word of "$ac_prog", so it can be a program name with args.
31995set dummy $ac_prog; ac_word=$2
31996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31997$as_echo_n "checking for $ac_word... " >&6; }
31998if ${ac_cv_prog_ac_ct_CC+:} false; then :
31999  $as_echo_n "(cached) " >&6
32000else
32001  if test -n "$ac_ct_CC"; then
32002  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32003else
32004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32005for as_dir in $PATH
32006do
32007  IFS=$as_save_IFS
32008  test -z "$as_dir" && as_dir=.
32009    for ac_exec_ext in '' $ac_executable_extensions; do
32010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32011    ac_cv_prog_ac_ct_CC="$ac_prog"
32012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32013    break 2
32014  fi
32015done
32016  done
32017IFS=$as_save_IFS
32018
32019fi
32020fi
32021ac_ct_CC=$ac_cv_prog_ac_ct_CC
32022if test -n "$ac_ct_CC"; then
32023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32024$as_echo "$ac_ct_CC" >&6; }
32025else
32026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32027$as_echo "no" >&6; }
32028fi
32029
32030
32031  test -n "$ac_ct_CC" && break
32032done
32033
32034  if test "x$ac_ct_CC" = x; then
32035    CC=""
32036  else
32037    case $cross_compiling:$ac_tool_warned in
32038yes:)
32039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32041ac_tool_warned=yes ;;
32042esac
32043    CC=$ac_ct_CC
32044  fi
32045fi
32046
32047
32048test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32050as_fn_error $? "no acceptable C compiler found in \$PATH
32051See \`config.log' for more details" "$LINENO" 5; }
32052
32053# Provide some information about the compiler.
32054$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32055set X $ac_compile
32056ac_compiler=$2
32057for ac_option in --version -v -V -qversion; do
32058  { { ac_try="$ac_compiler $ac_option >&5"
32059case "(($ac_try" in
32060  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32061  *) ac_try_echo=$ac_try;;
32062esac
32063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32064$as_echo "$ac_try_echo"; } >&5
32065  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32066  ac_status=$?
32067  if test -s conftest.err; then
32068    sed '10a\
32069... rest of stderr output deleted ...
32070         10q' conftest.err >conftest.er1
32071    cat conftest.er1 >&5
32072  fi
32073  rm -f conftest.er1 conftest.err
32074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32075  test $ac_status = 0; }
32076done
32077
32078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32079/* end confdefs.h.  */
32080
32081int
32082main ()
32083{
32084
32085  ;
32086  return 0;
32087}
32088_ACEOF
32089ac_clean_files_save=$ac_clean_files
32090ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32091# Try to create an executable without -o first, disregard a.out.
32092# It will help us diagnose broken compilers, and finding out an intuition
32093# of exeext.
32094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32095$as_echo_n "checking whether the C compiler works... " >&6; }
32096ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32097
32098# The possible output files:
32099ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32100
32101ac_rmfiles=
32102for ac_file in $ac_files
32103do
32104  case $ac_file in
32105    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32106    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32107  esac
32108done
32109rm -f $ac_rmfiles
32110
32111if { { ac_try="$ac_link_default"
32112case "(($ac_try" in
32113  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32114  *) ac_try_echo=$ac_try;;
32115esac
32116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32117$as_echo "$ac_try_echo"; } >&5
32118  (eval "$ac_link_default") 2>&5
32119  ac_status=$?
32120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32121  test $ac_status = 0; }; then :
32122  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32123# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32124# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32125# so that the user can short-circuit this test for compilers unknown to
32126# Autoconf.
32127for ac_file in $ac_files ''
32128do
32129  test -f "$ac_file" || continue
32130  case $ac_file in
32131    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32132	;;
32133    [ab].out )
32134	# We found the default executable, but exeext='' is most
32135	# certainly right.
32136	break;;
32137    *.* )
32138	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32139	then :; else
32140	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32141	fi
32142	# We set ac_cv_exeext here because the later test for it is not
32143	# safe: cross compilers may not add the suffix if given an `-o'
32144	# argument, so we may need to know it at that point already.
32145	# Even if this section looks crufty: it has the advantage of
32146	# actually working.
32147	break;;
32148    * )
32149	break;;
32150  esac
32151done
32152test "$ac_cv_exeext" = no && ac_cv_exeext=
32153
32154else
32155  ac_file=''
32156fi
32157if test -z "$ac_file"; then :
32158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32159$as_echo "no" >&6; }
32160$as_echo "$as_me: failed program was:" >&5
32161sed 's/^/| /' conftest.$ac_ext >&5
32162
32163{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32165as_fn_error 77 "C compiler cannot create executables
32166See \`config.log' for more details" "$LINENO" 5; }
32167else
32168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32169$as_echo "yes" >&6; }
32170fi
32171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32172$as_echo_n "checking for C compiler default output file name... " >&6; }
32173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32174$as_echo "$ac_file" >&6; }
32175ac_exeext=$ac_cv_exeext
32176
32177rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32178ac_clean_files=$ac_clean_files_save
32179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32180$as_echo_n "checking for suffix of executables... " >&6; }
32181if { { ac_try="$ac_link"
32182case "(($ac_try" in
32183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32184  *) ac_try_echo=$ac_try;;
32185esac
32186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32187$as_echo "$ac_try_echo"; } >&5
32188  (eval "$ac_link") 2>&5
32189  ac_status=$?
32190  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32191  test $ac_status = 0; }; then :
32192  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32193# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32194# work properly (i.e., refer to `conftest.exe'), while it won't with
32195# `rm'.
32196for ac_file in conftest.exe conftest conftest.*; do
32197  test -f "$ac_file" || continue
32198  case $ac_file in
32199    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32200    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32201	  break;;
32202    * ) break;;
32203  esac
32204done
32205else
32206  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32208as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32209See \`config.log' for more details" "$LINENO" 5; }
32210fi
32211rm -f conftest conftest$ac_cv_exeext
32212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32213$as_echo "$ac_cv_exeext" >&6; }
32214
32215rm -f conftest.$ac_ext
32216EXEEXT=$ac_cv_exeext
32217ac_exeext=$EXEEXT
32218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32219/* end confdefs.h.  */
32220#include <stdio.h>
32221int
32222main ()
32223{
32224FILE *f = fopen ("conftest.out", "w");
32225 return ferror (f) || fclose (f) != 0;
32226
32227  ;
32228  return 0;
32229}
32230_ACEOF
32231ac_clean_files="$ac_clean_files conftest.out"
32232# Check that the compiler produces executables we can run.  If not, either
32233# the compiler is broken, or we cross compile.
32234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32235$as_echo_n "checking whether we are cross compiling... " >&6; }
32236if test "$cross_compiling" != yes; then
32237  { { ac_try="$ac_link"
32238case "(($ac_try" in
32239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32240  *) ac_try_echo=$ac_try;;
32241esac
32242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32243$as_echo "$ac_try_echo"; } >&5
32244  (eval "$ac_link") 2>&5
32245  ac_status=$?
32246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32247  test $ac_status = 0; }
32248  if { ac_try='./conftest$ac_cv_exeext'
32249  { { case "(($ac_try" in
32250  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32251  *) ac_try_echo=$ac_try;;
32252esac
32253eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32254$as_echo "$ac_try_echo"; } >&5
32255  (eval "$ac_try") 2>&5
32256  ac_status=$?
32257  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32258  test $ac_status = 0; }; }; then
32259    cross_compiling=no
32260  else
32261    if test "$cross_compiling" = maybe; then
32262	cross_compiling=yes
32263    else
32264	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32266as_fn_error $? "cannot run C compiled programs.
32267If you meant to cross compile, use \`--host'.
32268See \`config.log' for more details" "$LINENO" 5; }
32269    fi
32270  fi
32271fi
32272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32273$as_echo "$cross_compiling" >&6; }
32274
32275rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32276ac_clean_files=$ac_clean_files_save
32277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32278$as_echo_n "checking for suffix of object files... " >&6; }
32279if ${ac_cv_objext+:} false; then :
32280  $as_echo_n "(cached) " >&6
32281else
32282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32283/* end confdefs.h.  */
32284
32285int
32286main ()
32287{
32288
32289  ;
32290  return 0;
32291}
32292_ACEOF
32293rm -f conftest.o conftest.obj
32294if { { ac_try="$ac_compile"
32295case "(($ac_try" in
32296  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32297  *) ac_try_echo=$ac_try;;
32298esac
32299eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32300$as_echo "$ac_try_echo"; } >&5
32301  (eval "$ac_compile") 2>&5
32302  ac_status=$?
32303  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32304  test $ac_status = 0; }; then :
32305  for ac_file in conftest.o conftest.obj conftest.*; do
32306  test -f "$ac_file" || continue;
32307  case $ac_file in
32308    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32309    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32310       break;;
32311  esac
32312done
32313else
32314  $as_echo "$as_me: failed program was:" >&5
32315sed 's/^/| /' conftest.$ac_ext >&5
32316
32317{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32319as_fn_error $? "cannot compute suffix of object files: cannot compile
32320See \`config.log' for more details" "$LINENO" 5; }
32321fi
32322rm -f conftest.$ac_cv_objext conftest.$ac_ext
32323fi
32324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32325$as_echo "$ac_cv_objext" >&6; }
32326OBJEXT=$ac_cv_objext
32327ac_objext=$OBJEXT
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32329$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32330if ${ac_cv_c_compiler_gnu+:} false; then :
32331  $as_echo_n "(cached) " >&6
32332else
32333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32334/* end confdefs.h.  */
32335
32336int
32337main ()
32338{
32339#ifndef __GNUC__
32340       choke me
32341#endif
32342
32343  ;
32344  return 0;
32345}
32346_ACEOF
32347if ac_fn_c_try_compile "$LINENO"; then :
32348  ac_compiler_gnu=yes
32349else
32350  ac_compiler_gnu=no
32351fi
32352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32353ac_cv_c_compiler_gnu=$ac_compiler_gnu
32354
32355fi
32356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32357$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32358if test $ac_compiler_gnu = yes; then
32359  GCC=yes
32360else
32361  GCC=
32362fi
32363ac_test_CFLAGS=${CFLAGS+set}
32364ac_save_CFLAGS=$CFLAGS
32365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32366$as_echo_n "checking whether $CC accepts -g... " >&6; }
32367if ${ac_cv_prog_cc_g+:} false; then :
32368  $as_echo_n "(cached) " >&6
32369else
32370  ac_save_c_werror_flag=$ac_c_werror_flag
32371   ac_c_werror_flag=yes
32372   ac_cv_prog_cc_g=no
32373   CFLAGS="-g"
32374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32375/* end confdefs.h.  */
32376
32377int
32378main ()
32379{
32380
32381  ;
32382  return 0;
32383}
32384_ACEOF
32385if ac_fn_c_try_compile "$LINENO"; then :
32386  ac_cv_prog_cc_g=yes
32387else
32388  CFLAGS=""
32389      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32390/* end confdefs.h.  */
32391
32392int
32393main ()
32394{
32395
32396  ;
32397  return 0;
32398}
32399_ACEOF
32400if ac_fn_c_try_compile "$LINENO"; then :
32401
32402else
32403  ac_c_werror_flag=$ac_save_c_werror_flag
32404	 CFLAGS="-g"
32405	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32406/* end confdefs.h.  */
32407
32408int
32409main ()
32410{
32411
32412  ;
32413  return 0;
32414}
32415_ACEOF
32416if ac_fn_c_try_compile "$LINENO"; then :
32417  ac_cv_prog_cc_g=yes
32418fi
32419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32420fi
32421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32422fi
32423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32424   ac_c_werror_flag=$ac_save_c_werror_flag
32425fi
32426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32427$as_echo "$ac_cv_prog_cc_g" >&6; }
32428if test "$ac_test_CFLAGS" = set; then
32429  CFLAGS=$ac_save_CFLAGS
32430elif test $ac_cv_prog_cc_g = yes; then
32431  if test "$GCC" = yes; then
32432    CFLAGS="-g -O2"
32433  else
32434    CFLAGS="-g"
32435  fi
32436else
32437  if test "$GCC" = yes; then
32438    CFLAGS="-O2"
32439  else
32440    CFLAGS=
32441  fi
32442fi
32443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32444$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32445if ${ac_cv_prog_cc_c89+:} false; then :
32446  $as_echo_n "(cached) " >&6
32447else
32448  ac_cv_prog_cc_c89=no
32449ac_save_CC=$CC
32450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32451/* end confdefs.h.  */
32452#include <stdarg.h>
32453#include <stdio.h>
32454struct stat;
32455/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32456struct buf { int x; };
32457FILE * (*rcsopen) (struct buf *, struct stat *, int);
32458static char *e (p, i)
32459     char **p;
32460     int i;
32461{
32462  return p[i];
32463}
32464static char *f (char * (*g) (char **, int), char **p, ...)
32465{
32466  char *s;
32467  va_list v;
32468  va_start (v,p);
32469  s = g (p, va_arg (v,int));
32470  va_end (v);
32471  return s;
32472}
32473
32474/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32475   function prototypes and stuff, but not '\xHH' hex character constants.
32476   These don't provoke an error unfortunately, instead are silently treated
32477   as 'x'.  The following induces an error, until -std is added to get
32478   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32479   array size at least.  It's necessary to write '\x00'==0 to get something
32480   that's true only with -std.  */
32481int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32482
32483/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32484   inside strings and character constants.  */
32485#define FOO(x) 'x'
32486int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32487
32488int test (int i, double x);
32489struct s1 {int (*f) (int a);};
32490struct s2 {int (*f) (double a);};
32491int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32492int argc;
32493char **argv;
32494int
32495main ()
32496{
32497return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32498  ;
32499  return 0;
32500}
32501_ACEOF
32502for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32503	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32504do
32505  CC="$ac_save_CC $ac_arg"
32506  if ac_fn_c_try_compile "$LINENO"; then :
32507  ac_cv_prog_cc_c89=$ac_arg
32508fi
32509rm -f core conftest.err conftest.$ac_objext
32510  test "x$ac_cv_prog_cc_c89" != "xno" && break
32511done
32512rm -f conftest.$ac_ext
32513CC=$ac_save_CC
32514
32515fi
32516# AC_CACHE_VAL
32517case "x$ac_cv_prog_cc_c89" in
32518  x)
32519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32520$as_echo "none needed" >&6; } ;;
32521  xno)
32522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32523$as_echo "unsupported" >&6; } ;;
32524  *)
32525    CC="$CC $ac_cv_prog_cc_c89"
32526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32527$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32528esac
32529if test "x$ac_cv_prog_cc_c89" != xno; then :
32530
32531fi
32532
32533ac_ext=cpp
32534ac_cpp='$CXXCPP $CPPFLAGS'
32535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32538
32539
32540
32541  COMPILER_NAME=C++
32542  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32543
32544  if test "x$CXX" != x; then
32545    # User has supplied compiler name already, always let that override.
32546    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32547$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32548    if test "x`basename $CXX`" = "x$CXX"; then
32549      # A command without a complete path is provided, search $PATH.
32550
32551      for ac_prog in $CXX
32552do
32553  # Extract the first word of "$ac_prog", so it can be a program name with args.
32554set dummy $ac_prog; ac_word=$2
32555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32556$as_echo_n "checking for $ac_word... " >&6; }
32557if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32558  $as_echo_n "(cached) " >&6
32559else
32560  case $POTENTIAL_CXX in
32561  [\\/]* | ?:[\\/]*)
32562  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32563  ;;
32564  *)
32565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32566for as_dir in $PATH
32567do
32568  IFS=$as_save_IFS
32569  test -z "$as_dir" && as_dir=.
32570    for ac_exec_ext in '' $ac_executable_extensions; do
32571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32572    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32574    break 2
32575  fi
32576done
32577  done
32578IFS=$as_save_IFS
32579
32580  ;;
32581esac
32582fi
32583POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32584if test -n "$POTENTIAL_CXX"; then
32585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32586$as_echo "$POTENTIAL_CXX" >&6; }
32587else
32588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32589$as_echo "no" >&6; }
32590fi
32591
32592
32593  test -n "$POTENTIAL_CXX" && break
32594done
32595
32596      if test "x$POTENTIAL_CXX" != x; then
32597        CXX=$POTENTIAL_CXX
32598      else
32599        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32600      fi
32601    else
32602      # Otherwise it might already be a complete path
32603      if test ! -x "$CXX"; then
32604        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32605      fi
32606    fi
32607  else
32608    # No user supplied value. Locate compiler ourselves.
32609
32610    # If we are cross compiling, assume cross compilation tools follows the
32611    # cross compilation standard where they are prefixed with the autoconf
32612    # standard name for the target. For example the binary
32613    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32614    # If we are not cross compiling, then the default compiler name will be
32615    # used.
32616
32617    CXX=
32618    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32619    # before checking the rest of the PATH.
32620    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32621    # step, this should not be necessary.
32622    if test -n "$TOOLCHAIN_PATH"; then
32623      PATH_save="$PATH"
32624      PATH="$TOOLCHAIN_PATH"
32625      for ac_prog in $SEARCH_LIST
32626do
32627  # Extract the first word of "$ac_prog", so it can be a program name with args.
32628set dummy $ac_prog; ac_word=$2
32629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32630$as_echo_n "checking for $ac_word... " >&6; }
32631if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32632  $as_echo_n "(cached) " >&6
32633else
32634  case $TOOLCHAIN_PATH_CXX in
32635  [\\/]* | ?:[\\/]*)
32636  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32637  ;;
32638  *)
32639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32640for as_dir in $PATH
32641do
32642  IFS=$as_save_IFS
32643  test -z "$as_dir" && as_dir=.
32644    for ac_exec_ext in '' $ac_executable_extensions; do
32645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32646    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32648    break 2
32649  fi
32650done
32651  done
32652IFS=$as_save_IFS
32653
32654  ;;
32655esac
32656fi
32657TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32658if test -n "$TOOLCHAIN_PATH_CXX"; then
32659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32660$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32661else
32662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32663$as_echo "no" >&6; }
32664fi
32665
32666
32667  test -n "$TOOLCHAIN_PATH_CXX" && break
32668done
32669
32670      CXX=$TOOLCHAIN_PATH_CXX
32671      PATH="$PATH_save"
32672    fi
32673
32674    # AC_PATH_PROGS can't be run multiple times with the same variable,
32675    # so create a new name for this run.
32676    if test "x$CXX" = x; then
32677      for ac_prog in $SEARCH_LIST
32678do
32679  # Extract the first word of "$ac_prog", so it can be a program name with args.
32680set dummy $ac_prog; ac_word=$2
32681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32682$as_echo_n "checking for $ac_word... " >&6; }
32683if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32684  $as_echo_n "(cached) " >&6
32685else
32686  case $POTENTIAL_CXX in
32687  [\\/]* | ?:[\\/]*)
32688  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32689  ;;
32690  *)
32691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32692for as_dir in $PATH
32693do
32694  IFS=$as_save_IFS
32695  test -z "$as_dir" && as_dir=.
32696    for ac_exec_ext in '' $ac_executable_extensions; do
32697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32698    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32700    break 2
32701  fi
32702done
32703  done
32704IFS=$as_save_IFS
32705
32706  ;;
32707esac
32708fi
32709POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32710if test -n "$POTENTIAL_CXX"; then
32711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32712$as_echo "$POTENTIAL_CXX" >&6; }
32713else
32714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32715$as_echo "no" >&6; }
32716fi
32717
32718
32719  test -n "$POTENTIAL_CXX" && break
32720done
32721
32722      CXX=$POTENTIAL_CXX
32723    fi
32724
32725    if test "x$CXX" = x; then
32726
32727  # Print a helpful message on how to acquire the necessary build dependency.
32728  # devkit is the help tag: freetype, cups, alsa etc
32729  MISSING_DEPENDENCY=devkit
32730
32731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32732    cygwin_help $MISSING_DEPENDENCY
32733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32734    msys_help $MISSING_DEPENDENCY
32735  else
32736    PKGHANDLER_COMMAND=
32737
32738    case $PKGHANDLER in
32739      apt-get)
32740        apt_help     $MISSING_DEPENDENCY ;;
32741      yum)
32742        yum_help     $MISSING_DEPENDENCY ;;
32743      port)
32744        port_help    $MISSING_DEPENDENCY ;;
32745      pkgutil)
32746        pkgutil_help $MISSING_DEPENDENCY ;;
32747      pkgadd)
32748        pkgadd_help  $MISSING_DEPENDENCY ;;
32749    esac
32750
32751    if test "x$PKGHANDLER_COMMAND" != x; then
32752      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32753    fi
32754  fi
32755
32756      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32757    fi
32758  fi
32759
32760  # Now we have a compiler binary in CXX. Make sure it's okay.
32761
32762  # Only process if variable expands to non-empty
32763
32764  if test "x$CXX" != x; then
32765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32766
32767  # First separate the path from the arguments. This will split at the first
32768  # space.
32769  complete="$CXX"
32770  path="${complete%% *}"
32771  tmp="$complete EOL"
32772  arguments="${tmp#* }"
32773
32774  # Input might be given as Windows format, start by converting to
32775  # unix format.
32776  new_path=`$CYGPATH -u "$path"`
32777
32778  # Now try to locate executable using which
32779  new_path=`$WHICH "$new_path" 2> /dev/null`
32780  # bat and cmd files are not always considered executable in cygwin causing which
32781  # to not find them
32782  if test "x$new_path" = x \
32783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32785    new_path=`$CYGPATH -u "$path"`
32786  fi
32787  if test "x$new_path" = x; then
32788    # Oops. Which didn't find the executable.
32789    # The splitting of arguments from the executable at a space might have been incorrect,
32790    # since paths with space are more likely in Windows. Give it another try with the whole
32791    # argument.
32792    path="$complete"
32793    arguments="EOL"
32794    new_path=`$CYGPATH -u "$path"`
32795    new_path=`$WHICH "$new_path" 2> /dev/null`
32796    # bat and cmd files are not always considered executable in cygwin causing which
32797    # to not find them
32798    if test "x$new_path" = x \
32799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32801      new_path=`$CYGPATH -u "$path"`
32802    fi
32803    if test "x$new_path" = x; then
32804      # It's still not found. Now this is an unrecoverable error.
32805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32806$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32807      has_space=`$ECHO "$complete" | $GREP " "`
32808      if test "x$has_space" != x; then
32809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32811      fi
32812      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32813    fi
32814  fi
32815
32816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32819  # "foo.exe" is OK but "foo" is an error.
32820  #
32821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32822  # It is also a way to make sure we got the proper file name for the real test later on.
32823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32824  if test "x$test_shortpath" = x; then
32825    # Short path failed, file does not exist as specified.
32826    # Try adding .exe or .cmd
32827    if test -f "${new_path}.exe"; then
32828      input_to_shortpath="${new_path}.exe"
32829    elif test -f "${new_path}.cmd"; then
32830      input_to_shortpath="${new_path}.cmd"
32831    else
32832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32833$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32836      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32837    fi
32838  else
32839    input_to_shortpath="$new_path"
32840  fi
32841
32842  # Call helper function which possibly converts this using DOS-style short mode.
32843  # If so, the updated path is stored in $new_path.
32844  new_path="$input_to_shortpath"
32845
32846  input_path="$input_to_shortpath"
32847  # Check if we need to convert this using DOS-style short mode. If the path
32848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32849  # take no chances and rewrite it.
32850  # Note: m4 eats our [], so we need to use [ and ] instead.
32851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32852  if test "x$has_forbidden_chars" != x; then
32853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32857      # Going to short mode and back again did indeed matter. Since short mode is
32858      # case insensitive, let's make it lowercase to improve readability.
32859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32860      # Now convert it back to Unix-style (cygpath)
32861      input_path=`$CYGPATH -u "$shortmode_path"`
32862      new_path="$input_path"
32863    fi
32864  fi
32865
32866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32867  if test "x$test_cygdrive_prefix" = x; then
32868    # As a simple fix, exclude /usr/bin since it's not a real path.
32869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32871      # a path prefixed by /cygdrive for fixpath to work.
32872      new_path="$CYGWIN_ROOT_PATH$input_path"
32873    fi
32874  fi
32875
32876  # remove trailing .exe if any
32877  new_path="${new_path/%.exe/}"
32878
32879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880
32881  # First separate the path from the arguments. This will split at the first
32882  # space.
32883  complete="$CXX"
32884  path="${complete%% *}"
32885  tmp="$complete EOL"
32886  arguments="${tmp#* }"
32887
32888  # Input might be given as Windows format, start by converting to
32889  # unix format.
32890  new_path="$path"
32891
32892  windows_path="$new_path"
32893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32894    unix_path=`$CYGPATH -u "$windows_path"`
32895    new_path="$unix_path"
32896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32898    new_path="$unix_path"
32899  fi
32900
32901
32902  # Now try to locate executable using which
32903  new_path=`$WHICH "$new_path" 2> /dev/null`
32904
32905  if test "x$new_path" = x; then
32906    # Oops. Which didn't find the executable.
32907    # The splitting of arguments from the executable at a space might have been incorrect,
32908    # since paths with space are more likely in Windows. Give it another try with the whole
32909    # argument.
32910    path="$complete"
32911    arguments="EOL"
32912    new_path="$path"
32913
32914  windows_path="$new_path"
32915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32916    unix_path=`$CYGPATH -u "$windows_path"`
32917    new_path="$unix_path"
32918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32920    new_path="$unix_path"
32921  fi
32922
32923
32924    new_path=`$WHICH "$new_path" 2> /dev/null`
32925    # bat and cmd files are not always considered executable in MSYS causing which
32926    # to not find them
32927    if test "x$new_path" = x \
32928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32930      new_path="$path"
32931
32932  windows_path="$new_path"
32933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32934    unix_path=`$CYGPATH -u "$windows_path"`
32935    new_path="$unix_path"
32936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32938    new_path="$unix_path"
32939  fi
32940
32941    fi
32942
32943    if test "x$new_path" = x; then
32944      # It's still not found. Now this is an unrecoverable error.
32945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32946$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32947      has_space=`$ECHO "$complete" | $GREP " "`
32948      if test "x$has_space" != x; then
32949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32951      fi
32952      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32953    fi
32954  fi
32955
32956  # Now new_path has a complete unix path to the binary
32957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32958    # Keep paths in /bin as-is, but remove trailing .exe if any
32959    new_path="${new_path/%.exe/}"
32960    # Do not save /bin paths to all_fixpath_prefixes!
32961  else
32962    # Not in mixed or Windows style, start by that.
32963    new_path=`cmd //c echo $new_path`
32964
32965  input_path="$new_path"
32966  # Check if we need to convert this using DOS-style short mode. If the path
32967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32968  # take no chances and rewrite it.
32969  # Note: m4 eats our [], so we need to use [ and ] instead.
32970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32971  if test "x$has_forbidden_chars" != x; then
32972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32974  fi
32975
32976    # Output is in $new_path
32977
32978  windows_path="$new_path"
32979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32980    unix_path=`$CYGPATH -u "$windows_path"`
32981    new_path="$unix_path"
32982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32984    new_path="$unix_path"
32985  fi
32986
32987    # remove trailing .exe if any
32988    new_path="${new_path/%.exe/}"
32989
32990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32992  fi
32993
32994    else
32995      # We're on a unix platform. Hooray! :)
32996      # First separate the path from the arguments. This will split at the first
32997      # space.
32998      complete="$CXX"
32999      path="${complete%% *}"
33000      tmp="$complete EOL"
33001      arguments="${tmp#* }"
33002
33003      # Cannot rely on the command "which" here since it doesn't always work.
33004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33005      if test -z "$is_absolute_path"; then
33006        # Path to executable is not absolute. Find it.
33007        IFS_save="$IFS"
33008        IFS=:
33009        for p in $PATH; do
33010          if test -f "$p/$path" && test -x "$p/$path"; then
33011            new_path="$p/$path"
33012            break
33013          fi
33014        done
33015        IFS="$IFS_save"
33016      else
33017        # This is an absolute path, we can use it without further modifications.
33018        new_path="$path"
33019      fi
33020
33021      if test "x$new_path" = x; then
33022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33023$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33024        has_space=`$ECHO "$complete" | $GREP " "`
33025        if test "x$has_space" != x; then
33026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33028        fi
33029        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33030      fi
33031    fi
33032
33033    # Now join together the path and the arguments once again
33034    if test "x$arguments" != xEOL; then
33035      new_complete="$new_path ${arguments% *}"
33036    else
33037      new_complete="$new_path"
33038    fi
33039
33040    if test "x$complete" != "x$new_complete"; then
33041      CXX="$new_complete"
33042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33043$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33044    fi
33045  fi
33046
33047  TEST_COMPILER="$CXX"
33048  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33049  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33050  if test "x$OPENJDK_BUILD_OS" != xaix; then
33051    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33053$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33054
33055  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33056    # Follow a chain of symbolic links. Use readlink
33057    # where it exists, else fall back to horribly
33058    # complicated shell code.
33059    if test "x$READLINK_TESTED" != yes; then
33060      # On MacOSX there is a readlink tool with a different
33061      # purpose than the GNU readlink tool. Check the found readlink.
33062      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33063      if test "x$ISGNU" = x; then
33064        # A readlink that we do not know how to use.
33065        # Are there other non-GNU readlinks out there?
33066        READLINK_TESTED=yes
33067        READLINK=
33068      fi
33069    fi
33070
33071    if test "x$READLINK" != x; then
33072      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33073    else
33074      # Save the current directory for restoring afterwards
33075      STARTDIR=$PWD
33076      COUNTER=0
33077      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33078      sym_link_file=`$BASENAME $TEST_COMPILER`
33079      cd $sym_link_dir
33080      # Use -P flag to resolve symlinks in directories.
33081      cd `$THEPWDCMD -P`
33082      sym_link_dir=`$THEPWDCMD -P`
33083      # Resolve file symlinks
33084      while test $COUNTER -lt 20; do
33085        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33086        if test "x$ISLINK" == x; then
33087          # This is not a symbolic link! We are done!
33088          break
33089        fi
33090        # Again resolve directory symlinks since the target of the just found
33091        # link could be in a different directory
33092        cd `$DIRNAME $ISLINK`
33093        sym_link_dir=`$THEPWDCMD -P`
33094        sym_link_file=`$BASENAME $ISLINK`
33095        let COUNTER=COUNTER+1
33096      done
33097      cd $STARTDIR
33098      TEST_COMPILER=$sym_link_dir/$sym_link_file
33099    fi
33100  fi
33101
33102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33103$as_echo "$TEST_COMPILER" >&6; }
33104  fi
33105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33106$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33107
33108  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33109  if test "x$COMPILER_BASENAME" = "xccache"; then
33110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33111$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33112    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33113    # We want to control ccache invocation ourselves, so ignore this cc and try
33114    # searching again.
33115
33116    # Remove the path to the fake ccache cc from the PATH
33117    RETRY_COMPILER_SAVED_PATH="$PATH"
33118    COMPILER_DIRNAME=`$DIRNAME $CXX`
33119    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33120
33121    # Try again looking for our compiler
33122    if test -n "$ac_tool_prefix"; then
33123  for ac_prog in $TOOLCHAIN_CXX_BINARY
33124  do
33125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33128$as_echo_n "checking for $ac_word... " >&6; }
33129if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33130  $as_echo_n "(cached) " >&6
33131else
33132  if test -n "$PROPER_COMPILER_CXX"; then
33133  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33134else
33135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33136for as_dir in $PATH
33137do
33138  IFS=$as_save_IFS
33139  test -z "$as_dir" && as_dir=.
33140    for ac_exec_ext in '' $ac_executable_extensions; do
33141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33142    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33144    break 2
33145  fi
33146done
33147  done
33148IFS=$as_save_IFS
33149
33150fi
33151fi
33152PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33153if test -n "$PROPER_COMPILER_CXX"; then
33154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33155$as_echo "$PROPER_COMPILER_CXX" >&6; }
33156else
33157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33158$as_echo "no" >&6; }
33159fi
33160
33161
33162    test -n "$PROPER_COMPILER_CXX" && break
33163  done
33164fi
33165if test -z "$PROPER_COMPILER_CXX"; then
33166  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33167  for ac_prog in $TOOLCHAIN_CXX_BINARY
33168do
33169  # Extract the first word of "$ac_prog", so it can be a program name with args.
33170set dummy $ac_prog; ac_word=$2
33171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33172$as_echo_n "checking for $ac_word... " >&6; }
33173if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33174  $as_echo_n "(cached) " >&6
33175else
33176  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33177  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33178else
33179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33180for as_dir in $PATH
33181do
33182  IFS=$as_save_IFS
33183  test -z "$as_dir" && as_dir=.
33184    for ac_exec_ext in '' $ac_executable_extensions; do
33185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33186    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33188    break 2
33189  fi
33190done
33191  done
33192IFS=$as_save_IFS
33193
33194fi
33195fi
33196ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33197if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33199$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33200else
33201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33202$as_echo "no" >&6; }
33203fi
33204
33205
33206  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33207done
33208
33209  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33210    PROPER_COMPILER_CXX=""
33211  else
33212    case $cross_compiling:$ac_tool_warned in
33213yes:)
33214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33216ac_tool_warned=yes ;;
33217esac
33218    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33219  fi
33220fi
33221
33222
33223  # Only process if variable expands to non-empty
33224
33225  if test "x$PROPER_COMPILER_CXX" != x; then
33226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33227
33228  # First separate the path from the arguments. This will split at the first
33229  # space.
33230  complete="$PROPER_COMPILER_CXX"
33231  path="${complete%% *}"
33232  tmp="$complete EOL"
33233  arguments="${tmp#* }"
33234
33235  # Input might be given as Windows format, start by converting to
33236  # unix format.
33237  new_path=`$CYGPATH -u "$path"`
33238
33239  # Now try to locate executable using which
33240  new_path=`$WHICH "$new_path" 2> /dev/null`
33241  # bat and cmd files are not always considered executable in cygwin causing which
33242  # to not find them
33243  if test "x$new_path" = x \
33244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33246    new_path=`$CYGPATH -u "$path"`
33247  fi
33248  if test "x$new_path" = x; then
33249    # Oops. Which didn't find the executable.
33250    # The splitting of arguments from the executable at a space might have been incorrect,
33251    # since paths with space are more likely in Windows. Give it another try with the whole
33252    # argument.
33253    path="$complete"
33254    arguments="EOL"
33255    new_path=`$CYGPATH -u "$path"`
33256    new_path=`$WHICH "$new_path" 2> /dev/null`
33257    # bat and cmd files are not always considered executable in cygwin causing which
33258    # to not find them
33259    if test "x$new_path" = x \
33260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33262      new_path=`$CYGPATH -u "$path"`
33263    fi
33264    if test "x$new_path" = x; then
33265      # It's still not found. Now this is an unrecoverable error.
33266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33267$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33268      has_space=`$ECHO "$complete" | $GREP " "`
33269      if test "x$has_space" != x; then
33270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33272      fi
33273      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33274    fi
33275  fi
33276
33277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33280  # "foo.exe" is OK but "foo" is an error.
33281  #
33282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33283  # It is also a way to make sure we got the proper file name for the real test later on.
33284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33285  if test "x$test_shortpath" = x; then
33286    # Short path failed, file does not exist as specified.
33287    # Try adding .exe or .cmd
33288    if test -f "${new_path}.exe"; then
33289      input_to_shortpath="${new_path}.exe"
33290    elif test -f "${new_path}.cmd"; then
33291      input_to_shortpath="${new_path}.cmd"
33292    else
33293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33294$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33297      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33298    fi
33299  else
33300    input_to_shortpath="$new_path"
33301  fi
33302
33303  # Call helper function which possibly converts this using DOS-style short mode.
33304  # If so, the updated path is stored in $new_path.
33305  new_path="$input_to_shortpath"
33306
33307  input_path="$input_to_shortpath"
33308  # Check if we need to convert this using DOS-style short mode. If the path
33309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33310  # take no chances and rewrite it.
33311  # Note: m4 eats our [], so we need to use [ and ] instead.
33312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33313  if test "x$has_forbidden_chars" != x; then
33314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33318      # Going to short mode and back again did indeed matter. Since short mode is
33319      # case insensitive, let's make it lowercase to improve readability.
33320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33321      # Now convert it back to Unix-style (cygpath)
33322      input_path=`$CYGPATH -u "$shortmode_path"`
33323      new_path="$input_path"
33324    fi
33325  fi
33326
33327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33328  if test "x$test_cygdrive_prefix" = x; then
33329    # As a simple fix, exclude /usr/bin since it's not a real path.
33330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33332      # a path prefixed by /cygdrive for fixpath to work.
33333      new_path="$CYGWIN_ROOT_PATH$input_path"
33334    fi
33335  fi
33336
33337  # remove trailing .exe if any
33338  new_path="${new_path/%.exe/}"
33339
33340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33341
33342  # First separate the path from the arguments. This will split at the first
33343  # space.
33344  complete="$PROPER_COMPILER_CXX"
33345  path="${complete%% *}"
33346  tmp="$complete EOL"
33347  arguments="${tmp#* }"
33348
33349  # Input might be given as Windows format, start by converting to
33350  # unix format.
33351  new_path="$path"
33352
33353  windows_path="$new_path"
33354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33355    unix_path=`$CYGPATH -u "$windows_path"`
33356    new_path="$unix_path"
33357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33359    new_path="$unix_path"
33360  fi
33361
33362
33363  # Now try to locate executable using which
33364  new_path=`$WHICH "$new_path" 2> /dev/null`
33365
33366  if test "x$new_path" = x; then
33367    # Oops. Which didn't find the executable.
33368    # The splitting of arguments from the executable at a space might have been incorrect,
33369    # since paths with space are more likely in Windows. Give it another try with the whole
33370    # argument.
33371    path="$complete"
33372    arguments="EOL"
33373    new_path="$path"
33374
33375  windows_path="$new_path"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    new_path="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    new_path="$unix_path"
33382  fi
33383
33384
33385    new_path=`$WHICH "$new_path" 2> /dev/null`
33386    # bat and cmd files are not always considered executable in MSYS causing which
33387    # to not find them
33388    if test "x$new_path" = x \
33389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33391      new_path="$path"
33392
33393  windows_path="$new_path"
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395    unix_path=`$CYGPATH -u "$windows_path"`
33396    new_path="$unix_path"
33397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33399    new_path="$unix_path"
33400  fi
33401
33402    fi
33403
33404    if test "x$new_path" = x; then
33405      # It's still not found. Now this is an unrecoverable error.
33406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33407$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33408      has_space=`$ECHO "$complete" | $GREP " "`
33409      if test "x$has_space" != x; then
33410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33412      fi
33413      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33414    fi
33415  fi
33416
33417  # Now new_path has a complete unix path to the binary
33418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33419    # Keep paths in /bin as-is, but remove trailing .exe if any
33420    new_path="${new_path/%.exe/}"
33421    # Do not save /bin paths to all_fixpath_prefixes!
33422  else
33423    # Not in mixed or Windows style, start by that.
33424    new_path=`cmd //c echo $new_path`
33425
33426  input_path="$new_path"
33427  # Check if we need to convert this using DOS-style short mode. If the path
33428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33429  # take no chances and rewrite it.
33430  # Note: m4 eats our [], so we need to use [ and ] instead.
33431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33432  if test "x$has_forbidden_chars" != x; then
33433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33435  fi
33436
33437    # Output is in $new_path
33438
33439  windows_path="$new_path"
33440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33441    unix_path=`$CYGPATH -u "$windows_path"`
33442    new_path="$unix_path"
33443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33445    new_path="$unix_path"
33446  fi
33447
33448    # remove trailing .exe if any
33449    new_path="${new_path/%.exe/}"
33450
33451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33453  fi
33454
33455    else
33456      # We're on a unix platform. Hooray! :)
33457      # First separate the path from the arguments. This will split at the first
33458      # space.
33459      complete="$PROPER_COMPILER_CXX"
33460      path="${complete%% *}"
33461      tmp="$complete EOL"
33462      arguments="${tmp#* }"
33463
33464      # Cannot rely on the command "which" here since it doesn't always work.
33465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33466      if test -z "$is_absolute_path"; then
33467        # Path to executable is not absolute. Find it.
33468        IFS_save="$IFS"
33469        IFS=:
33470        for p in $PATH; do
33471          if test -f "$p/$path" && test -x "$p/$path"; then
33472            new_path="$p/$path"
33473            break
33474          fi
33475        done
33476        IFS="$IFS_save"
33477      else
33478        # This is an absolute path, we can use it without further modifications.
33479        new_path="$path"
33480      fi
33481
33482      if test "x$new_path" = x; then
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33484$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33485        has_space=`$ECHO "$complete" | $GREP " "`
33486        if test "x$has_space" != x; then
33487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33489        fi
33490        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33491      fi
33492    fi
33493
33494    # Now join together the path and the arguments once again
33495    if test "x$arguments" != xEOL; then
33496      new_complete="$new_path ${arguments% *}"
33497    else
33498      new_complete="$new_path"
33499    fi
33500
33501    if test "x$complete" != "x$new_complete"; then
33502      PROPER_COMPILER_CXX="$new_complete"
33503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33504$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33505    fi
33506  fi
33507
33508    PATH="$RETRY_COMPILER_SAVED_PATH"
33509
33510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33511$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33512
33513  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33514    # Follow a chain of symbolic links. Use readlink
33515    # where it exists, else fall back to horribly
33516    # complicated shell code.
33517    if test "x$READLINK_TESTED" != yes; then
33518      # On MacOSX there is a readlink tool with a different
33519      # purpose than the GNU readlink tool. Check the found readlink.
33520      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33521      if test "x$ISGNU" = x; then
33522        # A readlink that we do not know how to use.
33523        # Are there other non-GNU readlinks out there?
33524        READLINK_TESTED=yes
33525        READLINK=
33526      fi
33527    fi
33528
33529    if test "x$READLINK" != x; then
33530      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33531    else
33532      # Save the current directory for restoring afterwards
33533      STARTDIR=$PWD
33534      COUNTER=0
33535      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33536      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33537      cd $sym_link_dir
33538      # Use -P flag to resolve symlinks in directories.
33539      cd `$THEPWDCMD -P`
33540      sym_link_dir=`$THEPWDCMD -P`
33541      # Resolve file symlinks
33542      while test $COUNTER -lt 20; do
33543        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33544        if test "x$ISLINK" == x; then
33545          # This is not a symbolic link! We are done!
33546          break
33547        fi
33548        # Again resolve directory symlinks since the target of the just found
33549        # link could be in a different directory
33550        cd `$DIRNAME $ISLINK`
33551        sym_link_dir=`$THEPWDCMD -P`
33552        sym_link_file=`$BASENAME $ISLINK`
33553        let COUNTER=COUNTER+1
33554      done
33555      cd $STARTDIR
33556      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33557    fi
33558  fi
33559
33560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33561$as_echo "$PROPER_COMPILER_CXX" >&6; }
33562    CXX="$PROPER_COMPILER_CXX"
33563  else
33564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33565$as_echo "no, keeping CXX" >&6; }
33566  fi
33567
33568
33569  COMPILER=$CXX
33570  COMPILER_NAME=$COMPILER_NAME
33571
33572  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33573    # cc -V output typically looks like
33574    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33575    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33576    # Check that this is likely to be the Solaris Studio cc.
33577    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33578    if test $? -ne 0; then
33579      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33580      { $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
33581$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33582      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33583$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33585$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33586      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33587    fi
33588    # Remove usage instructions (if present), and
33589    # collapse compiler output into a single line
33590    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33591        $SED -e 's/ *[Uu]sage:.*//'`
33592    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33593        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33594  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33595    # xlc -qversion output typically looks like
33596    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33597    #     Version: 11.01.0000.0015
33598    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33599    # Check that this is likely to be the IBM XL C compiler.
33600    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33601    if test $? -ne 0; then
33602      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33603      { $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
33604$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33605      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33606$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33607      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33608$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33609      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33610    fi
33611    # Collapse compiler output into a single line
33612    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33613    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33614        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33615  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33616    # There is no specific version flag, but all output starts with a version string.
33617    # First line typically looks something like:
33618    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33619    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33620    # Check that this is likely to be Microsoft CL.EXE.
33621    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33622    if test $? -ne 0; then
33623      { $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
33624$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33626$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628    fi
33629    # Collapse compiler output into a single line
33630    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33631    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33633  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33634    # gcc --version output typically looks like
33635    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33636    #     Copyright (C) 2013 Free Software Foundation, Inc.
33637    #     This is free software; see the source for copying conditions.  There is NO
33638    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33639    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33640    # Check that this is likely to be GCC.
33641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33642    if test $? -ne 0; then
33643      { $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
33644$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33645      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33646$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33647      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33648    fi
33649    # Remove Copyright and legalese from version string, and
33650    # collapse into a single line
33651    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33652        $SED -e 's/ *Copyright .*//'`
33653    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33654        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33655  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33656    # clang --version output typically looks like
33657    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33658    #    clang version 3.3 (tags/RELEASE_33/final)
33659    # or
33660    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33661    #    Target: x86_64-pc-linux-gnu
33662    #    Thread model: posix
33663    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33664    # Check that this is likely to be clang
33665    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33666    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33670$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33671      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33672    fi
33673    # Collapse compiler output into a single line
33674    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33675    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33676        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33677  else
33678      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33679  fi
33680  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33681  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33682  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33683  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33684
33685  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33686$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33687
33688
33689  # Now that we have resolved CXX ourself, let autoconf have its go at it
33690  ac_ext=cpp
33691ac_cpp='$CXXCPP $CPPFLAGS'
33692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33695if test -z "$CXX"; then
33696  if test -n "$CCC"; then
33697    CXX=$CCC
33698  else
33699    if test -n "$ac_tool_prefix"; then
33700  for ac_prog in $CXX
33701  do
33702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33705$as_echo_n "checking for $ac_word... " >&6; }
33706if ${ac_cv_prog_CXX+:} false; then :
33707  $as_echo_n "(cached) " >&6
33708else
33709  if test -n "$CXX"; then
33710  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33711else
33712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33713for as_dir in $PATH
33714do
33715  IFS=$as_save_IFS
33716  test -z "$as_dir" && as_dir=.
33717    for ac_exec_ext in '' $ac_executable_extensions; do
33718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33719    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33721    break 2
33722  fi
33723done
33724  done
33725IFS=$as_save_IFS
33726
33727fi
33728fi
33729CXX=$ac_cv_prog_CXX
33730if test -n "$CXX"; then
33731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33732$as_echo "$CXX" >&6; }
33733else
33734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33735$as_echo "no" >&6; }
33736fi
33737
33738
33739    test -n "$CXX" && break
33740  done
33741fi
33742if test -z "$CXX"; then
33743  ac_ct_CXX=$CXX
33744  for ac_prog in $CXX
33745do
33746  # Extract the first word of "$ac_prog", so it can be a program name with args.
33747set dummy $ac_prog; ac_word=$2
33748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33749$as_echo_n "checking for $ac_word... " >&6; }
33750if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33751  $as_echo_n "(cached) " >&6
33752else
33753  if test -n "$ac_ct_CXX"; then
33754  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33755else
33756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757for as_dir in $PATH
33758do
33759  IFS=$as_save_IFS
33760  test -z "$as_dir" && as_dir=.
33761    for ac_exec_ext in '' $ac_executable_extensions; do
33762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763    ac_cv_prog_ac_ct_CXX="$ac_prog"
33764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765    break 2
33766  fi
33767done
33768  done
33769IFS=$as_save_IFS
33770
33771fi
33772fi
33773ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33774if test -n "$ac_ct_CXX"; then
33775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33776$as_echo "$ac_ct_CXX" >&6; }
33777else
33778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33779$as_echo "no" >&6; }
33780fi
33781
33782
33783  test -n "$ac_ct_CXX" && break
33784done
33785
33786  if test "x$ac_ct_CXX" = x; then
33787    CXX="g++"
33788  else
33789    case $cross_compiling:$ac_tool_warned in
33790yes:)
33791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33793ac_tool_warned=yes ;;
33794esac
33795    CXX=$ac_ct_CXX
33796  fi
33797fi
33798
33799  fi
33800fi
33801# Provide some information about the compiler.
33802$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33803set X $ac_compile
33804ac_compiler=$2
33805for ac_option in --version -v -V -qversion; do
33806  { { ac_try="$ac_compiler $ac_option >&5"
33807case "(($ac_try" in
33808  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33809  *) ac_try_echo=$ac_try;;
33810esac
33811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33812$as_echo "$ac_try_echo"; } >&5
33813  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33814  ac_status=$?
33815  if test -s conftest.err; then
33816    sed '10a\
33817... rest of stderr output deleted ...
33818         10q' conftest.err >conftest.er1
33819    cat conftest.er1 >&5
33820  fi
33821  rm -f conftest.er1 conftest.err
33822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33823  test $ac_status = 0; }
33824done
33825
33826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33827$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33828if ${ac_cv_cxx_compiler_gnu+:} false; then :
33829  $as_echo_n "(cached) " >&6
33830else
33831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33832/* end confdefs.h.  */
33833
33834int
33835main ()
33836{
33837#ifndef __GNUC__
33838       choke me
33839#endif
33840
33841  ;
33842  return 0;
33843}
33844_ACEOF
33845if ac_fn_cxx_try_compile "$LINENO"; then :
33846  ac_compiler_gnu=yes
33847else
33848  ac_compiler_gnu=no
33849fi
33850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33851ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33852
33853fi
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33855$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33856if test $ac_compiler_gnu = yes; then
33857  GXX=yes
33858else
33859  GXX=
33860fi
33861ac_test_CXXFLAGS=${CXXFLAGS+set}
33862ac_save_CXXFLAGS=$CXXFLAGS
33863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33864$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33865if ${ac_cv_prog_cxx_g+:} false; then :
33866  $as_echo_n "(cached) " >&6
33867else
33868  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33869   ac_cxx_werror_flag=yes
33870   ac_cv_prog_cxx_g=no
33871   CXXFLAGS="-g"
33872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33873/* end confdefs.h.  */
33874
33875int
33876main ()
33877{
33878
33879  ;
33880  return 0;
33881}
33882_ACEOF
33883if ac_fn_cxx_try_compile "$LINENO"; then :
33884  ac_cv_prog_cxx_g=yes
33885else
33886  CXXFLAGS=""
33887      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33888/* end confdefs.h.  */
33889
33890int
33891main ()
33892{
33893
33894  ;
33895  return 0;
33896}
33897_ACEOF
33898if ac_fn_cxx_try_compile "$LINENO"; then :
33899
33900else
33901  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33902	 CXXFLAGS="-g"
33903	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33904/* end confdefs.h.  */
33905
33906int
33907main ()
33908{
33909
33910  ;
33911  return 0;
33912}
33913_ACEOF
33914if ac_fn_cxx_try_compile "$LINENO"; then :
33915  ac_cv_prog_cxx_g=yes
33916fi
33917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33918fi
33919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33920fi
33921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33922   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33923fi
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33925$as_echo "$ac_cv_prog_cxx_g" >&6; }
33926if test "$ac_test_CXXFLAGS" = set; then
33927  CXXFLAGS=$ac_save_CXXFLAGS
33928elif test $ac_cv_prog_cxx_g = yes; then
33929  if test "$GXX" = yes; then
33930    CXXFLAGS="-g -O2"
33931  else
33932    CXXFLAGS="-g"
33933  fi
33934else
33935  if test "$GXX" = yes; then
33936    CXXFLAGS="-O2"
33937  else
33938    CXXFLAGS=
33939  fi
33940fi
33941ac_ext=cpp
33942ac_cpp='$CXXCPP $CPPFLAGS'
33943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33946
33947
33948  #
33949  # Setup the preprocessor (CPP and CXXCPP)
33950  #
33951  ac_ext=c
33952ac_cpp='$CPP $CPPFLAGS'
33953ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33954ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33955ac_compiler_gnu=$ac_cv_c_compiler_gnu
33956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33957$as_echo_n "checking how to run the C preprocessor... " >&6; }
33958# On Suns, sometimes $CPP names a directory.
33959if test -n "$CPP" && test -d "$CPP"; then
33960  CPP=
33961fi
33962if test -z "$CPP"; then
33963  if ${ac_cv_prog_CPP+:} false; then :
33964  $as_echo_n "(cached) " >&6
33965else
33966      # Double quotes because CPP needs to be expanded
33967    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33968    do
33969      ac_preproc_ok=false
33970for ac_c_preproc_warn_flag in '' yes
33971do
33972  # Use a header file that comes with gcc, so configuring glibc
33973  # with a fresh cross-compiler works.
33974  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33975  # <limits.h> exists even on freestanding compilers.
33976  # On the NeXT, cc -E runs the code through the compiler's parser,
33977  # not just through cpp. "Syntax error" is here to catch this case.
33978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979/* end confdefs.h.  */
33980#ifdef __STDC__
33981# include <limits.h>
33982#else
33983# include <assert.h>
33984#endif
33985		     Syntax error
33986_ACEOF
33987if ac_fn_c_try_cpp "$LINENO"; then :
33988
33989else
33990  # Broken: fails on valid input.
33991continue
33992fi
33993rm -f conftest.err conftest.i conftest.$ac_ext
33994
33995  # OK, works on sane cases.  Now check whether nonexistent headers
33996  # can be detected and how.
33997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33998/* end confdefs.h.  */
33999#include <ac_nonexistent.h>
34000_ACEOF
34001if ac_fn_c_try_cpp "$LINENO"; then :
34002  # Broken: success on invalid input.
34003continue
34004else
34005  # Passes both tests.
34006ac_preproc_ok=:
34007break
34008fi
34009rm -f conftest.err conftest.i conftest.$ac_ext
34010
34011done
34012# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34013rm -f conftest.i conftest.err conftest.$ac_ext
34014if $ac_preproc_ok; then :
34015  break
34016fi
34017
34018    done
34019    ac_cv_prog_CPP=$CPP
34020
34021fi
34022  CPP=$ac_cv_prog_CPP
34023else
34024  ac_cv_prog_CPP=$CPP
34025fi
34026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34027$as_echo "$CPP" >&6; }
34028ac_preproc_ok=false
34029for ac_c_preproc_warn_flag in '' yes
34030do
34031  # Use a header file that comes with gcc, so configuring glibc
34032  # with a fresh cross-compiler works.
34033  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34034  # <limits.h> exists even on freestanding compilers.
34035  # On the NeXT, cc -E runs the code through the compiler's parser,
34036  # not just through cpp. "Syntax error" is here to catch this case.
34037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34038/* end confdefs.h.  */
34039#ifdef __STDC__
34040# include <limits.h>
34041#else
34042# include <assert.h>
34043#endif
34044		     Syntax error
34045_ACEOF
34046if ac_fn_c_try_cpp "$LINENO"; then :
34047
34048else
34049  # Broken: fails on valid input.
34050continue
34051fi
34052rm -f conftest.err conftest.i conftest.$ac_ext
34053
34054  # OK, works on sane cases.  Now check whether nonexistent headers
34055  # can be detected and how.
34056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34057/* end confdefs.h.  */
34058#include <ac_nonexistent.h>
34059_ACEOF
34060if ac_fn_c_try_cpp "$LINENO"; then :
34061  # Broken: success on invalid input.
34062continue
34063else
34064  # Passes both tests.
34065ac_preproc_ok=:
34066break
34067fi
34068rm -f conftest.err conftest.i conftest.$ac_ext
34069
34070done
34071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34072rm -f conftest.i conftest.err conftest.$ac_ext
34073if $ac_preproc_ok; then :
34074
34075else
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 $? "C preprocessor \"$CPP\" fails sanity check
34079See \`config.log' for more details" "$LINENO" 5; }
34080fi
34081
34082ac_ext=cpp
34083ac_cpp='$CXXCPP $CPPFLAGS'
34084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34087
34088
34089  # Only process if variable expands to non-empty
34090
34091  if test "x$CPP" != x; then
34092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34093
34094  # First separate the path from the arguments. This will split at the first
34095  # space.
34096  complete="$CPP"
34097  path="${complete%% *}"
34098  tmp="$complete EOL"
34099  arguments="${tmp#* }"
34100
34101  # Input might be given as Windows format, start by converting to
34102  # unix format.
34103  new_path=`$CYGPATH -u "$path"`
34104
34105  # Now try to locate executable using which
34106  new_path=`$WHICH "$new_path" 2> /dev/null`
34107  # bat and cmd files are not always considered executable in cygwin causing which
34108  # to not find them
34109  if test "x$new_path" = x \
34110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34112    new_path=`$CYGPATH -u "$path"`
34113  fi
34114  if test "x$new_path" = x; then
34115    # Oops. Which didn't find the executable.
34116    # The splitting of arguments from the executable at a space might have been incorrect,
34117    # since paths with space are more likely in Windows. Give it another try with the whole
34118    # argument.
34119    path="$complete"
34120    arguments="EOL"
34121    new_path=`$CYGPATH -u "$path"`
34122    new_path=`$WHICH "$new_path" 2> /dev/null`
34123    # bat and cmd files are not always considered executable in cygwin causing which
34124    # to not find them
34125    if test "x$new_path" = x \
34126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34128      new_path=`$CYGPATH -u "$path"`
34129    fi
34130    if test "x$new_path" = x; then
34131      # It's still not found. Now this is an unrecoverable error.
34132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34133$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34134      has_space=`$ECHO "$complete" | $GREP " "`
34135      if test "x$has_space" != x; then
34136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34138      fi
34139      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34140    fi
34141  fi
34142
34143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34146  # "foo.exe" is OK but "foo" is an error.
34147  #
34148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34149  # It is also a way to make sure we got the proper file name for the real test later on.
34150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34151  if test "x$test_shortpath" = x; then
34152    # Short path failed, file does not exist as specified.
34153    # Try adding .exe or .cmd
34154    if test -f "${new_path}.exe"; then
34155      input_to_shortpath="${new_path}.exe"
34156    elif test -f "${new_path}.cmd"; then
34157      input_to_shortpath="${new_path}.cmd"
34158    else
34159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34160$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34163      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34164    fi
34165  else
34166    input_to_shortpath="$new_path"
34167  fi
34168
34169  # Call helper function which possibly converts this using DOS-style short mode.
34170  # If so, the updated path is stored in $new_path.
34171  new_path="$input_to_shortpath"
34172
34173  input_path="$input_to_shortpath"
34174  # Check if we need to convert this using DOS-style short mode. If the path
34175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34176  # take no chances and rewrite it.
34177  # Note: m4 eats our [], so we need to use [ and ] instead.
34178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34179  if test "x$has_forbidden_chars" != x; then
34180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34184      # Going to short mode and back again did indeed matter. Since short mode is
34185      # case insensitive, let's make it lowercase to improve readability.
34186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34187      # Now convert it back to Unix-style (cygpath)
34188      input_path=`$CYGPATH -u "$shortmode_path"`
34189      new_path="$input_path"
34190    fi
34191  fi
34192
34193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34194  if test "x$test_cygdrive_prefix" = x; then
34195    # As a simple fix, exclude /usr/bin since it's not a real path.
34196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34198      # a path prefixed by /cygdrive for fixpath to work.
34199      new_path="$CYGWIN_ROOT_PATH$input_path"
34200    fi
34201  fi
34202
34203  # remove trailing .exe if any
34204  new_path="${new_path/%.exe/}"
34205
34206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34207
34208  # First separate the path from the arguments. This will split at the first
34209  # space.
34210  complete="$CPP"
34211  path="${complete%% *}"
34212  tmp="$complete EOL"
34213  arguments="${tmp#* }"
34214
34215  # Input might be given as Windows format, start by converting to
34216  # unix format.
34217  new_path="$path"
34218
34219  windows_path="$new_path"
34220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34221    unix_path=`$CYGPATH -u "$windows_path"`
34222    new_path="$unix_path"
34223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34225    new_path="$unix_path"
34226  fi
34227
34228
34229  # Now try to locate executable using which
34230  new_path=`$WHICH "$new_path" 2> /dev/null`
34231
34232  if test "x$new_path" = x; then
34233    # Oops. Which didn't find the executable.
34234    # The splitting of arguments from the executable at a space might have been incorrect,
34235    # since paths with space are more likely in Windows. Give it another try with the whole
34236    # argument.
34237    path="$complete"
34238    arguments="EOL"
34239    new_path="$path"
34240
34241  windows_path="$new_path"
34242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34243    unix_path=`$CYGPATH -u "$windows_path"`
34244    new_path="$unix_path"
34245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34247    new_path="$unix_path"
34248  fi
34249
34250
34251    new_path=`$WHICH "$new_path" 2> /dev/null`
34252    # bat and cmd files are not always considered executable in MSYS causing which
34253    # to not find them
34254    if test "x$new_path" = x \
34255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34257      new_path="$path"
34258
34259  windows_path="$new_path"
34260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34261    unix_path=`$CYGPATH -u "$windows_path"`
34262    new_path="$unix_path"
34263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34265    new_path="$unix_path"
34266  fi
34267
34268    fi
34269
34270    if test "x$new_path" = x; then
34271      # It's still not found. Now this is an unrecoverable error.
34272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34273$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34274      has_space=`$ECHO "$complete" | $GREP " "`
34275      if test "x$has_space" != x; then
34276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34278      fi
34279      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34280    fi
34281  fi
34282
34283  # Now new_path has a complete unix path to the binary
34284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34285    # Keep paths in /bin as-is, but remove trailing .exe if any
34286    new_path="${new_path/%.exe/}"
34287    # Do not save /bin paths to all_fixpath_prefixes!
34288  else
34289    # Not in mixed or Windows style, start by that.
34290    new_path=`cmd //c echo $new_path`
34291
34292  input_path="$new_path"
34293  # Check if we need to convert this using DOS-style short mode. If the path
34294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34295  # take no chances and rewrite it.
34296  # Note: m4 eats our [], so we need to use [ and ] instead.
34297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34298  if test "x$has_forbidden_chars" != x; then
34299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34301  fi
34302
34303    # Output is in $new_path
34304
34305  windows_path="$new_path"
34306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34307    unix_path=`$CYGPATH -u "$windows_path"`
34308    new_path="$unix_path"
34309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34311    new_path="$unix_path"
34312  fi
34313
34314    # remove trailing .exe if any
34315    new_path="${new_path/%.exe/}"
34316
34317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34319  fi
34320
34321    else
34322      # We're on a unix platform. Hooray! :)
34323      # First separate the path from the arguments. This will split at the first
34324      # space.
34325      complete="$CPP"
34326      path="${complete%% *}"
34327      tmp="$complete EOL"
34328      arguments="${tmp#* }"
34329
34330      # Cannot rely on the command "which" here since it doesn't always work.
34331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34332      if test -z "$is_absolute_path"; then
34333        # Path to executable is not absolute. Find it.
34334        IFS_save="$IFS"
34335        IFS=:
34336        for p in $PATH; do
34337          if test -f "$p/$path" && test -x "$p/$path"; then
34338            new_path="$p/$path"
34339            break
34340          fi
34341        done
34342        IFS="$IFS_save"
34343      else
34344        # This is an absolute path, we can use it without further modifications.
34345        new_path="$path"
34346      fi
34347
34348      if test "x$new_path" = x; then
34349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34350$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34351        has_space=`$ECHO "$complete" | $GREP " "`
34352        if test "x$has_space" != x; then
34353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34355        fi
34356        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34357      fi
34358    fi
34359
34360    # Now join together the path and the arguments once again
34361    if test "x$arguments" != xEOL; then
34362      new_complete="$new_path ${arguments% *}"
34363    else
34364      new_complete="$new_path"
34365    fi
34366
34367    if test "x$complete" != "x$new_complete"; then
34368      CPP="$new_complete"
34369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34370$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34371    fi
34372  fi
34373
34374  ac_ext=cpp
34375ac_cpp='$CXXCPP $CPPFLAGS'
34376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34380$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34381if test -z "$CXXCPP"; then
34382  if ${ac_cv_prog_CXXCPP+:} false; then :
34383  $as_echo_n "(cached) " >&6
34384else
34385      # Double quotes because CXXCPP needs to be expanded
34386    for CXXCPP in "$CXX -E" "/lib/cpp"
34387    do
34388      ac_preproc_ok=false
34389for ac_cxx_preproc_warn_flag in '' yes
34390do
34391  # Use a header file that comes with gcc, so configuring glibc
34392  # with a fresh cross-compiler works.
34393  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34394  # <limits.h> exists even on freestanding compilers.
34395  # On the NeXT, cc -E runs the code through the compiler's parser,
34396  # not just through cpp. "Syntax error" is here to catch this case.
34397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34398/* end confdefs.h.  */
34399#ifdef __STDC__
34400# include <limits.h>
34401#else
34402# include <assert.h>
34403#endif
34404		     Syntax error
34405_ACEOF
34406if ac_fn_cxx_try_cpp "$LINENO"; then :
34407
34408else
34409  # Broken: fails on valid input.
34410continue
34411fi
34412rm -f conftest.err conftest.i conftest.$ac_ext
34413
34414  # OK, works on sane cases.  Now check whether nonexistent headers
34415  # can be detected and how.
34416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34417/* end confdefs.h.  */
34418#include <ac_nonexistent.h>
34419_ACEOF
34420if ac_fn_cxx_try_cpp "$LINENO"; then :
34421  # Broken: success on invalid input.
34422continue
34423else
34424  # Passes both tests.
34425ac_preproc_ok=:
34426break
34427fi
34428rm -f conftest.err conftest.i conftest.$ac_ext
34429
34430done
34431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34432rm -f conftest.i conftest.err conftest.$ac_ext
34433if $ac_preproc_ok; then :
34434  break
34435fi
34436
34437    done
34438    ac_cv_prog_CXXCPP=$CXXCPP
34439
34440fi
34441  CXXCPP=$ac_cv_prog_CXXCPP
34442else
34443  ac_cv_prog_CXXCPP=$CXXCPP
34444fi
34445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34446$as_echo "$CXXCPP" >&6; }
34447ac_preproc_ok=false
34448for ac_cxx_preproc_warn_flag in '' yes
34449do
34450  # Use a header file that comes with gcc, so configuring glibc
34451  # with a fresh cross-compiler works.
34452  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34453  # <limits.h> exists even on freestanding compilers.
34454  # On the NeXT, cc -E runs the code through the compiler's parser,
34455  # not just through cpp. "Syntax error" is here to catch this case.
34456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34457/* end confdefs.h.  */
34458#ifdef __STDC__
34459# include <limits.h>
34460#else
34461# include <assert.h>
34462#endif
34463		     Syntax error
34464_ACEOF
34465if ac_fn_cxx_try_cpp "$LINENO"; then :
34466
34467else
34468  # Broken: fails on valid input.
34469continue
34470fi
34471rm -f conftest.err conftest.i conftest.$ac_ext
34472
34473  # OK, works on sane cases.  Now check whether nonexistent headers
34474  # can be detected and how.
34475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34476/* end confdefs.h.  */
34477#include <ac_nonexistent.h>
34478_ACEOF
34479if ac_fn_cxx_try_cpp "$LINENO"; then :
34480  # Broken: success on invalid input.
34481continue
34482else
34483  # Passes both tests.
34484ac_preproc_ok=:
34485break
34486fi
34487rm -f conftest.err conftest.i conftest.$ac_ext
34488
34489done
34490# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34491rm -f conftest.i conftest.err conftest.$ac_ext
34492if $ac_preproc_ok; then :
34493
34494else
34495  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34497as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34498See \`config.log' for more details" "$LINENO" 5; }
34499fi
34500
34501ac_ext=cpp
34502ac_cpp='$CXXCPP $CPPFLAGS'
34503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34506
34507
34508  # Only process if variable expands to non-empty
34509
34510  if test "x$CXXCPP" != x; then
34511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34512
34513  # First separate the path from the arguments. This will split at the first
34514  # space.
34515  complete="$CXXCPP"
34516  path="${complete%% *}"
34517  tmp="$complete EOL"
34518  arguments="${tmp#* }"
34519
34520  # Input might be given as Windows format, start by converting to
34521  # unix format.
34522  new_path=`$CYGPATH -u "$path"`
34523
34524  # Now try to locate executable using which
34525  new_path=`$WHICH "$new_path" 2> /dev/null`
34526  # bat and cmd files are not always considered executable in cygwin causing which
34527  # to not find them
34528  if test "x$new_path" = x \
34529      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34530      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34531    new_path=`$CYGPATH -u "$path"`
34532  fi
34533  if test "x$new_path" = x; then
34534    # Oops. Which didn't find the executable.
34535    # The splitting of arguments from the executable at a space might have been incorrect,
34536    # since paths with space are more likely in Windows. Give it another try with the whole
34537    # argument.
34538    path="$complete"
34539    arguments="EOL"
34540    new_path=`$CYGPATH -u "$path"`
34541    new_path=`$WHICH "$new_path" 2> /dev/null`
34542    # bat and cmd files are not always considered executable in cygwin causing which
34543    # to not find them
34544    if test "x$new_path" = x \
34545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34547      new_path=`$CYGPATH -u "$path"`
34548    fi
34549    if test "x$new_path" = x; then
34550      # It's still not found. Now this is an unrecoverable error.
34551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34552$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34553      has_space=`$ECHO "$complete" | $GREP " "`
34554      if test "x$has_space" != x; then
34555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34557      fi
34558      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34559    fi
34560  fi
34561
34562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34565  # "foo.exe" is OK but "foo" is an error.
34566  #
34567  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34568  # It is also a way to make sure we got the proper file name for the real test later on.
34569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34570  if test "x$test_shortpath" = x; then
34571    # Short path failed, file does not exist as specified.
34572    # Try adding .exe or .cmd
34573    if test -f "${new_path}.exe"; then
34574      input_to_shortpath="${new_path}.exe"
34575    elif test -f "${new_path}.cmd"; then
34576      input_to_shortpath="${new_path}.cmd"
34577    else
34578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34579$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34580      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34582      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34583    fi
34584  else
34585    input_to_shortpath="$new_path"
34586  fi
34587
34588  # Call helper function which possibly converts this using DOS-style short mode.
34589  # If so, the updated path is stored in $new_path.
34590  new_path="$input_to_shortpath"
34591
34592  input_path="$input_to_shortpath"
34593  # Check if we need to convert this using DOS-style short mode. If the path
34594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34595  # take no chances and rewrite it.
34596  # Note: m4 eats our [], so we need to use [ and ] instead.
34597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34598  if test "x$has_forbidden_chars" != x; then
34599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34603      # Going to short mode and back again did indeed matter. Since short mode is
34604      # case insensitive, let's make it lowercase to improve readability.
34605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34606      # Now convert it back to Unix-style (cygpath)
34607      input_path=`$CYGPATH -u "$shortmode_path"`
34608      new_path="$input_path"
34609    fi
34610  fi
34611
34612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34613  if test "x$test_cygdrive_prefix" = x; then
34614    # As a simple fix, exclude /usr/bin since it's not a real path.
34615    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34617      # a path prefixed by /cygdrive for fixpath to work.
34618      new_path="$CYGWIN_ROOT_PATH$input_path"
34619    fi
34620  fi
34621
34622  # remove trailing .exe if any
34623  new_path="${new_path/%.exe/}"
34624
34625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626
34627  # First separate the path from the arguments. This will split at the first
34628  # space.
34629  complete="$CXXCPP"
34630  path="${complete%% *}"
34631  tmp="$complete EOL"
34632  arguments="${tmp#* }"
34633
34634  # Input might be given as Windows format, start by converting to
34635  # unix format.
34636  new_path="$path"
34637
34638  windows_path="$new_path"
34639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34640    unix_path=`$CYGPATH -u "$windows_path"`
34641    new_path="$unix_path"
34642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34644    new_path="$unix_path"
34645  fi
34646
34647
34648  # Now try to locate executable using which
34649  new_path=`$WHICH "$new_path" 2> /dev/null`
34650
34651  if test "x$new_path" = x; then
34652    # Oops. Which didn't find the executable.
34653    # The splitting of arguments from the executable at a space might have been incorrect,
34654    # since paths with space are more likely in Windows. Give it another try with the whole
34655    # argument.
34656    path="$complete"
34657    arguments="EOL"
34658    new_path="$path"
34659
34660  windows_path="$new_path"
34661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662    unix_path=`$CYGPATH -u "$windows_path"`
34663    new_path="$unix_path"
34664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666    new_path="$unix_path"
34667  fi
34668
34669
34670    new_path=`$WHICH "$new_path" 2> /dev/null`
34671    # bat and cmd files are not always considered executable in MSYS causing which
34672    # to not find them
34673    if test "x$new_path" = x \
34674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34676      new_path="$path"
34677
34678  windows_path="$new_path"
34679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34680    unix_path=`$CYGPATH -u "$windows_path"`
34681    new_path="$unix_path"
34682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34684    new_path="$unix_path"
34685  fi
34686
34687    fi
34688
34689    if test "x$new_path" = x; then
34690      # It's still not found. Now this is an unrecoverable error.
34691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34692$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34693      has_space=`$ECHO "$complete" | $GREP " "`
34694      if test "x$has_space" != x; then
34695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34697      fi
34698      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34699    fi
34700  fi
34701
34702  # Now new_path has a complete unix path to the binary
34703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34704    # Keep paths in /bin as-is, but remove trailing .exe if any
34705    new_path="${new_path/%.exe/}"
34706    # Do not save /bin paths to all_fixpath_prefixes!
34707  else
34708    # Not in mixed or Windows style, start by that.
34709    new_path=`cmd //c echo $new_path`
34710
34711  input_path="$new_path"
34712  # Check if we need to convert this using DOS-style short mode. If the path
34713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34714  # take no chances and rewrite it.
34715  # Note: m4 eats our [], so we need to use [ and ] instead.
34716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34717  if test "x$has_forbidden_chars" != x; then
34718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34720  fi
34721
34722    # Output is in $new_path
34723
34724  windows_path="$new_path"
34725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34726    unix_path=`$CYGPATH -u "$windows_path"`
34727    new_path="$unix_path"
34728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34730    new_path="$unix_path"
34731  fi
34732
34733    # remove trailing .exe if any
34734    new_path="${new_path/%.exe/}"
34735
34736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34738  fi
34739
34740    else
34741      # We're on a unix platform. Hooray! :)
34742      # First separate the path from the arguments. This will split at the first
34743      # space.
34744      complete="$CXXCPP"
34745      path="${complete%% *}"
34746      tmp="$complete EOL"
34747      arguments="${tmp#* }"
34748
34749      # Cannot rely on the command "which" here since it doesn't always work.
34750      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34751      if test -z "$is_absolute_path"; then
34752        # Path to executable is not absolute. Find it.
34753        IFS_save="$IFS"
34754        IFS=:
34755        for p in $PATH; do
34756          if test -f "$p/$path" && test -x "$p/$path"; then
34757            new_path="$p/$path"
34758            break
34759          fi
34760        done
34761        IFS="$IFS_save"
34762      else
34763        # This is an absolute path, we can use it without further modifications.
34764        new_path="$path"
34765      fi
34766
34767      if test "x$new_path" = x; then
34768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34769$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34770        has_space=`$ECHO "$complete" | $GREP " "`
34771        if test "x$has_space" != x; then
34772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34774        fi
34775        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34776      fi
34777    fi
34778
34779    # Now join together the path and the arguments once again
34780    if test "x$arguments" != xEOL; then
34781      new_complete="$new_path ${arguments% *}"
34782    else
34783      new_complete="$new_path"
34784    fi
34785
34786    if test "x$complete" != "x$new_complete"; then
34787      CXXCPP="$new_complete"
34788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34789$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34790    fi
34791  fi
34792
34793
34794  #
34795  # Setup the linker (LD)
34796  #
34797  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34798    # In the Microsoft toolchain we have a separate LD command "link".
34799    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34800    # a cygwin program for something completely different.
34801    # Extract the first word of "link", so it can be a program name with args.
34802set dummy link; ac_word=$2
34803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34804$as_echo_n "checking for $ac_word... " >&6; }
34805if ${ac_cv_prog_LD+:} false; then :
34806  $as_echo_n "(cached) " >&6
34807else
34808  if test -n "$LD"; then
34809  ac_cv_prog_LD="$LD" # Let the user override the test.
34810else
34811  ac_prog_rejected=no
34812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34813for as_dir in $PATH
34814do
34815  IFS=$as_save_IFS
34816  test -z "$as_dir" && as_dir=.
34817    for ac_exec_ext in '' $ac_executable_extensions; do
34818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34819    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34820       ac_prog_rejected=yes
34821       continue
34822     fi
34823    ac_cv_prog_LD="link"
34824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34825    break 2
34826  fi
34827done
34828  done
34829IFS=$as_save_IFS
34830
34831if test $ac_prog_rejected = yes; then
34832  # We found a bogon in the path, so make sure we never use it.
34833  set dummy $ac_cv_prog_LD
34834  shift
34835  if test $# != 0; then
34836    # We chose a different compiler from the bogus one.
34837    # However, it has the same basename, so the bogon will be chosen
34838    # first if we set LD to just the basename; use the full file name.
34839    shift
34840    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34841  fi
34842fi
34843fi
34844fi
34845LD=$ac_cv_prog_LD
34846if test -n "$LD"; then
34847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34848$as_echo "$LD" >&6; }
34849else
34850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34851$as_echo "no" >&6; }
34852fi
34853
34854
34855
34856  # Only process if variable expands to non-empty
34857
34858  if test "x$LD" != x; then
34859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34860
34861  # First separate the path from the arguments. This will split at the first
34862  # space.
34863  complete="$LD"
34864  path="${complete%% *}"
34865  tmp="$complete EOL"
34866  arguments="${tmp#* }"
34867
34868  # Input might be given as Windows format, start by converting to
34869  # unix format.
34870  new_path=`$CYGPATH -u "$path"`
34871
34872  # Now try to locate executable using which
34873  new_path=`$WHICH "$new_path" 2> /dev/null`
34874  # bat and cmd files are not always considered executable in cygwin causing which
34875  # to not find them
34876  if test "x$new_path" = x \
34877      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34878      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34879    new_path=`$CYGPATH -u "$path"`
34880  fi
34881  if test "x$new_path" = x; then
34882    # Oops. Which didn't find the executable.
34883    # The splitting of arguments from the executable at a space might have been incorrect,
34884    # since paths with space are more likely in Windows. Give it another try with the whole
34885    # argument.
34886    path="$complete"
34887    arguments="EOL"
34888    new_path=`$CYGPATH -u "$path"`
34889    new_path=`$WHICH "$new_path" 2> /dev/null`
34890    # bat and cmd files are not always considered executable in cygwin causing which
34891    # to not find them
34892    if test "x$new_path" = x \
34893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34895      new_path=`$CYGPATH -u "$path"`
34896    fi
34897    if test "x$new_path" = x; then
34898      # It's still not found. Now this is an unrecoverable error.
34899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34900$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34901      has_space=`$ECHO "$complete" | $GREP " "`
34902      if test "x$has_space" != x; then
34903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34905      fi
34906      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34907    fi
34908  fi
34909
34910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34913  # "foo.exe" is OK but "foo" is an error.
34914  #
34915  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34916  # It is also a way to make sure we got the proper file name for the real test later on.
34917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34918  if test "x$test_shortpath" = x; then
34919    # Short path failed, file does not exist as specified.
34920    # Try adding .exe or .cmd
34921    if test -f "${new_path}.exe"; then
34922      input_to_shortpath="${new_path}.exe"
34923    elif test -f "${new_path}.cmd"; then
34924      input_to_shortpath="${new_path}.cmd"
34925    else
34926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34927$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34930      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34931    fi
34932  else
34933    input_to_shortpath="$new_path"
34934  fi
34935
34936  # Call helper function which possibly converts this using DOS-style short mode.
34937  # If so, the updated path is stored in $new_path.
34938  new_path="$input_to_shortpath"
34939
34940  input_path="$input_to_shortpath"
34941  # Check if we need to convert this using DOS-style short mode. If the path
34942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34943  # take no chances and rewrite it.
34944  # Note: m4 eats our [], so we need to use [ and ] instead.
34945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34946  if test "x$has_forbidden_chars" != x; then
34947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34951      # Going to short mode and back again did indeed matter. Since short mode is
34952      # case insensitive, let's make it lowercase to improve readability.
34953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34954      # Now convert it back to Unix-style (cygpath)
34955      input_path=`$CYGPATH -u "$shortmode_path"`
34956      new_path="$input_path"
34957    fi
34958  fi
34959
34960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34961  if test "x$test_cygdrive_prefix" = x; then
34962    # As a simple fix, exclude /usr/bin since it's not a real path.
34963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34965      # a path prefixed by /cygdrive for fixpath to work.
34966      new_path="$CYGWIN_ROOT_PATH$input_path"
34967    fi
34968  fi
34969
34970  # remove trailing .exe if any
34971  new_path="${new_path/%.exe/}"
34972
34973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34974
34975  # First separate the path from the arguments. This will split at the first
34976  # space.
34977  complete="$LD"
34978  path="${complete%% *}"
34979  tmp="$complete EOL"
34980  arguments="${tmp#* }"
34981
34982  # Input might be given as Windows format, start by converting to
34983  # unix format.
34984  new_path="$path"
34985
34986  windows_path="$new_path"
34987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34988    unix_path=`$CYGPATH -u "$windows_path"`
34989    new_path="$unix_path"
34990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34992    new_path="$unix_path"
34993  fi
34994
34995
34996  # Now try to locate executable using which
34997  new_path=`$WHICH "$new_path" 2> /dev/null`
34998
34999  if test "x$new_path" = x; then
35000    # Oops. Which didn't find the executable.
35001    # The splitting of arguments from the executable at a space might have been incorrect,
35002    # since paths with space are more likely in Windows. Give it another try with the whole
35003    # argument.
35004    path="$complete"
35005    arguments="EOL"
35006    new_path="$path"
35007
35008  windows_path="$new_path"
35009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35010    unix_path=`$CYGPATH -u "$windows_path"`
35011    new_path="$unix_path"
35012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35014    new_path="$unix_path"
35015  fi
35016
35017
35018    new_path=`$WHICH "$new_path" 2> /dev/null`
35019    # bat and cmd files are not always considered executable in MSYS causing which
35020    # to not find them
35021    if test "x$new_path" = x \
35022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35024      new_path="$path"
35025
35026  windows_path="$new_path"
35027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35028    unix_path=`$CYGPATH -u "$windows_path"`
35029    new_path="$unix_path"
35030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35032    new_path="$unix_path"
35033  fi
35034
35035    fi
35036
35037    if test "x$new_path" = x; then
35038      # It's still not found. Now this is an unrecoverable error.
35039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35040$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35041      has_space=`$ECHO "$complete" | $GREP " "`
35042      if test "x$has_space" != x; then
35043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35045      fi
35046      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35047    fi
35048  fi
35049
35050  # Now new_path has a complete unix path to the binary
35051  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35052    # Keep paths in /bin as-is, but remove trailing .exe if any
35053    new_path="${new_path/%.exe/}"
35054    # Do not save /bin paths to all_fixpath_prefixes!
35055  else
35056    # Not in mixed or Windows style, start by that.
35057    new_path=`cmd //c echo $new_path`
35058
35059  input_path="$new_path"
35060  # Check if we need to convert this using DOS-style short mode. If the path
35061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35062  # take no chances and rewrite it.
35063  # Note: m4 eats our [], so we need to use [ and ] instead.
35064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35065  if test "x$has_forbidden_chars" != x; then
35066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35068  fi
35069
35070    # Output is in $new_path
35071
35072  windows_path="$new_path"
35073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35074    unix_path=`$CYGPATH -u "$windows_path"`
35075    new_path="$unix_path"
35076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35078    new_path="$unix_path"
35079  fi
35080
35081    # remove trailing .exe if any
35082    new_path="${new_path/%.exe/}"
35083
35084    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35085    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35086  fi
35087
35088    else
35089      # We're on a unix platform. Hooray! :)
35090      # First separate the path from the arguments. This will split at the first
35091      # space.
35092      complete="$LD"
35093      path="${complete%% *}"
35094      tmp="$complete EOL"
35095      arguments="${tmp#* }"
35096
35097      # Cannot rely on the command "which" here since it doesn't always work.
35098      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35099      if test -z "$is_absolute_path"; then
35100        # Path to executable is not absolute. Find it.
35101        IFS_save="$IFS"
35102        IFS=:
35103        for p in $PATH; do
35104          if test -f "$p/$path" && test -x "$p/$path"; then
35105            new_path="$p/$path"
35106            break
35107          fi
35108        done
35109        IFS="$IFS_save"
35110      else
35111        # This is an absolute path, we can use it without further modifications.
35112        new_path="$path"
35113      fi
35114
35115      if test "x$new_path" = x; then
35116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35117$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35118        has_space=`$ECHO "$complete" | $GREP " "`
35119        if test "x$has_space" != x; then
35120          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35122        fi
35123        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35124      fi
35125    fi
35126
35127    # Now join together the path and the arguments once again
35128    if test "x$arguments" != xEOL; then
35129      new_complete="$new_path ${arguments% *}"
35130    else
35131      new_complete="$new_path"
35132    fi
35133
35134    if test "x$complete" != "x$new_complete"; then
35135      LD="$new_complete"
35136      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35137$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35138    fi
35139  fi
35140
35141    # Verify that we indeed succeeded with this trick.
35142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35143$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35144    "$LD" --version > /dev/null
35145    if test $? -eq 0 ; then
35146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35147$as_echo "no" >&6; }
35148      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35149    else
35150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35151$as_echo "yes" >&6; }
35152    fi
35153    LDCXX="$LD"
35154  else
35155    # All other toolchains use the compiler to link.
35156    LD="$CC"
35157    LDCXX="$CXX"
35158  fi
35159
35160  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35161
35162
35163  #
35164  # Setup the assembler (AS)
35165  #
35166  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35167    # FIXME: should this really be solaris, or solstudio?
35168
35169
35170  # Publish this variable in the help.
35171
35172
35173  if [ -z "${AS+x}" ]; then
35174    # The variable is not set by user, try to locate tool using the code snippet
35175    for ac_prog in as
35176do
35177  # Extract the first word of "$ac_prog", so it can be a program name with args.
35178set dummy $ac_prog; ac_word=$2
35179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35180$as_echo_n "checking for $ac_word... " >&6; }
35181if ${ac_cv_path_AS+:} false; then :
35182  $as_echo_n "(cached) " >&6
35183else
35184  case $AS in
35185  [\\/]* | ?:[\\/]*)
35186  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35187  ;;
35188  *)
35189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35190for as_dir in $PATH
35191do
35192  IFS=$as_save_IFS
35193  test -z "$as_dir" && as_dir=.
35194    for ac_exec_ext in '' $ac_executable_extensions; do
35195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35196    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35198    break 2
35199  fi
35200done
35201  done
35202IFS=$as_save_IFS
35203
35204  ;;
35205esac
35206fi
35207AS=$ac_cv_path_AS
35208if test -n "$AS"; then
35209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35210$as_echo "$AS" >&6; }
35211else
35212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35213$as_echo "no" >&6; }
35214fi
35215
35216
35217  test -n "$AS" && break
35218done
35219
35220  else
35221    # The variable is set, but is it from the command line or the environment?
35222
35223    # Try to remove the string !AS! from our list.
35224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35226      # If it failed, the variable was not from the command line. Ignore it,
35227      # but warn the user (except for BASH, which is always set by the calling BASH).
35228      if test "xAS" != xBASH; then
35229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35230$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35231      fi
35232      # Try to locate tool using the code snippet
35233      for ac_prog in as
35234do
35235  # Extract the first word of "$ac_prog", so it can be a program name with args.
35236set dummy $ac_prog; ac_word=$2
35237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35238$as_echo_n "checking for $ac_word... " >&6; }
35239if ${ac_cv_path_AS+:} false; then :
35240  $as_echo_n "(cached) " >&6
35241else
35242  case $AS in
35243  [\\/]* | ?:[\\/]*)
35244  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35245  ;;
35246  *)
35247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35248for as_dir in $PATH
35249do
35250  IFS=$as_save_IFS
35251  test -z "$as_dir" && as_dir=.
35252    for ac_exec_ext in '' $ac_executable_extensions; do
35253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35254    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35256    break 2
35257  fi
35258done
35259  done
35260IFS=$as_save_IFS
35261
35262  ;;
35263esac
35264fi
35265AS=$ac_cv_path_AS
35266if test -n "$AS"; then
35267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35268$as_echo "$AS" >&6; }
35269else
35270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35271$as_echo "no" >&6; }
35272fi
35273
35274
35275  test -n "$AS" && break
35276done
35277
35278    else
35279      # If it succeeded, then it was overridden by the user. We will use it
35280      # for the tool.
35281
35282      # First remove it from the list of overridden variables, so we can test
35283      # for unknown variables in the end.
35284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35285
35286      # Check if we try to supply an empty value
35287      if test "x$AS" = x; then
35288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35289$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35291$as_echo_n "checking for AS... " >&6; }
35292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35293$as_echo "disabled" >&6; }
35294      else
35295        # Check if the provided tool contains a complete path.
35296        tool_specified="$AS"
35297        tool_basename="${tool_specified##*/}"
35298        if test "x$tool_basename" = "x$tool_specified"; then
35299          # A command without a complete path is provided, search $PATH.
35300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35301$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35302          # Extract the first word of "$tool_basename", so it can be a program name with args.
35303set dummy $tool_basename; ac_word=$2
35304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35305$as_echo_n "checking for $ac_word... " >&6; }
35306if ${ac_cv_path_AS+:} false; then :
35307  $as_echo_n "(cached) " >&6
35308else
35309  case $AS in
35310  [\\/]* | ?:[\\/]*)
35311  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35312  ;;
35313  *)
35314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35315for as_dir in $PATH
35316do
35317  IFS=$as_save_IFS
35318  test -z "$as_dir" && as_dir=.
35319    for ac_exec_ext in '' $ac_executable_extensions; do
35320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35321    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35323    break 2
35324  fi
35325done
35326  done
35327IFS=$as_save_IFS
35328
35329  ;;
35330esac
35331fi
35332AS=$ac_cv_path_AS
35333if test -n "$AS"; then
35334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35335$as_echo "$AS" >&6; }
35336else
35337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35338$as_echo "no" >&6; }
35339fi
35340
35341
35342          if test "x$AS" = x; then
35343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35344          fi
35345        else
35346          # Otherwise we believe it is a complete path. Use it as it is.
35347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35348$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35350$as_echo_n "checking for AS... " >&6; }
35351          if test ! -x "$tool_specified"; then
35352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35353$as_echo "not found" >&6; }
35354            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35355          fi
35356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35357$as_echo "$tool_specified" >&6; }
35358        fi
35359      fi
35360    fi
35361
35362  fi
35363
35364
35365
35366  # Only process if variable expands to non-empty
35367
35368  if test "x$AS" != x; then
35369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35370
35371  # First separate the path from the arguments. This will split at the first
35372  # space.
35373  complete="$AS"
35374  path="${complete%% *}"
35375  tmp="$complete EOL"
35376  arguments="${tmp#* }"
35377
35378  # Input might be given as Windows format, start by converting to
35379  # unix format.
35380  new_path=`$CYGPATH -u "$path"`
35381
35382  # Now try to locate executable using which
35383  new_path=`$WHICH "$new_path" 2> /dev/null`
35384  # bat and cmd files are not always considered executable in cygwin causing which
35385  # to not find them
35386  if test "x$new_path" = x \
35387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35389    new_path=`$CYGPATH -u "$path"`
35390  fi
35391  if test "x$new_path" = x; then
35392    # Oops. Which didn't find the executable.
35393    # The splitting of arguments from the executable at a space might have been incorrect,
35394    # since paths with space are more likely in Windows. Give it another try with the whole
35395    # argument.
35396    path="$complete"
35397    arguments="EOL"
35398    new_path=`$CYGPATH -u "$path"`
35399    new_path=`$WHICH "$new_path" 2> /dev/null`
35400    # bat and cmd files are not always considered executable in cygwin causing which
35401    # to not find them
35402    if test "x$new_path" = x \
35403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35405      new_path=`$CYGPATH -u "$path"`
35406    fi
35407    if test "x$new_path" = x; then
35408      # It's still not found. Now this is an unrecoverable error.
35409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35410$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35411      has_space=`$ECHO "$complete" | $GREP " "`
35412      if test "x$has_space" != x; then
35413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35415      fi
35416      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35417    fi
35418  fi
35419
35420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35423  # "foo.exe" is OK but "foo" is an error.
35424  #
35425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35426  # It is also a way to make sure we got the proper file name for the real test later on.
35427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35428  if test "x$test_shortpath" = x; then
35429    # Short path failed, file does not exist as specified.
35430    # Try adding .exe or .cmd
35431    if test -f "${new_path}.exe"; then
35432      input_to_shortpath="${new_path}.exe"
35433    elif test -f "${new_path}.cmd"; then
35434      input_to_shortpath="${new_path}.cmd"
35435    else
35436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35437$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35440      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35441    fi
35442  else
35443    input_to_shortpath="$new_path"
35444  fi
35445
35446  # Call helper function which possibly converts this using DOS-style short mode.
35447  # If so, the updated path is stored in $new_path.
35448  new_path="$input_to_shortpath"
35449
35450  input_path="$input_to_shortpath"
35451  # Check if we need to convert this using DOS-style short mode. If the path
35452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35453  # take no chances and rewrite it.
35454  # Note: m4 eats our [], so we need to use [ and ] instead.
35455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35456  if test "x$has_forbidden_chars" != x; then
35457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35461      # Going to short mode and back again did indeed matter. Since short mode is
35462      # case insensitive, let's make it lowercase to improve readability.
35463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464      # Now convert it back to Unix-style (cygpath)
35465      input_path=`$CYGPATH -u "$shortmode_path"`
35466      new_path="$input_path"
35467    fi
35468  fi
35469
35470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35471  if test "x$test_cygdrive_prefix" = x; then
35472    # As a simple fix, exclude /usr/bin since it's not a real path.
35473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35475      # a path prefixed by /cygdrive for fixpath to work.
35476      new_path="$CYGWIN_ROOT_PATH$input_path"
35477    fi
35478  fi
35479
35480  # remove trailing .exe if any
35481  new_path="${new_path/%.exe/}"
35482
35483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35484
35485  # First separate the path from the arguments. This will split at the first
35486  # space.
35487  complete="$AS"
35488  path="${complete%% *}"
35489  tmp="$complete EOL"
35490  arguments="${tmp#* }"
35491
35492  # Input might be given as Windows format, start by converting to
35493  # unix format.
35494  new_path="$path"
35495
35496  windows_path="$new_path"
35497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35498    unix_path=`$CYGPATH -u "$windows_path"`
35499    new_path="$unix_path"
35500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35502    new_path="$unix_path"
35503  fi
35504
35505
35506  # Now try to locate executable using which
35507  new_path=`$WHICH "$new_path" 2> /dev/null`
35508
35509  if test "x$new_path" = x; then
35510    # Oops. Which didn't find the executable.
35511    # The splitting of arguments from the executable at a space might have been incorrect,
35512    # since paths with space are more likely in Windows. Give it another try with the whole
35513    # argument.
35514    path="$complete"
35515    arguments="EOL"
35516    new_path="$path"
35517
35518  windows_path="$new_path"
35519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520    unix_path=`$CYGPATH -u "$windows_path"`
35521    new_path="$unix_path"
35522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35524    new_path="$unix_path"
35525  fi
35526
35527
35528    new_path=`$WHICH "$new_path" 2> /dev/null`
35529    # bat and cmd files are not always considered executable in MSYS causing which
35530    # to not find them
35531    if test "x$new_path" = x \
35532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35534      new_path="$path"
35535
35536  windows_path="$new_path"
35537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35538    unix_path=`$CYGPATH -u "$windows_path"`
35539    new_path="$unix_path"
35540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35542    new_path="$unix_path"
35543  fi
35544
35545    fi
35546
35547    if test "x$new_path" = x; then
35548      # It's still not found. Now this is an unrecoverable error.
35549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35550$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35551      has_space=`$ECHO "$complete" | $GREP " "`
35552      if test "x$has_space" != x; then
35553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35555      fi
35556      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35557    fi
35558  fi
35559
35560  # Now new_path has a complete unix path to the binary
35561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35562    # Keep paths in /bin as-is, but remove trailing .exe if any
35563    new_path="${new_path/%.exe/}"
35564    # Do not save /bin paths to all_fixpath_prefixes!
35565  else
35566    # Not in mixed or Windows style, start by that.
35567    new_path=`cmd //c echo $new_path`
35568
35569  input_path="$new_path"
35570  # Check if we need to convert this using DOS-style short mode. If the path
35571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35572  # take no chances and rewrite it.
35573  # Note: m4 eats our [], so we need to use [ and ] instead.
35574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35575  if test "x$has_forbidden_chars" != x; then
35576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35578  fi
35579
35580    # Output is in $new_path
35581
35582  windows_path="$new_path"
35583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35584    unix_path=`$CYGPATH -u "$windows_path"`
35585    new_path="$unix_path"
35586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35588    new_path="$unix_path"
35589  fi
35590
35591    # remove trailing .exe if any
35592    new_path="${new_path/%.exe/}"
35593
35594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35596  fi
35597
35598    else
35599      # We're on a unix platform. Hooray! :)
35600      # First separate the path from the arguments. This will split at the first
35601      # space.
35602      complete="$AS"
35603      path="${complete%% *}"
35604      tmp="$complete EOL"
35605      arguments="${tmp#* }"
35606
35607      # Cannot rely on the command "which" here since it doesn't always work.
35608      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35609      if test -z "$is_absolute_path"; then
35610        # Path to executable is not absolute. Find it.
35611        IFS_save="$IFS"
35612        IFS=:
35613        for p in $PATH; do
35614          if test -f "$p/$path" && test -x "$p/$path"; then
35615            new_path="$p/$path"
35616            break
35617          fi
35618        done
35619        IFS="$IFS_save"
35620      else
35621        # This is an absolute path, we can use it without further modifications.
35622        new_path="$path"
35623      fi
35624
35625      if test "x$new_path" = x; then
35626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35627$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35628        has_space=`$ECHO "$complete" | $GREP " "`
35629        if test "x$has_space" != x; then
35630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35632        fi
35633        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35634      fi
35635    fi
35636
35637    # Now join together the path and the arguments once again
35638    if test "x$arguments" != xEOL; then
35639      new_complete="$new_path ${arguments% *}"
35640    else
35641      new_complete="$new_path"
35642    fi
35643
35644    if test "x$complete" != "x$new_complete"; then
35645      AS="$new_complete"
35646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35647$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35648    fi
35649  fi
35650
35651  else
35652    # FIXME: is this correct for microsoft?
35653    AS="$CC -c"
35654  fi
35655
35656
35657  #
35658  # Setup the archiver (AR)
35659  #
35660  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35661    # The corresponding ar tool is lib.exe (used to create static libraries)
35662    # Extract the first word of "lib", so it can be a program name with args.
35663set dummy lib; ac_word=$2
35664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35665$as_echo_n "checking for $ac_word... " >&6; }
35666if ${ac_cv_prog_AR+:} false; then :
35667  $as_echo_n "(cached) " >&6
35668else
35669  if test -n "$AR"; then
35670  ac_cv_prog_AR="$AR" # Let the user override the test.
35671else
35672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35673for as_dir in $PATH
35674do
35675  IFS=$as_save_IFS
35676  test -z "$as_dir" && as_dir=.
35677    for ac_exec_ext in '' $ac_executable_extensions; do
35678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35679    ac_cv_prog_AR="lib"
35680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35681    break 2
35682  fi
35683done
35684  done
35685IFS=$as_save_IFS
35686
35687fi
35688fi
35689AR=$ac_cv_prog_AR
35690if test -n "$AR"; then
35691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35692$as_echo "$AR" >&6; }
35693else
35694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35695$as_echo "no" >&6; }
35696fi
35697
35698
35699  else
35700
35701
35702  # Publish this variable in the help.
35703
35704
35705  if [ -z "${AR+x}" ]; then
35706    # The variable is not set by user, try to locate tool using the code snippet
35707    if test -n "$ac_tool_prefix"; then
35708  for ac_prog in ar
35709  do
35710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35713$as_echo_n "checking for $ac_word... " >&6; }
35714if ${ac_cv_prog_AR+:} false; then :
35715  $as_echo_n "(cached) " >&6
35716else
35717  if test -n "$AR"; then
35718  ac_cv_prog_AR="$AR" # Let the user override the test.
35719else
35720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35721for as_dir in $PATH
35722do
35723  IFS=$as_save_IFS
35724  test -z "$as_dir" && as_dir=.
35725    for ac_exec_ext in '' $ac_executable_extensions; do
35726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35727    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35729    break 2
35730  fi
35731done
35732  done
35733IFS=$as_save_IFS
35734
35735fi
35736fi
35737AR=$ac_cv_prog_AR
35738if test -n "$AR"; then
35739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35740$as_echo "$AR" >&6; }
35741else
35742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35743$as_echo "no" >&6; }
35744fi
35745
35746
35747    test -n "$AR" && break
35748  done
35749fi
35750if test -z "$AR"; then
35751  ac_ct_AR=$AR
35752  for ac_prog in ar
35753do
35754  # Extract the first word of "$ac_prog", so it can be a program name with args.
35755set dummy $ac_prog; ac_word=$2
35756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35757$as_echo_n "checking for $ac_word... " >&6; }
35758if ${ac_cv_prog_ac_ct_AR+:} false; then :
35759  $as_echo_n "(cached) " >&6
35760else
35761  if test -n "$ac_ct_AR"; then
35762  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35763else
35764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35765for as_dir in $PATH
35766do
35767  IFS=$as_save_IFS
35768  test -z "$as_dir" && as_dir=.
35769    for ac_exec_ext in '' $ac_executable_extensions; do
35770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35771    ac_cv_prog_ac_ct_AR="$ac_prog"
35772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35773    break 2
35774  fi
35775done
35776  done
35777IFS=$as_save_IFS
35778
35779fi
35780fi
35781ac_ct_AR=$ac_cv_prog_ac_ct_AR
35782if test -n "$ac_ct_AR"; then
35783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35784$as_echo "$ac_ct_AR" >&6; }
35785else
35786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35787$as_echo "no" >&6; }
35788fi
35789
35790
35791  test -n "$ac_ct_AR" && break
35792done
35793
35794  if test "x$ac_ct_AR" = x; then
35795    AR=""
35796  else
35797    case $cross_compiling:$ac_tool_warned in
35798yes:)
35799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35801ac_tool_warned=yes ;;
35802esac
35803    AR=$ac_ct_AR
35804  fi
35805fi
35806
35807  else
35808    # The variable is set, but is it from the command line or the environment?
35809
35810    # Try to remove the string !AR! from our list.
35811    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35812    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35813      # If it failed, the variable was not from the command line. Ignore it,
35814      # but warn the user (except for BASH, which is always set by the calling BASH).
35815      if test "xAR" != xBASH; then
35816        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35817$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35818      fi
35819      # Try to locate tool using the code snippet
35820      if test -n "$ac_tool_prefix"; then
35821  for ac_prog in ar
35822  do
35823    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35824set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35826$as_echo_n "checking for $ac_word... " >&6; }
35827if ${ac_cv_prog_AR+:} false; then :
35828  $as_echo_n "(cached) " >&6
35829else
35830  if test -n "$AR"; then
35831  ac_cv_prog_AR="$AR" # Let the user override the test.
35832else
35833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35834for as_dir in $PATH
35835do
35836  IFS=$as_save_IFS
35837  test -z "$as_dir" && as_dir=.
35838    for ac_exec_ext in '' $ac_executable_extensions; do
35839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35840    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35842    break 2
35843  fi
35844done
35845  done
35846IFS=$as_save_IFS
35847
35848fi
35849fi
35850AR=$ac_cv_prog_AR
35851if test -n "$AR"; then
35852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35853$as_echo "$AR" >&6; }
35854else
35855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35856$as_echo "no" >&6; }
35857fi
35858
35859
35860    test -n "$AR" && break
35861  done
35862fi
35863if test -z "$AR"; then
35864  ac_ct_AR=$AR
35865  for ac_prog in ar
35866do
35867  # Extract the first word of "$ac_prog", so it can be a program name with args.
35868set dummy $ac_prog; ac_word=$2
35869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35870$as_echo_n "checking for $ac_word... " >&6; }
35871if ${ac_cv_prog_ac_ct_AR+:} false; then :
35872  $as_echo_n "(cached) " >&6
35873else
35874  if test -n "$ac_ct_AR"; then
35875  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35876else
35877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35878for as_dir in $PATH
35879do
35880  IFS=$as_save_IFS
35881  test -z "$as_dir" && as_dir=.
35882    for ac_exec_ext in '' $ac_executable_extensions; do
35883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35884    ac_cv_prog_ac_ct_AR="$ac_prog"
35885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35886    break 2
35887  fi
35888done
35889  done
35890IFS=$as_save_IFS
35891
35892fi
35893fi
35894ac_ct_AR=$ac_cv_prog_ac_ct_AR
35895if test -n "$ac_ct_AR"; then
35896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35897$as_echo "$ac_ct_AR" >&6; }
35898else
35899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35900$as_echo "no" >&6; }
35901fi
35902
35903
35904  test -n "$ac_ct_AR" && break
35905done
35906
35907  if test "x$ac_ct_AR" = x; then
35908    AR=""
35909  else
35910    case $cross_compiling:$ac_tool_warned in
35911yes:)
35912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35914ac_tool_warned=yes ;;
35915esac
35916    AR=$ac_ct_AR
35917  fi
35918fi
35919
35920    else
35921      # If it succeeded, then it was overridden by the user. We will use it
35922      # for the tool.
35923
35924      # First remove it from the list of overridden variables, so we can test
35925      # for unknown variables in the end.
35926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35927
35928      # Check if we try to supply an empty value
35929      if test "x$AR" = x; then
35930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35931$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35933$as_echo_n "checking for AR... " >&6; }
35934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35935$as_echo "disabled" >&6; }
35936      else
35937        # Check if the provided tool contains a complete path.
35938        tool_specified="$AR"
35939        tool_basename="${tool_specified##*/}"
35940        if test "x$tool_basename" = "x$tool_specified"; then
35941          # A command without a complete path is provided, search $PATH.
35942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35943$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35944          # Extract the first word of "$tool_basename", so it can be a program name with args.
35945set dummy $tool_basename; ac_word=$2
35946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35947$as_echo_n "checking for $ac_word... " >&6; }
35948if ${ac_cv_path_AR+:} false; then :
35949  $as_echo_n "(cached) " >&6
35950else
35951  case $AR in
35952  [\\/]* | ?:[\\/]*)
35953  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35954  ;;
35955  *)
35956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35957for as_dir in $PATH
35958do
35959  IFS=$as_save_IFS
35960  test -z "$as_dir" && as_dir=.
35961    for ac_exec_ext in '' $ac_executable_extensions; do
35962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35963    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35965    break 2
35966  fi
35967done
35968  done
35969IFS=$as_save_IFS
35970
35971  ;;
35972esac
35973fi
35974AR=$ac_cv_path_AR
35975if test -n "$AR"; then
35976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35977$as_echo "$AR" >&6; }
35978else
35979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35980$as_echo "no" >&6; }
35981fi
35982
35983
35984          if test "x$AR" = x; then
35985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35986          fi
35987        else
35988          # Otherwise we believe it is a complete path. Use it as it is.
35989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35990$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35992$as_echo_n "checking for AR... " >&6; }
35993          if test ! -x "$tool_specified"; then
35994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35995$as_echo "not found" >&6; }
35996            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35997          fi
35998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35999$as_echo "$tool_specified" >&6; }
36000        fi
36001      fi
36002    fi
36003
36004  fi
36005
36006
36007  fi
36008
36009  # Only process if variable expands to non-empty
36010
36011  if test "x$AR" != x; then
36012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36013
36014  # First separate the path from the arguments. This will split at the first
36015  # space.
36016  complete="$AR"
36017  path="${complete%% *}"
36018  tmp="$complete EOL"
36019  arguments="${tmp#* }"
36020
36021  # Input might be given as Windows format, start by converting to
36022  # unix format.
36023  new_path=`$CYGPATH -u "$path"`
36024
36025  # Now try to locate executable using which
36026  new_path=`$WHICH "$new_path" 2> /dev/null`
36027  # bat and cmd files are not always considered executable in cygwin causing which
36028  # to not find them
36029  if test "x$new_path" = x \
36030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36032    new_path=`$CYGPATH -u "$path"`
36033  fi
36034  if test "x$new_path" = x; then
36035    # Oops. Which didn't find the executable.
36036    # The splitting of arguments from the executable at a space might have been incorrect,
36037    # since paths with space are more likely in Windows. Give it another try with the whole
36038    # argument.
36039    path="$complete"
36040    arguments="EOL"
36041    new_path=`$CYGPATH -u "$path"`
36042    new_path=`$WHICH "$new_path" 2> /dev/null`
36043    # bat and cmd files are not always considered executable in cygwin causing which
36044    # to not find them
36045    if test "x$new_path" = x \
36046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36048      new_path=`$CYGPATH -u "$path"`
36049    fi
36050    if test "x$new_path" = x; then
36051      # It's still not found. Now this is an unrecoverable error.
36052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36053$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36054      has_space=`$ECHO "$complete" | $GREP " "`
36055      if test "x$has_space" != x; then
36056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36058      fi
36059      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36060    fi
36061  fi
36062
36063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36066  # "foo.exe" is OK but "foo" is an error.
36067  #
36068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36069  # It is also a way to make sure we got the proper file name for the real test later on.
36070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36071  if test "x$test_shortpath" = x; then
36072    # Short path failed, file does not exist as specified.
36073    # Try adding .exe or .cmd
36074    if test -f "${new_path}.exe"; then
36075      input_to_shortpath="${new_path}.exe"
36076    elif test -f "${new_path}.cmd"; then
36077      input_to_shortpath="${new_path}.cmd"
36078    else
36079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36080$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36083      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36084    fi
36085  else
36086    input_to_shortpath="$new_path"
36087  fi
36088
36089  # Call helper function which possibly converts this using DOS-style short mode.
36090  # If so, the updated path is stored in $new_path.
36091  new_path="$input_to_shortpath"
36092
36093  input_path="$input_to_shortpath"
36094  # Check if we need to convert this using DOS-style short mode. If the path
36095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36096  # take no chances and rewrite it.
36097  # Note: m4 eats our [], so we need to use [ and ] instead.
36098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36099  if test "x$has_forbidden_chars" != x; then
36100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36104      # Going to short mode and back again did indeed matter. Since short mode is
36105      # case insensitive, let's make it lowercase to improve readability.
36106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36107      # Now convert it back to Unix-style (cygpath)
36108      input_path=`$CYGPATH -u "$shortmode_path"`
36109      new_path="$input_path"
36110    fi
36111  fi
36112
36113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36114  if test "x$test_cygdrive_prefix" = x; then
36115    # As a simple fix, exclude /usr/bin since it's not a real path.
36116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36118      # a path prefixed by /cygdrive for fixpath to work.
36119      new_path="$CYGWIN_ROOT_PATH$input_path"
36120    fi
36121  fi
36122
36123  # remove trailing .exe if any
36124  new_path="${new_path/%.exe/}"
36125
36126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36127
36128  # First separate the path from the arguments. This will split at the first
36129  # space.
36130  complete="$AR"
36131  path="${complete%% *}"
36132  tmp="$complete EOL"
36133  arguments="${tmp#* }"
36134
36135  # Input might be given as Windows format, start by converting to
36136  # unix format.
36137  new_path="$path"
36138
36139  windows_path="$new_path"
36140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36141    unix_path=`$CYGPATH -u "$windows_path"`
36142    new_path="$unix_path"
36143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36145    new_path="$unix_path"
36146  fi
36147
36148
36149  # Now try to locate executable using which
36150  new_path=`$WHICH "$new_path" 2> /dev/null`
36151
36152  if test "x$new_path" = x; then
36153    # Oops. Which didn't find the executable.
36154    # The splitting of arguments from the executable at a space might have been incorrect,
36155    # since paths with space are more likely in Windows. Give it another try with the whole
36156    # argument.
36157    path="$complete"
36158    arguments="EOL"
36159    new_path="$path"
36160
36161  windows_path="$new_path"
36162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36163    unix_path=`$CYGPATH -u "$windows_path"`
36164    new_path="$unix_path"
36165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36167    new_path="$unix_path"
36168  fi
36169
36170
36171    new_path=`$WHICH "$new_path" 2> /dev/null`
36172    # bat and cmd files are not always considered executable in MSYS causing which
36173    # to not find them
36174    if test "x$new_path" = x \
36175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36177      new_path="$path"
36178
36179  windows_path="$new_path"
36180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36181    unix_path=`$CYGPATH -u "$windows_path"`
36182    new_path="$unix_path"
36183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36185    new_path="$unix_path"
36186  fi
36187
36188    fi
36189
36190    if test "x$new_path" = x; then
36191      # It's still not found. Now this is an unrecoverable error.
36192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36193$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36194      has_space=`$ECHO "$complete" | $GREP " "`
36195      if test "x$has_space" != x; then
36196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36198      fi
36199      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36200    fi
36201  fi
36202
36203  # Now new_path has a complete unix path to the binary
36204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36205    # Keep paths in /bin as-is, but remove trailing .exe if any
36206    new_path="${new_path/%.exe/}"
36207    # Do not save /bin paths to all_fixpath_prefixes!
36208  else
36209    # Not in mixed or Windows style, start by that.
36210    new_path=`cmd //c echo $new_path`
36211
36212  input_path="$new_path"
36213  # Check if we need to convert this using DOS-style short mode. If the path
36214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36215  # take no chances and rewrite it.
36216  # Note: m4 eats our [], so we need to use [ and ] instead.
36217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36218  if test "x$has_forbidden_chars" != x; then
36219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36221  fi
36222
36223    # Output is in $new_path
36224
36225  windows_path="$new_path"
36226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36227    unix_path=`$CYGPATH -u "$windows_path"`
36228    new_path="$unix_path"
36229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36231    new_path="$unix_path"
36232  fi
36233
36234    # remove trailing .exe if any
36235    new_path="${new_path/%.exe/}"
36236
36237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36239  fi
36240
36241    else
36242      # We're on a unix platform. Hooray! :)
36243      # First separate the path from the arguments. This will split at the first
36244      # space.
36245      complete="$AR"
36246      path="${complete%% *}"
36247      tmp="$complete EOL"
36248      arguments="${tmp#* }"
36249
36250      # Cannot rely on the command "which" here since it doesn't always work.
36251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36252      if test -z "$is_absolute_path"; then
36253        # Path to executable is not absolute. Find it.
36254        IFS_save="$IFS"
36255        IFS=:
36256        for p in $PATH; do
36257          if test -f "$p/$path" && test -x "$p/$path"; then
36258            new_path="$p/$path"
36259            break
36260          fi
36261        done
36262        IFS="$IFS_save"
36263      else
36264        # This is an absolute path, we can use it without further modifications.
36265        new_path="$path"
36266      fi
36267
36268      if test "x$new_path" = x; then
36269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36270$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36271        has_space=`$ECHO "$complete" | $GREP " "`
36272        if test "x$has_space" != x; then
36273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36275        fi
36276        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36277      fi
36278    fi
36279
36280    # Now join together the path and the arguments once again
36281    if test "x$arguments" != xEOL; then
36282      new_complete="$new_path ${arguments% *}"
36283    else
36284      new_complete="$new_path"
36285    fi
36286
36287    if test "x$complete" != "x$new_complete"; then
36288      AR="$new_complete"
36289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36290$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36291    fi
36292  fi
36293
36294
36295
36296  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36297
36298
36299  # Publish this variable in the help.
36300
36301
36302  if [ -z "${LIPO+x}" ]; then
36303    # The variable is not set by user, try to locate tool using the code snippet
36304    for ac_prog in lipo
36305do
36306  # Extract the first word of "$ac_prog", so it can be a program name with args.
36307set dummy $ac_prog; ac_word=$2
36308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36309$as_echo_n "checking for $ac_word... " >&6; }
36310if ${ac_cv_path_LIPO+:} false; then :
36311  $as_echo_n "(cached) " >&6
36312else
36313  case $LIPO in
36314  [\\/]* | ?:[\\/]*)
36315  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36316  ;;
36317  *)
36318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36319for as_dir in $PATH
36320do
36321  IFS=$as_save_IFS
36322  test -z "$as_dir" && as_dir=.
36323    for ac_exec_ext in '' $ac_executable_extensions; do
36324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36325    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36327    break 2
36328  fi
36329done
36330  done
36331IFS=$as_save_IFS
36332
36333  ;;
36334esac
36335fi
36336LIPO=$ac_cv_path_LIPO
36337if test -n "$LIPO"; then
36338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36339$as_echo "$LIPO" >&6; }
36340else
36341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36342$as_echo "no" >&6; }
36343fi
36344
36345
36346  test -n "$LIPO" && break
36347done
36348
36349  else
36350    # The variable is set, but is it from the command line or the environment?
36351
36352    # Try to remove the string !LIPO! from our list.
36353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36355      # If it failed, the variable was not from the command line. Ignore it,
36356      # but warn the user (except for BASH, which is always set by the calling BASH).
36357      if test "xLIPO" != xBASH; then
36358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36359$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36360      fi
36361      # Try to locate tool using the code snippet
36362      for ac_prog in lipo
36363do
36364  # Extract the first word of "$ac_prog", so it can be a program name with args.
36365set dummy $ac_prog; ac_word=$2
36366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36367$as_echo_n "checking for $ac_word... " >&6; }
36368if ${ac_cv_path_LIPO+:} false; then :
36369  $as_echo_n "(cached) " >&6
36370else
36371  case $LIPO in
36372  [\\/]* | ?:[\\/]*)
36373  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36374  ;;
36375  *)
36376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36377for as_dir in $PATH
36378do
36379  IFS=$as_save_IFS
36380  test -z "$as_dir" && as_dir=.
36381    for ac_exec_ext in '' $ac_executable_extensions; do
36382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36383    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36385    break 2
36386  fi
36387done
36388  done
36389IFS=$as_save_IFS
36390
36391  ;;
36392esac
36393fi
36394LIPO=$ac_cv_path_LIPO
36395if test -n "$LIPO"; then
36396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36397$as_echo "$LIPO" >&6; }
36398else
36399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36400$as_echo "no" >&6; }
36401fi
36402
36403
36404  test -n "$LIPO" && break
36405done
36406
36407    else
36408      # If it succeeded, then it was overridden by the user. We will use it
36409      # for the tool.
36410
36411      # First remove it from the list of overridden variables, so we can test
36412      # for unknown variables in the end.
36413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36414
36415      # Check if we try to supply an empty value
36416      if test "x$LIPO" = x; then
36417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36418$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36420$as_echo_n "checking for LIPO... " >&6; }
36421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36422$as_echo "disabled" >&6; }
36423      else
36424        # Check if the provided tool contains a complete path.
36425        tool_specified="$LIPO"
36426        tool_basename="${tool_specified##*/}"
36427        if test "x$tool_basename" = "x$tool_specified"; then
36428          # A command without a complete path is provided, search $PATH.
36429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36430$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36431          # Extract the first word of "$tool_basename", so it can be a program name with args.
36432set dummy $tool_basename; ac_word=$2
36433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36434$as_echo_n "checking for $ac_word... " >&6; }
36435if ${ac_cv_path_LIPO+:} false; then :
36436  $as_echo_n "(cached) " >&6
36437else
36438  case $LIPO in
36439  [\\/]* | ?:[\\/]*)
36440  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36441  ;;
36442  *)
36443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36444for as_dir in $PATH
36445do
36446  IFS=$as_save_IFS
36447  test -z "$as_dir" && as_dir=.
36448    for ac_exec_ext in '' $ac_executable_extensions; do
36449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36450    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36452    break 2
36453  fi
36454done
36455  done
36456IFS=$as_save_IFS
36457
36458  ;;
36459esac
36460fi
36461LIPO=$ac_cv_path_LIPO
36462if test -n "$LIPO"; then
36463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36464$as_echo "$LIPO" >&6; }
36465else
36466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36467$as_echo "no" >&6; }
36468fi
36469
36470
36471          if test "x$LIPO" = x; then
36472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36473          fi
36474        else
36475          # Otherwise we believe it is a complete path. Use it as it is.
36476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36477$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36479$as_echo_n "checking for LIPO... " >&6; }
36480          if test ! -x "$tool_specified"; then
36481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36482$as_echo "not found" >&6; }
36483            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36484          fi
36485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36486$as_echo "$tool_specified" >&6; }
36487        fi
36488      fi
36489    fi
36490
36491  fi
36492
36493
36494
36495  # Only process if variable expands to non-empty
36496
36497  if test "x$LIPO" != x; then
36498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36499
36500  # First separate the path from the arguments. This will split at the first
36501  # space.
36502  complete="$LIPO"
36503  path="${complete%% *}"
36504  tmp="$complete EOL"
36505  arguments="${tmp#* }"
36506
36507  # Input might be given as Windows format, start by converting to
36508  # unix format.
36509  new_path=`$CYGPATH -u "$path"`
36510
36511  # Now try to locate executable using which
36512  new_path=`$WHICH "$new_path" 2> /dev/null`
36513  # bat and cmd files are not always considered executable in cygwin causing which
36514  # to not find them
36515  if test "x$new_path" = x \
36516      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36517      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36518    new_path=`$CYGPATH -u "$path"`
36519  fi
36520  if test "x$new_path" = x; then
36521    # Oops. Which didn't find the executable.
36522    # The splitting of arguments from the executable at a space might have been incorrect,
36523    # since paths with space are more likely in Windows. Give it another try with the whole
36524    # argument.
36525    path="$complete"
36526    arguments="EOL"
36527    new_path=`$CYGPATH -u "$path"`
36528    new_path=`$WHICH "$new_path" 2> /dev/null`
36529    # bat and cmd files are not always considered executable in cygwin causing which
36530    # to not find them
36531    if test "x$new_path" = x \
36532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36534      new_path=`$CYGPATH -u "$path"`
36535    fi
36536    if test "x$new_path" = x; then
36537      # It's still not found. Now this is an unrecoverable error.
36538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36539$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36540      has_space=`$ECHO "$complete" | $GREP " "`
36541      if test "x$has_space" != x; then
36542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36544      fi
36545      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36546    fi
36547  fi
36548
36549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36552  # "foo.exe" is OK but "foo" is an error.
36553  #
36554  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36555  # It is also a way to make sure we got the proper file name for the real test later on.
36556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36557  if test "x$test_shortpath" = x; then
36558    # Short path failed, file does not exist as specified.
36559    # Try adding .exe or .cmd
36560    if test -f "${new_path}.exe"; then
36561      input_to_shortpath="${new_path}.exe"
36562    elif test -f "${new_path}.cmd"; then
36563      input_to_shortpath="${new_path}.cmd"
36564    else
36565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36566$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36569      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36570    fi
36571  else
36572    input_to_shortpath="$new_path"
36573  fi
36574
36575  # Call helper function which possibly converts this using DOS-style short mode.
36576  # If so, the updated path is stored in $new_path.
36577  new_path="$input_to_shortpath"
36578
36579  input_path="$input_to_shortpath"
36580  # Check if we need to convert this using DOS-style short mode. If the path
36581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36582  # take no chances and rewrite it.
36583  # Note: m4 eats our [], so we need to use [ and ] instead.
36584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36585  if test "x$has_forbidden_chars" != x; then
36586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36590      # Going to short mode and back again did indeed matter. Since short mode is
36591      # case insensitive, let's make it lowercase to improve readability.
36592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36593      # Now convert it back to Unix-style (cygpath)
36594      input_path=`$CYGPATH -u "$shortmode_path"`
36595      new_path="$input_path"
36596    fi
36597  fi
36598
36599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36600  if test "x$test_cygdrive_prefix" = x; then
36601    # As a simple fix, exclude /usr/bin since it's not a real path.
36602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36604      # a path prefixed by /cygdrive for fixpath to work.
36605      new_path="$CYGWIN_ROOT_PATH$input_path"
36606    fi
36607  fi
36608
36609  # remove trailing .exe if any
36610  new_path="${new_path/%.exe/}"
36611
36612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36613
36614  # First separate the path from the arguments. This will split at the first
36615  # space.
36616  complete="$LIPO"
36617  path="${complete%% *}"
36618  tmp="$complete EOL"
36619  arguments="${tmp#* }"
36620
36621  # Input might be given as Windows format, start by converting to
36622  # unix format.
36623  new_path="$path"
36624
36625  windows_path="$new_path"
36626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36627    unix_path=`$CYGPATH -u "$windows_path"`
36628    new_path="$unix_path"
36629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36631    new_path="$unix_path"
36632  fi
36633
36634
36635  # Now try to locate executable using which
36636  new_path=`$WHICH "$new_path" 2> /dev/null`
36637
36638  if test "x$new_path" = x; then
36639    # Oops. Which didn't find the executable.
36640    # The splitting of arguments from the executable at a space might have been incorrect,
36641    # since paths with space are more likely in Windows. Give it another try with the whole
36642    # argument.
36643    path="$complete"
36644    arguments="EOL"
36645    new_path="$path"
36646
36647  windows_path="$new_path"
36648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36649    unix_path=`$CYGPATH -u "$windows_path"`
36650    new_path="$unix_path"
36651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36653    new_path="$unix_path"
36654  fi
36655
36656
36657    new_path=`$WHICH "$new_path" 2> /dev/null`
36658    # bat and cmd files are not always considered executable in MSYS causing which
36659    # to not find them
36660    if test "x$new_path" = x \
36661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36663      new_path="$path"
36664
36665  windows_path="$new_path"
36666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36667    unix_path=`$CYGPATH -u "$windows_path"`
36668    new_path="$unix_path"
36669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36671    new_path="$unix_path"
36672  fi
36673
36674    fi
36675
36676    if test "x$new_path" = x; then
36677      # It's still not found. Now this is an unrecoverable error.
36678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36679$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36680      has_space=`$ECHO "$complete" | $GREP " "`
36681      if test "x$has_space" != x; then
36682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36684      fi
36685      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36686    fi
36687  fi
36688
36689  # Now new_path has a complete unix path to the binary
36690  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36691    # Keep paths in /bin as-is, but remove trailing .exe if any
36692    new_path="${new_path/%.exe/}"
36693    # Do not save /bin paths to all_fixpath_prefixes!
36694  else
36695    # Not in mixed or Windows style, start by that.
36696    new_path=`cmd //c echo $new_path`
36697
36698  input_path="$new_path"
36699  # Check if we need to convert this using DOS-style short mode. If the path
36700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36701  # take no chances and rewrite it.
36702  # Note: m4 eats our [], so we need to use [ and ] instead.
36703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36704  if test "x$has_forbidden_chars" != x; then
36705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36707  fi
36708
36709    # Output is in $new_path
36710
36711  windows_path="$new_path"
36712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36713    unix_path=`$CYGPATH -u "$windows_path"`
36714    new_path="$unix_path"
36715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36717    new_path="$unix_path"
36718  fi
36719
36720    # remove trailing .exe if any
36721    new_path="${new_path/%.exe/}"
36722
36723    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36724    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36725  fi
36726
36727    else
36728      # We're on a unix platform. Hooray! :)
36729      # First separate the path from the arguments. This will split at the first
36730      # space.
36731      complete="$LIPO"
36732      path="${complete%% *}"
36733      tmp="$complete EOL"
36734      arguments="${tmp#* }"
36735
36736      # Cannot rely on the command "which" here since it doesn't always work.
36737      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36738      if test -z "$is_absolute_path"; then
36739        # Path to executable is not absolute. Find it.
36740        IFS_save="$IFS"
36741        IFS=:
36742        for p in $PATH; do
36743          if test -f "$p/$path" && test -x "$p/$path"; then
36744            new_path="$p/$path"
36745            break
36746          fi
36747        done
36748        IFS="$IFS_save"
36749      else
36750        # This is an absolute path, we can use it without further modifications.
36751        new_path="$path"
36752      fi
36753
36754      if test "x$new_path" = x; then
36755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36756$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36757        has_space=`$ECHO "$complete" | $GREP " "`
36758        if test "x$has_space" != x; then
36759          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36760$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36761        fi
36762        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36763      fi
36764    fi
36765
36766    # Now join together the path and the arguments once again
36767    if test "x$arguments" != xEOL; then
36768      new_complete="$new_path ${arguments% *}"
36769    else
36770      new_complete="$new_path"
36771    fi
36772
36773    if test "x$complete" != "x$new_complete"; then
36774      LIPO="$new_complete"
36775      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36776$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36777    fi
36778  fi
36779
36780  fi
36781
36782  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36783    # Extract the first word of "mt", so it can be a program name with args.
36784set dummy mt; 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_prog_MT+:} false; then :
36788  $as_echo_n "(cached) " >&6
36789else
36790  if test -n "$MT"; then
36791  ac_cv_prog_MT="$MT" # Let the user override the test.
36792else
36793  ac_prog_rejected=no
36794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36795for as_dir in $PATH
36796do
36797  IFS=$as_save_IFS
36798  test -z "$as_dir" && as_dir=.
36799    for ac_exec_ext in '' $ac_executable_extensions; do
36800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36801    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36802       ac_prog_rejected=yes
36803       continue
36804     fi
36805    ac_cv_prog_MT="mt"
36806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36807    break 2
36808  fi
36809done
36810  done
36811IFS=$as_save_IFS
36812
36813if test $ac_prog_rejected = yes; then
36814  # We found a bogon in the path, so make sure we never use it.
36815  set dummy $ac_cv_prog_MT
36816  shift
36817  if test $# != 0; then
36818    # We chose a different compiler from the bogus one.
36819    # However, it has the same basename, so the bogon will be chosen
36820    # first if we set MT to just the basename; use the full file name.
36821    shift
36822    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36823  fi
36824fi
36825fi
36826fi
36827MT=$ac_cv_prog_MT
36828if test -n "$MT"; then
36829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36830$as_echo "$MT" >&6; }
36831else
36832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36833$as_echo "no" >&6; }
36834fi
36835
36836
36837
36838  # Only process if variable expands to non-empty
36839
36840  if test "x$MT" != x; then
36841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36842
36843  # First separate the path from the arguments. This will split at the first
36844  # space.
36845  complete="$MT"
36846  path="${complete%% *}"
36847  tmp="$complete EOL"
36848  arguments="${tmp#* }"
36849
36850  # Input might be given as Windows format, start by converting to
36851  # unix format.
36852  new_path=`$CYGPATH -u "$path"`
36853
36854  # Now try to locate executable using which
36855  new_path=`$WHICH "$new_path" 2> /dev/null`
36856  # bat and cmd files are not always considered executable in cygwin causing which
36857  # to not find them
36858  if test "x$new_path" = x \
36859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36861    new_path=`$CYGPATH -u "$path"`
36862  fi
36863  if test "x$new_path" = x; then
36864    # Oops. Which didn't find the executable.
36865    # The splitting of arguments from the executable at a space might have been incorrect,
36866    # since paths with space are more likely in Windows. Give it another try with the whole
36867    # argument.
36868    path="$complete"
36869    arguments="EOL"
36870    new_path=`$CYGPATH -u "$path"`
36871    new_path=`$WHICH "$new_path" 2> /dev/null`
36872    # bat and cmd files are not always considered executable in cygwin causing which
36873    # to not find them
36874    if test "x$new_path" = x \
36875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36877      new_path=`$CYGPATH -u "$path"`
36878    fi
36879    if test "x$new_path" = x; then
36880      # It's still not found. Now this is an unrecoverable error.
36881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36882$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36883      has_space=`$ECHO "$complete" | $GREP " "`
36884      if test "x$has_space" != x; then
36885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36887      fi
36888      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36889    fi
36890  fi
36891
36892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36895  # "foo.exe" is OK but "foo" is an error.
36896  #
36897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36898  # It is also a way to make sure we got the proper file name for the real test later on.
36899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36900  if test "x$test_shortpath" = x; then
36901    # Short path failed, file does not exist as specified.
36902    # Try adding .exe or .cmd
36903    if test -f "${new_path}.exe"; then
36904      input_to_shortpath="${new_path}.exe"
36905    elif test -f "${new_path}.cmd"; then
36906      input_to_shortpath="${new_path}.cmd"
36907    else
36908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
36909$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
36910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36912      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36913    fi
36914  else
36915    input_to_shortpath="$new_path"
36916  fi
36917
36918  # Call helper function which possibly converts this using DOS-style short mode.
36919  # If so, the updated path is stored in $new_path.
36920  new_path="$input_to_shortpath"
36921
36922  input_path="$input_to_shortpath"
36923  # Check if we need to convert this using DOS-style short mode. If the path
36924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36925  # take no chances and rewrite it.
36926  # Note: m4 eats our [], so we need to use [ and ] instead.
36927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36928  if test "x$has_forbidden_chars" != x; then
36929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36933      # Going to short mode and back again did indeed matter. Since short mode is
36934      # case insensitive, let's make it lowercase to improve readability.
36935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36936      # Now convert it back to Unix-style (cygpath)
36937      input_path=`$CYGPATH -u "$shortmode_path"`
36938      new_path="$input_path"
36939    fi
36940  fi
36941
36942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36943  if test "x$test_cygdrive_prefix" = x; then
36944    # As a simple fix, exclude /usr/bin since it's not a real path.
36945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36947      # a path prefixed by /cygdrive for fixpath to work.
36948      new_path="$CYGWIN_ROOT_PATH$input_path"
36949    fi
36950  fi
36951
36952  # remove trailing .exe if any
36953  new_path="${new_path/%.exe/}"
36954
36955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36956
36957  # First separate the path from the arguments. This will split at the first
36958  # space.
36959  complete="$MT"
36960  path="${complete%% *}"
36961  tmp="$complete EOL"
36962  arguments="${tmp#* }"
36963
36964  # Input might be given as Windows format, start by converting to
36965  # unix format.
36966  new_path="$path"
36967
36968  windows_path="$new_path"
36969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36970    unix_path=`$CYGPATH -u "$windows_path"`
36971    new_path="$unix_path"
36972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36974    new_path="$unix_path"
36975  fi
36976
36977
36978  # Now try to locate executable using which
36979  new_path=`$WHICH "$new_path" 2> /dev/null`
36980
36981  if test "x$new_path" = x; then
36982    # Oops. Which didn't find the executable.
36983    # The splitting of arguments from the executable at a space might have been incorrect,
36984    # since paths with space are more likely in Windows. Give it another try with the whole
36985    # argument.
36986    path="$complete"
36987    arguments="EOL"
36988    new_path="$path"
36989
36990  windows_path="$new_path"
36991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36992    unix_path=`$CYGPATH -u "$windows_path"`
36993    new_path="$unix_path"
36994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36996    new_path="$unix_path"
36997  fi
36998
36999
37000    new_path=`$WHICH "$new_path" 2> /dev/null`
37001    # bat and cmd files are not always considered executable in MSYS causing which
37002    # to not find them
37003    if test "x$new_path" = x \
37004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37006      new_path="$path"
37007
37008  windows_path="$new_path"
37009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37010    unix_path=`$CYGPATH -u "$windows_path"`
37011    new_path="$unix_path"
37012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37014    new_path="$unix_path"
37015  fi
37016
37017    fi
37018
37019    if test "x$new_path" = x; then
37020      # It's still not found. Now this is an unrecoverable error.
37021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37022$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37023      has_space=`$ECHO "$complete" | $GREP " "`
37024      if test "x$has_space" != x; then
37025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37027      fi
37028      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37029    fi
37030  fi
37031
37032  # Now new_path has a complete unix path to the binary
37033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37034    # Keep paths in /bin as-is, but remove trailing .exe if any
37035    new_path="${new_path/%.exe/}"
37036    # Do not save /bin paths to all_fixpath_prefixes!
37037  else
37038    # Not in mixed or Windows style, start by that.
37039    new_path=`cmd //c echo $new_path`
37040
37041  input_path="$new_path"
37042  # Check if we need to convert this using DOS-style short mode. If the path
37043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37044  # take no chances and rewrite it.
37045  # Note: m4 eats our [], so we need to use [ and ] instead.
37046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37047  if test "x$has_forbidden_chars" != x; then
37048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37050  fi
37051
37052    # Output is in $new_path
37053
37054  windows_path="$new_path"
37055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37056    unix_path=`$CYGPATH -u "$windows_path"`
37057    new_path="$unix_path"
37058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37060    new_path="$unix_path"
37061  fi
37062
37063    # remove trailing .exe if any
37064    new_path="${new_path/%.exe/}"
37065
37066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37068  fi
37069
37070    else
37071      # We're on a unix platform. Hooray! :)
37072      # First separate the path from the arguments. This will split at the first
37073      # space.
37074      complete="$MT"
37075      path="${complete%% *}"
37076      tmp="$complete EOL"
37077      arguments="${tmp#* }"
37078
37079      # Cannot rely on the command "which" here since it doesn't always work.
37080      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37081      if test -z "$is_absolute_path"; then
37082        # Path to executable is not absolute. Find it.
37083        IFS_save="$IFS"
37084        IFS=:
37085        for p in $PATH; do
37086          if test -f "$p/$path" && test -x "$p/$path"; then
37087            new_path="$p/$path"
37088            break
37089          fi
37090        done
37091        IFS="$IFS_save"
37092      else
37093        # This is an absolute path, we can use it without further modifications.
37094        new_path="$path"
37095      fi
37096
37097      if test "x$new_path" = x; then
37098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37099$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37100        has_space=`$ECHO "$complete" | $GREP " "`
37101        if test "x$has_space" != x; then
37102          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37104        fi
37105        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37106      fi
37107    fi
37108
37109    # Now join together the path and the arguments once again
37110    if test "x$arguments" != xEOL; then
37111      new_complete="$new_path ${arguments% *}"
37112    else
37113      new_complete="$new_path"
37114    fi
37115
37116    if test "x$complete" != "x$new_complete"; then
37117      MT="$new_complete"
37118      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37119$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37120    fi
37121  fi
37122
37123    # Setup the resource compiler (RC)
37124    # Extract the first word of "rc", so it can be a program name with args.
37125set dummy rc; ac_word=$2
37126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37127$as_echo_n "checking for $ac_word... " >&6; }
37128if ${ac_cv_prog_RC+:} false; then :
37129  $as_echo_n "(cached) " >&6
37130else
37131  if test -n "$RC"; then
37132  ac_cv_prog_RC="$RC" # Let the user override the test.
37133else
37134  ac_prog_rejected=no
37135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37136for as_dir in $PATH
37137do
37138  IFS=$as_save_IFS
37139  test -z "$as_dir" && as_dir=.
37140    for ac_exec_ext in '' $ac_executable_extensions; do
37141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37142    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37143       ac_prog_rejected=yes
37144       continue
37145     fi
37146    ac_cv_prog_RC="rc"
37147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37148    break 2
37149  fi
37150done
37151  done
37152IFS=$as_save_IFS
37153
37154if test $ac_prog_rejected = yes; then
37155  # We found a bogon in the path, so make sure we never use it.
37156  set dummy $ac_cv_prog_RC
37157  shift
37158  if test $# != 0; then
37159    # We chose a different compiler from the bogus one.
37160    # However, it has the same basename, so the bogon will be chosen
37161    # first if we set RC to just the basename; use the full file name.
37162    shift
37163    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37164  fi
37165fi
37166fi
37167fi
37168RC=$ac_cv_prog_RC
37169if test -n "$RC"; then
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37171$as_echo "$RC" >&6; }
37172else
37173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37174$as_echo "no" >&6; }
37175fi
37176
37177
37178
37179  # Only process if variable expands to non-empty
37180
37181  if test "x$RC" != x; then
37182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37183
37184  # First separate the path from the arguments. This will split at the first
37185  # space.
37186  complete="$RC"
37187  path="${complete%% *}"
37188  tmp="$complete EOL"
37189  arguments="${tmp#* }"
37190
37191  # Input might be given as Windows format, start by converting to
37192  # unix format.
37193  new_path=`$CYGPATH -u "$path"`
37194
37195  # Now try to locate executable using which
37196  new_path=`$WHICH "$new_path" 2> /dev/null`
37197  # bat and cmd files are not always considered executable in cygwin causing which
37198  # to not find them
37199  if test "x$new_path" = x \
37200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37202    new_path=`$CYGPATH -u "$path"`
37203  fi
37204  if test "x$new_path" = x; then
37205    # Oops. Which didn't find the executable.
37206    # The splitting of arguments from the executable at a space might have been incorrect,
37207    # since paths with space are more likely in Windows. Give it another try with the whole
37208    # argument.
37209    path="$complete"
37210    arguments="EOL"
37211    new_path=`$CYGPATH -u "$path"`
37212    new_path=`$WHICH "$new_path" 2> /dev/null`
37213    # bat and cmd files are not always considered executable in cygwin causing which
37214    # to not find them
37215    if test "x$new_path" = x \
37216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37218      new_path=`$CYGPATH -u "$path"`
37219    fi
37220    if test "x$new_path" = x; then
37221      # It's still not found. Now this is an unrecoverable error.
37222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37223$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37224      has_space=`$ECHO "$complete" | $GREP " "`
37225      if test "x$has_space" != x; then
37226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37228      fi
37229      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37230    fi
37231  fi
37232
37233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37236  # "foo.exe" is OK but "foo" is an error.
37237  #
37238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37239  # It is also a way to make sure we got the proper file name for the real test later on.
37240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37241  if test "x$test_shortpath" = x; then
37242    # Short path failed, file does not exist as specified.
37243    # Try adding .exe or .cmd
37244    if test -f "${new_path}.exe"; then
37245      input_to_shortpath="${new_path}.exe"
37246    elif test -f "${new_path}.cmd"; then
37247      input_to_shortpath="${new_path}.cmd"
37248    else
37249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37250$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37253      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37254    fi
37255  else
37256    input_to_shortpath="$new_path"
37257  fi
37258
37259  # Call helper function which possibly converts this using DOS-style short mode.
37260  # If so, the updated path is stored in $new_path.
37261  new_path="$input_to_shortpath"
37262
37263  input_path="$input_to_shortpath"
37264  # Check if we need to convert this using DOS-style short mode. If the path
37265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37266  # take no chances and rewrite it.
37267  # Note: m4 eats our [], so we need to use [ and ] instead.
37268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37269  if test "x$has_forbidden_chars" != x; then
37270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37274      # Going to short mode and back again did indeed matter. Since short mode is
37275      # case insensitive, let's make it lowercase to improve readability.
37276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37277      # Now convert it back to Unix-style (cygpath)
37278      input_path=`$CYGPATH -u "$shortmode_path"`
37279      new_path="$input_path"
37280    fi
37281  fi
37282
37283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37284  if test "x$test_cygdrive_prefix" = x; then
37285    # As a simple fix, exclude /usr/bin since it's not a real path.
37286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37288      # a path prefixed by /cygdrive for fixpath to work.
37289      new_path="$CYGWIN_ROOT_PATH$input_path"
37290    fi
37291  fi
37292
37293  # remove trailing .exe if any
37294  new_path="${new_path/%.exe/}"
37295
37296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37297
37298  # First separate the path from the arguments. This will split at the first
37299  # space.
37300  complete="$RC"
37301  path="${complete%% *}"
37302  tmp="$complete EOL"
37303  arguments="${tmp#* }"
37304
37305  # Input might be given as Windows format, start by converting to
37306  # unix format.
37307  new_path="$path"
37308
37309  windows_path="$new_path"
37310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37311    unix_path=`$CYGPATH -u "$windows_path"`
37312    new_path="$unix_path"
37313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37315    new_path="$unix_path"
37316  fi
37317
37318
37319  # Now try to locate executable using which
37320  new_path=`$WHICH "$new_path" 2> /dev/null`
37321
37322  if test "x$new_path" = x; then
37323    # Oops. Which didn't find the executable.
37324    # The splitting of arguments from the executable at a space might have been incorrect,
37325    # since paths with space are more likely in Windows. Give it another try with the whole
37326    # argument.
37327    path="$complete"
37328    arguments="EOL"
37329    new_path="$path"
37330
37331  windows_path="$new_path"
37332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37333    unix_path=`$CYGPATH -u "$windows_path"`
37334    new_path="$unix_path"
37335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37337    new_path="$unix_path"
37338  fi
37339
37340
37341    new_path=`$WHICH "$new_path" 2> /dev/null`
37342    # bat and cmd files are not always considered executable in MSYS causing which
37343    # to not find them
37344    if test "x$new_path" = x \
37345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37347      new_path="$path"
37348
37349  windows_path="$new_path"
37350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37351    unix_path=`$CYGPATH -u "$windows_path"`
37352    new_path="$unix_path"
37353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37355    new_path="$unix_path"
37356  fi
37357
37358    fi
37359
37360    if test "x$new_path" = x; then
37361      # It's still not found. Now this is an unrecoverable error.
37362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37363$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37364      has_space=`$ECHO "$complete" | $GREP " "`
37365      if test "x$has_space" != x; then
37366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37368      fi
37369      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37370    fi
37371  fi
37372
37373  # Now new_path has a complete unix path to the binary
37374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37375    # Keep paths in /bin as-is, but remove trailing .exe if any
37376    new_path="${new_path/%.exe/}"
37377    # Do not save /bin paths to all_fixpath_prefixes!
37378  else
37379    # Not in mixed or Windows style, start by that.
37380    new_path=`cmd //c echo $new_path`
37381
37382  input_path="$new_path"
37383  # Check if we need to convert this using DOS-style short mode. If the path
37384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37385  # take no chances and rewrite it.
37386  # Note: m4 eats our [], so we need to use [ and ] instead.
37387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37388  if test "x$has_forbidden_chars" != x; then
37389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37391  fi
37392
37393    # Output is in $new_path
37394
37395  windows_path="$new_path"
37396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37397    unix_path=`$CYGPATH -u "$windows_path"`
37398    new_path="$unix_path"
37399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37401    new_path="$unix_path"
37402  fi
37403
37404    # remove trailing .exe if any
37405    new_path="${new_path/%.exe/}"
37406
37407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37409  fi
37410
37411    else
37412      # We're on a unix platform. Hooray! :)
37413      # First separate the path from the arguments. This will split at the first
37414      # space.
37415      complete="$RC"
37416      path="${complete%% *}"
37417      tmp="$complete EOL"
37418      arguments="${tmp#* }"
37419
37420      # Cannot rely on the command "which" here since it doesn't always work.
37421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37422      if test -z "$is_absolute_path"; then
37423        # Path to executable is not absolute. Find it.
37424        IFS_save="$IFS"
37425        IFS=:
37426        for p in $PATH; do
37427          if test -f "$p/$path" && test -x "$p/$path"; then
37428            new_path="$p/$path"
37429            break
37430          fi
37431        done
37432        IFS="$IFS_save"
37433      else
37434        # This is an absolute path, we can use it without further modifications.
37435        new_path="$path"
37436      fi
37437
37438      if test "x$new_path" = x; then
37439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37440$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37441        has_space=`$ECHO "$complete" | $GREP " "`
37442        if test "x$has_space" != x; then
37443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37445        fi
37446        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37447      fi
37448    fi
37449
37450    # Now join together the path and the arguments once again
37451    if test "x$arguments" != xEOL; then
37452      new_complete="$new_path ${arguments% *}"
37453    else
37454      new_complete="$new_path"
37455    fi
37456
37457    if test "x$complete" != "x$new_complete"; then
37458      RC="$new_complete"
37459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37460$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37461    fi
37462  fi
37463
37464    # Extract the first word of "dumpbin", so it can be a program name with args.
37465set dummy dumpbin; ac_word=$2
37466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37467$as_echo_n "checking for $ac_word... " >&6; }
37468if ${ac_cv_prog_DUMPBIN+:} false; then :
37469  $as_echo_n "(cached) " >&6
37470else
37471  if test -n "$DUMPBIN"; then
37472  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37473else
37474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37475for as_dir in $PATH
37476do
37477  IFS=$as_save_IFS
37478  test -z "$as_dir" && as_dir=.
37479    for ac_exec_ext in '' $ac_executable_extensions; do
37480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37481    ac_cv_prog_DUMPBIN="dumpbin"
37482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37483    break 2
37484  fi
37485done
37486  done
37487IFS=$as_save_IFS
37488
37489fi
37490fi
37491DUMPBIN=$ac_cv_prog_DUMPBIN
37492if test -n "$DUMPBIN"; then
37493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37494$as_echo "$DUMPBIN" >&6; }
37495else
37496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37497$as_echo "no" >&6; }
37498fi
37499
37500
37501
37502  # Only process if variable expands to non-empty
37503
37504  if test "x$DUMPBIN" != x; then
37505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37506
37507  # First separate the path from the arguments. This will split at the first
37508  # space.
37509  complete="$DUMPBIN"
37510  path="${complete%% *}"
37511  tmp="$complete EOL"
37512  arguments="${tmp#* }"
37513
37514  # Input might be given as Windows format, start by converting to
37515  # unix format.
37516  new_path=`$CYGPATH -u "$path"`
37517
37518  # Now try to locate executable using which
37519  new_path=`$WHICH "$new_path" 2> /dev/null`
37520  # bat and cmd files are not always considered executable in cygwin causing which
37521  # to not find them
37522  if test "x$new_path" = x \
37523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37525    new_path=`$CYGPATH -u "$path"`
37526  fi
37527  if test "x$new_path" = x; then
37528    # Oops. Which didn't find the executable.
37529    # The splitting of arguments from the executable at a space might have been incorrect,
37530    # since paths with space are more likely in Windows. Give it another try with the whole
37531    # argument.
37532    path="$complete"
37533    arguments="EOL"
37534    new_path=`$CYGPATH -u "$path"`
37535    new_path=`$WHICH "$new_path" 2> /dev/null`
37536    # bat and cmd files are not always considered executable in cygwin causing which
37537    # to not find them
37538    if test "x$new_path" = x \
37539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37541      new_path=`$CYGPATH -u "$path"`
37542    fi
37543    if test "x$new_path" = x; then
37544      # It's still not found. Now this is an unrecoverable error.
37545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37546$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37547      has_space=`$ECHO "$complete" | $GREP " "`
37548      if test "x$has_space" != x; then
37549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37551      fi
37552      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37553    fi
37554  fi
37555
37556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37559  # "foo.exe" is OK but "foo" is an error.
37560  #
37561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37562  # It is also a way to make sure we got the proper file name for the real test later on.
37563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37564  if test "x$test_shortpath" = x; then
37565    # Short path failed, file does not exist as specified.
37566    # Try adding .exe or .cmd
37567    if test -f "${new_path}.exe"; then
37568      input_to_shortpath="${new_path}.exe"
37569    elif test -f "${new_path}.cmd"; then
37570      input_to_shortpath="${new_path}.cmd"
37571    else
37572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37573$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37576      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37577    fi
37578  else
37579    input_to_shortpath="$new_path"
37580  fi
37581
37582  # Call helper function which possibly converts this using DOS-style short mode.
37583  # If so, the updated path is stored in $new_path.
37584  new_path="$input_to_shortpath"
37585
37586  input_path="$input_to_shortpath"
37587  # Check if we need to convert this using DOS-style short mode. If the path
37588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37589  # take no chances and rewrite it.
37590  # Note: m4 eats our [], so we need to use [ and ] instead.
37591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37592  if test "x$has_forbidden_chars" != x; then
37593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37597      # Going to short mode and back again did indeed matter. Since short mode is
37598      # case insensitive, let's make it lowercase to improve readability.
37599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37600      # Now convert it back to Unix-style (cygpath)
37601      input_path=`$CYGPATH -u "$shortmode_path"`
37602      new_path="$input_path"
37603    fi
37604  fi
37605
37606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37607  if test "x$test_cygdrive_prefix" = x; then
37608    # As a simple fix, exclude /usr/bin since it's not a real path.
37609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37611      # a path prefixed by /cygdrive for fixpath to work.
37612      new_path="$CYGWIN_ROOT_PATH$input_path"
37613    fi
37614  fi
37615
37616  # remove trailing .exe if any
37617  new_path="${new_path/%.exe/}"
37618
37619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37620
37621  # First separate the path from the arguments. This will split at the first
37622  # space.
37623  complete="$DUMPBIN"
37624  path="${complete%% *}"
37625  tmp="$complete EOL"
37626  arguments="${tmp#* }"
37627
37628  # Input might be given as Windows format, start by converting to
37629  # unix format.
37630  new_path="$path"
37631
37632  windows_path="$new_path"
37633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37634    unix_path=`$CYGPATH -u "$windows_path"`
37635    new_path="$unix_path"
37636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37638    new_path="$unix_path"
37639  fi
37640
37641
37642  # Now try to locate executable using which
37643  new_path=`$WHICH "$new_path" 2> /dev/null`
37644
37645  if test "x$new_path" = x; then
37646    # Oops. Which didn't find the executable.
37647    # The splitting of arguments from the executable at a space might have been incorrect,
37648    # since paths with space are more likely in Windows. Give it another try with the whole
37649    # argument.
37650    path="$complete"
37651    arguments="EOL"
37652    new_path="$path"
37653
37654  windows_path="$new_path"
37655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37656    unix_path=`$CYGPATH -u "$windows_path"`
37657    new_path="$unix_path"
37658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37660    new_path="$unix_path"
37661  fi
37662
37663
37664    new_path=`$WHICH "$new_path" 2> /dev/null`
37665    # bat and cmd files are not always considered executable in MSYS causing which
37666    # to not find them
37667    if test "x$new_path" = x \
37668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37670      new_path="$path"
37671
37672  windows_path="$new_path"
37673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37674    unix_path=`$CYGPATH -u "$windows_path"`
37675    new_path="$unix_path"
37676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37678    new_path="$unix_path"
37679  fi
37680
37681    fi
37682
37683    if test "x$new_path" = x; then
37684      # It's still not found. Now this is an unrecoverable error.
37685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37686$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37687      has_space=`$ECHO "$complete" | $GREP " "`
37688      if test "x$has_space" != x; then
37689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37691      fi
37692      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37693    fi
37694  fi
37695
37696  # Now new_path has a complete unix path to the binary
37697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37698    # Keep paths in /bin as-is, but remove trailing .exe if any
37699    new_path="${new_path/%.exe/}"
37700    # Do not save /bin paths to all_fixpath_prefixes!
37701  else
37702    # Not in mixed or Windows style, start by that.
37703    new_path=`cmd //c echo $new_path`
37704
37705  input_path="$new_path"
37706  # Check if we need to convert this using DOS-style short mode. If the path
37707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37708  # take no chances and rewrite it.
37709  # Note: m4 eats our [], so we need to use [ and ] instead.
37710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37711  if test "x$has_forbidden_chars" != x; then
37712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37714  fi
37715
37716    # Output is in $new_path
37717
37718  windows_path="$new_path"
37719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37720    unix_path=`$CYGPATH -u "$windows_path"`
37721    new_path="$unix_path"
37722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37724    new_path="$unix_path"
37725  fi
37726
37727    # remove trailing .exe if any
37728    new_path="${new_path/%.exe/}"
37729
37730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37732  fi
37733
37734    else
37735      # We're on a unix platform. Hooray! :)
37736      # First separate the path from the arguments. This will split at the first
37737      # space.
37738      complete="$DUMPBIN"
37739      path="${complete%% *}"
37740      tmp="$complete EOL"
37741      arguments="${tmp#* }"
37742
37743      # Cannot rely on the command "which" here since it doesn't always work.
37744      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37745      if test -z "$is_absolute_path"; then
37746        # Path to executable is not absolute. Find it.
37747        IFS_save="$IFS"
37748        IFS=:
37749        for p in $PATH; do
37750          if test -f "$p/$path" && test -x "$p/$path"; then
37751            new_path="$p/$path"
37752            break
37753          fi
37754        done
37755        IFS="$IFS_save"
37756      else
37757        # This is an absolute path, we can use it without further modifications.
37758        new_path="$path"
37759      fi
37760
37761      if test "x$new_path" = x; then
37762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37763$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37764        has_space=`$ECHO "$complete" | $GREP " "`
37765        if test "x$has_space" != x; then
37766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37768        fi
37769        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37770      fi
37771    fi
37772
37773    # Now join together the path and the arguments once again
37774    if test "x$arguments" != xEOL; then
37775      new_complete="$new_path ${arguments% *}"
37776    else
37777      new_complete="$new_path"
37778    fi
37779
37780    if test "x$complete" != "x$new_complete"; then
37781      DUMPBIN="$new_complete"
37782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37783$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37784    fi
37785  fi
37786
37787    # We need to check for 'msbuild.exe' because at the place where we expect to
37788    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37789    # won't find the 'msbuild.exe' executable in that case (and the
37790    # 'ac_executable_extensions' is unusable due to performance reasons).
37791    # Notice that we intentionally don't fix up the path to MSBUILD because we
37792    # will call it in a DOS shell during freetype detection on Windows (see
37793    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37794    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37795set dummy msbuild.exe; ac_word=$2
37796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37797$as_echo_n "checking for $ac_word... " >&6; }
37798if ${ac_cv_prog_MSBUILD+:} false; then :
37799  $as_echo_n "(cached) " >&6
37800else
37801  if test -n "$MSBUILD"; then
37802  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37803else
37804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37805for as_dir in $PATH
37806do
37807  IFS=$as_save_IFS
37808  test -z "$as_dir" && as_dir=.
37809    for ac_exec_ext in '' $ac_executable_extensions; do
37810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37811    ac_cv_prog_MSBUILD="msbuild.exe"
37812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37813    break 2
37814  fi
37815done
37816  done
37817IFS=$as_save_IFS
37818
37819fi
37820fi
37821MSBUILD=$ac_cv_prog_MSBUILD
37822if test -n "$MSBUILD"; then
37823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37824$as_echo "$MSBUILD" >&6; }
37825else
37826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37827$as_echo "no" >&6; }
37828fi
37829
37830
37831  fi
37832
37833  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37834
37835
37836  # Publish this variable in the help.
37837
37838
37839  if [ -z "${STRIP+x}" ]; then
37840    # The variable is not set by user, try to locate tool using the code snippet
37841    for ac_prog in strip
37842do
37843  # Extract the first word of "$ac_prog", so it can be a program name with args.
37844set dummy $ac_prog; ac_word=$2
37845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37846$as_echo_n "checking for $ac_word... " >&6; }
37847if ${ac_cv_path_STRIP+:} false; then :
37848  $as_echo_n "(cached) " >&6
37849else
37850  case $STRIP in
37851  [\\/]* | ?:[\\/]*)
37852  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37853  ;;
37854  *)
37855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37856for as_dir in $PATH
37857do
37858  IFS=$as_save_IFS
37859  test -z "$as_dir" && as_dir=.
37860    for ac_exec_ext in '' $ac_executable_extensions; do
37861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37862    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37864    break 2
37865  fi
37866done
37867  done
37868IFS=$as_save_IFS
37869
37870  ;;
37871esac
37872fi
37873STRIP=$ac_cv_path_STRIP
37874if test -n "$STRIP"; then
37875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37876$as_echo "$STRIP" >&6; }
37877else
37878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37879$as_echo "no" >&6; }
37880fi
37881
37882
37883  test -n "$STRIP" && break
37884done
37885
37886  else
37887    # The variable is set, but is it from the command line or the environment?
37888
37889    # Try to remove the string !STRIP! from our list.
37890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37892      # If it failed, the variable was not from the command line. Ignore it,
37893      # but warn the user (except for BASH, which is always set by the calling BASH).
37894      if test "xSTRIP" != xBASH; then
37895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37896$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37897      fi
37898      # Try to locate tool using the code snippet
37899      for ac_prog in strip
37900do
37901  # Extract the first word of "$ac_prog", so it can be a program name with args.
37902set dummy $ac_prog; ac_word=$2
37903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37904$as_echo_n "checking for $ac_word... " >&6; }
37905if ${ac_cv_path_STRIP+:} false; then :
37906  $as_echo_n "(cached) " >&6
37907else
37908  case $STRIP in
37909  [\\/]* | ?:[\\/]*)
37910  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37911  ;;
37912  *)
37913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37914for as_dir in $PATH
37915do
37916  IFS=$as_save_IFS
37917  test -z "$as_dir" && as_dir=.
37918    for ac_exec_ext in '' $ac_executable_extensions; do
37919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37920    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37922    break 2
37923  fi
37924done
37925  done
37926IFS=$as_save_IFS
37927
37928  ;;
37929esac
37930fi
37931STRIP=$ac_cv_path_STRIP
37932if test -n "$STRIP"; then
37933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37934$as_echo "$STRIP" >&6; }
37935else
37936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37937$as_echo "no" >&6; }
37938fi
37939
37940
37941  test -n "$STRIP" && break
37942done
37943
37944    else
37945      # If it succeeded, then it was overridden by the user. We will use it
37946      # for the tool.
37947
37948      # First remove it from the list of overridden variables, so we can test
37949      # for unknown variables in the end.
37950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37951
37952      # Check if we try to supply an empty value
37953      if test "x$STRIP" = x; then
37954        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37955$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37957$as_echo_n "checking for STRIP... " >&6; }
37958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37959$as_echo "disabled" >&6; }
37960      else
37961        # Check if the provided tool contains a complete path.
37962        tool_specified="$STRIP"
37963        tool_basename="${tool_specified##*/}"
37964        if test "x$tool_basename" = "x$tool_specified"; then
37965          # A command without a complete path is provided, search $PATH.
37966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37967$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37968          # Extract the first word of "$tool_basename", so it can be a program name with args.
37969set dummy $tool_basename; ac_word=$2
37970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37971$as_echo_n "checking for $ac_word... " >&6; }
37972if ${ac_cv_path_STRIP+:} false; then :
37973  $as_echo_n "(cached) " >&6
37974else
37975  case $STRIP in
37976  [\\/]* | ?:[\\/]*)
37977  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37978  ;;
37979  *)
37980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37981for as_dir in $PATH
37982do
37983  IFS=$as_save_IFS
37984  test -z "$as_dir" && as_dir=.
37985    for ac_exec_ext in '' $ac_executable_extensions; do
37986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37987    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37989    break 2
37990  fi
37991done
37992  done
37993IFS=$as_save_IFS
37994
37995  ;;
37996esac
37997fi
37998STRIP=$ac_cv_path_STRIP
37999if test -n "$STRIP"; then
38000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38001$as_echo "$STRIP" >&6; }
38002else
38003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38004$as_echo "no" >&6; }
38005fi
38006
38007
38008          if test "x$STRIP" = x; then
38009            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38010          fi
38011        else
38012          # Otherwise we believe it is a complete path. Use it as it is.
38013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38014$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38016$as_echo_n "checking for STRIP... " >&6; }
38017          if test ! -x "$tool_specified"; then
38018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38019$as_echo "not found" >&6; }
38020            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38021          fi
38022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38023$as_echo "$tool_specified" >&6; }
38024        fi
38025      fi
38026    fi
38027
38028  fi
38029
38030
38031
38032  # Only process if variable expands to non-empty
38033
38034  if test "x$STRIP" != x; then
38035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38036
38037  # First separate the path from the arguments. This will split at the first
38038  # space.
38039  complete="$STRIP"
38040  path="${complete%% *}"
38041  tmp="$complete EOL"
38042  arguments="${tmp#* }"
38043
38044  # Input might be given as Windows format, start by converting to
38045  # unix format.
38046  new_path=`$CYGPATH -u "$path"`
38047
38048  # Now try to locate executable using which
38049  new_path=`$WHICH "$new_path" 2> /dev/null`
38050  # bat and cmd files are not always considered executable in cygwin causing which
38051  # to not find them
38052  if test "x$new_path" = x \
38053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38055    new_path=`$CYGPATH -u "$path"`
38056  fi
38057  if test "x$new_path" = x; then
38058    # Oops. Which didn't find the executable.
38059    # The splitting of arguments from the executable at a space might have been incorrect,
38060    # since paths with space are more likely in Windows. Give it another try with the whole
38061    # argument.
38062    path="$complete"
38063    arguments="EOL"
38064    new_path=`$CYGPATH -u "$path"`
38065    new_path=`$WHICH "$new_path" 2> /dev/null`
38066    # bat and cmd files are not always considered executable in cygwin causing which
38067    # to not find them
38068    if test "x$new_path" = x \
38069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38071      new_path=`$CYGPATH -u "$path"`
38072    fi
38073    if test "x$new_path" = x; then
38074      # It's still not found. Now this is an unrecoverable error.
38075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38076$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38077      has_space=`$ECHO "$complete" | $GREP " "`
38078      if test "x$has_space" != x; then
38079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38081      fi
38082      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38083    fi
38084  fi
38085
38086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38089  # "foo.exe" is OK but "foo" is an error.
38090  #
38091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38092  # It is also a way to make sure we got the proper file name for the real test later on.
38093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38094  if test "x$test_shortpath" = x; then
38095    # Short path failed, file does not exist as specified.
38096    # Try adding .exe or .cmd
38097    if test -f "${new_path}.exe"; then
38098      input_to_shortpath="${new_path}.exe"
38099    elif test -f "${new_path}.cmd"; then
38100      input_to_shortpath="${new_path}.cmd"
38101    else
38102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38103$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38106      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38107    fi
38108  else
38109    input_to_shortpath="$new_path"
38110  fi
38111
38112  # Call helper function which possibly converts this using DOS-style short mode.
38113  # If so, the updated path is stored in $new_path.
38114  new_path="$input_to_shortpath"
38115
38116  input_path="$input_to_shortpath"
38117  # Check if we need to convert this using DOS-style short mode. If the path
38118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38119  # take no chances and rewrite it.
38120  # Note: m4 eats our [], so we need to use [ and ] instead.
38121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38122  if test "x$has_forbidden_chars" != x; then
38123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38127      # Going to short mode and back again did indeed matter. Since short mode is
38128      # case insensitive, let's make it lowercase to improve readability.
38129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38130      # Now convert it back to Unix-style (cygpath)
38131      input_path=`$CYGPATH -u "$shortmode_path"`
38132      new_path="$input_path"
38133    fi
38134  fi
38135
38136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38137  if test "x$test_cygdrive_prefix" = x; then
38138    # As a simple fix, exclude /usr/bin since it's not a real path.
38139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38141      # a path prefixed by /cygdrive for fixpath to work.
38142      new_path="$CYGWIN_ROOT_PATH$input_path"
38143    fi
38144  fi
38145
38146  # remove trailing .exe if any
38147  new_path="${new_path/%.exe/}"
38148
38149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38150
38151  # First separate the path from the arguments. This will split at the first
38152  # space.
38153  complete="$STRIP"
38154  path="${complete%% *}"
38155  tmp="$complete EOL"
38156  arguments="${tmp#* }"
38157
38158  # Input might be given as Windows format, start by converting to
38159  # unix format.
38160  new_path="$path"
38161
38162  windows_path="$new_path"
38163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38164    unix_path=`$CYGPATH -u "$windows_path"`
38165    new_path="$unix_path"
38166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38168    new_path="$unix_path"
38169  fi
38170
38171
38172  # Now try to locate executable using which
38173  new_path=`$WHICH "$new_path" 2> /dev/null`
38174
38175  if test "x$new_path" = x; then
38176    # Oops. Which didn't find the executable.
38177    # The splitting of arguments from the executable at a space might have been incorrect,
38178    # since paths with space are more likely in Windows. Give it another try with the whole
38179    # argument.
38180    path="$complete"
38181    arguments="EOL"
38182    new_path="$path"
38183
38184  windows_path="$new_path"
38185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38186    unix_path=`$CYGPATH -u "$windows_path"`
38187    new_path="$unix_path"
38188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38190    new_path="$unix_path"
38191  fi
38192
38193
38194    new_path=`$WHICH "$new_path" 2> /dev/null`
38195    # bat and cmd files are not always considered executable in MSYS causing which
38196    # to not find them
38197    if test "x$new_path" = x \
38198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38200      new_path="$path"
38201
38202  windows_path="$new_path"
38203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38204    unix_path=`$CYGPATH -u "$windows_path"`
38205    new_path="$unix_path"
38206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38208    new_path="$unix_path"
38209  fi
38210
38211    fi
38212
38213    if test "x$new_path" = x; then
38214      # It's still not found. Now this is an unrecoverable error.
38215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38216$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38217      has_space=`$ECHO "$complete" | $GREP " "`
38218      if test "x$has_space" != x; then
38219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38221      fi
38222      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38223    fi
38224  fi
38225
38226  # Now new_path has a complete unix path to the binary
38227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38228    # Keep paths in /bin as-is, but remove trailing .exe if any
38229    new_path="${new_path/%.exe/}"
38230    # Do not save /bin paths to all_fixpath_prefixes!
38231  else
38232    # Not in mixed or Windows style, start by that.
38233    new_path=`cmd //c echo $new_path`
38234
38235  input_path="$new_path"
38236  # Check if we need to convert this using DOS-style short mode. If the path
38237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38238  # take no chances and rewrite it.
38239  # Note: m4 eats our [], so we need to use [ and ] instead.
38240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38241  if test "x$has_forbidden_chars" != x; then
38242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38244  fi
38245
38246    # Output is in $new_path
38247
38248  windows_path="$new_path"
38249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38250    unix_path=`$CYGPATH -u "$windows_path"`
38251    new_path="$unix_path"
38252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38254    new_path="$unix_path"
38255  fi
38256
38257    # remove trailing .exe if any
38258    new_path="${new_path/%.exe/}"
38259
38260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38262  fi
38263
38264    else
38265      # We're on a unix platform. Hooray! :)
38266      # First separate the path from the arguments. This will split at the first
38267      # space.
38268      complete="$STRIP"
38269      path="${complete%% *}"
38270      tmp="$complete EOL"
38271      arguments="${tmp#* }"
38272
38273      # Cannot rely on the command "which" here since it doesn't always work.
38274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38275      if test -z "$is_absolute_path"; then
38276        # Path to executable is not absolute. Find it.
38277        IFS_save="$IFS"
38278        IFS=:
38279        for p in $PATH; do
38280          if test -f "$p/$path" && test -x "$p/$path"; then
38281            new_path="$p/$path"
38282            break
38283          fi
38284        done
38285        IFS="$IFS_save"
38286      else
38287        # This is an absolute path, we can use it without further modifications.
38288        new_path="$path"
38289      fi
38290
38291      if test "x$new_path" = x; then
38292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38293$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38294        has_space=`$ECHO "$complete" | $GREP " "`
38295        if test "x$has_space" != x; then
38296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38298        fi
38299        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38300      fi
38301    fi
38302
38303    # Now join together the path and the arguments once again
38304    if test "x$arguments" != xEOL; then
38305      new_complete="$new_path ${arguments% *}"
38306    else
38307      new_complete="$new_path"
38308    fi
38309
38310    if test "x$complete" != "x$new_complete"; then
38311      STRIP="$new_complete"
38312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38313$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38314    fi
38315  fi
38316
38317
38318
38319  # Publish this variable in the help.
38320
38321
38322  if [ -z "${NM+x}" ]; then
38323    # The variable is not set by user, try to locate tool using the code snippet
38324    for ac_prog in nm
38325do
38326  # Extract the first word of "$ac_prog", so it can be a program name with args.
38327set dummy $ac_prog; ac_word=$2
38328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38329$as_echo_n "checking for $ac_word... " >&6; }
38330if ${ac_cv_path_NM+:} false; then :
38331  $as_echo_n "(cached) " >&6
38332else
38333  case $NM in
38334  [\\/]* | ?:[\\/]*)
38335  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38336  ;;
38337  *)
38338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38339for as_dir in $PATH
38340do
38341  IFS=$as_save_IFS
38342  test -z "$as_dir" && as_dir=.
38343    for ac_exec_ext in '' $ac_executable_extensions; do
38344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38345    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38347    break 2
38348  fi
38349done
38350  done
38351IFS=$as_save_IFS
38352
38353  ;;
38354esac
38355fi
38356NM=$ac_cv_path_NM
38357if test -n "$NM"; then
38358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38359$as_echo "$NM" >&6; }
38360else
38361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38362$as_echo "no" >&6; }
38363fi
38364
38365
38366  test -n "$NM" && break
38367done
38368
38369  else
38370    # The variable is set, but is it from the command line or the environment?
38371
38372    # Try to remove the string !NM! from our list.
38373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38375      # If it failed, the variable was not from the command line. Ignore it,
38376      # but warn the user (except for BASH, which is always set by the calling BASH).
38377      if test "xNM" != xBASH; then
38378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38379$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38380      fi
38381      # Try to locate tool using the code snippet
38382      for ac_prog in nm
38383do
38384  # Extract the first word of "$ac_prog", so it can be a program name with args.
38385set dummy $ac_prog; ac_word=$2
38386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38387$as_echo_n "checking for $ac_word... " >&6; }
38388if ${ac_cv_path_NM+:} false; then :
38389  $as_echo_n "(cached) " >&6
38390else
38391  case $NM in
38392  [\\/]* | ?:[\\/]*)
38393  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38394  ;;
38395  *)
38396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38397for as_dir in $PATH
38398do
38399  IFS=$as_save_IFS
38400  test -z "$as_dir" && as_dir=.
38401    for ac_exec_ext in '' $ac_executable_extensions; do
38402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38403    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38405    break 2
38406  fi
38407done
38408  done
38409IFS=$as_save_IFS
38410
38411  ;;
38412esac
38413fi
38414NM=$ac_cv_path_NM
38415if test -n "$NM"; then
38416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38417$as_echo "$NM" >&6; }
38418else
38419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38420$as_echo "no" >&6; }
38421fi
38422
38423
38424  test -n "$NM" && break
38425done
38426
38427    else
38428      # If it succeeded, then it was overridden by the user. We will use it
38429      # for the tool.
38430
38431      # First remove it from the list of overridden variables, so we can test
38432      # for unknown variables in the end.
38433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38434
38435      # Check if we try to supply an empty value
38436      if test "x$NM" = x; then
38437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38438$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38440$as_echo_n "checking for NM... " >&6; }
38441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38442$as_echo "disabled" >&6; }
38443      else
38444        # Check if the provided tool contains a complete path.
38445        tool_specified="$NM"
38446        tool_basename="${tool_specified##*/}"
38447        if test "x$tool_basename" = "x$tool_specified"; then
38448          # A command without a complete path is provided, search $PATH.
38449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38450$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38451          # Extract the first word of "$tool_basename", so it can be a program name with args.
38452set dummy $tool_basename; ac_word=$2
38453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38454$as_echo_n "checking for $ac_word... " >&6; }
38455if ${ac_cv_path_NM+:} false; then :
38456  $as_echo_n "(cached) " >&6
38457else
38458  case $NM in
38459  [\\/]* | ?:[\\/]*)
38460  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38461  ;;
38462  *)
38463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38464for as_dir in $PATH
38465do
38466  IFS=$as_save_IFS
38467  test -z "$as_dir" && as_dir=.
38468    for ac_exec_ext in '' $ac_executable_extensions; do
38469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38470    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38472    break 2
38473  fi
38474done
38475  done
38476IFS=$as_save_IFS
38477
38478  ;;
38479esac
38480fi
38481NM=$ac_cv_path_NM
38482if test -n "$NM"; then
38483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38484$as_echo "$NM" >&6; }
38485else
38486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38487$as_echo "no" >&6; }
38488fi
38489
38490
38491          if test "x$NM" = x; then
38492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38493          fi
38494        else
38495          # Otherwise we believe it is a complete path. Use it as it is.
38496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38497$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38499$as_echo_n "checking for NM... " >&6; }
38500          if test ! -x "$tool_specified"; then
38501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38502$as_echo "not found" >&6; }
38503            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38504          fi
38505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38506$as_echo "$tool_specified" >&6; }
38507        fi
38508      fi
38509    fi
38510
38511  fi
38512
38513
38514
38515  # Only process if variable expands to non-empty
38516
38517  if test "x$NM" != x; then
38518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38519
38520  # First separate the path from the arguments. This will split at the first
38521  # space.
38522  complete="$NM"
38523  path="${complete%% *}"
38524  tmp="$complete EOL"
38525  arguments="${tmp#* }"
38526
38527  # Input might be given as Windows format, start by converting to
38528  # unix format.
38529  new_path=`$CYGPATH -u "$path"`
38530
38531  # Now try to locate executable using which
38532  new_path=`$WHICH "$new_path" 2> /dev/null`
38533  # bat and cmd files are not always considered executable in cygwin causing which
38534  # to not find them
38535  if test "x$new_path" = x \
38536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38538    new_path=`$CYGPATH -u "$path"`
38539  fi
38540  if test "x$new_path" = x; then
38541    # Oops. Which didn't find the executable.
38542    # The splitting of arguments from the executable at a space might have been incorrect,
38543    # since paths with space are more likely in Windows. Give it another try with the whole
38544    # argument.
38545    path="$complete"
38546    arguments="EOL"
38547    new_path=`$CYGPATH -u "$path"`
38548    new_path=`$WHICH "$new_path" 2> /dev/null`
38549    # bat and cmd files are not always considered executable in cygwin causing which
38550    # to not find them
38551    if test "x$new_path" = x \
38552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38554      new_path=`$CYGPATH -u "$path"`
38555    fi
38556    if test "x$new_path" = x; then
38557      # It's still not found. Now this is an unrecoverable error.
38558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38559$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38560      has_space=`$ECHO "$complete" | $GREP " "`
38561      if test "x$has_space" != x; then
38562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38564      fi
38565      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38566    fi
38567  fi
38568
38569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38572  # "foo.exe" is OK but "foo" is an error.
38573  #
38574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38575  # It is also a way to make sure we got the proper file name for the real test later on.
38576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38577  if test "x$test_shortpath" = x; then
38578    # Short path failed, file does not exist as specified.
38579    # Try adding .exe or .cmd
38580    if test -f "${new_path}.exe"; then
38581      input_to_shortpath="${new_path}.exe"
38582    elif test -f "${new_path}.cmd"; then
38583      input_to_shortpath="${new_path}.cmd"
38584    else
38585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38586$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38589      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38590    fi
38591  else
38592    input_to_shortpath="$new_path"
38593  fi
38594
38595  # Call helper function which possibly converts this using DOS-style short mode.
38596  # If so, the updated path is stored in $new_path.
38597  new_path="$input_to_shortpath"
38598
38599  input_path="$input_to_shortpath"
38600  # Check if we need to convert this using DOS-style short mode. If the path
38601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38602  # take no chances and rewrite it.
38603  # Note: m4 eats our [], so we need to use [ and ] instead.
38604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38605  if test "x$has_forbidden_chars" != x; then
38606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38610      # Going to short mode and back again did indeed matter. Since short mode is
38611      # case insensitive, let's make it lowercase to improve readability.
38612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38613      # Now convert it back to Unix-style (cygpath)
38614      input_path=`$CYGPATH -u "$shortmode_path"`
38615      new_path="$input_path"
38616    fi
38617  fi
38618
38619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38620  if test "x$test_cygdrive_prefix" = x; then
38621    # As a simple fix, exclude /usr/bin since it's not a real path.
38622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38624      # a path prefixed by /cygdrive for fixpath to work.
38625      new_path="$CYGWIN_ROOT_PATH$input_path"
38626    fi
38627  fi
38628
38629  # remove trailing .exe if any
38630  new_path="${new_path/%.exe/}"
38631
38632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38633
38634  # First separate the path from the arguments. This will split at the first
38635  # space.
38636  complete="$NM"
38637  path="${complete%% *}"
38638  tmp="$complete EOL"
38639  arguments="${tmp#* }"
38640
38641  # Input might be given as Windows format, start by converting to
38642  # unix format.
38643  new_path="$path"
38644
38645  windows_path="$new_path"
38646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38647    unix_path=`$CYGPATH -u "$windows_path"`
38648    new_path="$unix_path"
38649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38651    new_path="$unix_path"
38652  fi
38653
38654
38655  # Now try to locate executable using which
38656  new_path=`$WHICH "$new_path" 2> /dev/null`
38657
38658  if test "x$new_path" = x; then
38659    # Oops. Which didn't find the executable.
38660    # The splitting of arguments from the executable at a space might have been incorrect,
38661    # since paths with space are more likely in Windows. Give it another try with the whole
38662    # argument.
38663    path="$complete"
38664    arguments="EOL"
38665    new_path="$path"
38666
38667  windows_path="$new_path"
38668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38669    unix_path=`$CYGPATH -u "$windows_path"`
38670    new_path="$unix_path"
38671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38673    new_path="$unix_path"
38674  fi
38675
38676
38677    new_path=`$WHICH "$new_path" 2> /dev/null`
38678    # bat and cmd files are not always considered executable in MSYS causing which
38679    # to not find them
38680    if test "x$new_path" = x \
38681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38683      new_path="$path"
38684
38685  windows_path="$new_path"
38686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38687    unix_path=`$CYGPATH -u "$windows_path"`
38688    new_path="$unix_path"
38689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38691    new_path="$unix_path"
38692  fi
38693
38694    fi
38695
38696    if test "x$new_path" = x; then
38697      # It's still not found. Now this is an unrecoverable error.
38698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38699$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38700      has_space=`$ECHO "$complete" | $GREP " "`
38701      if test "x$has_space" != x; then
38702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38704      fi
38705      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38706    fi
38707  fi
38708
38709  # Now new_path has a complete unix path to the binary
38710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38711    # Keep paths in /bin as-is, but remove trailing .exe if any
38712    new_path="${new_path/%.exe/}"
38713    # Do not save /bin paths to all_fixpath_prefixes!
38714  else
38715    # Not in mixed or Windows style, start by that.
38716    new_path=`cmd //c echo $new_path`
38717
38718  input_path="$new_path"
38719  # Check if we need to convert this using DOS-style short mode. If the path
38720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38721  # take no chances and rewrite it.
38722  # Note: m4 eats our [], so we need to use [ and ] instead.
38723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38724  if test "x$has_forbidden_chars" != x; then
38725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38727  fi
38728
38729    # Output is in $new_path
38730
38731  windows_path="$new_path"
38732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38733    unix_path=`$CYGPATH -u "$windows_path"`
38734    new_path="$unix_path"
38735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38737    new_path="$unix_path"
38738  fi
38739
38740    # remove trailing .exe if any
38741    new_path="${new_path/%.exe/}"
38742
38743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38745  fi
38746
38747    else
38748      # We're on a unix platform. Hooray! :)
38749      # First separate the path from the arguments. This will split at the first
38750      # space.
38751      complete="$NM"
38752      path="${complete%% *}"
38753      tmp="$complete EOL"
38754      arguments="${tmp#* }"
38755
38756      # Cannot rely on the command "which" here since it doesn't always work.
38757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38758      if test -z "$is_absolute_path"; then
38759        # Path to executable is not absolute. Find it.
38760        IFS_save="$IFS"
38761        IFS=:
38762        for p in $PATH; do
38763          if test -f "$p/$path" && test -x "$p/$path"; then
38764            new_path="$p/$path"
38765            break
38766          fi
38767        done
38768        IFS="$IFS_save"
38769      else
38770        # This is an absolute path, we can use it without further modifications.
38771        new_path="$path"
38772      fi
38773
38774      if test "x$new_path" = x; then
38775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38776$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38777        has_space=`$ECHO "$complete" | $GREP " "`
38778        if test "x$has_space" != x; then
38779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38781        fi
38782        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38783      fi
38784    fi
38785
38786    # Now join together the path and the arguments once again
38787    if test "x$arguments" != xEOL; then
38788      new_complete="$new_path ${arguments% *}"
38789    else
38790      new_complete="$new_path"
38791    fi
38792
38793    if test "x$complete" != "x$new_complete"; then
38794      NM="$new_complete"
38795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38796$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38797    fi
38798  fi
38799
38800
38801
38802  # Publish this variable in the help.
38803
38804
38805  if [ -z "${GNM+x}" ]; then
38806    # The variable is not set by user, try to locate tool using the code snippet
38807    for ac_prog in gnm
38808do
38809  # Extract the first word of "$ac_prog", so it can be a program name with args.
38810set dummy $ac_prog; ac_word=$2
38811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38812$as_echo_n "checking for $ac_word... " >&6; }
38813if ${ac_cv_path_GNM+:} false; then :
38814  $as_echo_n "(cached) " >&6
38815else
38816  case $GNM in
38817  [\\/]* | ?:[\\/]*)
38818  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38819  ;;
38820  *)
38821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38822for as_dir in $PATH
38823do
38824  IFS=$as_save_IFS
38825  test -z "$as_dir" && as_dir=.
38826    for ac_exec_ext in '' $ac_executable_extensions; do
38827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38828    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38830    break 2
38831  fi
38832done
38833  done
38834IFS=$as_save_IFS
38835
38836  ;;
38837esac
38838fi
38839GNM=$ac_cv_path_GNM
38840if test -n "$GNM"; then
38841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38842$as_echo "$GNM" >&6; }
38843else
38844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38845$as_echo "no" >&6; }
38846fi
38847
38848
38849  test -n "$GNM" && break
38850done
38851
38852  else
38853    # The variable is set, but is it from the command line or the environment?
38854
38855    # Try to remove the string !GNM! from our list.
38856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38858      # If it failed, the variable was not from the command line. Ignore it,
38859      # but warn the user (except for BASH, which is always set by the calling BASH).
38860      if test "xGNM" != xBASH; then
38861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38862$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38863      fi
38864      # Try to locate tool using the code snippet
38865      for ac_prog in gnm
38866do
38867  # Extract the first word of "$ac_prog", so it can be a program name with args.
38868set dummy $ac_prog; ac_word=$2
38869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38870$as_echo_n "checking for $ac_word... " >&6; }
38871if ${ac_cv_path_GNM+:} false; then :
38872  $as_echo_n "(cached) " >&6
38873else
38874  case $GNM in
38875  [\\/]* | ?:[\\/]*)
38876  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38877  ;;
38878  *)
38879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38880for as_dir in $PATH
38881do
38882  IFS=$as_save_IFS
38883  test -z "$as_dir" && as_dir=.
38884    for ac_exec_ext in '' $ac_executable_extensions; do
38885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38886    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38888    break 2
38889  fi
38890done
38891  done
38892IFS=$as_save_IFS
38893
38894  ;;
38895esac
38896fi
38897GNM=$ac_cv_path_GNM
38898if test -n "$GNM"; then
38899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38900$as_echo "$GNM" >&6; }
38901else
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38903$as_echo "no" >&6; }
38904fi
38905
38906
38907  test -n "$GNM" && break
38908done
38909
38910    else
38911      # If it succeeded, then it was overridden by the user. We will use it
38912      # for the tool.
38913
38914      # First remove it from the list of overridden variables, so we can test
38915      # for unknown variables in the end.
38916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38917
38918      # Check if we try to supply an empty value
38919      if test "x$GNM" = x; then
38920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
38921$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
38922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38923$as_echo_n "checking for GNM... " >&6; }
38924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38925$as_echo "disabled" >&6; }
38926      else
38927        # Check if the provided tool contains a complete path.
38928        tool_specified="$GNM"
38929        tool_basename="${tool_specified##*/}"
38930        if test "x$tool_basename" = "x$tool_specified"; then
38931          # A command without a complete path is provided, search $PATH.
38932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
38933$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
38934          # Extract the first word of "$tool_basename", so it can be a program name with args.
38935set dummy $tool_basename; ac_word=$2
38936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38937$as_echo_n "checking for $ac_word... " >&6; }
38938if ${ac_cv_path_GNM+:} false; then :
38939  $as_echo_n "(cached) " >&6
38940else
38941  case $GNM in
38942  [\\/]* | ?:[\\/]*)
38943  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38944  ;;
38945  *)
38946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38947for as_dir in $PATH
38948do
38949  IFS=$as_save_IFS
38950  test -z "$as_dir" && as_dir=.
38951    for ac_exec_ext in '' $ac_executable_extensions; do
38952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38953    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38955    break 2
38956  fi
38957done
38958  done
38959IFS=$as_save_IFS
38960
38961  ;;
38962esac
38963fi
38964GNM=$ac_cv_path_GNM
38965if test -n "$GNM"; then
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38967$as_echo "$GNM" >&6; }
38968else
38969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38970$as_echo "no" >&6; }
38971fi
38972
38973
38974          if test "x$GNM" = x; then
38975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38976          fi
38977        else
38978          # Otherwise we believe it is a complete path. Use it as it is.
38979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
38980$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
38981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38982$as_echo_n "checking for GNM... " >&6; }
38983          if test ! -x "$tool_specified"; then
38984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38985$as_echo "not found" >&6; }
38986            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
38987          fi
38988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38989$as_echo "$tool_specified" >&6; }
38990        fi
38991      fi
38992    fi
38993
38994  fi
38995
38996
38997
38998  # Only process if variable expands to non-empty
38999
39000  if test "x$GNM" != x; then
39001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39002
39003  # First separate the path from the arguments. This will split at the first
39004  # space.
39005  complete="$GNM"
39006  path="${complete%% *}"
39007  tmp="$complete EOL"
39008  arguments="${tmp#* }"
39009
39010  # Input might be given as Windows format, start by converting to
39011  # unix format.
39012  new_path=`$CYGPATH -u "$path"`
39013
39014  # Now try to locate executable using which
39015  new_path=`$WHICH "$new_path" 2> /dev/null`
39016  # bat and cmd files are not always considered executable in cygwin causing which
39017  # to not find them
39018  if test "x$new_path" = x \
39019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39021    new_path=`$CYGPATH -u "$path"`
39022  fi
39023  if test "x$new_path" = x; then
39024    # Oops. Which didn't find the executable.
39025    # The splitting of arguments from the executable at a space might have been incorrect,
39026    # since paths with space are more likely in Windows. Give it another try with the whole
39027    # argument.
39028    path="$complete"
39029    arguments="EOL"
39030    new_path=`$CYGPATH -u "$path"`
39031    new_path=`$WHICH "$new_path" 2> /dev/null`
39032    # bat and cmd files are not always considered executable in cygwin causing which
39033    # to not find them
39034    if test "x$new_path" = x \
39035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39037      new_path=`$CYGPATH -u "$path"`
39038    fi
39039    if test "x$new_path" = x; then
39040      # It's still not found. Now this is an unrecoverable error.
39041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39042$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39043      has_space=`$ECHO "$complete" | $GREP " "`
39044      if test "x$has_space" != x; then
39045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39047      fi
39048      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39049    fi
39050  fi
39051
39052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39055  # "foo.exe" is OK but "foo" is an error.
39056  #
39057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39058  # It is also a way to make sure we got the proper file name for the real test later on.
39059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39060  if test "x$test_shortpath" = x; then
39061    # Short path failed, file does not exist as specified.
39062    # Try adding .exe or .cmd
39063    if test -f "${new_path}.exe"; then
39064      input_to_shortpath="${new_path}.exe"
39065    elif test -f "${new_path}.cmd"; then
39066      input_to_shortpath="${new_path}.cmd"
39067    else
39068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39069$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39072      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39073    fi
39074  else
39075    input_to_shortpath="$new_path"
39076  fi
39077
39078  # Call helper function which possibly converts this using DOS-style short mode.
39079  # If so, the updated path is stored in $new_path.
39080  new_path="$input_to_shortpath"
39081
39082  input_path="$input_to_shortpath"
39083  # Check if we need to convert this using DOS-style short mode. If the path
39084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39085  # take no chances and rewrite it.
39086  # Note: m4 eats our [], so we need to use [ and ] instead.
39087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39088  if test "x$has_forbidden_chars" != x; then
39089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39093      # Going to short mode and back again did indeed matter. Since short mode is
39094      # case insensitive, let's make it lowercase to improve readability.
39095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39096      # Now convert it back to Unix-style (cygpath)
39097      input_path=`$CYGPATH -u "$shortmode_path"`
39098      new_path="$input_path"
39099    fi
39100  fi
39101
39102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39103  if test "x$test_cygdrive_prefix" = x; then
39104    # As a simple fix, exclude /usr/bin since it's not a real path.
39105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39107      # a path prefixed by /cygdrive for fixpath to work.
39108      new_path="$CYGWIN_ROOT_PATH$input_path"
39109    fi
39110  fi
39111
39112  # remove trailing .exe if any
39113  new_path="${new_path/%.exe/}"
39114
39115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39116
39117  # First separate the path from the arguments. This will split at the first
39118  # space.
39119  complete="$GNM"
39120  path="${complete%% *}"
39121  tmp="$complete EOL"
39122  arguments="${tmp#* }"
39123
39124  # Input might be given as Windows format, start by converting to
39125  # unix format.
39126  new_path="$path"
39127
39128  windows_path="$new_path"
39129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130    unix_path=`$CYGPATH -u "$windows_path"`
39131    new_path="$unix_path"
39132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134    new_path="$unix_path"
39135  fi
39136
39137
39138  # Now try to locate executable using which
39139  new_path=`$WHICH "$new_path" 2> /dev/null`
39140
39141  if test "x$new_path" = x; then
39142    # Oops. Which didn't find the executable.
39143    # The splitting of arguments from the executable at a space might have been incorrect,
39144    # since paths with space are more likely in Windows. Give it another try with the whole
39145    # argument.
39146    path="$complete"
39147    arguments="EOL"
39148    new_path="$path"
39149
39150  windows_path="$new_path"
39151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39152    unix_path=`$CYGPATH -u "$windows_path"`
39153    new_path="$unix_path"
39154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39156    new_path="$unix_path"
39157  fi
39158
39159
39160    new_path=`$WHICH "$new_path" 2> /dev/null`
39161    # bat and cmd files are not always considered executable in MSYS causing which
39162    # to not find them
39163    if test "x$new_path" = x \
39164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39166      new_path="$path"
39167
39168  windows_path="$new_path"
39169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170    unix_path=`$CYGPATH -u "$windows_path"`
39171    new_path="$unix_path"
39172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174    new_path="$unix_path"
39175  fi
39176
39177    fi
39178
39179    if test "x$new_path" = x; then
39180      # It's still not found. Now this is an unrecoverable error.
39181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39182$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39183      has_space=`$ECHO "$complete" | $GREP " "`
39184      if test "x$has_space" != x; then
39185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39187      fi
39188      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39189    fi
39190  fi
39191
39192  # Now new_path has a complete unix path to the binary
39193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39194    # Keep paths in /bin as-is, but remove trailing .exe if any
39195    new_path="${new_path/%.exe/}"
39196    # Do not save /bin paths to all_fixpath_prefixes!
39197  else
39198    # Not in mixed or Windows style, start by that.
39199    new_path=`cmd //c echo $new_path`
39200
39201  input_path="$new_path"
39202  # Check if we need to convert this using DOS-style short mode. If the path
39203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39204  # take no chances and rewrite it.
39205  # Note: m4 eats our [], so we need to use [ and ] instead.
39206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39207  if test "x$has_forbidden_chars" != x; then
39208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39210  fi
39211
39212    # Output is in $new_path
39213
39214  windows_path="$new_path"
39215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39216    unix_path=`$CYGPATH -u "$windows_path"`
39217    new_path="$unix_path"
39218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39220    new_path="$unix_path"
39221  fi
39222
39223    # remove trailing .exe if any
39224    new_path="${new_path/%.exe/}"
39225
39226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39228  fi
39229
39230    else
39231      # We're on a unix platform. Hooray! :)
39232      # First separate the path from the arguments. This will split at the first
39233      # space.
39234      complete="$GNM"
39235      path="${complete%% *}"
39236      tmp="$complete EOL"
39237      arguments="${tmp#* }"
39238
39239      # Cannot rely on the command "which" here since it doesn't always work.
39240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39241      if test -z "$is_absolute_path"; then
39242        # Path to executable is not absolute. Find it.
39243        IFS_save="$IFS"
39244        IFS=:
39245        for p in $PATH; do
39246          if test -f "$p/$path" && test -x "$p/$path"; then
39247            new_path="$p/$path"
39248            break
39249          fi
39250        done
39251        IFS="$IFS_save"
39252      else
39253        # This is an absolute path, we can use it without further modifications.
39254        new_path="$path"
39255      fi
39256
39257      if test "x$new_path" = x; then
39258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39259$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39260        has_space=`$ECHO "$complete" | $GREP " "`
39261        if test "x$has_space" != x; then
39262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39264        fi
39265        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39266      fi
39267    fi
39268
39269    # Now join together the path and the arguments once again
39270    if test "x$arguments" != xEOL; then
39271      new_complete="$new_path ${arguments% *}"
39272    else
39273      new_complete="$new_path"
39274    fi
39275
39276    if test "x$complete" != "x$new_complete"; then
39277      GNM="$new_complete"
39278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39279$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39280    fi
39281  fi
39282
39283  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39284    # FIXME: we should unify this with the solaris case above.
39285
39286
39287  # Publish this variable in the help.
39288
39289
39290  if [ -z "${STRIP+x}" ]; then
39291    # The variable is not set by user, try to locate tool using the code snippet
39292    if test -n "$ac_tool_prefix"; then
39293  for ac_prog in strip
39294  do
39295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39298$as_echo_n "checking for $ac_word... " >&6; }
39299if ${ac_cv_prog_STRIP+:} false; then :
39300  $as_echo_n "(cached) " >&6
39301else
39302  if test -n "$STRIP"; then
39303  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39304else
39305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39306for as_dir in $PATH
39307do
39308  IFS=$as_save_IFS
39309  test -z "$as_dir" && as_dir=.
39310    for ac_exec_ext in '' $ac_executable_extensions; do
39311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39312    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39314    break 2
39315  fi
39316done
39317  done
39318IFS=$as_save_IFS
39319
39320fi
39321fi
39322STRIP=$ac_cv_prog_STRIP
39323if test -n "$STRIP"; then
39324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39325$as_echo "$STRIP" >&6; }
39326else
39327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39328$as_echo "no" >&6; }
39329fi
39330
39331
39332    test -n "$STRIP" && break
39333  done
39334fi
39335if test -z "$STRIP"; then
39336  ac_ct_STRIP=$STRIP
39337  for ac_prog in strip
39338do
39339  # Extract the first word of "$ac_prog", so it can be a program name with args.
39340set dummy $ac_prog; ac_word=$2
39341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39342$as_echo_n "checking for $ac_word... " >&6; }
39343if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39344  $as_echo_n "(cached) " >&6
39345else
39346  if test -n "$ac_ct_STRIP"; then
39347  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39348else
39349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39350for as_dir in $PATH
39351do
39352  IFS=$as_save_IFS
39353  test -z "$as_dir" && as_dir=.
39354    for ac_exec_ext in '' $ac_executable_extensions; do
39355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39356    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39358    break 2
39359  fi
39360done
39361  done
39362IFS=$as_save_IFS
39363
39364fi
39365fi
39366ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39367if test -n "$ac_ct_STRIP"; then
39368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39369$as_echo "$ac_ct_STRIP" >&6; }
39370else
39371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39372$as_echo "no" >&6; }
39373fi
39374
39375
39376  test -n "$ac_ct_STRIP" && break
39377done
39378
39379  if test "x$ac_ct_STRIP" = x; then
39380    STRIP=""
39381  else
39382    case $cross_compiling:$ac_tool_warned in
39383yes:)
39384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39386ac_tool_warned=yes ;;
39387esac
39388    STRIP=$ac_ct_STRIP
39389  fi
39390fi
39391
39392  else
39393    # The variable is set, but is it from the command line or the environment?
39394
39395    # Try to remove the string !STRIP! from our list.
39396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39398      # If it failed, the variable was not from the command line. Ignore it,
39399      # but warn the user (except for BASH, which is always set by the calling BASH).
39400      if test "xSTRIP" != xBASH; then
39401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39402$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39403      fi
39404      # Try to locate tool using the code snippet
39405      if test -n "$ac_tool_prefix"; then
39406  for ac_prog in strip
39407  do
39408    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39409set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39411$as_echo_n "checking for $ac_word... " >&6; }
39412if ${ac_cv_prog_STRIP+:} false; then :
39413  $as_echo_n "(cached) " >&6
39414else
39415  if test -n "$STRIP"; then
39416  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39417else
39418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39419for as_dir in $PATH
39420do
39421  IFS=$as_save_IFS
39422  test -z "$as_dir" && as_dir=.
39423    for ac_exec_ext in '' $ac_executable_extensions; do
39424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39425    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39427    break 2
39428  fi
39429done
39430  done
39431IFS=$as_save_IFS
39432
39433fi
39434fi
39435STRIP=$ac_cv_prog_STRIP
39436if test -n "$STRIP"; then
39437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39438$as_echo "$STRIP" >&6; }
39439else
39440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39441$as_echo "no" >&6; }
39442fi
39443
39444
39445    test -n "$STRIP" && break
39446  done
39447fi
39448if test -z "$STRIP"; then
39449  ac_ct_STRIP=$STRIP
39450  for ac_prog in strip
39451do
39452  # Extract the first word of "$ac_prog", so it can be a program name with args.
39453set dummy $ac_prog; ac_word=$2
39454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39455$as_echo_n "checking for $ac_word... " >&6; }
39456if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39457  $as_echo_n "(cached) " >&6
39458else
39459  if test -n "$ac_ct_STRIP"; then
39460  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39461else
39462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39463for as_dir in $PATH
39464do
39465  IFS=$as_save_IFS
39466  test -z "$as_dir" && as_dir=.
39467    for ac_exec_ext in '' $ac_executable_extensions; do
39468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39469    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39471    break 2
39472  fi
39473done
39474  done
39475IFS=$as_save_IFS
39476
39477fi
39478fi
39479ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39480if test -n "$ac_ct_STRIP"; then
39481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39482$as_echo "$ac_ct_STRIP" >&6; }
39483else
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39485$as_echo "no" >&6; }
39486fi
39487
39488
39489  test -n "$ac_ct_STRIP" && break
39490done
39491
39492  if test "x$ac_ct_STRIP" = x; then
39493    STRIP=""
39494  else
39495    case $cross_compiling:$ac_tool_warned in
39496yes:)
39497{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39498$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39499ac_tool_warned=yes ;;
39500esac
39501    STRIP=$ac_ct_STRIP
39502  fi
39503fi
39504
39505    else
39506      # If it succeeded, then it was overridden by the user. We will use it
39507      # for the tool.
39508
39509      # First remove it from the list of overridden variables, so we can test
39510      # for unknown variables in the end.
39511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39512
39513      # Check if we try to supply an empty value
39514      if test "x$STRIP" = x; then
39515        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39516$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39518$as_echo_n "checking for STRIP... " >&6; }
39519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39520$as_echo "disabled" >&6; }
39521      else
39522        # Check if the provided tool contains a complete path.
39523        tool_specified="$STRIP"
39524        tool_basename="${tool_specified##*/}"
39525        if test "x$tool_basename" = "x$tool_specified"; then
39526          # A command without a complete path is provided, search $PATH.
39527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39528$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39529          # Extract the first word of "$tool_basename", so it can be a program name with args.
39530set dummy $tool_basename; ac_word=$2
39531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39532$as_echo_n "checking for $ac_word... " >&6; }
39533if ${ac_cv_path_STRIP+:} false; then :
39534  $as_echo_n "(cached) " >&6
39535else
39536  case $STRIP in
39537  [\\/]* | ?:[\\/]*)
39538  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39539  ;;
39540  *)
39541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39542for as_dir in $PATH
39543do
39544  IFS=$as_save_IFS
39545  test -z "$as_dir" && as_dir=.
39546    for ac_exec_ext in '' $ac_executable_extensions; do
39547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39548    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39550    break 2
39551  fi
39552done
39553  done
39554IFS=$as_save_IFS
39555
39556  ;;
39557esac
39558fi
39559STRIP=$ac_cv_path_STRIP
39560if test -n "$STRIP"; then
39561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39562$as_echo "$STRIP" >&6; }
39563else
39564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39565$as_echo "no" >&6; }
39566fi
39567
39568
39569          if test "x$STRIP" = x; then
39570            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39571          fi
39572        else
39573          # Otherwise we believe it is a complete path. Use it as it is.
39574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39575$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39576          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39577$as_echo_n "checking for STRIP... " >&6; }
39578          if test ! -x "$tool_specified"; then
39579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39580$as_echo "not found" >&6; }
39581            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39582          fi
39583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39584$as_echo "$tool_specified" >&6; }
39585        fi
39586      fi
39587    fi
39588
39589  fi
39590
39591
39592
39593  # Only process if variable expands to non-empty
39594
39595  if test "x$STRIP" != x; then
39596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39597
39598  # First separate the path from the arguments. This will split at the first
39599  # space.
39600  complete="$STRIP"
39601  path="${complete%% *}"
39602  tmp="$complete EOL"
39603  arguments="${tmp#* }"
39604
39605  # Input might be given as Windows format, start by converting to
39606  # unix format.
39607  new_path=`$CYGPATH -u "$path"`
39608
39609  # Now try to locate executable using which
39610  new_path=`$WHICH "$new_path" 2> /dev/null`
39611  # bat and cmd files are not always considered executable in cygwin causing which
39612  # to not find them
39613  if test "x$new_path" = x \
39614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39616    new_path=`$CYGPATH -u "$path"`
39617  fi
39618  if test "x$new_path" = x; then
39619    # Oops. Which didn't find the executable.
39620    # The splitting of arguments from the executable at a space might have been incorrect,
39621    # since paths with space are more likely in Windows. Give it another try with the whole
39622    # argument.
39623    path="$complete"
39624    arguments="EOL"
39625    new_path=`$CYGPATH -u "$path"`
39626    new_path=`$WHICH "$new_path" 2> /dev/null`
39627    # bat and cmd files are not always considered executable in cygwin causing which
39628    # to not find them
39629    if test "x$new_path" = x \
39630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39632      new_path=`$CYGPATH -u "$path"`
39633    fi
39634    if test "x$new_path" = x; then
39635      # It's still not found. Now this is an unrecoverable error.
39636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39637$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39638      has_space=`$ECHO "$complete" | $GREP " "`
39639      if test "x$has_space" != x; then
39640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39642      fi
39643      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39644    fi
39645  fi
39646
39647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39650  # "foo.exe" is OK but "foo" is an error.
39651  #
39652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39653  # It is also a way to make sure we got the proper file name for the real test later on.
39654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39655  if test "x$test_shortpath" = x; then
39656    # Short path failed, file does not exist as specified.
39657    # Try adding .exe or .cmd
39658    if test -f "${new_path}.exe"; then
39659      input_to_shortpath="${new_path}.exe"
39660    elif test -f "${new_path}.cmd"; then
39661      input_to_shortpath="${new_path}.cmd"
39662    else
39663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39664$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39667      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39668    fi
39669  else
39670    input_to_shortpath="$new_path"
39671  fi
39672
39673  # Call helper function which possibly converts this using DOS-style short mode.
39674  # If so, the updated path is stored in $new_path.
39675  new_path="$input_to_shortpath"
39676
39677  input_path="$input_to_shortpath"
39678  # Check if we need to convert this using DOS-style short mode. If the path
39679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39680  # take no chances and rewrite it.
39681  # Note: m4 eats our [], so we need to use [ and ] instead.
39682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39683  if test "x$has_forbidden_chars" != x; then
39684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39688      # Going to short mode and back again did indeed matter. Since short mode is
39689      # case insensitive, let's make it lowercase to improve readability.
39690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39691      # Now convert it back to Unix-style (cygpath)
39692      input_path=`$CYGPATH -u "$shortmode_path"`
39693      new_path="$input_path"
39694    fi
39695  fi
39696
39697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39698  if test "x$test_cygdrive_prefix" = x; then
39699    # As a simple fix, exclude /usr/bin since it's not a real path.
39700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39702      # a path prefixed by /cygdrive for fixpath to work.
39703      new_path="$CYGWIN_ROOT_PATH$input_path"
39704    fi
39705  fi
39706
39707  # remove trailing .exe if any
39708  new_path="${new_path/%.exe/}"
39709
39710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39711
39712  # First separate the path from the arguments. This will split at the first
39713  # space.
39714  complete="$STRIP"
39715  path="${complete%% *}"
39716  tmp="$complete EOL"
39717  arguments="${tmp#* }"
39718
39719  # Input might be given as Windows format, start by converting to
39720  # unix format.
39721  new_path="$path"
39722
39723  windows_path="$new_path"
39724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39725    unix_path=`$CYGPATH -u "$windows_path"`
39726    new_path="$unix_path"
39727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39729    new_path="$unix_path"
39730  fi
39731
39732
39733  # Now try to locate executable using which
39734  new_path=`$WHICH "$new_path" 2> /dev/null`
39735
39736  if test "x$new_path" = x; then
39737    # Oops. Which didn't find the executable.
39738    # The splitting of arguments from the executable at a space might have been incorrect,
39739    # since paths with space are more likely in Windows. Give it another try with the whole
39740    # argument.
39741    path="$complete"
39742    arguments="EOL"
39743    new_path="$path"
39744
39745  windows_path="$new_path"
39746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39747    unix_path=`$CYGPATH -u "$windows_path"`
39748    new_path="$unix_path"
39749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39751    new_path="$unix_path"
39752  fi
39753
39754
39755    new_path=`$WHICH "$new_path" 2> /dev/null`
39756    # bat and cmd files are not always considered executable in MSYS causing which
39757    # to not find them
39758    if test "x$new_path" = x \
39759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39761      new_path="$path"
39762
39763  windows_path="$new_path"
39764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39765    unix_path=`$CYGPATH -u "$windows_path"`
39766    new_path="$unix_path"
39767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39769    new_path="$unix_path"
39770  fi
39771
39772    fi
39773
39774    if test "x$new_path" = x; then
39775      # It's still not found. Now this is an unrecoverable error.
39776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39777$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39778      has_space=`$ECHO "$complete" | $GREP " "`
39779      if test "x$has_space" != x; then
39780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39782      fi
39783      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39784    fi
39785  fi
39786
39787  # Now new_path has a complete unix path to the binary
39788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39789    # Keep paths in /bin as-is, but remove trailing .exe if any
39790    new_path="${new_path/%.exe/}"
39791    # Do not save /bin paths to all_fixpath_prefixes!
39792  else
39793    # Not in mixed or Windows style, start by that.
39794    new_path=`cmd //c echo $new_path`
39795
39796  input_path="$new_path"
39797  # Check if we need to convert this using DOS-style short mode. If the path
39798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39799  # take no chances and rewrite it.
39800  # Note: m4 eats our [], so we need to use [ and ] instead.
39801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39802  if test "x$has_forbidden_chars" != x; then
39803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39805  fi
39806
39807    # Output is in $new_path
39808
39809  windows_path="$new_path"
39810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39811    unix_path=`$CYGPATH -u "$windows_path"`
39812    new_path="$unix_path"
39813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39815    new_path="$unix_path"
39816  fi
39817
39818    # remove trailing .exe if any
39819    new_path="${new_path/%.exe/}"
39820
39821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39823  fi
39824
39825    else
39826      # We're on a unix platform. Hooray! :)
39827      # First separate the path from the arguments. This will split at the first
39828      # space.
39829      complete="$STRIP"
39830      path="${complete%% *}"
39831      tmp="$complete EOL"
39832      arguments="${tmp#* }"
39833
39834      # Cannot rely on the command "which" here since it doesn't always work.
39835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39836      if test -z "$is_absolute_path"; then
39837        # Path to executable is not absolute. Find it.
39838        IFS_save="$IFS"
39839        IFS=:
39840        for p in $PATH; do
39841          if test -f "$p/$path" && test -x "$p/$path"; then
39842            new_path="$p/$path"
39843            break
39844          fi
39845        done
39846        IFS="$IFS_save"
39847      else
39848        # This is an absolute path, we can use it without further modifications.
39849        new_path="$path"
39850      fi
39851
39852      if test "x$new_path" = x; then
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39854$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39855        has_space=`$ECHO "$complete" | $GREP " "`
39856        if test "x$has_space" != x; then
39857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39859        fi
39860        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39861      fi
39862    fi
39863
39864    # Now join together the path and the arguments once again
39865    if test "x$arguments" != xEOL; then
39866      new_complete="$new_path ${arguments% *}"
39867    else
39868      new_complete="$new_path"
39869    fi
39870
39871    if test "x$complete" != "x$new_complete"; then
39872      STRIP="$new_complete"
39873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39874$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39875    fi
39876  fi
39877
39878
39879
39880  # Publish this variable in the help.
39881
39882
39883  if [ -z "${NM+x}" ]; then
39884    # The variable is not set by user, try to locate tool using the code snippet
39885    if test -n "$ac_tool_prefix"; then
39886  for ac_prog in nm
39887  do
39888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39891$as_echo_n "checking for $ac_word... " >&6; }
39892if ${ac_cv_prog_NM+:} false; then :
39893  $as_echo_n "(cached) " >&6
39894else
39895  if test -n "$NM"; then
39896  ac_cv_prog_NM="$NM" # Let the user override the test.
39897else
39898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39899for as_dir in $PATH
39900do
39901  IFS=$as_save_IFS
39902  test -z "$as_dir" && as_dir=.
39903    for ac_exec_ext in '' $ac_executable_extensions; do
39904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39905    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
39906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39907    break 2
39908  fi
39909done
39910  done
39911IFS=$as_save_IFS
39912
39913fi
39914fi
39915NM=$ac_cv_prog_NM
39916if test -n "$NM"; then
39917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39918$as_echo "$NM" >&6; }
39919else
39920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39921$as_echo "no" >&6; }
39922fi
39923
39924
39925    test -n "$NM" && break
39926  done
39927fi
39928if test -z "$NM"; then
39929  ac_ct_NM=$NM
39930  for ac_prog in nm
39931do
39932  # Extract the first word of "$ac_prog", so it can be a program name with args.
39933set dummy $ac_prog; ac_word=$2
39934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39935$as_echo_n "checking for $ac_word... " >&6; }
39936if ${ac_cv_prog_ac_ct_NM+:} false; then :
39937  $as_echo_n "(cached) " >&6
39938else
39939  if test -n "$ac_ct_NM"; then
39940  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
39941else
39942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39943for as_dir in $PATH
39944do
39945  IFS=$as_save_IFS
39946  test -z "$as_dir" && as_dir=.
39947    for ac_exec_ext in '' $ac_executable_extensions; do
39948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39949    ac_cv_prog_ac_ct_NM="$ac_prog"
39950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39951    break 2
39952  fi
39953done
39954  done
39955IFS=$as_save_IFS
39956
39957fi
39958fi
39959ac_ct_NM=$ac_cv_prog_ac_ct_NM
39960if test -n "$ac_ct_NM"; then
39961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
39962$as_echo "$ac_ct_NM" >&6; }
39963else
39964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39965$as_echo "no" >&6; }
39966fi
39967
39968
39969  test -n "$ac_ct_NM" && break
39970done
39971
39972  if test "x$ac_ct_NM" = x; then
39973    NM=""
39974  else
39975    case $cross_compiling:$ac_tool_warned in
39976yes:)
39977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39979ac_tool_warned=yes ;;
39980esac
39981    NM=$ac_ct_NM
39982  fi
39983fi
39984
39985  else
39986    # The variable is set, but is it from the command line or the environment?
39987
39988    # Try to remove the string !NM! from our list.
39989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39991      # If it failed, the variable was not from the command line. Ignore it,
39992      # but warn the user (except for BASH, which is always set by the calling BASH).
39993      if test "xNM" != xBASH; then
39994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39995$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39996      fi
39997      # Try to locate tool using the code snippet
39998      if test -n "$ac_tool_prefix"; then
39999  for ac_prog in nm
40000  do
40001    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40002set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40004$as_echo_n "checking for $ac_word... " >&6; }
40005if ${ac_cv_prog_NM+:} false; then :
40006  $as_echo_n "(cached) " >&6
40007else
40008  if test -n "$NM"; then
40009  ac_cv_prog_NM="$NM" # Let the user override the test.
40010else
40011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40012for as_dir in $PATH
40013do
40014  IFS=$as_save_IFS
40015  test -z "$as_dir" && as_dir=.
40016    for ac_exec_ext in '' $ac_executable_extensions; do
40017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40018    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40020    break 2
40021  fi
40022done
40023  done
40024IFS=$as_save_IFS
40025
40026fi
40027fi
40028NM=$ac_cv_prog_NM
40029if test -n "$NM"; then
40030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40031$as_echo "$NM" >&6; }
40032else
40033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40034$as_echo "no" >&6; }
40035fi
40036
40037
40038    test -n "$NM" && break
40039  done
40040fi
40041if test -z "$NM"; then
40042  ac_ct_NM=$NM
40043  for ac_prog in nm
40044do
40045  # Extract the first word of "$ac_prog", so it can be a program name with args.
40046set dummy $ac_prog; ac_word=$2
40047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40048$as_echo_n "checking for $ac_word... " >&6; }
40049if ${ac_cv_prog_ac_ct_NM+:} false; then :
40050  $as_echo_n "(cached) " >&6
40051else
40052  if test -n "$ac_ct_NM"; then
40053  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40054else
40055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40056for as_dir in $PATH
40057do
40058  IFS=$as_save_IFS
40059  test -z "$as_dir" && as_dir=.
40060    for ac_exec_ext in '' $ac_executable_extensions; do
40061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40062    ac_cv_prog_ac_ct_NM="$ac_prog"
40063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40064    break 2
40065  fi
40066done
40067  done
40068IFS=$as_save_IFS
40069
40070fi
40071fi
40072ac_ct_NM=$ac_cv_prog_ac_ct_NM
40073if test -n "$ac_ct_NM"; then
40074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40075$as_echo "$ac_ct_NM" >&6; }
40076else
40077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40078$as_echo "no" >&6; }
40079fi
40080
40081
40082  test -n "$ac_ct_NM" && break
40083done
40084
40085  if test "x$ac_ct_NM" = x; then
40086    NM=""
40087  else
40088    case $cross_compiling:$ac_tool_warned in
40089yes:)
40090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40092ac_tool_warned=yes ;;
40093esac
40094    NM=$ac_ct_NM
40095  fi
40096fi
40097
40098    else
40099      # If it succeeded, then it was overridden by the user. We will use it
40100      # for the tool.
40101
40102      # First remove it from the list of overridden variables, so we can test
40103      # for unknown variables in the end.
40104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40105
40106      # Check if we try to supply an empty value
40107      if test "x$NM" = x; then
40108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40109$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40111$as_echo_n "checking for NM... " >&6; }
40112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40113$as_echo "disabled" >&6; }
40114      else
40115        # Check if the provided tool contains a complete path.
40116        tool_specified="$NM"
40117        tool_basename="${tool_specified##*/}"
40118        if test "x$tool_basename" = "x$tool_specified"; then
40119          # A command without a complete path is provided, search $PATH.
40120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40121$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40122          # Extract the first word of "$tool_basename", so it can be a program name with args.
40123set dummy $tool_basename; ac_word=$2
40124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40125$as_echo_n "checking for $ac_word... " >&6; }
40126if ${ac_cv_path_NM+:} false; then :
40127  $as_echo_n "(cached) " >&6
40128else
40129  case $NM in
40130  [\\/]* | ?:[\\/]*)
40131  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40132  ;;
40133  *)
40134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40135for as_dir in $PATH
40136do
40137  IFS=$as_save_IFS
40138  test -z "$as_dir" && as_dir=.
40139    for ac_exec_ext in '' $ac_executable_extensions; do
40140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40141    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40143    break 2
40144  fi
40145done
40146  done
40147IFS=$as_save_IFS
40148
40149  ;;
40150esac
40151fi
40152NM=$ac_cv_path_NM
40153if test -n "$NM"; then
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40155$as_echo "$NM" >&6; }
40156else
40157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40158$as_echo "no" >&6; }
40159fi
40160
40161
40162          if test "x$NM" = x; then
40163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40164          fi
40165        else
40166          # Otherwise we believe it is a complete path. Use it as it is.
40167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40168$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40170$as_echo_n "checking for NM... " >&6; }
40171          if test ! -x "$tool_specified"; then
40172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40173$as_echo "not found" >&6; }
40174            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40175          fi
40176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40177$as_echo "$tool_specified" >&6; }
40178        fi
40179      fi
40180    fi
40181
40182  fi
40183
40184
40185
40186  # Only process if variable expands to non-empty
40187
40188  if test "x$NM" != x; then
40189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40190
40191  # First separate the path from the arguments. This will split at the first
40192  # space.
40193  complete="$NM"
40194  path="${complete%% *}"
40195  tmp="$complete EOL"
40196  arguments="${tmp#* }"
40197
40198  # Input might be given as Windows format, start by converting to
40199  # unix format.
40200  new_path=`$CYGPATH -u "$path"`
40201
40202  # Now try to locate executable using which
40203  new_path=`$WHICH "$new_path" 2> /dev/null`
40204  # bat and cmd files are not always considered executable in cygwin causing which
40205  # to not find them
40206  if test "x$new_path" = x \
40207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40209    new_path=`$CYGPATH -u "$path"`
40210  fi
40211  if test "x$new_path" = x; then
40212    # Oops. Which didn't find the executable.
40213    # The splitting of arguments from the executable at a space might have been incorrect,
40214    # since paths with space are more likely in Windows. Give it another try with the whole
40215    # argument.
40216    path="$complete"
40217    arguments="EOL"
40218    new_path=`$CYGPATH -u "$path"`
40219    new_path=`$WHICH "$new_path" 2> /dev/null`
40220    # bat and cmd files are not always considered executable in cygwin causing which
40221    # to not find them
40222    if test "x$new_path" = x \
40223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40225      new_path=`$CYGPATH -u "$path"`
40226    fi
40227    if test "x$new_path" = x; then
40228      # It's still not found. Now this is an unrecoverable error.
40229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40230$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40231      has_space=`$ECHO "$complete" | $GREP " "`
40232      if test "x$has_space" != x; then
40233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40235      fi
40236      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40237    fi
40238  fi
40239
40240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40243  # "foo.exe" is OK but "foo" is an error.
40244  #
40245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40246  # It is also a way to make sure we got the proper file name for the real test later on.
40247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40248  if test "x$test_shortpath" = x; then
40249    # Short path failed, file does not exist as specified.
40250    # Try adding .exe or .cmd
40251    if test -f "${new_path}.exe"; then
40252      input_to_shortpath="${new_path}.exe"
40253    elif test -f "${new_path}.cmd"; then
40254      input_to_shortpath="${new_path}.cmd"
40255    else
40256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40257$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40260      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40261    fi
40262  else
40263    input_to_shortpath="$new_path"
40264  fi
40265
40266  # Call helper function which possibly converts this using DOS-style short mode.
40267  # If so, the updated path is stored in $new_path.
40268  new_path="$input_to_shortpath"
40269
40270  input_path="$input_to_shortpath"
40271  # Check if we need to convert this using DOS-style short mode. If the path
40272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40273  # take no chances and rewrite it.
40274  # Note: m4 eats our [], so we need to use [ and ] instead.
40275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40276  if test "x$has_forbidden_chars" != x; then
40277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40281      # Going to short mode and back again did indeed matter. Since short mode is
40282      # case insensitive, let's make it lowercase to improve readability.
40283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40284      # Now convert it back to Unix-style (cygpath)
40285      input_path=`$CYGPATH -u "$shortmode_path"`
40286      new_path="$input_path"
40287    fi
40288  fi
40289
40290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40291  if test "x$test_cygdrive_prefix" = x; then
40292    # As a simple fix, exclude /usr/bin since it's not a real path.
40293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40295      # a path prefixed by /cygdrive for fixpath to work.
40296      new_path="$CYGWIN_ROOT_PATH$input_path"
40297    fi
40298  fi
40299
40300  # remove trailing .exe if any
40301  new_path="${new_path/%.exe/}"
40302
40303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40304
40305  # First separate the path from the arguments. This will split at the first
40306  # space.
40307  complete="$NM"
40308  path="${complete%% *}"
40309  tmp="$complete EOL"
40310  arguments="${tmp#* }"
40311
40312  # Input might be given as Windows format, start by converting to
40313  # unix format.
40314  new_path="$path"
40315
40316  windows_path="$new_path"
40317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40318    unix_path=`$CYGPATH -u "$windows_path"`
40319    new_path="$unix_path"
40320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40322    new_path="$unix_path"
40323  fi
40324
40325
40326  # Now try to locate executable using which
40327  new_path=`$WHICH "$new_path" 2> /dev/null`
40328
40329  if test "x$new_path" = x; then
40330    # Oops. Which didn't find the executable.
40331    # The splitting of arguments from the executable at a space might have been incorrect,
40332    # since paths with space are more likely in Windows. Give it another try with the whole
40333    # argument.
40334    path="$complete"
40335    arguments="EOL"
40336    new_path="$path"
40337
40338  windows_path="$new_path"
40339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40340    unix_path=`$CYGPATH -u "$windows_path"`
40341    new_path="$unix_path"
40342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40344    new_path="$unix_path"
40345  fi
40346
40347
40348    new_path=`$WHICH "$new_path" 2> /dev/null`
40349    # bat and cmd files are not always considered executable in MSYS causing which
40350    # to not find them
40351    if test "x$new_path" = x \
40352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40354      new_path="$path"
40355
40356  windows_path="$new_path"
40357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40358    unix_path=`$CYGPATH -u "$windows_path"`
40359    new_path="$unix_path"
40360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40362    new_path="$unix_path"
40363  fi
40364
40365    fi
40366
40367    if test "x$new_path" = x; then
40368      # It's still not found. Now this is an unrecoverable error.
40369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40370$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40371      has_space=`$ECHO "$complete" | $GREP " "`
40372      if test "x$has_space" != x; then
40373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40375      fi
40376      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40377    fi
40378  fi
40379
40380  # Now new_path has a complete unix path to the binary
40381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40382    # Keep paths in /bin as-is, but remove trailing .exe if any
40383    new_path="${new_path/%.exe/}"
40384    # Do not save /bin paths to all_fixpath_prefixes!
40385  else
40386    # Not in mixed or Windows style, start by that.
40387    new_path=`cmd //c echo $new_path`
40388
40389  input_path="$new_path"
40390  # Check if we need to convert this using DOS-style short mode. If the path
40391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40392  # take no chances and rewrite it.
40393  # Note: m4 eats our [], so we need to use [ and ] instead.
40394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40395  if test "x$has_forbidden_chars" != x; then
40396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40398  fi
40399
40400    # Output is in $new_path
40401
40402  windows_path="$new_path"
40403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40404    unix_path=`$CYGPATH -u "$windows_path"`
40405    new_path="$unix_path"
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40408    new_path="$unix_path"
40409  fi
40410
40411    # remove trailing .exe if any
40412    new_path="${new_path/%.exe/}"
40413
40414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40416  fi
40417
40418    else
40419      # We're on a unix platform. Hooray! :)
40420      # First separate the path from the arguments. This will split at the first
40421      # space.
40422      complete="$NM"
40423      path="${complete%% *}"
40424      tmp="$complete EOL"
40425      arguments="${tmp#* }"
40426
40427      # Cannot rely on the command "which" here since it doesn't always work.
40428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40429      if test -z "$is_absolute_path"; then
40430        # Path to executable is not absolute. Find it.
40431        IFS_save="$IFS"
40432        IFS=:
40433        for p in $PATH; do
40434          if test -f "$p/$path" && test -x "$p/$path"; then
40435            new_path="$p/$path"
40436            break
40437          fi
40438        done
40439        IFS="$IFS_save"
40440      else
40441        # This is an absolute path, we can use it without further modifications.
40442        new_path="$path"
40443      fi
40444
40445      if test "x$new_path" = x; then
40446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40448        has_space=`$ECHO "$complete" | $GREP " "`
40449        if test "x$has_space" != x; then
40450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40452        fi
40453        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40454      fi
40455    fi
40456
40457    # Now join together the path and the arguments once again
40458    if test "x$arguments" != xEOL; then
40459      new_complete="$new_path ${arguments% *}"
40460    else
40461      new_complete="$new_path"
40462    fi
40463
40464    if test "x$complete" != "x$new_complete"; then
40465      NM="$new_complete"
40466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40467$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40468    fi
40469  fi
40470
40471    GNM="$NM"
40472
40473  fi
40474
40475  # objcopy is used for moving debug symbols to separate files when
40476  # full debug symbols are enabled.
40477  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40478
40479
40480  # Publish this variable in the help.
40481
40482
40483  if [ -z "${OBJCOPY+x}" ]; then
40484    # The variable is not set by user, try to locate tool using the code snippet
40485    if test -n "$ac_tool_prefix"; then
40486  for ac_prog in gobjcopy objcopy
40487  do
40488    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40489set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40491$as_echo_n "checking for $ac_word... " >&6; }
40492if ${ac_cv_prog_OBJCOPY+:} false; then :
40493  $as_echo_n "(cached) " >&6
40494else
40495  if test -n "$OBJCOPY"; then
40496  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40497else
40498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40499for as_dir in $PATH
40500do
40501  IFS=$as_save_IFS
40502  test -z "$as_dir" && as_dir=.
40503    for ac_exec_ext in '' $ac_executable_extensions; do
40504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40505    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40507    break 2
40508  fi
40509done
40510  done
40511IFS=$as_save_IFS
40512
40513fi
40514fi
40515OBJCOPY=$ac_cv_prog_OBJCOPY
40516if test -n "$OBJCOPY"; then
40517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40518$as_echo "$OBJCOPY" >&6; }
40519else
40520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40521$as_echo "no" >&6; }
40522fi
40523
40524
40525    test -n "$OBJCOPY" && break
40526  done
40527fi
40528if test -z "$OBJCOPY"; then
40529  ac_ct_OBJCOPY=$OBJCOPY
40530  for ac_prog in gobjcopy objcopy
40531do
40532  # Extract the first word of "$ac_prog", so it can be a program name with args.
40533set dummy $ac_prog; ac_word=$2
40534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40535$as_echo_n "checking for $ac_word... " >&6; }
40536if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40537  $as_echo_n "(cached) " >&6
40538else
40539  if test -n "$ac_ct_OBJCOPY"; then
40540  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40541else
40542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40543for as_dir in $PATH
40544do
40545  IFS=$as_save_IFS
40546  test -z "$as_dir" && as_dir=.
40547    for ac_exec_ext in '' $ac_executable_extensions; do
40548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40549    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40551    break 2
40552  fi
40553done
40554  done
40555IFS=$as_save_IFS
40556
40557fi
40558fi
40559ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40560if test -n "$ac_ct_OBJCOPY"; then
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40562$as_echo "$ac_ct_OBJCOPY" >&6; }
40563else
40564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40565$as_echo "no" >&6; }
40566fi
40567
40568
40569  test -n "$ac_ct_OBJCOPY" && break
40570done
40571
40572  if test "x$ac_ct_OBJCOPY" = x; then
40573    OBJCOPY=""
40574  else
40575    case $cross_compiling:$ac_tool_warned in
40576yes:)
40577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40579ac_tool_warned=yes ;;
40580esac
40581    OBJCOPY=$ac_ct_OBJCOPY
40582  fi
40583fi
40584
40585  else
40586    # The variable is set, but is it from the command line or the environment?
40587
40588    # Try to remove the string !OBJCOPY! from our list.
40589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40591      # If it failed, the variable was not from the command line. Ignore it,
40592      # but warn the user (except for BASH, which is always set by the calling BASH).
40593      if test "xOBJCOPY" != xBASH; then
40594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40595$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40596      fi
40597      # Try to locate tool using the code snippet
40598      if test -n "$ac_tool_prefix"; then
40599  for ac_prog in gobjcopy objcopy
40600  do
40601    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40602set dummy $ac_tool_prefix$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_prog_OBJCOPY+:} false; then :
40606  $as_echo_n "(cached) " >&6
40607else
40608  if test -n "$OBJCOPY"; then
40609  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40610else
40611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40612for as_dir in $PATH
40613do
40614  IFS=$as_save_IFS
40615  test -z "$as_dir" && as_dir=.
40616    for ac_exec_ext in '' $ac_executable_extensions; do
40617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40618    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40620    break 2
40621  fi
40622done
40623  done
40624IFS=$as_save_IFS
40625
40626fi
40627fi
40628OBJCOPY=$ac_cv_prog_OBJCOPY
40629if test -n "$OBJCOPY"; then
40630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40631$as_echo "$OBJCOPY" >&6; }
40632else
40633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40634$as_echo "no" >&6; }
40635fi
40636
40637
40638    test -n "$OBJCOPY" && break
40639  done
40640fi
40641if test -z "$OBJCOPY"; then
40642  ac_ct_OBJCOPY=$OBJCOPY
40643  for ac_prog in gobjcopy objcopy
40644do
40645  # Extract the first word of "$ac_prog", so it can be a program name with args.
40646set dummy $ac_prog; ac_word=$2
40647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40648$as_echo_n "checking for $ac_word... " >&6; }
40649if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40650  $as_echo_n "(cached) " >&6
40651else
40652  if test -n "$ac_ct_OBJCOPY"; then
40653  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40654else
40655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40656for as_dir in $PATH
40657do
40658  IFS=$as_save_IFS
40659  test -z "$as_dir" && as_dir=.
40660    for ac_exec_ext in '' $ac_executable_extensions; do
40661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40662    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40664    break 2
40665  fi
40666done
40667  done
40668IFS=$as_save_IFS
40669
40670fi
40671fi
40672ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40673if test -n "$ac_ct_OBJCOPY"; then
40674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40675$as_echo "$ac_ct_OBJCOPY" >&6; }
40676else
40677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40678$as_echo "no" >&6; }
40679fi
40680
40681
40682  test -n "$ac_ct_OBJCOPY" && break
40683done
40684
40685  if test "x$ac_ct_OBJCOPY" = x; then
40686    OBJCOPY=""
40687  else
40688    case $cross_compiling:$ac_tool_warned in
40689yes:)
40690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40692ac_tool_warned=yes ;;
40693esac
40694    OBJCOPY=$ac_ct_OBJCOPY
40695  fi
40696fi
40697
40698    else
40699      # If it succeeded, then it was overridden by the user. We will use it
40700      # for the tool.
40701
40702      # First remove it from the list of overridden variables, so we can test
40703      # for unknown variables in the end.
40704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40705
40706      # Check if we try to supply an empty value
40707      if test "x$OBJCOPY" = x; then
40708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40709$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40711$as_echo_n "checking for OBJCOPY... " >&6; }
40712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40713$as_echo "disabled" >&6; }
40714      else
40715        # Check if the provided tool contains a complete path.
40716        tool_specified="$OBJCOPY"
40717        tool_basename="${tool_specified##*/}"
40718        if test "x$tool_basename" = "x$tool_specified"; then
40719          # A command without a complete path is provided, search $PATH.
40720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40721$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40722          # Extract the first word of "$tool_basename", so it can be a program name with args.
40723set dummy $tool_basename; ac_word=$2
40724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40725$as_echo_n "checking for $ac_word... " >&6; }
40726if ${ac_cv_path_OBJCOPY+:} false; then :
40727  $as_echo_n "(cached) " >&6
40728else
40729  case $OBJCOPY in
40730  [\\/]* | ?:[\\/]*)
40731  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40732  ;;
40733  *)
40734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40735for as_dir in $PATH
40736do
40737  IFS=$as_save_IFS
40738  test -z "$as_dir" && as_dir=.
40739    for ac_exec_ext in '' $ac_executable_extensions; do
40740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40741    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40743    break 2
40744  fi
40745done
40746  done
40747IFS=$as_save_IFS
40748
40749  ;;
40750esac
40751fi
40752OBJCOPY=$ac_cv_path_OBJCOPY
40753if test -n "$OBJCOPY"; then
40754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40755$as_echo "$OBJCOPY" >&6; }
40756else
40757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40758$as_echo "no" >&6; }
40759fi
40760
40761
40762          if test "x$OBJCOPY" = x; then
40763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40764          fi
40765        else
40766          # Otherwise we believe it is a complete path. Use it as it is.
40767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40768$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40770$as_echo_n "checking for OBJCOPY... " >&6; }
40771          if test ! -x "$tool_specified"; then
40772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40773$as_echo "not found" >&6; }
40774            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40775          fi
40776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40777$as_echo "$tool_specified" >&6; }
40778        fi
40779      fi
40780    fi
40781
40782  fi
40783
40784
40785    # Only call fixup if objcopy was found.
40786    if test -n "$OBJCOPY"; then
40787
40788  # Only process if variable expands to non-empty
40789
40790  if test "x$OBJCOPY" != x; then
40791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40792
40793  # First separate the path from the arguments. This will split at the first
40794  # space.
40795  complete="$OBJCOPY"
40796  path="${complete%% *}"
40797  tmp="$complete EOL"
40798  arguments="${tmp#* }"
40799
40800  # Input might be given as Windows format, start by converting to
40801  # unix format.
40802  new_path=`$CYGPATH -u "$path"`
40803
40804  # Now try to locate executable using which
40805  new_path=`$WHICH "$new_path" 2> /dev/null`
40806  # bat and cmd files are not always considered executable in cygwin causing which
40807  # to not find them
40808  if test "x$new_path" = x \
40809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40811    new_path=`$CYGPATH -u "$path"`
40812  fi
40813  if test "x$new_path" = x; then
40814    # Oops. Which didn't find the executable.
40815    # The splitting of arguments from the executable at a space might have been incorrect,
40816    # since paths with space are more likely in Windows. Give it another try with the whole
40817    # argument.
40818    path="$complete"
40819    arguments="EOL"
40820    new_path=`$CYGPATH -u "$path"`
40821    new_path=`$WHICH "$new_path" 2> /dev/null`
40822    # bat and cmd files are not always considered executable in cygwin causing which
40823    # to not find them
40824    if test "x$new_path" = x \
40825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40827      new_path=`$CYGPATH -u "$path"`
40828    fi
40829    if test "x$new_path" = x; then
40830      # It's still not found. Now this is an unrecoverable error.
40831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40832$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40833      has_space=`$ECHO "$complete" | $GREP " "`
40834      if test "x$has_space" != x; then
40835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40837      fi
40838      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40839    fi
40840  fi
40841
40842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40845  # "foo.exe" is OK but "foo" is an error.
40846  #
40847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40848  # It is also a way to make sure we got the proper file name for the real test later on.
40849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40850  if test "x$test_shortpath" = x; then
40851    # Short path failed, file does not exist as specified.
40852    # Try adding .exe or .cmd
40853    if test -f "${new_path}.exe"; then
40854      input_to_shortpath="${new_path}.exe"
40855    elif test -f "${new_path}.cmd"; then
40856      input_to_shortpath="${new_path}.cmd"
40857    else
40858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
40859$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
40860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40862      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40863    fi
40864  else
40865    input_to_shortpath="$new_path"
40866  fi
40867
40868  # Call helper function which possibly converts this using DOS-style short mode.
40869  # If so, the updated path is stored in $new_path.
40870  new_path="$input_to_shortpath"
40871
40872  input_path="$input_to_shortpath"
40873  # Check if we need to convert this using DOS-style short mode. If the path
40874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40875  # take no chances and rewrite it.
40876  # Note: m4 eats our [], so we need to use [ and ] instead.
40877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40878  if test "x$has_forbidden_chars" != x; then
40879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40883      # Going to short mode and back again did indeed matter. Since short mode is
40884      # case insensitive, let's make it lowercase to improve readability.
40885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40886      # Now convert it back to Unix-style (cygpath)
40887      input_path=`$CYGPATH -u "$shortmode_path"`
40888      new_path="$input_path"
40889    fi
40890  fi
40891
40892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40893  if test "x$test_cygdrive_prefix" = x; then
40894    # As a simple fix, exclude /usr/bin since it's not a real path.
40895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40897      # a path prefixed by /cygdrive for fixpath to work.
40898      new_path="$CYGWIN_ROOT_PATH$input_path"
40899    fi
40900  fi
40901
40902  # remove trailing .exe if any
40903  new_path="${new_path/%.exe/}"
40904
40905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40906
40907  # First separate the path from the arguments. This will split at the first
40908  # space.
40909  complete="$OBJCOPY"
40910  path="${complete%% *}"
40911  tmp="$complete EOL"
40912  arguments="${tmp#* }"
40913
40914  # Input might be given as Windows format, start by converting to
40915  # unix format.
40916  new_path="$path"
40917
40918  windows_path="$new_path"
40919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40920    unix_path=`$CYGPATH -u "$windows_path"`
40921    new_path="$unix_path"
40922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40924    new_path="$unix_path"
40925  fi
40926
40927
40928  # Now try to locate executable using which
40929  new_path=`$WHICH "$new_path" 2> /dev/null`
40930
40931  if test "x$new_path" = x; then
40932    # Oops. Which didn't find the executable.
40933    # The splitting of arguments from the executable at a space might have been incorrect,
40934    # since paths with space are more likely in Windows. Give it another try with the whole
40935    # argument.
40936    path="$complete"
40937    arguments="EOL"
40938    new_path="$path"
40939
40940  windows_path="$new_path"
40941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40942    unix_path=`$CYGPATH -u "$windows_path"`
40943    new_path="$unix_path"
40944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40946    new_path="$unix_path"
40947  fi
40948
40949
40950    new_path=`$WHICH "$new_path" 2> /dev/null`
40951    # bat and cmd files are not always considered executable in MSYS causing which
40952    # to not find them
40953    if test "x$new_path" = x \
40954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40956      new_path="$path"
40957
40958  windows_path="$new_path"
40959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40960    unix_path=`$CYGPATH -u "$windows_path"`
40961    new_path="$unix_path"
40962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40964    new_path="$unix_path"
40965  fi
40966
40967    fi
40968
40969    if test "x$new_path" = x; then
40970      # It's still not found. Now this is an unrecoverable error.
40971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40972$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40973      has_space=`$ECHO "$complete" | $GREP " "`
40974      if test "x$has_space" != x; then
40975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40977      fi
40978      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40979    fi
40980  fi
40981
40982  # Now new_path has a complete unix path to the binary
40983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40984    # Keep paths in /bin as-is, but remove trailing .exe if any
40985    new_path="${new_path/%.exe/}"
40986    # Do not save /bin paths to all_fixpath_prefixes!
40987  else
40988    # Not in mixed or Windows style, start by that.
40989    new_path=`cmd //c echo $new_path`
40990
40991  input_path="$new_path"
40992  # Check if we need to convert this using DOS-style short mode. If the path
40993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40994  # take no chances and rewrite it.
40995  # Note: m4 eats our [], so we need to use [ and ] instead.
40996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40997  if test "x$has_forbidden_chars" != x; then
40998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41000  fi
41001
41002    # Output is in $new_path
41003
41004  windows_path="$new_path"
41005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41006    unix_path=`$CYGPATH -u "$windows_path"`
41007    new_path="$unix_path"
41008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41010    new_path="$unix_path"
41011  fi
41012
41013    # remove trailing .exe if any
41014    new_path="${new_path/%.exe/}"
41015
41016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41018  fi
41019
41020    else
41021      # We're on a unix platform. Hooray! :)
41022      # First separate the path from the arguments. This will split at the first
41023      # space.
41024      complete="$OBJCOPY"
41025      path="${complete%% *}"
41026      tmp="$complete EOL"
41027      arguments="${tmp#* }"
41028
41029      # Cannot rely on the command "which" here since it doesn't always work.
41030      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41031      if test -z "$is_absolute_path"; then
41032        # Path to executable is not absolute. Find it.
41033        IFS_save="$IFS"
41034        IFS=:
41035        for p in $PATH; do
41036          if test -f "$p/$path" && test -x "$p/$path"; then
41037            new_path="$p/$path"
41038            break
41039          fi
41040        done
41041        IFS="$IFS_save"
41042      else
41043        # This is an absolute path, we can use it without further modifications.
41044        new_path="$path"
41045      fi
41046
41047      if test "x$new_path" = x; then
41048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41049$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41050        has_space=`$ECHO "$complete" | $GREP " "`
41051        if test "x$has_space" != x; then
41052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41054        fi
41055        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41056      fi
41057    fi
41058
41059    # Now join together the path and the arguments once again
41060    if test "x$arguments" != xEOL; then
41061      new_complete="$new_path ${arguments% *}"
41062    else
41063      new_complete="$new_path"
41064    fi
41065
41066    if test "x$complete" != "x$new_complete"; then
41067      OBJCOPY="$new_complete"
41068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41069$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41070    fi
41071  fi
41072
41073      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41074        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41075        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41076        # - version number is last blank separate word on first line
41077        # - version number formats that have been seen:
41078        #   - <major>.<minor>
41079        #   - <major>.<minor>.<micro>
41080        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41081        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41082         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41083              -e 's/.* //' \
41084              -e '/^[01]\./b bad' \
41085              -e '/^2\./{' \
41086              -e '  s/^2\.//' \
41087              -e '  /^[0-9]$/b bad' \
41088              -e '  /^[0-9]\./b bad' \
41089              -e '  /^1[0-9]$/b bad' \
41090              -e '  /^1[0-9]\./b bad' \
41091              -e '  /^20\./b bad' \
41092              -e '  /^21\.0$/b bad' \
41093              -e '  /^21\.0\./b bad' \
41094              -e '}' \
41095              -e ':good' \
41096              -e 's/.*/VALID_VERSION/p' \
41097              -e 'q' \
41098              -e ':bad' \
41099              -e 's/.*/BAD_VERSION/p' \
41100              -e 'q'`
41101        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41102          OBJCOPY=
41103          { $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
41104$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41105          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41106$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41107          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41108$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41109          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41110$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41111          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41112$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41113        fi
41114      fi
41115    fi
41116  fi
41117
41118
41119
41120  # Publish this variable in the help.
41121
41122
41123  if [ -z "${OBJDUMP+x}" ]; then
41124    # The variable is not set by user, try to locate tool using the code snippet
41125    if test -n "$ac_tool_prefix"; then
41126  for ac_prog in gobjdump objdump
41127  do
41128    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41129set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41131$as_echo_n "checking for $ac_word... " >&6; }
41132if ${ac_cv_prog_OBJDUMP+:} false; then :
41133  $as_echo_n "(cached) " >&6
41134else
41135  if test -n "$OBJDUMP"; then
41136  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41137else
41138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41139for as_dir in $PATH
41140do
41141  IFS=$as_save_IFS
41142  test -z "$as_dir" && as_dir=.
41143    for ac_exec_ext in '' $ac_executable_extensions; do
41144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41145    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41147    break 2
41148  fi
41149done
41150  done
41151IFS=$as_save_IFS
41152
41153fi
41154fi
41155OBJDUMP=$ac_cv_prog_OBJDUMP
41156if test -n "$OBJDUMP"; then
41157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41158$as_echo "$OBJDUMP" >&6; }
41159else
41160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41161$as_echo "no" >&6; }
41162fi
41163
41164
41165    test -n "$OBJDUMP" && break
41166  done
41167fi
41168if test -z "$OBJDUMP"; then
41169  ac_ct_OBJDUMP=$OBJDUMP
41170  for ac_prog in gobjdump objdump
41171do
41172  # Extract the first word of "$ac_prog", so it can be a program name with args.
41173set dummy $ac_prog; ac_word=$2
41174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41175$as_echo_n "checking for $ac_word... " >&6; }
41176if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41177  $as_echo_n "(cached) " >&6
41178else
41179  if test -n "$ac_ct_OBJDUMP"; then
41180  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41181else
41182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41183for as_dir in $PATH
41184do
41185  IFS=$as_save_IFS
41186  test -z "$as_dir" && as_dir=.
41187    for ac_exec_ext in '' $ac_executable_extensions; do
41188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41189    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41191    break 2
41192  fi
41193done
41194  done
41195IFS=$as_save_IFS
41196
41197fi
41198fi
41199ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41200if test -n "$ac_ct_OBJDUMP"; then
41201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41202$as_echo "$ac_ct_OBJDUMP" >&6; }
41203else
41204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41205$as_echo "no" >&6; }
41206fi
41207
41208
41209  test -n "$ac_ct_OBJDUMP" && break
41210done
41211
41212  if test "x$ac_ct_OBJDUMP" = x; then
41213    OBJDUMP=""
41214  else
41215    case $cross_compiling:$ac_tool_warned in
41216yes:)
41217{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41218$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41219ac_tool_warned=yes ;;
41220esac
41221    OBJDUMP=$ac_ct_OBJDUMP
41222  fi
41223fi
41224
41225  else
41226    # The variable is set, but is it from the command line or the environment?
41227
41228    # Try to remove the string !OBJDUMP! from our list.
41229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41231      # If it failed, the variable was not from the command line. Ignore it,
41232      # but warn the user (except for BASH, which is always set by the calling BASH).
41233      if test "xOBJDUMP" != xBASH; then
41234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41235$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41236      fi
41237      # Try to locate tool using the code snippet
41238      if test -n "$ac_tool_prefix"; then
41239  for ac_prog in gobjdump objdump
41240  do
41241    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41244$as_echo_n "checking for $ac_word... " >&6; }
41245if ${ac_cv_prog_OBJDUMP+:} false; then :
41246  $as_echo_n "(cached) " >&6
41247else
41248  if test -n "$OBJDUMP"; then
41249  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41250else
41251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41252for as_dir in $PATH
41253do
41254  IFS=$as_save_IFS
41255  test -z "$as_dir" && as_dir=.
41256    for ac_exec_ext in '' $ac_executable_extensions; do
41257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41258    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41260    break 2
41261  fi
41262done
41263  done
41264IFS=$as_save_IFS
41265
41266fi
41267fi
41268OBJDUMP=$ac_cv_prog_OBJDUMP
41269if test -n "$OBJDUMP"; then
41270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41271$as_echo "$OBJDUMP" >&6; }
41272else
41273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41274$as_echo "no" >&6; }
41275fi
41276
41277
41278    test -n "$OBJDUMP" && break
41279  done
41280fi
41281if test -z "$OBJDUMP"; then
41282  ac_ct_OBJDUMP=$OBJDUMP
41283  for ac_prog in gobjdump objdump
41284do
41285  # Extract the first word of "$ac_prog", so it can be a program name with args.
41286set dummy $ac_prog; ac_word=$2
41287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41288$as_echo_n "checking for $ac_word... " >&6; }
41289if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41290  $as_echo_n "(cached) " >&6
41291else
41292  if test -n "$ac_ct_OBJDUMP"; then
41293  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41294else
41295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41296for as_dir in $PATH
41297do
41298  IFS=$as_save_IFS
41299  test -z "$as_dir" && as_dir=.
41300    for ac_exec_ext in '' $ac_executable_extensions; do
41301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41302    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41304    break 2
41305  fi
41306done
41307  done
41308IFS=$as_save_IFS
41309
41310fi
41311fi
41312ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41313if test -n "$ac_ct_OBJDUMP"; then
41314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41315$as_echo "$ac_ct_OBJDUMP" >&6; }
41316else
41317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41318$as_echo "no" >&6; }
41319fi
41320
41321
41322  test -n "$ac_ct_OBJDUMP" && break
41323done
41324
41325  if test "x$ac_ct_OBJDUMP" = x; then
41326    OBJDUMP=""
41327  else
41328    case $cross_compiling:$ac_tool_warned in
41329yes:)
41330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41332ac_tool_warned=yes ;;
41333esac
41334    OBJDUMP=$ac_ct_OBJDUMP
41335  fi
41336fi
41337
41338    else
41339      # If it succeeded, then it was overridden by the user. We will use it
41340      # for the tool.
41341
41342      # First remove it from the list of overridden variables, so we can test
41343      # for unknown variables in the end.
41344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41345
41346      # Check if we try to supply an empty value
41347      if test "x$OBJDUMP" = x; then
41348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41349$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41351$as_echo_n "checking for OBJDUMP... " >&6; }
41352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41353$as_echo "disabled" >&6; }
41354      else
41355        # Check if the provided tool contains a complete path.
41356        tool_specified="$OBJDUMP"
41357        tool_basename="${tool_specified##*/}"
41358        if test "x$tool_basename" = "x$tool_specified"; then
41359          # A command without a complete path is provided, search $PATH.
41360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41361$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41362          # Extract the first word of "$tool_basename", so it can be a program name with args.
41363set dummy $tool_basename; ac_word=$2
41364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41365$as_echo_n "checking for $ac_word... " >&6; }
41366if ${ac_cv_path_OBJDUMP+:} false; then :
41367  $as_echo_n "(cached) " >&6
41368else
41369  case $OBJDUMP in
41370  [\\/]* | ?:[\\/]*)
41371  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41372  ;;
41373  *)
41374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41375for as_dir in $PATH
41376do
41377  IFS=$as_save_IFS
41378  test -z "$as_dir" && as_dir=.
41379    for ac_exec_ext in '' $ac_executable_extensions; do
41380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41381    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41383    break 2
41384  fi
41385done
41386  done
41387IFS=$as_save_IFS
41388
41389  ;;
41390esac
41391fi
41392OBJDUMP=$ac_cv_path_OBJDUMP
41393if test -n "$OBJDUMP"; then
41394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41395$as_echo "$OBJDUMP" >&6; }
41396else
41397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41398$as_echo "no" >&6; }
41399fi
41400
41401
41402          if test "x$OBJDUMP" = x; then
41403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41404          fi
41405        else
41406          # Otherwise we believe it is a complete path. Use it as it is.
41407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41408$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41410$as_echo_n "checking for OBJDUMP... " >&6; }
41411          if test ! -x "$tool_specified"; then
41412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41413$as_echo "not found" >&6; }
41414            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41415          fi
41416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41417$as_echo "$tool_specified" >&6; }
41418        fi
41419      fi
41420    fi
41421
41422  fi
41423
41424
41425  if test "x$OBJDUMP" != x; then
41426    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41427    # bails if argument is missing.
41428
41429  # Only process if variable expands to non-empty
41430
41431  if test "x$OBJDUMP" != x; then
41432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41433
41434  # First separate the path from the arguments. This will split at the first
41435  # space.
41436  complete="$OBJDUMP"
41437  path="${complete%% *}"
41438  tmp="$complete EOL"
41439  arguments="${tmp#* }"
41440
41441  # Input might be given as Windows format, start by converting to
41442  # unix format.
41443  new_path=`$CYGPATH -u "$path"`
41444
41445  # Now try to locate executable using which
41446  new_path=`$WHICH "$new_path" 2> /dev/null`
41447  # bat and cmd files are not always considered executable in cygwin causing which
41448  # to not find them
41449  if test "x$new_path" = x \
41450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41452    new_path=`$CYGPATH -u "$path"`
41453  fi
41454  if test "x$new_path" = x; then
41455    # Oops. Which didn't find the executable.
41456    # The splitting of arguments from the executable at a space might have been incorrect,
41457    # since paths with space are more likely in Windows. Give it another try with the whole
41458    # argument.
41459    path="$complete"
41460    arguments="EOL"
41461    new_path=`$CYGPATH -u "$path"`
41462    new_path=`$WHICH "$new_path" 2> /dev/null`
41463    # bat and cmd files are not always considered executable in cygwin causing which
41464    # to not find them
41465    if test "x$new_path" = x \
41466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41468      new_path=`$CYGPATH -u "$path"`
41469    fi
41470    if test "x$new_path" = x; then
41471      # It's still not found. Now this is an unrecoverable error.
41472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41473$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41474      has_space=`$ECHO "$complete" | $GREP " "`
41475      if test "x$has_space" != x; then
41476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41478      fi
41479      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41480    fi
41481  fi
41482
41483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41486  # "foo.exe" is OK but "foo" is an error.
41487  #
41488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41489  # It is also a way to make sure we got the proper file name for the real test later on.
41490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41491  if test "x$test_shortpath" = x; then
41492    # Short path failed, file does not exist as specified.
41493    # Try adding .exe or .cmd
41494    if test -f "${new_path}.exe"; then
41495      input_to_shortpath="${new_path}.exe"
41496    elif test -f "${new_path}.cmd"; then
41497      input_to_shortpath="${new_path}.cmd"
41498    else
41499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41500$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41503      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41504    fi
41505  else
41506    input_to_shortpath="$new_path"
41507  fi
41508
41509  # Call helper function which possibly converts this using DOS-style short mode.
41510  # If so, the updated path is stored in $new_path.
41511  new_path="$input_to_shortpath"
41512
41513  input_path="$input_to_shortpath"
41514  # Check if we need to convert this using DOS-style short mode. If the path
41515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41516  # take no chances and rewrite it.
41517  # Note: m4 eats our [], so we need to use [ and ] instead.
41518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41519  if test "x$has_forbidden_chars" != x; then
41520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41524      # Going to short mode and back again did indeed matter. Since short mode is
41525      # case insensitive, let's make it lowercase to improve readability.
41526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41527      # Now convert it back to Unix-style (cygpath)
41528      input_path=`$CYGPATH -u "$shortmode_path"`
41529      new_path="$input_path"
41530    fi
41531  fi
41532
41533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41534  if test "x$test_cygdrive_prefix" = x; then
41535    # As a simple fix, exclude /usr/bin since it's not a real path.
41536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41538      # a path prefixed by /cygdrive for fixpath to work.
41539      new_path="$CYGWIN_ROOT_PATH$input_path"
41540    fi
41541  fi
41542
41543  # remove trailing .exe if any
41544  new_path="${new_path/%.exe/}"
41545
41546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547
41548  # First separate the path from the arguments. This will split at the first
41549  # space.
41550  complete="$OBJDUMP"
41551  path="${complete%% *}"
41552  tmp="$complete EOL"
41553  arguments="${tmp#* }"
41554
41555  # Input might be given as Windows format, start by converting to
41556  # unix format.
41557  new_path="$path"
41558
41559  windows_path="$new_path"
41560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41561    unix_path=`$CYGPATH -u "$windows_path"`
41562    new_path="$unix_path"
41563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41565    new_path="$unix_path"
41566  fi
41567
41568
41569  # Now try to locate executable using which
41570  new_path=`$WHICH "$new_path" 2> /dev/null`
41571
41572  if test "x$new_path" = x; then
41573    # Oops. Which didn't find the executable.
41574    # The splitting of arguments from the executable at a space might have been incorrect,
41575    # since paths with space are more likely in Windows. Give it another try with the whole
41576    # argument.
41577    path="$complete"
41578    arguments="EOL"
41579    new_path="$path"
41580
41581  windows_path="$new_path"
41582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41583    unix_path=`$CYGPATH -u "$windows_path"`
41584    new_path="$unix_path"
41585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41587    new_path="$unix_path"
41588  fi
41589
41590
41591    new_path=`$WHICH "$new_path" 2> /dev/null`
41592    # bat and cmd files are not always considered executable in MSYS causing which
41593    # to not find them
41594    if test "x$new_path" = x \
41595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41597      new_path="$path"
41598
41599  windows_path="$new_path"
41600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41601    unix_path=`$CYGPATH -u "$windows_path"`
41602    new_path="$unix_path"
41603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41605    new_path="$unix_path"
41606  fi
41607
41608    fi
41609
41610    if test "x$new_path" = x; then
41611      # It's still not found. Now this is an unrecoverable error.
41612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41613$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41614      has_space=`$ECHO "$complete" | $GREP " "`
41615      if test "x$has_space" != x; then
41616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41618      fi
41619      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41620    fi
41621  fi
41622
41623  # Now new_path has a complete unix path to the binary
41624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41625    # Keep paths in /bin as-is, but remove trailing .exe if any
41626    new_path="${new_path/%.exe/}"
41627    # Do not save /bin paths to all_fixpath_prefixes!
41628  else
41629    # Not in mixed or Windows style, start by that.
41630    new_path=`cmd //c echo $new_path`
41631
41632  input_path="$new_path"
41633  # Check if we need to convert this using DOS-style short mode. If the path
41634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41635  # take no chances and rewrite it.
41636  # Note: m4 eats our [], so we need to use [ and ] instead.
41637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41638  if test "x$has_forbidden_chars" != x; then
41639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41641  fi
41642
41643    # Output is in $new_path
41644
41645  windows_path="$new_path"
41646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41647    unix_path=`$CYGPATH -u "$windows_path"`
41648    new_path="$unix_path"
41649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41651    new_path="$unix_path"
41652  fi
41653
41654    # remove trailing .exe if any
41655    new_path="${new_path/%.exe/}"
41656
41657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41659  fi
41660
41661    else
41662      # We're on a unix platform. Hooray! :)
41663      # First separate the path from the arguments. This will split at the first
41664      # space.
41665      complete="$OBJDUMP"
41666      path="${complete%% *}"
41667      tmp="$complete EOL"
41668      arguments="${tmp#* }"
41669
41670      # Cannot rely on the command "which" here since it doesn't always work.
41671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41672      if test -z "$is_absolute_path"; then
41673        # Path to executable is not absolute. Find it.
41674        IFS_save="$IFS"
41675        IFS=:
41676        for p in $PATH; do
41677          if test -f "$p/$path" && test -x "$p/$path"; then
41678            new_path="$p/$path"
41679            break
41680          fi
41681        done
41682        IFS="$IFS_save"
41683      else
41684        # This is an absolute path, we can use it without further modifications.
41685        new_path="$path"
41686      fi
41687
41688      if test "x$new_path" = x; then
41689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41690$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41691        has_space=`$ECHO "$complete" | $GREP " "`
41692        if test "x$has_space" != x; then
41693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41695        fi
41696        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41697      fi
41698    fi
41699
41700    # Now join together the path and the arguments once again
41701    if test "x$arguments" != xEOL; then
41702      new_complete="$new_path ${arguments% *}"
41703    else
41704      new_complete="$new_path"
41705    fi
41706
41707    if test "x$complete" != "x$new_complete"; then
41708      OBJDUMP="$new_complete"
41709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41710$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41711    fi
41712  fi
41713
41714  fi
41715
41716
41717  # Restore old path.
41718  PATH="$OLD_PATH"
41719
41720  # Restore the flags to the user specified values.
41721  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41722  CFLAGS="$ORG_CFLAGS"
41723  CXXFLAGS="$ORG_CXXFLAGS"
41724
41725
41726# Finally do some processing after the detection phase
41727
41728  if test "x$COMPILE_TYPE" = "xcross"; then
41729    # Now we need to find a C/C++ compiler that can build executables for the
41730    # build platform. We can't use the AC_PROG_CC macro, since it can only be
41731    # used once. Also, we need to do this without adding a tools dir to the
41732    # path, otherwise we might pick up cross-compilers which don't use standard
41733    # naming.
41734
41735    OLDPATH="$PATH"
41736
41737
41738# Check whether --with-build-devkit was given.
41739if test "${with_build_devkit+set}" = set; then :
41740  withval=$with_build_devkit;
41741fi
41742
41743    if test "x$with_build_devkit" = "xyes"; then
41744      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41745    elif test -n "$with_build_devkit"; then
41746      if test ! -d "$with_build_devkit"; then
41747        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41748      else
41749
41750  # Only process if variable expands to non-empty
41751
41752  if test "x$with_build_devkit" != x; then
41753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41754
41755  # Input might be given as Windows format, start by converting to
41756  # unix format.
41757  path="$with_build_devkit"
41758  new_path=`$CYGPATH -u "$path"`
41759
41760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41763  # "foo.exe" is OK but "foo" is an error.
41764  #
41765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41766  # It is also a way to make sure we got the proper file name for the real test later on.
41767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41768  if test "x$test_shortpath" = x; then
41769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41770$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41771    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41772  fi
41773
41774  # Call helper function which possibly converts this using DOS-style short mode.
41775  # If so, the updated path is stored in $new_path.
41776
41777  input_path="$new_path"
41778  # Check if we need to convert this using DOS-style short mode. If the path
41779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41780  # take no chances and rewrite it.
41781  # Note: m4 eats our [], so we need to use [ and ] instead.
41782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41783  if test "x$has_forbidden_chars" != x; then
41784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41788      # Going to short mode and back again did indeed matter. Since short mode is
41789      # case insensitive, let's make it lowercase to improve readability.
41790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41791      # Now convert it back to Unix-style (cygpath)
41792      input_path=`$CYGPATH -u "$shortmode_path"`
41793      new_path="$input_path"
41794    fi
41795  fi
41796
41797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41798  if test "x$test_cygdrive_prefix" = x; then
41799    # As a simple fix, exclude /usr/bin since it's not a real path.
41800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41802      # a path prefixed by /cygdrive for fixpath to work.
41803      new_path="$CYGWIN_ROOT_PATH$input_path"
41804    fi
41805  fi
41806
41807
41808  if test "x$path" != "x$new_path"; then
41809    with_build_devkit="$new_path"
41810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41811$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41812  fi
41813
41814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41815
41816  path="$with_build_devkit"
41817  has_colon=`$ECHO $path | $GREP ^.:`
41818  new_path="$path"
41819  if test "x$has_colon" = x; then
41820    # Not in mixed or Windows style, start by that.
41821    new_path=`cmd //c echo $path`
41822  fi
41823
41824
41825  input_path="$new_path"
41826  # Check if we need to convert this using DOS-style short mode. If the path
41827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41828  # take no chances and rewrite it.
41829  # Note: m4 eats our [], so we need to use [ and ] instead.
41830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41831  if test "x$has_forbidden_chars" != x; then
41832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41834  fi
41835
41836
41837  windows_path="$new_path"
41838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41839    unix_path=`$CYGPATH -u "$windows_path"`
41840    new_path="$unix_path"
41841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41843    new_path="$unix_path"
41844  fi
41845
41846  if test "x$path" != "x$new_path"; then
41847    with_build_devkit="$new_path"
41848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41849$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41850  fi
41851
41852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41854
41855    else
41856      # We're on a unix platform. Hooray! :)
41857      path="$with_build_devkit"
41858      has_space=`$ECHO "$path" | $GREP " "`
41859      if test "x$has_space" != x; then
41860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41861$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41863      fi
41864
41865      # Use eval to expand a potential ~
41866      eval path="$path"
41867      if test ! -f "$path" && test ! -d "$path"; then
41868        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
41869      fi
41870
41871      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
41872    fi
41873  fi
41874
41875        BUILD_DEVKIT_ROOT="$with_build_devkit"
41876        # Check for a meta data info file in the root of the devkit
41877        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
41878          # Process devkit.info so that existing devkit variables are not
41879          # modified by this
41880          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
41881              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
41882              -e "s/\$host/\$build/g" \
41883              $BUILD_DEVKIT_ROOT/devkit.info \
41884              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41885          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41886          # This potentially sets the following:
41887          # A descriptive name of the devkit
41888
41889  if test "x$BUILD_DEVKIT_NAME" = x; then
41890    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
41891  fi
41892
41893          # Corresponds to --with-extra-path
41894
41895  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
41896    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
41897  fi
41898
41899          # Corresponds to --with-toolchain-path
41900
41901  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41902    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
41903  fi
41904
41905          # Corresponds to --with-sysroot
41906
41907  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
41908    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
41909  fi
41910
41911          # Skip the Window specific parts
41912        fi
41913
41914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
41915$as_echo_n "checking for build platform devkit... " >&6; }
41916        if test "x$BUILD_DEVKIT_NAME" != x; then
41917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
41918$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
41919        else
41920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
41921$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
41922        fi
41923
41924        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
41925
41926  if test "x$BUILD_SYSROOT" != "x"; then
41927    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41928      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41929        # Solaris Studio does not have a concept of sysroot. Instead we must
41930        # make sure the default include and lib dirs are appended to each
41931        # compile and link command line.
41932        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
41933        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41934            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41935            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41936      fi
41937    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41938      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
41939      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
41940    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41941      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
41942      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
41943    fi
41944    # Propagate the sysroot args to hotspot
41945    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
41946    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41947    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41948    # The global CFLAGS and LDFLAGS variables need these for configure to function
41949    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
41950    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
41951    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41952    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41953  fi
41954
41955  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41956    # We also need -iframework<path>/System/Library/Frameworks
41957    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41958    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41959    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41960    # set this here so it doesn't have to be peppered throughout the forest
41961    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41962    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41963  fi
41964
41965
41966
41967
41968
41969         # Fallback default of just /bin if DEVKIT_PATH is not defined
41970        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41971          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
41972        fi
41973        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
41974      fi
41975    fi
41976
41977    # FIXME: we should list the discovered compilers as an exclude pattern!
41978    # If we do that, we can do this detection before POST_DETECTION, and still
41979    # find the build compilers in the tools dir, if needed.
41980
41981
41982
41983  # Publish this variable in the help.
41984
41985
41986  if [ -z "${BUILD_CC+x}" ]; then
41987    # The variable is not set by user, try to locate tool using the code snippet
41988    for ac_prog in cl cc gcc
41989do
41990  # Extract the first word of "$ac_prog", so it can be a program name with args.
41991set dummy $ac_prog; ac_word=$2
41992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41993$as_echo_n "checking for $ac_word... " >&6; }
41994if ${ac_cv_path_BUILD_CC+:} false; then :
41995  $as_echo_n "(cached) " >&6
41996else
41997  case $BUILD_CC in
41998  [\\/]* | ?:[\\/]*)
41999  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42000  ;;
42001  *)
42002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42003for as_dir in $PATH
42004do
42005  IFS=$as_save_IFS
42006  test -z "$as_dir" && as_dir=.
42007    for ac_exec_ext in '' $ac_executable_extensions; do
42008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42009    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42011    break 2
42012  fi
42013done
42014  done
42015IFS=$as_save_IFS
42016
42017  ;;
42018esac
42019fi
42020BUILD_CC=$ac_cv_path_BUILD_CC
42021if test -n "$BUILD_CC"; then
42022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42023$as_echo "$BUILD_CC" >&6; }
42024else
42025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42026$as_echo "no" >&6; }
42027fi
42028
42029
42030  test -n "$BUILD_CC" && break
42031done
42032
42033  else
42034    # The variable is set, but is it from the command line or the environment?
42035
42036    # Try to remove the string !BUILD_CC! from our list.
42037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42039      # If it failed, the variable was not from the command line. Ignore it,
42040      # but warn the user (except for BASH, which is always set by the calling BASH).
42041      if test "xBUILD_CC" != xBASH; then
42042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42043$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42044      fi
42045      # Try to locate tool using the code snippet
42046      for ac_prog in cl cc gcc
42047do
42048  # Extract the first word of "$ac_prog", so it can be a program name with args.
42049set dummy $ac_prog; ac_word=$2
42050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42051$as_echo_n "checking for $ac_word... " >&6; }
42052if ${ac_cv_path_BUILD_CC+:} false; then :
42053  $as_echo_n "(cached) " >&6
42054else
42055  case $BUILD_CC in
42056  [\\/]* | ?:[\\/]*)
42057  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42058  ;;
42059  *)
42060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42061for as_dir in $PATH
42062do
42063  IFS=$as_save_IFS
42064  test -z "$as_dir" && as_dir=.
42065    for ac_exec_ext in '' $ac_executable_extensions; do
42066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42067    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42069    break 2
42070  fi
42071done
42072  done
42073IFS=$as_save_IFS
42074
42075  ;;
42076esac
42077fi
42078BUILD_CC=$ac_cv_path_BUILD_CC
42079if test -n "$BUILD_CC"; then
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42081$as_echo "$BUILD_CC" >&6; }
42082else
42083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42084$as_echo "no" >&6; }
42085fi
42086
42087
42088  test -n "$BUILD_CC" && break
42089done
42090
42091    else
42092      # If it succeeded, then it was overridden by the user. We will use it
42093      # for the tool.
42094
42095      # First remove it from the list of overridden variables, so we can test
42096      # for unknown variables in the end.
42097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42098
42099      # Check if we try to supply an empty value
42100      if test "x$BUILD_CC" = x; then
42101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42102$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42104$as_echo_n "checking for BUILD_CC... " >&6; }
42105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42106$as_echo "disabled" >&6; }
42107      else
42108        # Check if the provided tool contains a complete path.
42109        tool_specified="$BUILD_CC"
42110        tool_basename="${tool_specified##*/}"
42111        if test "x$tool_basename" = "x$tool_specified"; then
42112          # A command without a complete path is provided, search $PATH.
42113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42114$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42115          # Extract the first word of "$tool_basename", so it can be a program name with args.
42116set dummy $tool_basename; ac_word=$2
42117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42118$as_echo_n "checking for $ac_word... " >&6; }
42119if ${ac_cv_path_BUILD_CC+:} false; then :
42120  $as_echo_n "(cached) " >&6
42121else
42122  case $BUILD_CC in
42123  [\\/]* | ?:[\\/]*)
42124  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42125  ;;
42126  *)
42127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42128for as_dir in $PATH
42129do
42130  IFS=$as_save_IFS
42131  test -z "$as_dir" && as_dir=.
42132    for ac_exec_ext in '' $ac_executable_extensions; do
42133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42134    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42136    break 2
42137  fi
42138done
42139  done
42140IFS=$as_save_IFS
42141
42142  ;;
42143esac
42144fi
42145BUILD_CC=$ac_cv_path_BUILD_CC
42146if test -n "$BUILD_CC"; then
42147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42148$as_echo "$BUILD_CC" >&6; }
42149else
42150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42151$as_echo "no" >&6; }
42152fi
42153
42154
42155          if test "x$BUILD_CC" = x; then
42156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42157          fi
42158        else
42159          # Otherwise we believe it is a complete path. Use it as it is.
42160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42161$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42163$as_echo_n "checking for BUILD_CC... " >&6; }
42164          if test ! -x "$tool_specified"; then
42165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42166$as_echo "not found" >&6; }
42167            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42168          fi
42169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42170$as_echo "$tool_specified" >&6; }
42171        fi
42172      fi
42173    fi
42174
42175  fi
42176
42177
42178
42179  if test "x$BUILD_CC" = x; then
42180    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42181  fi
42182
42183
42184
42185  # Only process if variable expands to non-empty
42186
42187  if test "x$BUILD_CC" != x; then
42188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42189
42190  # First separate the path from the arguments. This will split at the first
42191  # space.
42192  complete="$BUILD_CC"
42193  path="${complete%% *}"
42194  tmp="$complete EOL"
42195  arguments="${tmp#* }"
42196
42197  # Input might be given as Windows format, start by converting to
42198  # unix format.
42199  new_path=`$CYGPATH -u "$path"`
42200
42201  # Now try to locate executable using which
42202  new_path=`$WHICH "$new_path" 2> /dev/null`
42203  # bat and cmd files are not always considered executable in cygwin causing which
42204  # to not find them
42205  if test "x$new_path" = x \
42206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42208    new_path=`$CYGPATH -u "$path"`
42209  fi
42210  if test "x$new_path" = x; then
42211    # Oops. Which didn't find the executable.
42212    # The splitting of arguments from the executable at a space might have been incorrect,
42213    # since paths with space are more likely in Windows. Give it another try with the whole
42214    # argument.
42215    path="$complete"
42216    arguments="EOL"
42217    new_path=`$CYGPATH -u "$path"`
42218    new_path=`$WHICH "$new_path" 2> /dev/null`
42219    # bat and cmd files are not always considered executable in cygwin causing which
42220    # to not find them
42221    if test "x$new_path" = x \
42222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42224      new_path=`$CYGPATH -u "$path"`
42225    fi
42226    if test "x$new_path" = x; then
42227      # It's still not found. Now this is an unrecoverable error.
42228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42229$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42230      has_space=`$ECHO "$complete" | $GREP " "`
42231      if test "x$has_space" != x; then
42232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42234      fi
42235      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42236    fi
42237  fi
42238
42239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42242  # "foo.exe" is OK but "foo" is an error.
42243  #
42244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42245  # It is also a way to make sure we got the proper file name for the real test later on.
42246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42247  if test "x$test_shortpath" = x; then
42248    # Short path failed, file does not exist as specified.
42249    # Try adding .exe or .cmd
42250    if test -f "${new_path}.exe"; then
42251      input_to_shortpath="${new_path}.exe"
42252    elif test -f "${new_path}.cmd"; then
42253      input_to_shortpath="${new_path}.cmd"
42254    else
42255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42256$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42259      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42260    fi
42261  else
42262    input_to_shortpath="$new_path"
42263  fi
42264
42265  # Call helper function which possibly converts this using DOS-style short mode.
42266  # If so, the updated path is stored in $new_path.
42267  new_path="$input_to_shortpath"
42268
42269  input_path="$input_to_shortpath"
42270  # Check if we need to convert this using DOS-style short mode. If the path
42271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42272  # take no chances and rewrite it.
42273  # Note: m4 eats our [], so we need to use [ and ] instead.
42274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42275  if test "x$has_forbidden_chars" != x; then
42276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42280      # Going to short mode and back again did indeed matter. Since short mode is
42281      # case insensitive, let's make it lowercase to improve readability.
42282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42283      # Now convert it back to Unix-style (cygpath)
42284      input_path=`$CYGPATH -u "$shortmode_path"`
42285      new_path="$input_path"
42286    fi
42287  fi
42288
42289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42290  if test "x$test_cygdrive_prefix" = x; then
42291    # As a simple fix, exclude /usr/bin since it's not a real path.
42292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42294      # a path prefixed by /cygdrive for fixpath to work.
42295      new_path="$CYGWIN_ROOT_PATH$input_path"
42296    fi
42297  fi
42298
42299  # remove trailing .exe if any
42300  new_path="${new_path/%.exe/}"
42301
42302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42303
42304  # First separate the path from the arguments. This will split at the first
42305  # space.
42306  complete="$BUILD_CC"
42307  path="${complete%% *}"
42308  tmp="$complete EOL"
42309  arguments="${tmp#* }"
42310
42311  # Input might be given as Windows format, start by converting to
42312  # unix format.
42313  new_path="$path"
42314
42315  windows_path="$new_path"
42316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42317    unix_path=`$CYGPATH -u "$windows_path"`
42318    new_path="$unix_path"
42319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42321    new_path="$unix_path"
42322  fi
42323
42324
42325  # Now try to locate executable using which
42326  new_path=`$WHICH "$new_path" 2> /dev/null`
42327
42328  if test "x$new_path" = x; then
42329    # Oops. Which didn't find the executable.
42330    # The splitting of arguments from the executable at a space might have been incorrect,
42331    # since paths with space are more likely in Windows. Give it another try with the whole
42332    # argument.
42333    path="$complete"
42334    arguments="EOL"
42335    new_path="$path"
42336
42337  windows_path="$new_path"
42338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42339    unix_path=`$CYGPATH -u "$windows_path"`
42340    new_path="$unix_path"
42341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42343    new_path="$unix_path"
42344  fi
42345
42346
42347    new_path=`$WHICH "$new_path" 2> /dev/null`
42348    # bat and cmd files are not always considered executable in MSYS causing which
42349    # to not find them
42350    if test "x$new_path" = x \
42351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42353      new_path="$path"
42354
42355  windows_path="$new_path"
42356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42357    unix_path=`$CYGPATH -u "$windows_path"`
42358    new_path="$unix_path"
42359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42361    new_path="$unix_path"
42362  fi
42363
42364    fi
42365
42366    if test "x$new_path" = x; then
42367      # It's still not found. Now this is an unrecoverable error.
42368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42369$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42370      has_space=`$ECHO "$complete" | $GREP " "`
42371      if test "x$has_space" != x; then
42372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42374      fi
42375      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42376    fi
42377  fi
42378
42379  # Now new_path has a complete unix path to the binary
42380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42381    # Keep paths in /bin as-is, but remove trailing .exe if any
42382    new_path="${new_path/%.exe/}"
42383    # Do not save /bin paths to all_fixpath_prefixes!
42384  else
42385    # Not in mixed or Windows style, start by that.
42386    new_path=`cmd //c echo $new_path`
42387
42388  input_path="$new_path"
42389  # Check if we need to convert this using DOS-style short mode. If the path
42390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42391  # take no chances and rewrite it.
42392  # Note: m4 eats our [], so we need to use [ and ] instead.
42393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42394  if test "x$has_forbidden_chars" != x; then
42395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42397  fi
42398
42399    # Output is in $new_path
42400
42401  windows_path="$new_path"
42402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42403    unix_path=`$CYGPATH -u "$windows_path"`
42404    new_path="$unix_path"
42405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42407    new_path="$unix_path"
42408  fi
42409
42410    # remove trailing .exe if any
42411    new_path="${new_path/%.exe/}"
42412
42413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42415  fi
42416
42417    else
42418      # We're on a unix platform. Hooray! :)
42419      # First separate the path from the arguments. This will split at the first
42420      # space.
42421      complete="$BUILD_CC"
42422      path="${complete%% *}"
42423      tmp="$complete EOL"
42424      arguments="${tmp#* }"
42425
42426      # Cannot rely on the command "which" here since it doesn't always work.
42427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42428      if test -z "$is_absolute_path"; then
42429        # Path to executable is not absolute. Find it.
42430        IFS_save="$IFS"
42431        IFS=:
42432        for p in $PATH; do
42433          if test -f "$p/$path" && test -x "$p/$path"; then
42434            new_path="$p/$path"
42435            break
42436          fi
42437        done
42438        IFS="$IFS_save"
42439      else
42440        # This is an absolute path, we can use it without further modifications.
42441        new_path="$path"
42442      fi
42443
42444      if test "x$new_path" = x; then
42445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42446$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42447        has_space=`$ECHO "$complete" | $GREP " "`
42448        if test "x$has_space" != x; then
42449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42451        fi
42452        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42453      fi
42454    fi
42455
42456    # Now join together the path and the arguments once again
42457    if test "x$arguments" != xEOL; then
42458      new_complete="$new_path ${arguments% *}"
42459    else
42460      new_complete="$new_path"
42461    fi
42462
42463    if test "x$complete" != "x$new_complete"; then
42464      BUILD_CC="$new_complete"
42465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42466$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42467    fi
42468  fi
42469
42470
42471
42472
42473  # Publish this variable in the help.
42474
42475
42476  if [ -z "${BUILD_CXX+x}" ]; then
42477    # The variable is not set by user, try to locate tool using the code snippet
42478    for ac_prog in cl CC g++
42479do
42480  # Extract the first word of "$ac_prog", so it can be a program name with args.
42481set dummy $ac_prog; ac_word=$2
42482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42483$as_echo_n "checking for $ac_word... " >&6; }
42484if ${ac_cv_path_BUILD_CXX+:} false; then :
42485  $as_echo_n "(cached) " >&6
42486else
42487  case $BUILD_CXX in
42488  [\\/]* | ?:[\\/]*)
42489  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42490  ;;
42491  *)
42492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42493for as_dir in $PATH
42494do
42495  IFS=$as_save_IFS
42496  test -z "$as_dir" && as_dir=.
42497    for ac_exec_ext in '' $ac_executable_extensions; do
42498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42499    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42501    break 2
42502  fi
42503done
42504  done
42505IFS=$as_save_IFS
42506
42507  ;;
42508esac
42509fi
42510BUILD_CXX=$ac_cv_path_BUILD_CXX
42511if test -n "$BUILD_CXX"; then
42512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42513$as_echo "$BUILD_CXX" >&6; }
42514else
42515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42516$as_echo "no" >&6; }
42517fi
42518
42519
42520  test -n "$BUILD_CXX" && break
42521done
42522
42523  else
42524    # The variable is set, but is it from the command line or the environment?
42525
42526    # Try to remove the string !BUILD_CXX! from our list.
42527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42529      # If it failed, the variable was not from the command line. Ignore it,
42530      # but warn the user (except for BASH, which is always set by the calling BASH).
42531      if test "xBUILD_CXX" != xBASH; then
42532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42533$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42534      fi
42535      # Try to locate tool using the code snippet
42536      for ac_prog in cl CC g++
42537do
42538  # Extract the first word of "$ac_prog", so it can be a program name with args.
42539set dummy $ac_prog; ac_word=$2
42540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42541$as_echo_n "checking for $ac_word... " >&6; }
42542if ${ac_cv_path_BUILD_CXX+:} false; then :
42543  $as_echo_n "(cached) " >&6
42544else
42545  case $BUILD_CXX in
42546  [\\/]* | ?:[\\/]*)
42547  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42548  ;;
42549  *)
42550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42551for as_dir in $PATH
42552do
42553  IFS=$as_save_IFS
42554  test -z "$as_dir" && as_dir=.
42555    for ac_exec_ext in '' $ac_executable_extensions; do
42556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42557    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42559    break 2
42560  fi
42561done
42562  done
42563IFS=$as_save_IFS
42564
42565  ;;
42566esac
42567fi
42568BUILD_CXX=$ac_cv_path_BUILD_CXX
42569if test -n "$BUILD_CXX"; then
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42571$as_echo "$BUILD_CXX" >&6; }
42572else
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42574$as_echo "no" >&6; }
42575fi
42576
42577
42578  test -n "$BUILD_CXX" && break
42579done
42580
42581    else
42582      # If it succeeded, then it was overridden by the user. We will use it
42583      # for the tool.
42584
42585      # First remove it from the list of overridden variables, so we can test
42586      # for unknown variables in the end.
42587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42588
42589      # Check if we try to supply an empty value
42590      if test "x$BUILD_CXX" = x; then
42591        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42592$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42594$as_echo_n "checking for BUILD_CXX... " >&6; }
42595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42596$as_echo "disabled" >&6; }
42597      else
42598        # Check if the provided tool contains a complete path.
42599        tool_specified="$BUILD_CXX"
42600        tool_basename="${tool_specified##*/}"
42601        if test "x$tool_basename" = "x$tool_specified"; then
42602          # A command without a complete path is provided, search $PATH.
42603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42604$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42605          # Extract the first word of "$tool_basename", so it can be a program name with args.
42606set dummy $tool_basename; ac_word=$2
42607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42608$as_echo_n "checking for $ac_word... " >&6; }
42609if ${ac_cv_path_BUILD_CXX+:} false; then :
42610  $as_echo_n "(cached) " >&6
42611else
42612  case $BUILD_CXX in
42613  [\\/]* | ?:[\\/]*)
42614  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42615  ;;
42616  *)
42617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42618for as_dir in $PATH
42619do
42620  IFS=$as_save_IFS
42621  test -z "$as_dir" && as_dir=.
42622    for ac_exec_ext in '' $ac_executable_extensions; do
42623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42624    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42626    break 2
42627  fi
42628done
42629  done
42630IFS=$as_save_IFS
42631
42632  ;;
42633esac
42634fi
42635BUILD_CXX=$ac_cv_path_BUILD_CXX
42636if test -n "$BUILD_CXX"; then
42637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42638$as_echo "$BUILD_CXX" >&6; }
42639else
42640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42641$as_echo "no" >&6; }
42642fi
42643
42644
42645          if test "x$BUILD_CXX" = x; then
42646            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42647          fi
42648        else
42649          # Otherwise we believe it is a complete path. Use it as it is.
42650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42651$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42652          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42653$as_echo_n "checking for BUILD_CXX... " >&6; }
42654          if test ! -x "$tool_specified"; then
42655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42656$as_echo "not found" >&6; }
42657            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42658          fi
42659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42660$as_echo "$tool_specified" >&6; }
42661        fi
42662      fi
42663    fi
42664
42665  fi
42666
42667
42668
42669  if test "x$BUILD_CXX" = x; then
42670    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42671  fi
42672
42673
42674
42675  # Only process if variable expands to non-empty
42676
42677  if test "x$BUILD_CXX" != x; then
42678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42679
42680  # First separate the path from the arguments. This will split at the first
42681  # space.
42682  complete="$BUILD_CXX"
42683  path="${complete%% *}"
42684  tmp="$complete EOL"
42685  arguments="${tmp#* }"
42686
42687  # Input might be given as Windows format, start by converting to
42688  # unix format.
42689  new_path=`$CYGPATH -u "$path"`
42690
42691  # Now try to locate executable using which
42692  new_path=`$WHICH "$new_path" 2> /dev/null`
42693  # bat and cmd files are not always considered executable in cygwin causing which
42694  # to not find them
42695  if test "x$new_path" = x \
42696      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42697      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42698    new_path=`$CYGPATH -u "$path"`
42699  fi
42700  if test "x$new_path" = x; then
42701    # Oops. Which didn't find the executable.
42702    # The splitting of arguments from the executable at a space might have been incorrect,
42703    # since paths with space are more likely in Windows. Give it another try with the whole
42704    # argument.
42705    path="$complete"
42706    arguments="EOL"
42707    new_path=`$CYGPATH -u "$path"`
42708    new_path=`$WHICH "$new_path" 2> /dev/null`
42709    # bat and cmd files are not always considered executable in cygwin causing which
42710    # to not find them
42711    if test "x$new_path" = x \
42712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42714      new_path=`$CYGPATH -u "$path"`
42715    fi
42716    if test "x$new_path" = x; then
42717      # It's still not found. Now this is an unrecoverable error.
42718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42719$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42720      has_space=`$ECHO "$complete" | $GREP " "`
42721      if test "x$has_space" != x; then
42722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42724      fi
42725      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42726    fi
42727  fi
42728
42729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42732  # "foo.exe" is OK but "foo" is an error.
42733  #
42734  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42735  # It is also a way to make sure we got the proper file name for the real test later on.
42736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42737  if test "x$test_shortpath" = x; then
42738    # Short path failed, file does not exist as specified.
42739    # Try adding .exe or .cmd
42740    if test -f "${new_path}.exe"; then
42741      input_to_shortpath="${new_path}.exe"
42742    elif test -f "${new_path}.cmd"; then
42743      input_to_shortpath="${new_path}.cmd"
42744    else
42745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42746$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42749      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42750    fi
42751  else
42752    input_to_shortpath="$new_path"
42753  fi
42754
42755  # Call helper function which possibly converts this using DOS-style short mode.
42756  # If so, the updated path is stored in $new_path.
42757  new_path="$input_to_shortpath"
42758
42759  input_path="$input_to_shortpath"
42760  # Check if we need to convert this using DOS-style short mode. If the path
42761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42762  # take no chances and rewrite it.
42763  # Note: m4 eats our [], so we need to use [ and ] instead.
42764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42765  if test "x$has_forbidden_chars" != x; then
42766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42770      # Going to short mode and back again did indeed matter. Since short mode is
42771      # case insensitive, let's make it lowercase to improve readability.
42772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42773      # Now convert it back to Unix-style (cygpath)
42774      input_path=`$CYGPATH -u "$shortmode_path"`
42775      new_path="$input_path"
42776    fi
42777  fi
42778
42779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42780  if test "x$test_cygdrive_prefix" = x; then
42781    # As a simple fix, exclude /usr/bin since it's not a real path.
42782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42784      # a path prefixed by /cygdrive for fixpath to work.
42785      new_path="$CYGWIN_ROOT_PATH$input_path"
42786    fi
42787  fi
42788
42789  # remove trailing .exe if any
42790  new_path="${new_path/%.exe/}"
42791
42792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42793
42794  # First separate the path from the arguments. This will split at the first
42795  # space.
42796  complete="$BUILD_CXX"
42797  path="${complete%% *}"
42798  tmp="$complete EOL"
42799  arguments="${tmp#* }"
42800
42801  # Input might be given as Windows format, start by converting to
42802  # unix format.
42803  new_path="$path"
42804
42805  windows_path="$new_path"
42806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42807    unix_path=`$CYGPATH -u "$windows_path"`
42808    new_path="$unix_path"
42809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42811    new_path="$unix_path"
42812  fi
42813
42814
42815  # Now try to locate executable using which
42816  new_path=`$WHICH "$new_path" 2> /dev/null`
42817
42818  if test "x$new_path" = x; then
42819    # Oops. Which didn't find the executable.
42820    # The splitting of arguments from the executable at a space might have been incorrect,
42821    # since paths with space are more likely in Windows. Give it another try with the whole
42822    # argument.
42823    path="$complete"
42824    arguments="EOL"
42825    new_path="$path"
42826
42827  windows_path="$new_path"
42828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42829    unix_path=`$CYGPATH -u "$windows_path"`
42830    new_path="$unix_path"
42831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42833    new_path="$unix_path"
42834  fi
42835
42836
42837    new_path=`$WHICH "$new_path" 2> /dev/null`
42838    # bat and cmd files are not always considered executable in MSYS causing which
42839    # to not find them
42840    if test "x$new_path" = x \
42841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42843      new_path="$path"
42844
42845  windows_path="$new_path"
42846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42847    unix_path=`$CYGPATH -u "$windows_path"`
42848    new_path="$unix_path"
42849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42851    new_path="$unix_path"
42852  fi
42853
42854    fi
42855
42856    if test "x$new_path" = x; then
42857      # It's still not found. Now this is an unrecoverable error.
42858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42859$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42860      has_space=`$ECHO "$complete" | $GREP " "`
42861      if test "x$has_space" != x; then
42862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42864      fi
42865      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42866    fi
42867  fi
42868
42869  # Now new_path has a complete unix path to the binary
42870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42871    # Keep paths in /bin as-is, but remove trailing .exe if any
42872    new_path="${new_path/%.exe/}"
42873    # Do not save /bin paths to all_fixpath_prefixes!
42874  else
42875    # Not in mixed or Windows style, start by that.
42876    new_path=`cmd //c echo $new_path`
42877
42878  input_path="$new_path"
42879  # Check if we need to convert this using DOS-style short mode. If the path
42880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42881  # take no chances and rewrite it.
42882  # Note: m4 eats our [], so we need to use [ and ] instead.
42883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42884  if test "x$has_forbidden_chars" != x; then
42885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42887  fi
42888
42889    # Output is in $new_path
42890
42891  windows_path="$new_path"
42892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42893    unix_path=`$CYGPATH -u "$windows_path"`
42894    new_path="$unix_path"
42895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42897    new_path="$unix_path"
42898  fi
42899
42900    # remove trailing .exe if any
42901    new_path="${new_path/%.exe/}"
42902
42903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42905  fi
42906
42907    else
42908      # We're on a unix platform. Hooray! :)
42909      # First separate the path from the arguments. This will split at the first
42910      # space.
42911      complete="$BUILD_CXX"
42912      path="${complete%% *}"
42913      tmp="$complete EOL"
42914      arguments="${tmp#* }"
42915
42916      # Cannot rely on the command "which" here since it doesn't always work.
42917      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42918      if test -z "$is_absolute_path"; then
42919        # Path to executable is not absolute. Find it.
42920        IFS_save="$IFS"
42921        IFS=:
42922        for p in $PATH; do
42923          if test -f "$p/$path" && test -x "$p/$path"; then
42924            new_path="$p/$path"
42925            break
42926          fi
42927        done
42928        IFS="$IFS_save"
42929      else
42930        # This is an absolute path, we can use it without further modifications.
42931        new_path="$path"
42932      fi
42933
42934      if test "x$new_path" = x; then
42935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42936$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42937        has_space=`$ECHO "$complete" | $GREP " "`
42938        if test "x$has_space" != x; then
42939          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42941        fi
42942        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42943      fi
42944    fi
42945
42946    # Now join together the path and the arguments once again
42947    if test "x$arguments" != xEOL; then
42948      new_complete="$new_path ${arguments% *}"
42949    else
42950      new_complete="$new_path"
42951    fi
42952
42953    if test "x$complete" != "x$new_complete"; then
42954      BUILD_CXX="$new_complete"
42955      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
42956$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
42957    fi
42958  fi
42959
42960    BUILD_LD="$BUILD_CC"
42961
42962    PATH="$OLDPATH"
42963  else
42964    # If we are not cross compiling, use the normal target compilers for
42965    # building the build platform executables.
42966    BUILD_CC="$CC"
42967    BUILD_CXX="$CXX"
42968    BUILD_LD="$LD"
42969    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
42970    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
42971  fi
42972
42973
42974
42975
42976
42977
42978
42979
42980  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42981    # For hotspot, we need these in Windows mixed path,
42982    # so rewrite them all. Need added .exe suffix.
42983    HOTSPOT_CXX="$CXX.exe"
42984    HOTSPOT_LD="$LD.exe"
42985    HOTSPOT_MT="$MT.exe"
42986    HOTSPOT_RC="$RC.exe"
42987
42988  unix_path="$HOTSPOT_CXX"
42989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42990    windows_path=`$CYGPATH -m "$unix_path"`
42991    HOTSPOT_CXX="$windows_path"
42992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42993    windows_path=`cmd //c echo $unix_path`
42994    HOTSPOT_CXX="$windows_path"
42995  fi
42996
42997
42998  unix_path="$HOTSPOT_LD"
42999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43000    windows_path=`$CYGPATH -m "$unix_path"`
43001    HOTSPOT_LD="$windows_path"
43002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43003    windows_path=`cmd //c echo $unix_path`
43004    HOTSPOT_LD="$windows_path"
43005  fi
43006
43007
43008  unix_path="$HOTSPOT_MT"
43009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43010    windows_path=`$CYGPATH -m "$unix_path"`
43011    HOTSPOT_MT="$windows_path"
43012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43013    windows_path=`cmd //c echo $unix_path`
43014    HOTSPOT_MT="$windows_path"
43015  fi
43016
43017
43018  unix_path="$HOTSPOT_RC"
43019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43020    windows_path=`$CYGPATH -m "$unix_path"`
43021    HOTSPOT_RC="$windows_path"
43022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43023    windows_path=`cmd //c echo $unix_path`
43024    HOTSPOT_RC="$windows_path"
43025  fi
43026
43027
43028
43029  else
43030    HOTSPOT_CXX="$CXX"
43031    HOTSPOT_LD="$LD"
43032  fi
43033
43034
43035
43036  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43037    USE_CLANG=true
43038  fi
43039
43040
43041
43042
43043
43044  # The package path is used only on macosx?
43045  # FIXME: clean this up, and/or move it elsewhere.
43046  PACKAGE_PATH=/opt/local
43047
43048
43049  # Check for extra potential brokenness.
43050  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43051    # On Windows, double-check that we got the right compiler.
43052    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43053    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43054    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43055      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43056        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
43057      fi
43058    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43059      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43060        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43061      fi
43062    fi
43063  fi
43064
43065  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43066    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43067    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43068    # This is later checked when setting flags.
43069
43070    # "-Og" suppported for GCC 4.8 and later
43071    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43072
43073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43074$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43075  supports=yes
43076
43077  saved_cflags="$CFLAGS"
43078  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43079  ac_ext=c
43080ac_cpp='$CPP $CPPFLAGS'
43081ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43082ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43083ac_compiler_gnu=$ac_cv_c_compiler_gnu
43084
43085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43086/* end confdefs.h.  */
43087int i;
43088_ACEOF
43089if ac_fn_c_try_compile "$LINENO"; then :
43090
43091else
43092  supports=no
43093fi
43094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43095  ac_ext=cpp
43096ac_cpp='$CXXCPP $CPPFLAGS'
43097ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43098ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43099ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43100
43101  CFLAGS="$saved_cflags"
43102
43103  saved_cxxflags="$CXXFLAGS"
43104  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43105  ac_ext=cpp
43106ac_cpp='$CXXCPP $CPPFLAGS'
43107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43110
43111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43112/* end confdefs.h.  */
43113int i;
43114_ACEOF
43115if ac_fn_cxx_try_compile "$LINENO"; then :
43116
43117else
43118  supports=no
43119fi
43120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43121  ac_ext=cpp
43122ac_cpp='$CXXCPP $CPPFLAGS'
43123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43126
43127  CXXFLAGS="$saved_cxxflags"
43128
43129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43130$as_echo "$supports" >&6; }
43131  if test "x$supports" = "xyes" ; then
43132    HAS_CFLAG_OPTIMIZE_DEBUG=true
43133  else
43134    HAS_CFLAG_OPTIMIZE_DEBUG=false
43135  fi
43136
43137
43138    # "-z relro" supported in GNU binutils 2.17 and later
43139    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43140
43141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43142$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43143  supports=yes
43144
43145  saved_ldflags="$LDFLAGS"
43146  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43147  ac_ext=c
43148ac_cpp='$CPP $CPPFLAGS'
43149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43151ac_compiler_gnu=$ac_cv_c_compiler_gnu
43152
43153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43154/* end confdefs.h.  */
43155
43156int
43157main ()
43158{
43159
43160  ;
43161  return 0;
43162}
43163_ACEOF
43164if ac_fn_c_try_link "$LINENO"; then :
43165
43166else
43167  supports=no
43168fi
43169rm -f core conftest.err conftest.$ac_objext \
43170    conftest$ac_exeext conftest.$ac_ext
43171  ac_ext=cpp
43172ac_cpp='$CXXCPP $CPPFLAGS'
43173ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43174ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43175ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43176
43177  LDFLAGS="$saved_ldflags"
43178
43179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43180$as_echo "$supports" >&6; }
43181  if test "x$supports" = "xyes" ; then
43182    HAS_LINKER_RELRO=true
43183  else
43184    HAS_LINKER_RELRO=false
43185  fi
43186
43187
43188    # "-z now" supported in GNU binutils 2.11 and later
43189    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43190
43191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43192$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43193  supports=yes
43194
43195  saved_ldflags="$LDFLAGS"
43196  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43197  ac_ext=c
43198ac_cpp='$CPP $CPPFLAGS'
43199ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43200ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43201ac_compiler_gnu=$ac_cv_c_compiler_gnu
43202
43203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43204/* end confdefs.h.  */
43205
43206int
43207main ()
43208{
43209
43210  ;
43211  return 0;
43212}
43213_ACEOF
43214if ac_fn_c_try_link "$LINENO"; then :
43215
43216else
43217  supports=no
43218fi
43219rm -f core conftest.err conftest.$ac_objext \
43220    conftest$ac_exeext conftest.$ac_ext
43221  ac_ext=cpp
43222ac_cpp='$CXXCPP $CPPFLAGS'
43223ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43224ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43225ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43226
43227  LDFLAGS="$saved_ldflags"
43228
43229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43230$as_echo "$supports" >&6; }
43231  if test "x$supports" = "xyes" ; then
43232    HAS_LINKER_NOW=true
43233  else
43234    HAS_LINKER_NOW=false
43235  fi
43236
43237  fi
43238
43239  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43240  # in executable.'
43241  USING_BROKEN_SUSE_LD=no
43242  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43244$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43245    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43246    $ECHO "int main() { }" > main.c
43247    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43249$as_echo "no" >&6; }
43250      USING_BROKEN_SUSE_LD=no
43251    else
43252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43253$as_echo "yes" >&6; }
43254      USING_BROKEN_SUSE_LD=yes
43255    fi
43256    rm -rf version-script.map main.c a.out
43257  fi
43258
43259
43260
43261# Setup the JTReg Regression Test Harness.
43262
43263
43264# Check whether --with-jtreg was given.
43265if test "${with_jtreg+set}" = set; then :
43266  withval=$with_jtreg;
43267else
43268  with_jtreg=no
43269fi
43270
43271
43272  if test "x$with_jtreg" = xno; then
43273    # jtreg disabled
43274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43275$as_echo_n "checking for jtreg... " >&6; }
43276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43277$as_echo "no" >&6; }
43278  else
43279    if test "x$with_jtreg" != xyes; then
43280      # with path specified.
43281      JT_HOME="$with_jtreg"
43282    fi
43283
43284    if test "x$JT_HOME" != x; then
43285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43286$as_echo_n "checking for jtreg... " >&6; }
43287
43288      # use JT_HOME enviroment var.
43289
43290  # Only process if variable expands to non-empty
43291
43292  if test "x$JT_HOME" != x; then
43293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43294
43295  # Input might be given as Windows format, start by converting to
43296  # unix format.
43297  path="$JT_HOME"
43298  new_path=`$CYGPATH -u "$path"`
43299
43300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43303  # "foo.exe" is OK but "foo" is an error.
43304  #
43305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43306  # It is also a way to make sure we got the proper file name for the real test later on.
43307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43308  if test "x$test_shortpath" = x; then
43309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43310$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43311    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43312  fi
43313
43314  # Call helper function which possibly converts this using DOS-style short mode.
43315  # If so, the updated path is stored in $new_path.
43316
43317  input_path="$new_path"
43318  # Check if we need to convert this using DOS-style short mode. If the path
43319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43320  # take no chances and rewrite it.
43321  # Note: m4 eats our [], so we need to use [ and ] instead.
43322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43323  if test "x$has_forbidden_chars" != x; then
43324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43328      # Going to short mode and back again did indeed matter. Since short mode is
43329      # case insensitive, let's make it lowercase to improve readability.
43330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43331      # Now convert it back to Unix-style (cygpath)
43332      input_path=`$CYGPATH -u "$shortmode_path"`
43333      new_path="$input_path"
43334    fi
43335  fi
43336
43337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43338  if test "x$test_cygdrive_prefix" = x; then
43339    # As a simple fix, exclude /usr/bin since it's not a real path.
43340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43342      # a path prefixed by /cygdrive for fixpath to work.
43343      new_path="$CYGWIN_ROOT_PATH$input_path"
43344    fi
43345  fi
43346
43347
43348  if test "x$path" != "x$new_path"; then
43349    JT_HOME="$new_path"
43350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43351$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43352  fi
43353
43354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43355
43356  path="$JT_HOME"
43357  has_colon=`$ECHO $path | $GREP ^.:`
43358  new_path="$path"
43359  if test "x$has_colon" = x; then
43360    # Not in mixed or Windows style, start by that.
43361    new_path=`cmd //c echo $path`
43362  fi
43363
43364
43365  input_path="$new_path"
43366  # Check if we need to convert this using DOS-style short mode. If the path
43367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43368  # take no chances and rewrite it.
43369  # Note: m4 eats our [], so we need to use [ and ] instead.
43370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43371  if test "x$has_forbidden_chars" != x; then
43372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43374  fi
43375
43376
43377  windows_path="$new_path"
43378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43379    unix_path=`$CYGPATH -u "$windows_path"`
43380    new_path="$unix_path"
43381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43383    new_path="$unix_path"
43384  fi
43385
43386  if test "x$path" != "x$new_path"; then
43387    JT_HOME="$new_path"
43388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43389$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43390  fi
43391
43392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43394
43395    else
43396      # We're on a unix platform. Hooray! :)
43397      path="$JT_HOME"
43398      has_space=`$ECHO "$path" | $GREP " "`
43399      if test "x$has_space" != x; then
43400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43401$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43403      fi
43404
43405      # Use eval to expand a potential ~
43406      eval path="$path"
43407      if test ! -f "$path" && test ! -d "$path"; then
43408        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43409      fi
43410
43411      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43412    fi
43413  fi
43414
43415
43416      # jtreg win32 script works for everybody
43417      JTREGEXE="$JT_HOME/bin/jtreg"
43418
43419      if test ! -f "$JTREGEXE"; then
43420        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43421      fi
43422
43423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43424$as_echo "$JTREGEXE" >&6; }
43425    else
43426      # try to find jtreg on path
43427
43428
43429
43430  # Publish this variable in the help.
43431
43432
43433  if [ -z "${JTREGEXE+x}" ]; then
43434    # The variable is not set by user, try to locate tool using the code snippet
43435    for ac_prog in jtreg
43436do
43437  # Extract the first word of "$ac_prog", so it can be a program name with args.
43438set dummy $ac_prog; ac_word=$2
43439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43440$as_echo_n "checking for $ac_word... " >&6; }
43441if ${ac_cv_path_JTREGEXE+:} false; then :
43442  $as_echo_n "(cached) " >&6
43443else
43444  case $JTREGEXE in
43445  [\\/]* | ?:[\\/]*)
43446  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43447  ;;
43448  *)
43449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43450for as_dir in $PATH
43451do
43452  IFS=$as_save_IFS
43453  test -z "$as_dir" && as_dir=.
43454    for ac_exec_ext in '' $ac_executable_extensions; do
43455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43456    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43458    break 2
43459  fi
43460done
43461  done
43462IFS=$as_save_IFS
43463
43464  ;;
43465esac
43466fi
43467JTREGEXE=$ac_cv_path_JTREGEXE
43468if test -n "$JTREGEXE"; then
43469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43470$as_echo "$JTREGEXE" >&6; }
43471else
43472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43473$as_echo "no" >&6; }
43474fi
43475
43476
43477  test -n "$JTREGEXE" && break
43478done
43479
43480  else
43481    # The variable is set, but is it from the command line or the environment?
43482
43483    # Try to remove the string !JTREGEXE! from our list.
43484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43486      # If it failed, the variable was not from the command line. Ignore it,
43487      # but warn the user (except for BASH, which is always set by the calling BASH).
43488      if test "xJTREGEXE" != xBASH; then
43489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43490$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43491      fi
43492      # Try to locate tool using the code snippet
43493      for ac_prog in jtreg
43494do
43495  # Extract the first word of "$ac_prog", so it can be a program name with args.
43496set dummy $ac_prog; ac_word=$2
43497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43498$as_echo_n "checking for $ac_word... " >&6; }
43499if ${ac_cv_path_JTREGEXE+:} false; then :
43500  $as_echo_n "(cached) " >&6
43501else
43502  case $JTREGEXE in
43503  [\\/]* | ?:[\\/]*)
43504  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43505  ;;
43506  *)
43507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43508for as_dir in $PATH
43509do
43510  IFS=$as_save_IFS
43511  test -z "$as_dir" && as_dir=.
43512    for ac_exec_ext in '' $ac_executable_extensions; do
43513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43514    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43516    break 2
43517  fi
43518done
43519  done
43520IFS=$as_save_IFS
43521
43522  ;;
43523esac
43524fi
43525JTREGEXE=$ac_cv_path_JTREGEXE
43526if test -n "$JTREGEXE"; then
43527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43528$as_echo "$JTREGEXE" >&6; }
43529else
43530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43531$as_echo "no" >&6; }
43532fi
43533
43534
43535  test -n "$JTREGEXE" && break
43536done
43537
43538    else
43539      # If it succeeded, then it was overridden by the user. We will use it
43540      # for the tool.
43541
43542      # First remove it from the list of overridden variables, so we can test
43543      # for unknown variables in the end.
43544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43545
43546      # Check if we try to supply an empty value
43547      if test "x$JTREGEXE" = x; then
43548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43549$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43551$as_echo_n "checking for JTREGEXE... " >&6; }
43552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43553$as_echo "disabled" >&6; }
43554      else
43555        # Check if the provided tool contains a complete path.
43556        tool_specified="$JTREGEXE"
43557        tool_basename="${tool_specified##*/}"
43558        if test "x$tool_basename" = "x$tool_specified"; then
43559          # A command without a complete path is provided, search $PATH.
43560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43561$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43562          # Extract the first word of "$tool_basename", so it can be a program name with args.
43563set dummy $tool_basename; ac_word=$2
43564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43565$as_echo_n "checking for $ac_word... " >&6; }
43566if ${ac_cv_path_JTREGEXE+:} false; then :
43567  $as_echo_n "(cached) " >&6
43568else
43569  case $JTREGEXE in
43570  [\\/]* | ?:[\\/]*)
43571  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43572  ;;
43573  *)
43574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43575for as_dir in $PATH
43576do
43577  IFS=$as_save_IFS
43578  test -z "$as_dir" && as_dir=.
43579    for ac_exec_ext in '' $ac_executable_extensions; do
43580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43581    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43583    break 2
43584  fi
43585done
43586  done
43587IFS=$as_save_IFS
43588
43589  ;;
43590esac
43591fi
43592JTREGEXE=$ac_cv_path_JTREGEXE
43593if test -n "$JTREGEXE"; then
43594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43595$as_echo "$JTREGEXE" >&6; }
43596else
43597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43598$as_echo "no" >&6; }
43599fi
43600
43601
43602          if test "x$JTREGEXE" = x; then
43603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43604          fi
43605        else
43606          # Otherwise we believe it is a complete path. Use it as it is.
43607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43608$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43610$as_echo_n "checking for JTREGEXE... " >&6; }
43611          if test ! -x "$tool_specified"; then
43612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43613$as_echo "not found" >&6; }
43614            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43615          fi
43616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43617$as_echo "$tool_specified" >&6; }
43618        fi
43619      fi
43620    fi
43621
43622  fi
43623
43624
43625
43626  if test "x$JTREGEXE" = x; then
43627    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43628  fi
43629
43630
43631      JT_HOME="`$DIRNAME $JTREGEXE`"
43632    fi
43633  fi
43634
43635
43636
43637
43638
43639
43640  # Option used to tell the compiler whether to create 32- or 64-bit executables
43641  if test "x$TOOLCHAIN_TYPE" = xxlc; then
43642    COMPILER_TARGET_BITS_FLAG="-q"
43643  else
43644    COMPILER_TARGET_BITS_FLAG="-m"
43645  fi
43646
43647
43648  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43649  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43650    ARFLAGS="-r"
43651  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43652    ARFLAGS="-X64"
43653  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43654    # lib.exe is used as AR to create static libraries.
43655    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43656  else
43657    ARFLAGS=""
43658  fi
43659
43660
43661  ## Setup strip.
43662  # FIXME: should this really be per platform, or should it be per toolchain type?
43663  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43664  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43665  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43666    STRIPFLAGS="-g"
43667  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43668    STRIPFLAGS="-x"
43669  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43670    STRIPFLAGS="-S"
43671  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43672    STRIPFLAGS="-X32_64"
43673  fi
43674
43675
43676
43677  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43678    CC_OUT_OPTION=-Fo
43679    EXE_OUT_OPTION=-out:
43680    LD_OUT_OPTION=-out:
43681    AR_OUT_OPTION=-out:
43682  else
43683    # The option used to specify the target .o,.a or .so file.
43684    # When compiling, how to specify the to be created object file.
43685    CC_OUT_OPTION='-o$(SPACE)'
43686    # When linking, how to specify the to be created executable.
43687    EXE_OUT_OPTION='-o$(SPACE)'
43688    # When linking, how to specify the to be created dynamically linkable library.
43689    LD_OUT_OPTION='-o$(SPACE)'
43690    # When archiving, how to specify the to be create static archive for object files.
43691    AR_OUT_OPTION='rcs$(SPACE)'
43692  fi
43693
43694
43695
43696
43697
43698  # On Windows, we need to set RC flags.
43699  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43700    RC_FLAGS="-nologo -l0x409"
43701    if test "x$VARIANT" = xOPT; then
43702      RC_FLAGS="$RC_FLAGS -DNDEBUG"
43703    fi
43704
43705    # The version variables used to create RC_FLAGS may be overridden
43706    # in a custom configure script, or possibly the command line.
43707    # Let those variables be expanded at make time in spec.gmk.
43708    # The \$ are escaped to the shell, and the $(...) variables
43709    # are evaluated by make.
43710    RC_FLAGS="$RC_FLAGS \
43711        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43712        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43713        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43714        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43715        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43716        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43717        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43718  fi
43719
43720
43721  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43722    # silence copyright notice and other headers.
43723    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43724  fi
43725
43726
43727# FIXME: Currently we must test this after toolchain but before flags. Fix!
43728
43729# Now we can test some aspects on the target using configure macros.
43730
43731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43732$as_echo_n "checking for ANSI C header files... " >&6; }
43733if ${ac_cv_header_stdc+:} false; then :
43734  $as_echo_n "(cached) " >&6
43735else
43736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43737/* end confdefs.h.  */
43738#include <stdlib.h>
43739#include <stdarg.h>
43740#include <string.h>
43741#include <float.h>
43742
43743int
43744main ()
43745{
43746
43747  ;
43748  return 0;
43749}
43750_ACEOF
43751if ac_fn_cxx_try_compile "$LINENO"; then :
43752  ac_cv_header_stdc=yes
43753else
43754  ac_cv_header_stdc=no
43755fi
43756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43757
43758if test $ac_cv_header_stdc = yes; then
43759  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43761/* end confdefs.h.  */
43762#include <string.h>
43763
43764_ACEOF
43765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43766  $EGREP "memchr" >/dev/null 2>&1; then :
43767
43768else
43769  ac_cv_header_stdc=no
43770fi
43771rm -f conftest*
43772
43773fi
43774
43775if test $ac_cv_header_stdc = yes; then
43776  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43778/* end confdefs.h.  */
43779#include <stdlib.h>
43780
43781_ACEOF
43782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43783  $EGREP "free" >/dev/null 2>&1; then :
43784
43785else
43786  ac_cv_header_stdc=no
43787fi
43788rm -f conftest*
43789
43790fi
43791
43792if test $ac_cv_header_stdc = yes; then
43793  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43794  if test "$cross_compiling" = yes; then :
43795  :
43796else
43797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43798/* end confdefs.h.  */
43799#include <ctype.h>
43800#include <stdlib.h>
43801#if ((' ' & 0x0FF) == 0x020)
43802# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43803# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43804#else
43805# define ISLOWER(c) \
43806		   (('a' <= (c) && (c) <= 'i') \
43807		     || ('j' <= (c) && (c) <= 'r') \
43808		     || ('s' <= (c) && (c) <= 'z'))
43809# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43810#endif
43811
43812#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43813int
43814main ()
43815{
43816  int i;
43817  for (i = 0; i < 256; i++)
43818    if (XOR (islower (i), ISLOWER (i))
43819	|| toupper (i) != TOUPPER (i))
43820      return 2;
43821  return 0;
43822}
43823_ACEOF
43824if ac_fn_cxx_try_run "$LINENO"; then :
43825
43826else
43827  ac_cv_header_stdc=no
43828fi
43829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43830  conftest.$ac_objext conftest.beam conftest.$ac_ext
43831fi
43832
43833fi
43834fi
43835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43836$as_echo "$ac_cv_header_stdc" >&6; }
43837if test $ac_cv_header_stdc = yes; then
43838
43839$as_echo "#define STDC_HEADERS 1" >>confdefs.h
43840
43841fi
43842
43843# On IRIX 5.3, sys/types and inttypes.h are conflicting.
43844for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
43845		  inttypes.h stdint.h unistd.h
43846do :
43847  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43848ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
43849"
43850if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43851  cat >>confdefs.h <<_ACEOF
43852#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43853_ACEOF
43854
43855fi
43856
43857done
43858
43859
43860
43861  ###############################################################################
43862  #
43863  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
43864  # (The JVM can use 32 or 64 bit Java pointers but that decision
43865  # is made at runtime.)
43866  #
43867
43868  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
43869    # Always specify -m flag on Solaris
43870    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
43871
43872  # When we add flags to the "official" CFLAGS etc, we need to
43873  # keep track of these additions in ADDED_CFLAGS etc. These
43874  # will later be checked to make sure only controlled additions
43875  # have been made to CFLAGS etc.
43876  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43877  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43878  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43879
43880  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43881  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43882  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43883
43884  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43885  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43886  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43887
43888  elif test "x$COMPILE_TYPE" = xreduced; then
43889    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
43890      # Specify -m if running reduced on unix platforms
43891
43892  # When we add flags to the "official" CFLAGS etc, we need to
43893  # keep track of these additions in ADDED_CFLAGS etc. These
43894  # will later be checked to make sure only controlled additions
43895  # have been made to CFLAGS etc.
43896  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43897  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43898  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43899
43900  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43901  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43902  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43903
43904  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43905  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43906  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43907
43908    fi
43909  fi
43910
43911  # Make compilation sanity check
43912  for ac_header in stdio.h
43913do :
43914  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
43915if test "x$ac_cv_header_stdio_h" = xyes; then :
43916  cat >>confdefs.h <<_ACEOF
43917#define HAVE_STDIO_H 1
43918_ACEOF
43919
43920else
43921
43922    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
43923$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
43924    if test "x$COMPILE_TYPE" = xreduced; then
43925
43926  # Print a helpful message on how to acquire the necessary build dependency.
43927  # reduced is the help tag: freetype, cups, alsa etc
43928  MISSING_DEPENDENCY=reduced
43929
43930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43931    cygwin_help $MISSING_DEPENDENCY
43932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43933    msys_help $MISSING_DEPENDENCY
43934  else
43935    PKGHANDLER_COMMAND=
43936
43937    case $PKGHANDLER in
43938      apt-get)
43939        apt_help     $MISSING_DEPENDENCY ;;
43940      yum)
43941        yum_help     $MISSING_DEPENDENCY ;;
43942      port)
43943        port_help    $MISSING_DEPENDENCY ;;
43944      pkgutil)
43945        pkgutil_help $MISSING_DEPENDENCY ;;
43946      pkgadd)
43947        pkgadd_help  $MISSING_DEPENDENCY ;;
43948    esac
43949
43950    if test "x$PKGHANDLER_COMMAND" != x; then
43951      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43952    fi
43953  fi
43954
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
43956$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
43957    elif test "x$COMPILE_TYPE" = xcross; then
43958      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
43959$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
43960    fi
43961    as_fn_error $? "Cannot continue." "$LINENO" 5
43962
43963fi
43964
43965done
43966
43967
43968  # The cast to long int works around a bug in the HP C Compiler
43969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
43970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
43971# This bug is HP SR number 8606223364.
43972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
43973$as_echo_n "checking size of int *... " >&6; }
43974if ${ac_cv_sizeof_int_p+:} false; then :
43975  $as_echo_n "(cached) " >&6
43976else
43977  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
43978
43979else
43980  if test "$ac_cv_type_int_p" = yes; then
43981     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43983as_fn_error 77 "cannot compute sizeof (int *)
43984See \`config.log' for more details" "$LINENO" 5; }
43985   else
43986     ac_cv_sizeof_int_p=0
43987   fi
43988fi
43989
43990fi
43991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
43992$as_echo "$ac_cv_sizeof_int_p" >&6; }
43993
43994
43995
43996cat >>confdefs.h <<_ACEOF
43997#define SIZEOF_INT_P $ac_cv_sizeof_int_p
43998_ACEOF
43999
44000
44001
44002  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44003  if test "x$ac_cv_sizeof_int_p" = x; then
44004    # The test failed, lets stick to the assumed value.
44005    { $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
44006$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44007  else
44008    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44009
44010    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44011      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44012      # Let's try to implicitely set the compilers target architecture and retry the test
44013      { $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
44014$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;}
44015      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44016$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44017
44018  # When we add flags to the "official" CFLAGS etc, we need to
44019  # keep track of these additions in ADDED_CFLAGS etc. These
44020  # will later be checked to make sure only controlled additions
44021  # have been made to CFLAGS etc.
44022  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44023  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44024  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44025
44026  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44027  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44028  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44029
44030  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44031  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44032  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44033
44034
44035      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44036      unset ac_cv_sizeof_int_p
44037      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44038      cat >>confdefs.h <<_ACEOF
44039#undef SIZEOF_INT_P
44040_ACEOF
44041
44042      # The cast to long int works around a bug in the HP C Compiler
44043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44045# This bug is HP SR number 8606223364.
44046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44047$as_echo_n "checking size of int *... " >&6; }
44048if ${ac_cv_sizeof_int_p+:} false; then :
44049  $as_echo_n "(cached) " >&6
44050else
44051  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44052
44053else
44054  if test "$ac_cv_type_int_p" = yes; then
44055     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44057as_fn_error 77 "cannot compute sizeof (int *)
44058See \`config.log' for more details" "$LINENO" 5; }
44059   else
44060     ac_cv_sizeof_int_p=0
44061   fi
44062fi
44063
44064fi
44065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44066$as_echo "$ac_cv_sizeof_int_p" >&6; }
44067
44068
44069
44070cat >>confdefs.h <<_ACEOF
44071#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44072_ACEOF
44073
44074
44075
44076      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44077
44078      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44079        { $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
44080$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;}
44081        if test "x$COMPILE_TYPE" = xreduced; then
44082
44083  # Print a helpful message on how to acquire the necessary build dependency.
44084  # reduced is the help tag: freetype, cups, alsa etc
44085  MISSING_DEPENDENCY=reduced
44086
44087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44088    cygwin_help $MISSING_DEPENDENCY
44089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44090    msys_help $MISSING_DEPENDENCY
44091  else
44092    PKGHANDLER_COMMAND=
44093
44094    case $PKGHANDLER in
44095      apt-get)
44096        apt_help     $MISSING_DEPENDENCY ;;
44097      yum)
44098        yum_help     $MISSING_DEPENDENCY ;;
44099      port)
44100        port_help    $MISSING_DEPENDENCY ;;
44101      pkgutil)
44102        pkgutil_help $MISSING_DEPENDENCY ;;
44103      pkgadd)
44104        pkgadd_help  $MISSING_DEPENDENCY ;;
44105    esac
44106
44107    if test "x$PKGHANDLER_COMMAND" != x; then
44108      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44109    fi
44110  fi
44111
44112          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44113$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44114        elif test "x$COMPILE_TYPE" = xcross; then
44115          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44116$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44117        fi
44118        as_fn_error $? "Cannot continue." "$LINENO" 5
44119      fi
44120    fi
44121  fi
44122
44123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44124$as_echo_n "checking for target address size... " >&6; }
44125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44126$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44127
44128
44129  ###############################################################################
44130  #
44131  # Is the target little of big endian?
44132  #
44133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44134$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44135if ${ac_cv_c_bigendian+:} false; then :
44136  $as_echo_n "(cached) " >&6
44137else
44138  ac_cv_c_bigendian=unknown
44139    # See if we're dealing with a universal compiler.
44140    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44141/* end confdefs.h.  */
44142#ifndef __APPLE_CC__
44143	       not a universal capable compiler
44144	     #endif
44145	     typedef int dummy;
44146
44147_ACEOF
44148if ac_fn_cxx_try_compile "$LINENO"; then :
44149
44150	# Check for potential -arch flags.  It is not universal unless
44151	# there are at least two -arch flags with different values.
44152	ac_arch=
44153	ac_prev=
44154	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44155	 if test -n "$ac_prev"; then
44156	   case $ac_word in
44157	     i?86 | x86_64 | ppc | ppc64)
44158	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44159		 ac_arch=$ac_word
44160	       else
44161		 ac_cv_c_bigendian=universal
44162		 break
44163	       fi
44164	       ;;
44165	   esac
44166	   ac_prev=
44167	 elif test "x$ac_word" = "x-arch"; then
44168	   ac_prev=arch
44169	 fi
44170       done
44171fi
44172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44173    if test $ac_cv_c_bigendian = unknown; then
44174      # See if sys/param.h defines the BYTE_ORDER macro.
44175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44176/* end confdefs.h.  */
44177#include <sys/types.h>
44178	     #include <sys/param.h>
44179
44180int
44181main ()
44182{
44183#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44184		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44185		     && LITTLE_ENDIAN)
44186	      bogus endian macros
44187	     #endif
44188
44189  ;
44190  return 0;
44191}
44192_ACEOF
44193if ac_fn_cxx_try_compile "$LINENO"; then :
44194  # It does; now see whether it defined to BIG_ENDIAN or not.
44195	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44196/* end confdefs.h.  */
44197#include <sys/types.h>
44198		#include <sys/param.h>
44199
44200int
44201main ()
44202{
44203#if BYTE_ORDER != BIG_ENDIAN
44204		 not big endian
44205		#endif
44206
44207  ;
44208  return 0;
44209}
44210_ACEOF
44211if ac_fn_cxx_try_compile "$LINENO"; then :
44212  ac_cv_c_bigendian=yes
44213else
44214  ac_cv_c_bigendian=no
44215fi
44216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44217fi
44218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44219    fi
44220    if test $ac_cv_c_bigendian = unknown; then
44221      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44222      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44223/* end confdefs.h.  */
44224#include <limits.h>
44225
44226int
44227main ()
44228{
44229#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44230	      bogus endian macros
44231	     #endif
44232
44233  ;
44234  return 0;
44235}
44236_ACEOF
44237if ac_fn_cxx_try_compile "$LINENO"; then :
44238  # It does; now see whether it defined to _BIG_ENDIAN or not.
44239	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44240/* end confdefs.h.  */
44241#include <limits.h>
44242
44243int
44244main ()
44245{
44246#ifndef _BIG_ENDIAN
44247		 not big endian
44248		#endif
44249
44250  ;
44251  return 0;
44252}
44253_ACEOF
44254if ac_fn_cxx_try_compile "$LINENO"; then :
44255  ac_cv_c_bigendian=yes
44256else
44257  ac_cv_c_bigendian=no
44258fi
44259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44260fi
44261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44262    fi
44263    if test $ac_cv_c_bigendian = unknown; then
44264      # Compile a test program.
44265      if test "$cross_compiling" = yes; then :
44266  # Try to guess by grepping values from an object file.
44267	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44268/* end confdefs.h.  */
44269short int ascii_mm[] =
44270		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44271		short int ascii_ii[] =
44272		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44273		int use_ascii (int i) {
44274		  return ascii_mm[i] + ascii_ii[i];
44275		}
44276		short int ebcdic_ii[] =
44277		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44278		short int ebcdic_mm[] =
44279		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44280		int use_ebcdic (int i) {
44281		  return ebcdic_mm[i] + ebcdic_ii[i];
44282		}
44283		extern int foo;
44284
44285int
44286main ()
44287{
44288return use_ascii (foo) == use_ebcdic (foo);
44289  ;
44290  return 0;
44291}
44292_ACEOF
44293if ac_fn_cxx_try_compile "$LINENO"; then :
44294  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44295	      ac_cv_c_bigendian=yes
44296	    fi
44297	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44298	      if test "$ac_cv_c_bigendian" = unknown; then
44299		ac_cv_c_bigendian=no
44300	      else
44301		# finding both strings is unlikely to happen, but who knows?
44302		ac_cv_c_bigendian=unknown
44303	      fi
44304	    fi
44305fi
44306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44307else
44308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44309/* end confdefs.h.  */
44310$ac_includes_default
44311int
44312main ()
44313{
44314
44315	     /* Are we little or big endian?  From Harbison&Steele.  */
44316	     union
44317	     {
44318	       long int l;
44319	       char c[sizeof (long int)];
44320	     } u;
44321	     u.l = 1;
44322	     return u.c[sizeof (long int) - 1] == 1;
44323
44324  ;
44325  return 0;
44326}
44327_ACEOF
44328if ac_fn_cxx_try_run "$LINENO"; then :
44329  ac_cv_c_bigendian=no
44330else
44331  ac_cv_c_bigendian=yes
44332fi
44333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44334  conftest.$ac_objext conftest.beam conftest.$ac_ext
44335fi
44336
44337    fi
44338fi
44339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44340$as_echo "$ac_cv_c_bigendian" >&6; }
44341 case $ac_cv_c_bigendian in #(
44342   yes)
44343     ENDIAN="big";; #(
44344   no)
44345     ENDIAN="little" ;; #(
44346   universal)
44347     ENDIAN="universal_endianness"
44348     ;; #(
44349   *)
44350     ENDIAN="unknown" ;;
44351 esac
44352
44353
44354  if test "x$ENDIAN" = xuniversal_endianness; then
44355    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44356  fi
44357  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44358    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
44359  fi
44360
44361
44362# Configure flags for the tools
44363
44364  ###############################################################################
44365  #
44366  # How to compile shared libraries.
44367  #
44368
44369  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44370    PICFLAG="-fPIC"
44371    C_FLAG_REORDER=''
44372    CXX_FLAG_REORDER=''
44373
44374    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44375      # Linking is different on MacOSX
44376      if test "x$STATIC_BUILD" = xtrue; then
44377        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
44378      else
44379        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44380      fi
44381      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44382      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44383      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44384      SET_SHARED_LIBRARY_MAPFILE=''
44385    else
44386      # Default works for linux, might work on other platforms as well.
44387      SHARED_LIBRARY_FLAGS='-shared'
44388      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44389      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44390      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44391      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44392    fi
44393  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44394    PICFLAG=''
44395    C_FLAG_REORDER=''
44396    CXX_FLAG_REORDER=''
44397
44398    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44399      # Linking is different on MacOSX
44400      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44401      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44402      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44403      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44404      SET_SHARED_LIBRARY_MAPFILE=''
44405    else
44406      # Default works for linux, might work on other platforms as well.
44407      SHARED_LIBRARY_FLAGS='-shared'
44408      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44409      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44410      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44411      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44412    fi
44413  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44414    PICFLAG="-KPIC"
44415    C_FLAG_REORDER='-xF'
44416    CXX_FLAG_REORDER='-xF'
44417    SHARED_LIBRARY_FLAGS="-G"
44418    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44419    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44420    SET_SHARED_LIBRARY_NAME=''
44421    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44422  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44423    PICFLAG="-qpic=large"
44424    C_FLAG_REORDER=''
44425    CXX_FLAG_REORDER=''
44426    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44427    SET_EXECUTABLE_ORIGIN=""
44428    SET_SHARED_LIBRARY_ORIGIN=''
44429    SET_SHARED_LIBRARY_NAME=''
44430    SET_SHARED_LIBRARY_MAPFILE=''
44431  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44432    PICFLAG=""
44433    C_FLAG_REORDER=''
44434    CXX_FLAG_REORDER=''
44435    SHARED_LIBRARY_FLAGS="-LD"
44436    SET_EXECUTABLE_ORIGIN=''
44437    SET_SHARED_LIBRARY_ORIGIN=''
44438    SET_SHARED_LIBRARY_NAME=''
44439    SET_SHARED_LIBRARY_MAPFILE=''
44440  fi
44441
44442
44443
44444
44445
44446
44447
44448
44449  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44450    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44451    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44452    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44453  fi
44454  # The (cross) compiler is now configured, we can now test capabilities
44455  # of the target platform.
44456
44457
44458
44459  ###############################################################################
44460  #
44461  # Setup the opt flags for different compilers
44462  # and different operating systems.
44463  #
44464
44465  # FIXME: this was indirectly the old default, but just inherited.
44466  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44467  #   C_FLAG_DEPS="-MMD -MF"
44468  # fi
44469
44470  # Generate make dependency files
44471  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44472    C_FLAG_DEPS="-MMD -MF"
44473  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44474    C_FLAG_DEPS="-MMD -MF"
44475  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44476    C_FLAG_DEPS="-xMMD -xMF"
44477  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44478    C_FLAG_DEPS="-qmakedep=gcc -MF"
44479  fi
44480  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44481
44482
44483
44484  # Debug symbols
44485  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44486    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44487      # reduce from default "-g2" option to save space
44488      CFLAGS_DEBUG_SYMBOLS="-g1"
44489      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44490    else
44491      CFLAGS_DEBUG_SYMBOLS="-g"
44492      CXXFLAGS_DEBUG_SYMBOLS="-g"
44493    fi
44494  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44495    CFLAGS_DEBUG_SYMBOLS="-g"
44496    CXXFLAGS_DEBUG_SYMBOLS="-g"
44497  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44498    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44499    # FIXME: likely a bug, this disables debug symbols rather than enables them
44500    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44501  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44502    CFLAGS_DEBUG_SYMBOLS="-g"
44503    CXXFLAGS_DEBUG_SYMBOLS="-g"
44504  fi
44505
44506
44507
44508  # bounds, memory and behavior checking options
44509  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44510    case $DEBUG_LEVEL in
44511    release )
44512      # no adjustment
44513      ;;
44514    fastdebug )
44515      # no adjustment
44516      ;;
44517    slowdebug )
44518      # Add runtime stack smashing and undefined behavior checks.
44519      # Not all versions of gcc support -fstack-protector
44520      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44521
44522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44523$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44524  supports=yes
44525
44526  saved_cflags="$CFLAGS"
44527  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44528  ac_ext=c
44529ac_cpp='$CPP $CPPFLAGS'
44530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44532ac_compiler_gnu=$ac_cv_c_compiler_gnu
44533
44534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44535/* end confdefs.h.  */
44536int i;
44537_ACEOF
44538if ac_fn_c_try_compile "$LINENO"; then :
44539
44540else
44541  supports=no
44542fi
44543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44544  ac_ext=cpp
44545ac_cpp='$CXXCPP $CPPFLAGS'
44546ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44547ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44548ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44549
44550  CFLAGS="$saved_cflags"
44551
44552  saved_cxxflags="$CXXFLAGS"
44553  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44554  ac_ext=cpp
44555ac_cpp='$CXXCPP $CPPFLAGS'
44556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44559
44560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44561/* end confdefs.h.  */
44562int i;
44563_ACEOF
44564if ac_fn_cxx_try_compile "$LINENO"; then :
44565
44566else
44567  supports=no
44568fi
44569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44570  ac_ext=cpp
44571ac_cpp='$CXXCPP $CPPFLAGS'
44572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44575
44576  CXXFLAGS="$saved_cxxflags"
44577
44578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44579$as_echo "$supports" >&6; }
44580  if test "x$supports" = "xyes" ; then
44581    :
44582  else
44583    STACK_PROTECTOR_CFLAG=""
44584  fi
44585
44586
44587      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44588      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44589      ;;
44590    esac
44591  fi
44592
44593  # Optimization levels
44594  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44595    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44596
44597    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44598      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44599      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44600      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44601      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44602      C_O_FLAG_DEBUG="-xregs=no%frameptr"
44603      C_O_FLAG_NONE="-xregs=no%frameptr"
44604      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44605      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44606      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44607      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44608      CXX_O_FLAG_NONE="-xregs=no%frameptr"
44609      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44610        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44611        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44612      fi
44613    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44614      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44615      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44616      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44617      C_O_FLAG_DEBUG=""
44618      C_O_FLAG_NONE=""
44619      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44620      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44621      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44622      C_O_FLAG_DEBUG=""
44623      CXX_O_FLAG_NONE=""
44624    fi
44625  else
44626    # The remaining toolchains share opt flags between CC and CXX;
44627    # setup for C and duplicate afterwards.
44628    if test "x$TOOLCHAIN_TYPE" = xgcc; then
44629      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44630        # On MacOSX we optimize for size, something
44631        # we should do for all platforms?
44632        C_O_FLAG_HIGHEST="-Os"
44633        C_O_FLAG_HI="-Os"
44634        C_O_FLAG_NORM="-Os"
44635      else
44636        C_O_FLAG_HIGHEST="-O3"
44637        C_O_FLAG_HI="-O3"
44638        C_O_FLAG_NORM="-O2"
44639      fi
44640      C_O_FLAG_DEBUG="-O0"
44641      C_O_FLAG_NONE="-O0"
44642    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44643      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44644        # On MacOSX we optimize for size, something
44645        # we should do for all platforms?
44646        C_O_FLAG_HIGHEST="-Os"
44647        C_O_FLAG_HI="-Os"
44648        C_O_FLAG_NORM="-Os"
44649      else
44650        C_O_FLAG_HIGHEST="-O3"
44651        C_O_FLAG_HI="-O3"
44652        C_O_FLAG_NORM="-O2"
44653      fi
44654      C_O_FLAG_DEBUG="-O0"
44655      C_O_FLAG_NONE="-O0"
44656    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44657      C_O_FLAG_HIGHEST="-O3"
44658      C_O_FLAG_HI="-O3 -qstrict"
44659      C_O_FLAG_NORM="-O2"
44660      C_O_FLAG_DEBUG="-qnoopt"
44661      C_O_FLAG_NONE="-qnoop"
44662    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44663      C_O_FLAG_HIGHEST="-O2"
44664      C_O_FLAG_HI="-O1"
44665      C_O_FLAG_NORM="-O1"
44666      C_O_FLAG_DEBUG="-Od"
44667      C_O_FLAG_NONE="-Od"
44668    fi
44669    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44670    CXX_O_FLAG_HI="$C_O_FLAG_HI"
44671    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44672    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44673    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44674  fi
44675
44676  # Adjust optimization flags according to debug level.
44677  case $DEBUG_LEVEL in
44678    release )
44679      # no adjustment
44680      ;;
44681    fastdebug )
44682      # Not quite so much optimization
44683      C_O_FLAG_HI="$C_O_FLAG_NORM"
44684      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44685      ;;
44686    slowdebug )
44687      # Disable optimization
44688      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44689      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44690      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44691      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44692      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44693      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44694      ;;
44695  esac
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709  # Special extras...
44710  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44711    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44712      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44713      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44714    fi
44715    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44716    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44717  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44718    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44719    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44720  fi
44721
44722  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44723  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44724  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44725
44726  ###############################################################################
44727  #
44728  # Now setup the CFLAGS and LDFLAGS for the JDK build.
44729  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44730  #
44731
44732  # Setup compiler/platform specific flags into
44733  #    CFLAGS_JDK    - C Compiler flags
44734  #    CXXFLAGS_JDK  - C++ Compiler flags
44735  #    COMMON_CCXXFLAGS_JDK - common to C and C++
44736  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44737    if test "x$OPENJDK_TARGET_CPU" = xx86; then
44738      # Force compatibility with i586 on 32 bit intel platforms.
44739      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44740    fi
44741    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44742        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44743    case $OPENJDK_TARGET_CPU_ARCH in
44744      arm )
44745        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44746        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44747        ;;
44748      ppc )
44749        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44750        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44751        ;;
44752      * )
44753        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44754        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44755        ;;
44756    esac
44757  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44758    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44759    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44760      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44761    fi
44762
44763    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44764    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44765  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44766    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44767    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44768  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44769    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44770        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44771        -DWIN32_LEAN_AND_MEAN \
44772        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44773        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44774        -DWIN32 -DIAL"
44775    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44776      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44777    else
44778      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44779    fi
44780    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44781    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44782    # studio.
44783    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44784      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44785          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44786    fi
44787  fi
44788
44789  ###############################################################################
44790
44791  # Adjust flags according to debug level.
44792  case $DEBUG_LEVEL in
44793    fastdebug | slowdebug )
44794      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44795      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44796      JAVAC_FLAGS="$JAVAC_FLAGS -g"
44797      ;;
44798    release )
44799      ;;
44800    * )
44801      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44802      ;;
44803  esac
44804
44805  # Setup LP64
44806  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44807
44808  # Set some common defines. These works for all compilers, but assume
44809  # -D is universally accepted.
44810
44811  # Setup endianness
44812  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44813    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44814    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44815    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44816    #   Note: -Dmacro         is the same as    #define macro 1
44817    #         -Dmacro=        is the same as    #define macro
44818    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44819      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44820    else
44821      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44822    fi
44823  else
44824    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44825    # are defined in the system?
44826    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44827      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44828    else
44829      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44830    fi
44831  fi
44832
44833  # Setup target OS define. Use OS target name but in upper case.
44834  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44835  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44836
44837  # Setup target CPU
44838  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
44839
44840  # Setup debug/release defines
44841  if test "x$DEBUG_LEVEL" = xrelease; then
44842    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
44843    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44844      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
44845    fi
44846  else
44847    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
44848  fi
44849
44850  # Setup release name
44851  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
44852
44853
44854  # Set some additional per-OS defines.
44855  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44856    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
44857  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44858    # FIXME: PPC64 should not be here.
44859    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
44860  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
44861    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
44862  fi
44863
44864  # Additional macosx handling
44865  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44866    # Setting these parameters makes it an error to link to macosx APIs that are
44867    # newer than the given OS version and makes the linked binaries compatible
44868    # even if built on a newer version of the OS.
44869    # The expected format is X.Y.Z
44870    MACOSX_VERSION_MIN=10.7.0
44871
44872
44873    # The macro takes the version with no dots, ex: 1070
44874    # Let the flags variables get resolved in make for easier override on make
44875    # command line.
44876    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44877    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44878  fi
44879
44880  # Setup some hard coded includes
44881  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44882      -I${JDK_TOPDIR}/src/java.base/share/native/include \
44883      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
44884      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
44885      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
44886      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
44887
44888  # The shared libraries are compiled using the picflag.
44889  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44890  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44891
44892  # Executable flags
44893  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44894  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44895
44896
44897
44898
44899
44900
44901  # Flags for compiling test libraries
44902  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44903  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44904
44905  # Flags for compiling test executables
44906  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44907  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44908
44909
44910
44911
44912
44913
44914  # Setup LDFLAGS et al.
44915  #
44916
44917  # Now this is odd. The JDK native libraries have to link against libjvm.so
44918  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
44919  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
44920  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
44921  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
44922  # libraries will link to whatever is in memory. Yuck.
44923  #
44924  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
44925  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44926    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
44927    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44928      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
44929    fi
44930    # TODO: make -debug optional "--disable-full-debug-symbols"
44931    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
44932  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44933    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44934    # We have previously set HAS_GNU_HASH if this is the case
44935    if test -n "$HAS_GNU_HASH"; then
44936      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
44937    fi
44938    if test "x$OPENJDK_TARGET_OS" = xlinux; then
44939      # And since we now know that the linker is gnu, then add -z defs, to forbid
44940      # undefined symbols in object files.
44941      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
44942      case $DEBUG_LEVEL in
44943        release )
44944          # tell linker to optimize libraries.
44945          # Should this be supplied to the OSS linker as well?
44946          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
44947          ;;
44948        slowdebug )
44949          if test "x$HAS_LINKER_NOW" = "xtrue"; then
44950            # do relocations at load
44951            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
44952            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
44953          fi
44954          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44955            # mark relocations read only
44956            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44957            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44958          fi
44959          ;;
44960        fastdebug )
44961          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44962            # mark relocations read only
44963            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44964            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44965          fi
44966          ;;
44967        * )
44968          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44969          ;;
44970        esac
44971    fi
44972  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44973    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
44974    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
44975  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44976    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
44977  fi
44978
44979  # Customize LDFLAGS for executables
44980
44981  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
44982
44983  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44984    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
44985      LDFLAGS_STACK_SIZE=1048576
44986    else
44987      LDFLAGS_STACK_SIZE=327680
44988    fi
44989    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
44990  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
44991    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
44992  fi
44993
44994  # Customize LDFLAGS for libs
44995  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
44996
44997  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44998    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
44999    JDKLIB_LIBS=""
45000  else
45001    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45002        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45003
45004    # On some platforms (mac) the linker warns about non existing -L dirs.
45005    # Add server first if available. Linking aginst client does not always produce the same results.
45006    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45007    # Default to server for other variants.
45008    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45009      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45010    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45011      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45012    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45013      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45014    else
45015      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45016    fi
45017
45018    JDKLIB_LIBS="-ljava -ljvm"
45019    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45020      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45021    fi
45022  fi
45023
45024
45025
45026
45027
45028
45029
45030  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45031  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45032
45033
45034
45035
45036
45037  # Some Zero and Shark settings.
45038  # ZERO_ARCHFLAG tells the compiler which mode to build for
45039  case "${OPENJDK_TARGET_CPU}" in
45040    s390)
45041      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45042      ;;
45043    *)
45044      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45045  esac
45046
45047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45048$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45049  supports=yes
45050
45051  saved_cflags="$CFLAGS"
45052  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45053  ac_ext=c
45054ac_cpp='$CPP $CPPFLAGS'
45055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45057ac_compiler_gnu=$ac_cv_c_compiler_gnu
45058
45059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45060/* end confdefs.h.  */
45061int i;
45062_ACEOF
45063if ac_fn_c_try_compile "$LINENO"; then :
45064
45065else
45066  supports=no
45067fi
45068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45069  ac_ext=cpp
45070ac_cpp='$CXXCPP $CPPFLAGS'
45071ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45072ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45073ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45074
45075  CFLAGS="$saved_cflags"
45076
45077  saved_cxxflags="$CXXFLAGS"
45078  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45079  ac_ext=cpp
45080ac_cpp='$CXXCPP $CPPFLAGS'
45081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45084
45085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45086/* end confdefs.h.  */
45087int i;
45088_ACEOF
45089if ac_fn_cxx_try_compile "$LINENO"; then :
45090
45091else
45092  supports=no
45093fi
45094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45095  ac_ext=cpp
45096ac_cpp='$CXXCPP $CPPFLAGS'
45097ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45098ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45099ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45100
45101  CXXFLAGS="$saved_cxxflags"
45102
45103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45104$as_echo "$supports" >&6; }
45105  if test "x$supports" = "xyes" ; then
45106    :
45107  else
45108    ZERO_ARCHFLAG=""
45109  fi
45110
45111
45112
45113  # Check that the compiler supports -mX (or -qX on AIX) flags
45114  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45115
45116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45117$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45118  supports=yes
45119
45120  saved_cflags="$CFLAGS"
45121  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45122  ac_ext=c
45123ac_cpp='$CPP $CPPFLAGS'
45124ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45125ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45126ac_compiler_gnu=$ac_cv_c_compiler_gnu
45127
45128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45129/* end confdefs.h.  */
45130int i;
45131_ACEOF
45132if ac_fn_c_try_compile "$LINENO"; then :
45133
45134else
45135  supports=no
45136fi
45137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45138  ac_ext=cpp
45139ac_cpp='$CXXCPP $CPPFLAGS'
45140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45143
45144  CFLAGS="$saved_cflags"
45145
45146  saved_cxxflags="$CXXFLAGS"
45147  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45148  ac_ext=cpp
45149ac_cpp='$CXXCPP $CPPFLAGS'
45150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45153
45154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45155/* end confdefs.h.  */
45156int i;
45157_ACEOF
45158if ac_fn_cxx_try_compile "$LINENO"; then :
45159
45160else
45161  supports=no
45162fi
45163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45164  ac_ext=cpp
45165ac_cpp='$CXXCPP $CPPFLAGS'
45166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45169
45170  CXXFLAGS="$saved_cxxflags"
45171
45172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45173$as_echo "$supports" >&6; }
45174  if test "x$supports" = "xyes" ; then
45175    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45176  else
45177    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45178  fi
45179
45180
45181
45182  # Check whether --enable-warnings-as-errors was given.
45183if test "${enable_warnings_as_errors+set}" = set; then :
45184  enableval=$enable_warnings_as_errors;
45185fi
45186
45187
45188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45189$as_echo_n "checking if native warnings are errors... " >&6; }
45190  if test "x$enable_warnings_as_errors" = "xyes"; then
45191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45192$as_echo "yes (explicitely set)" >&6; }
45193    WARNINGS_AS_ERRORS=true
45194  elif test "x$enable_warnings_as_errors" = "xno"; then
45195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45196$as_echo "no" >&6; }
45197    WARNINGS_AS_ERRORS=false
45198  elif test "x$enable_warnings_as_errors" = "x"; then
45199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45200$as_echo "yes (default)" >&6; }
45201    WARNINGS_AS_ERRORS=true
45202  else
45203    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45204  fi
45205
45206  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45207    # Set legacy hotspot variable
45208    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
45209  else
45210    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
45211  fi
45212
45213
45214
45215
45216  case "${TOOLCHAIN_TYPE}" in
45217    microsoft)
45218      DISABLE_WARNING_PREFIX="-wd"
45219      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45220      ;;
45221    solstudio)
45222      DISABLE_WARNING_PREFIX="-erroff="
45223      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45224      ;;
45225    gcc)
45226      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45227
45228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45229$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45230  supports=yes
45231
45232  saved_cflags="$CFLAGS"
45233  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45234  ac_ext=c
45235ac_cpp='$CPP $CPPFLAGS'
45236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45238ac_compiler_gnu=$ac_cv_c_compiler_gnu
45239
45240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45241/* end confdefs.h.  */
45242int i;
45243_ACEOF
45244if ac_fn_c_try_compile "$LINENO"; then :
45245
45246else
45247  supports=no
45248fi
45249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45250  ac_ext=cpp
45251ac_cpp='$CXXCPP $CPPFLAGS'
45252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45255
45256  CFLAGS="$saved_cflags"
45257
45258  saved_cxxflags="$CXXFLAGS"
45259  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45260  ac_ext=cpp
45261ac_cpp='$CXXCPP $CPPFLAGS'
45262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45265
45266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45267/* end confdefs.h.  */
45268int i;
45269_ACEOF
45270if ac_fn_cxx_try_compile "$LINENO"; then :
45271
45272else
45273  supports=no
45274fi
45275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45276  ac_ext=cpp
45277ac_cpp='$CXXCPP $CPPFLAGS'
45278ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45279ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45280ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45281
45282  CXXFLAGS="$saved_cxxflags"
45283
45284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45285$as_echo "$supports" >&6; }
45286  if test "x$supports" = "xyes" ; then
45287    GCC_CAN_DISABLE_WARNINGS=true
45288  else
45289    GCC_CAN_DISABLE_WARNINGS=false
45290
45291  fi
45292
45293      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45294        DISABLE_WARNING_PREFIX="-Wno-"
45295      else
45296        DISABLE_WARNING_PREFIX=
45297      fi
45298      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45299      ;;
45300    clang)
45301      DISABLE_WARNING_PREFIX="-Wno-"
45302      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45303      ;;
45304  esac
45305
45306
45307
45308
45309# Setup debug symbols (need objcopy from the toolchain for that)
45310
45311  #
45312  # ENABLE_DEBUG_SYMBOLS
45313  # This must be done after the toolchain is setup, since we're looking at objcopy.
45314  #
45315  # Check whether --enable-debug-symbols was given.
45316if test "${enable_debug_symbols+set}" = set; then :
45317  enableval=$enable_debug_symbols;
45318fi
45319
45320
45321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45322$as_echo_n "checking if we should generate debug symbols... " >&6; }
45323
45324  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45325    # explicit enabling of enable-debug-symbols and can't find objcopy
45326    #   this is an error
45327    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45328  fi
45329
45330  if test "x$enable_debug_symbols" = "xyes"; then
45331    ENABLE_DEBUG_SYMBOLS=true
45332  elif test "x$enable_debug_symbols" = "xno"; then
45333    ENABLE_DEBUG_SYMBOLS=false
45334  else
45335    # Default is on if objcopy is found
45336    if test "x$OBJCOPY" != x; then
45337      ENABLE_DEBUG_SYMBOLS=true
45338    # MacOS X and Windows don't use objcopy but default is on for those OSes
45339    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45340      ENABLE_DEBUG_SYMBOLS=true
45341    else
45342      ENABLE_DEBUG_SYMBOLS=false
45343    fi
45344  fi
45345
45346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45347$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45348
45349  #
45350  # ZIP_DEBUGINFO_FILES
45351  #
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45353$as_echo_n "checking if we should zip debug-info files... " >&6; }
45354  # Check whether --enable-zip-debug-info was given.
45355if test "${enable_zip_debug_info+set}" = set; then :
45356  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45357else
45358  enable_zip_debug_info="yes"
45359fi
45360
45361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45362$as_echo "${enable_zip_debug_info}" >&6; }
45363
45364  if test "x${enable_zip_debug_info}" = "xno"; then
45365    ZIP_DEBUGINFO_FILES=false
45366  else
45367    ZIP_DEBUGINFO_FILES=true
45368  fi
45369
45370
45371
45372
45373
45374  # Check whether --enable-native-coverage was given.
45375if test "${enable_native_coverage+set}" = set; then :
45376  enableval=$enable_native_coverage;
45377fi
45378
45379  GCOV_ENABLED="false"
45380  if test "x$enable_native_coverage" = "xyes"; then
45381    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45383$as_echo_n "checking if native coverage is enabled... " >&6; }
45384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45385$as_echo "yes" >&6; }
45386      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45387      GCOV_LDFLAGS="-fprofile-arcs"
45388      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45389      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45390      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45391      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45392      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45393      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45394      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45395      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45396      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45397      GCOV_ENABLED="true"
45398    else
45399      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45400    fi
45401  elif test "x$enable_native_coverage" = "xno"; then
45402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45403$as_echo_n "checking if native coverage is enabled... " >&6; }
45404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45405$as_echo "no" >&6; }
45406  elif test "x$enable_native_coverage" != "x"; then
45407    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45408  fi
45409
45410
45411
45412
45413###############################################################################
45414#
45415# Check dependencies for external and internal libraries.
45416#
45417###############################################################################
45418
45419# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45420
45421  # When using cygwin or msys, we need a wrapper binary that renames
45422  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45423  # @files and rewrites these too! This wrapper binary is
45424  # called fixpath.
45425  FIXPATH=
45426  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45428$as_echo_n "checking if fixpath can be created... " >&6; }
45429    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45430    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45431    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45432    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45433      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45434      FIXPATH="$FIXPATH_BIN -c"
45435    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45436      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45437      # @ was chosen as separator to minimize risk of other tools messing around with it
45438      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45439          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45440      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45441      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45442    fi
45443    FIXPATH_SRC_W="$FIXPATH_SRC"
45444    FIXPATH_BIN_W="$FIXPATH_BIN"
45445
45446  unix_path="$FIXPATH_SRC_W"
45447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45448    windows_path=`$CYGPATH -m "$unix_path"`
45449    FIXPATH_SRC_W="$windows_path"
45450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45451    windows_path=`cmd //c echo $unix_path`
45452    FIXPATH_SRC_W="$windows_path"
45453  fi
45454
45455
45456  unix_path="$FIXPATH_BIN_W"
45457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458    windows_path=`$CYGPATH -m "$unix_path"`
45459    FIXPATH_BIN_W="$windows_path"
45460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45461    windows_path=`cmd //c echo $unix_path`
45462    FIXPATH_BIN_W="$windows_path"
45463  fi
45464
45465    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45466    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45467    cd $FIXPATH_DIR
45468    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45469    cd $CURDIR
45470
45471    if test ! -x $FIXPATH_BIN; then
45472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45473$as_echo "no" >&6; }
45474      cat $FIXPATH_DIR/fixpath1.log
45475      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45476    fi
45477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45478$as_echo "yes" >&6; }
45479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45480$as_echo_n "checking if fixpath.exe works... " >&6; }
45481    cd $FIXPATH_DIR
45482    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45483        > $FIXPATH_DIR/fixpath2.log 2>&1
45484    cd $CURDIR
45485    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45487$as_echo "no" >&6; }
45488      cat $FIXPATH_DIR/fixpath2.log
45489      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45490    fi
45491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45492$as_echo "yes" >&6; }
45493
45494    FIXPATH_DETACH_FLAG="--detach"
45495  fi
45496
45497
45498
45499
45500
45501
45502  # Check if X11 is needed
45503  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45504    # No X11 support on windows or macosx
45505    NEEDS_LIB_X11=false
45506  else
45507    if test "x$SUPPORT_HEADFUL" = xno; then
45508      # No X11 support if building headless-only
45509      NEEDS_LIB_X11=false
45510    else
45511      # All other instances need X11
45512      NEEDS_LIB_X11=true
45513    fi
45514  fi
45515
45516  # Check if cups is needed
45517  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45518    # Windows have a separate print system
45519    NEEDS_LIB_CUPS=false
45520  else
45521    NEEDS_LIB_CUPS=true
45522  fi
45523
45524  # Check if freetype is needed
45525  if test "x$OPENJDK" = "xtrue"; then
45526    NEEDS_LIB_FREETYPE=true
45527  else
45528    NEEDS_LIB_FREETYPE=false
45529  fi
45530
45531  # Check if alsa is needed
45532  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45533    NEEDS_LIB_ALSA=true
45534  else
45535    NEEDS_LIB_ALSA=false
45536  fi
45537
45538  # Check if ffi is needed
45539  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45540    NEEDS_LIB_FFI=true
45541  else
45542    NEEDS_LIB_FFI=false
45543  fi
45544
45545
45546  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45547  # dynamic build is configured on command line.
45548
45549# Check whether --with-stdc++lib was given.
45550if test "${with_stdc__lib+set}" = set; then :
45551  withval=$with_stdc__lib;
45552        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45553                && test "x$with_stdc__lib" != xdefault; then
45554          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45555        fi
45556
45557else
45558  with_stdc__lib=default
45559
45560fi
45561
45562
45563  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45564    # Test if -lstdc++ works.
45565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45566$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45567    ac_ext=cpp
45568ac_cpp='$CXXCPP $CPPFLAGS'
45569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45572
45573    OLD_CXXFLAGS="$CXXFLAGS"
45574    CXXFLAGS="$CXXFLAGS -lstdc++"
45575    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45576/* end confdefs.h.  */
45577
45578int
45579main ()
45580{
45581return 0;
45582  ;
45583  return 0;
45584}
45585_ACEOF
45586if ac_fn_cxx_try_link "$LINENO"; then :
45587  has_dynamic_libstdcxx=yes
45588else
45589  has_dynamic_libstdcxx=no
45590fi
45591rm -f core conftest.err conftest.$ac_objext \
45592    conftest$ac_exeext conftest.$ac_ext
45593    CXXFLAGS="$OLD_CXXFLAGS"
45594    ac_ext=cpp
45595ac_cpp='$CXXCPP $CPPFLAGS'
45596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45599
45600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45601$as_echo "$has_dynamic_libstdcxx" >&6; }
45602
45603    # Test if stdc++ can be linked statically.
45604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45605$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45606    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45607    ac_ext=cpp
45608ac_cpp='$CXXCPP $CPPFLAGS'
45609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45612
45613    OLD_LIBS="$LIBS"
45614    OLD_CXX="$CXX"
45615    LIBS="$STATIC_STDCXX_FLAGS"
45616    CXX="$CC"
45617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45618/* end confdefs.h.  */
45619
45620int
45621main ()
45622{
45623return 0;
45624  ;
45625  return 0;
45626}
45627_ACEOF
45628if ac_fn_cxx_try_link "$LINENO"; then :
45629  has_static_libstdcxx=yes
45630else
45631  has_static_libstdcxx=no
45632fi
45633rm -f core conftest.err conftest.$ac_objext \
45634    conftest$ac_exeext conftest.$ac_ext
45635    LIBS="$OLD_LIBS"
45636    CXX="$OLD_CXX"
45637    ac_ext=cpp
45638ac_cpp='$CXXCPP $CPPFLAGS'
45639ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45640ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45641ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45642
45643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45644$as_echo "$has_static_libstdcxx" >&6; }
45645
45646    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45647      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45648    fi
45649
45650    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45651      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45652    fi
45653
45654    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45655      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45656    fi
45657
45658    # If dynamic was requested, it's available since it would fail above otherwise.
45659    # If dynamic wasn't requested, go with static unless it isn't available.
45660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45661$as_echo_n "checking how to link with libstdc++... " >&6; }
45662    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45663      LIBCXX="$LIBCXX -lstdc++"
45664      LDCXX="$CXX"
45665      STATIC_CXX_SETTING="STATIC_CXX=false"
45666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45667$as_echo "dynamic" >&6; }
45668    else
45669      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45670      LDCXX="$CC"
45671      STATIC_CXX_SETTING="STATIC_CXX=true"
45672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45673$as_echo "static" >&6; }
45674    fi
45675  fi
45676
45677
45678  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45679  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45680    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45681  fi
45682
45683  # TODO better (platform agnostic) test
45684  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45685    LIBCXX="-lstdc++"
45686  fi
45687
45688
45689  # Setup Windows runtime dlls
45690  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45691
45692
45693# Check whether --with-msvcr-dll was given.
45694if test "${with_msvcr_dll+set}" = set; then :
45695  withval=$with_msvcr_dll;
45696fi
45697
45698
45699  if test "x$with_msvcr_dll" != x; then
45700    # If given explicitely by user, do not probe. If not present, fail directly.
45701
45702  DLL_NAME="$MSVCR_NAME"
45703  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45704  METHOD="--with-msvcr-dll"
45705  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45706    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45707$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45708
45709    # Need to check if the found msvcr is correct architecture
45710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45711$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45712    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45714      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45715      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45716      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45717        CORRECT_MSVCR_ARCH="PE32 executable"
45718      else
45719        CORRECT_MSVCR_ARCH="PE32+ executable"
45720      fi
45721    else
45722      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45723        CORRECT_MSVCR_ARCH=386
45724      else
45725        CORRECT_MSVCR_ARCH=x86-64
45726      fi
45727    fi
45728    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45730$as_echo "ok" >&6; }
45731      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45732
45733  # Only process if variable expands to non-empty
45734
45735  if test "x$MSVC_DLL" != x; then
45736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45737
45738  # Input might be given as Windows format, start by converting to
45739  # unix format.
45740  path="$MSVC_DLL"
45741  new_path=`$CYGPATH -u "$path"`
45742
45743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45746  # "foo.exe" is OK but "foo" is an error.
45747  #
45748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45749  # It is also a way to make sure we got the proper file name for the real test later on.
45750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45751  if test "x$test_shortpath" = x; then
45752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45753$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45754    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45755  fi
45756
45757  # Call helper function which possibly converts this using DOS-style short mode.
45758  # If so, the updated path is stored in $new_path.
45759
45760  input_path="$new_path"
45761  # Check if we need to convert this using DOS-style short mode. If the path
45762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45763  # take no chances and rewrite it.
45764  # Note: m4 eats our [], so we need to use [ and ] instead.
45765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45766  if test "x$has_forbidden_chars" != x; then
45767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45771      # Going to short mode and back again did indeed matter. Since short mode is
45772      # case insensitive, let's make it lowercase to improve readability.
45773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45774      # Now convert it back to Unix-style (cygpath)
45775      input_path=`$CYGPATH -u "$shortmode_path"`
45776      new_path="$input_path"
45777    fi
45778  fi
45779
45780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45781  if test "x$test_cygdrive_prefix" = x; then
45782    # As a simple fix, exclude /usr/bin since it's not a real path.
45783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45785      # a path prefixed by /cygdrive for fixpath to work.
45786      new_path="$CYGWIN_ROOT_PATH$input_path"
45787    fi
45788  fi
45789
45790
45791  if test "x$path" != "x$new_path"; then
45792    MSVC_DLL="$new_path"
45793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45794$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45795  fi
45796
45797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45798
45799  path="$MSVC_DLL"
45800  has_colon=`$ECHO $path | $GREP ^.:`
45801  new_path="$path"
45802  if test "x$has_colon" = x; then
45803    # Not in mixed or Windows style, start by that.
45804    new_path=`cmd //c echo $path`
45805  fi
45806
45807
45808  input_path="$new_path"
45809  # Check if we need to convert this using DOS-style short mode. If the path
45810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45811  # take no chances and rewrite it.
45812  # Note: m4 eats our [], so we need to use [ and ] instead.
45813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45814  if test "x$has_forbidden_chars" != x; then
45815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45817  fi
45818
45819
45820  windows_path="$new_path"
45821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45822    unix_path=`$CYGPATH -u "$windows_path"`
45823    new_path="$unix_path"
45824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45826    new_path="$unix_path"
45827  fi
45828
45829  if test "x$path" != "x$new_path"; then
45830    MSVC_DLL="$new_path"
45831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45833  fi
45834
45835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45837
45838    else
45839      # We're on a unix platform. Hooray! :)
45840      path="$MSVC_DLL"
45841      has_space=`$ECHO "$path" | $GREP " "`
45842      if test "x$has_space" != x; then
45843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45844$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45846      fi
45847
45848      # Use eval to expand a potential ~
45849      eval path="$path"
45850      if test ! -f "$path" && test ! -d "$path"; then
45851        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45852      fi
45853
45854      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45855    fi
45856  fi
45857
45858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45859$as_echo_n "checking for $DLL_NAME... " >&6; }
45860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45861$as_echo "$MSVC_DLL" >&6; }
45862    else
45863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45864$as_echo "incorrect, ignoring" >&6; }
45865      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45866$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45867    fi
45868  fi
45869
45870    if test "x$MSVC_DLL" = x; then
45871      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
45872    fi
45873    MSVCR_DLL="$MSVC_DLL"
45874  elif test "x$DEVKIT_MSVCR_DLL" != x; then
45875
45876  DLL_NAME="$MSVCR_NAME"
45877  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
45878  METHOD="devkit"
45879  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45880    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45881$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45882
45883    # Need to check if the found msvcr is correct architecture
45884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45885$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45886    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45889      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45891        CORRECT_MSVCR_ARCH="PE32 executable"
45892      else
45893        CORRECT_MSVCR_ARCH="PE32+ executable"
45894      fi
45895    else
45896      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45897        CORRECT_MSVCR_ARCH=386
45898      else
45899        CORRECT_MSVCR_ARCH=x86-64
45900      fi
45901    fi
45902    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45904$as_echo "ok" >&6; }
45905      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45906
45907  # Only process if variable expands to non-empty
45908
45909  if test "x$MSVC_DLL" != x; then
45910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911
45912  # Input might be given as Windows format, start by converting to
45913  # unix format.
45914  path="$MSVC_DLL"
45915  new_path=`$CYGPATH -u "$path"`
45916
45917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45920  # "foo.exe" is OK but "foo" is an error.
45921  #
45922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45923  # It is also a way to make sure we got the proper file name for the real test later on.
45924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45925  if test "x$test_shortpath" = x; then
45926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45928    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45929  fi
45930
45931  # Call helper function which possibly converts this using DOS-style short mode.
45932  # If so, the updated path is stored in $new_path.
45933
45934  input_path="$new_path"
45935  # Check if we need to convert this using DOS-style short mode. If the path
45936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45937  # take no chances and rewrite it.
45938  # Note: m4 eats our [], so we need to use [ and ] instead.
45939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45940  if test "x$has_forbidden_chars" != x; then
45941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45945      # Going to short mode and back again did indeed matter. Since short mode is
45946      # case insensitive, let's make it lowercase to improve readability.
45947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45948      # Now convert it back to Unix-style (cygpath)
45949      input_path=`$CYGPATH -u "$shortmode_path"`
45950      new_path="$input_path"
45951    fi
45952  fi
45953
45954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45955  if test "x$test_cygdrive_prefix" = x; then
45956    # As a simple fix, exclude /usr/bin since it's not a real path.
45957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45959      # a path prefixed by /cygdrive for fixpath to work.
45960      new_path="$CYGWIN_ROOT_PATH$input_path"
45961    fi
45962  fi
45963
45964
45965  if test "x$path" != "x$new_path"; then
45966    MSVC_DLL="$new_path"
45967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45968$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45969  fi
45970
45971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45972
45973  path="$MSVC_DLL"
45974  has_colon=`$ECHO $path | $GREP ^.:`
45975  new_path="$path"
45976  if test "x$has_colon" = x; then
45977    # Not in mixed or Windows style, start by that.
45978    new_path=`cmd //c echo $path`
45979  fi
45980
45981
45982  input_path="$new_path"
45983  # Check if we need to convert this using DOS-style short mode. If the path
45984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45985  # take no chances and rewrite it.
45986  # Note: m4 eats our [], so we need to use [ and ] instead.
45987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45988  if test "x$has_forbidden_chars" != x; then
45989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45991  fi
45992
45993
45994  windows_path="$new_path"
45995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996    unix_path=`$CYGPATH -u "$windows_path"`
45997    new_path="$unix_path"
45998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46000    new_path="$unix_path"
46001  fi
46002
46003  if test "x$path" != "x$new_path"; then
46004    MSVC_DLL="$new_path"
46005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46006$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46007  fi
46008
46009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46011
46012    else
46013      # We're on a unix platform. Hooray! :)
46014      path="$MSVC_DLL"
46015      has_space=`$ECHO "$path" | $GREP " "`
46016      if test "x$has_space" != x; then
46017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46018$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46020      fi
46021
46022      # Use eval to expand a potential ~
46023      eval path="$path"
46024      if test ! -f "$path" && test ! -d "$path"; then
46025        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46026      fi
46027
46028      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46029    fi
46030  fi
46031
46032      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46033$as_echo_n "checking for $DLL_NAME... " >&6; }
46034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46035$as_echo "$MSVC_DLL" >&6; }
46036    else
46037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46038$as_echo "incorrect, ignoring" >&6; }
46039      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46040$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46041    fi
46042  fi
46043
46044    if test "x$MSVC_DLL" = x; then
46045      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46046    fi
46047    MSVCR_DLL="$MSVC_DLL"
46048  else
46049
46050  DLL_NAME="${MSVCR_NAME}"
46051  MSVC_DLL=
46052
46053  if test "x$MSVC_DLL" = x; then
46054    # Probe: Using well-known location from Visual Studio 10.0
46055    if test "x$VCINSTALLDIR" != x; then
46056      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46057
46058  windows_path="$CYGWIN_VC_INSTALL_DIR"
46059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46060    unix_path=`$CYGPATH -u "$windows_path"`
46061    CYGWIN_VC_INSTALL_DIR="$unix_path"
46062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46064    CYGWIN_VC_INSTALL_DIR="$unix_path"
46065  fi
46066
46067      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46068        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46069      else
46070        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46071      fi
46072      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46073
46074  DLL_NAME="$DLL_NAME"
46075  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46076  METHOD="well-known location in VCINSTALLDIR"
46077  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46079$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46080
46081    # Need to check if the found msvcr is correct architecture
46082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46083$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46084    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46086      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46087      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46088      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46089        CORRECT_MSVCR_ARCH="PE32 executable"
46090      else
46091        CORRECT_MSVCR_ARCH="PE32+ executable"
46092      fi
46093    else
46094      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46095        CORRECT_MSVCR_ARCH=386
46096      else
46097        CORRECT_MSVCR_ARCH=x86-64
46098      fi
46099    fi
46100    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46102$as_echo "ok" >&6; }
46103      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46104
46105  # Only process if variable expands to non-empty
46106
46107  if test "x$MSVC_DLL" != x; then
46108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46109
46110  # Input might be given as Windows format, start by converting to
46111  # unix format.
46112  path="$MSVC_DLL"
46113  new_path=`$CYGPATH -u "$path"`
46114
46115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46118  # "foo.exe" is OK but "foo" is an error.
46119  #
46120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46121  # It is also a way to make sure we got the proper file name for the real test later on.
46122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46123  if test "x$test_shortpath" = x; then
46124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46125$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46126    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46127  fi
46128
46129  # Call helper function which possibly converts this using DOS-style short mode.
46130  # If so, the updated path is stored in $new_path.
46131
46132  input_path="$new_path"
46133  # Check if we need to convert this using DOS-style short mode. If the path
46134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46135  # take no chances and rewrite it.
46136  # Note: m4 eats our [], so we need to use [ and ] instead.
46137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46138  if test "x$has_forbidden_chars" != x; then
46139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46143      # Going to short mode and back again did indeed matter. Since short mode is
46144      # case insensitive, let's make it lowercase to improve readability.
46145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46146      # Now convert it back to Unix-style (cygpath)
46147      input_path=`$CYGPATH -u "$shortmode_path"`
46148      new_path="$input_path"
46149    fi
46150  fi
46151
46152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46153  if test "x$test_cygdrive_prefix" = x; then
46154    # As a simple fix, exclude /usr/bin since it's not a real path.
46155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46157      # a path prefixed by /cygdrive for fixpath to work.
46158      new_path="$CYGWIN_ROOT_PATH$input_path"
46159    fi
46160  fi
46161
46162
46163  if test "x$path" != "x$new_path"; then
46164    MSVC_DLL="$new_path"
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46166$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46167  fi
46168
46169    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170
46171  path="$MSVC_DLL"
46172  has_colon=`$ECHO $path | $GREP ^.:`
46173  new_path="$path"
46174  if test "x$has_colon" = x; then
46175    # Not in mixed or Windows style, start by that.
46176    new_path=`cmd //c echo $path`
46177  fi
46178
46179
46180  input_path="$new_path"
46181  # Check if we need to convert this using DOS-style short mode. If the path
46182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46183  # take no chances and rewrite it.
46184  # Note: m4 eats our [], so we need to use [ and ] instead.
46185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46186  if test "x$has_forbidden_chars" != x; then
46187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46189  fi
46190
46191
46192  windows_path="$new_path"
46193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46194    unix_path=`$CYGPATH -u "$windows_path"`
46195    new_path="$unix_path"
46196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46198    new_path="$unix_path"
46199  fi
46200
46201  if test "x$path" != "x$new_path"; then
46202    MSVC_DLL="$new_path"
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46204$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46205  fi
46206
46207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46209
46210    else
46211      # We're on a unix platform. Hooray! :)
46212      path="$MSVC_DLL"
46213      has_space=`$ECHO "$path" | $GREP " "`
46214      if test "x$has_space" != x; then
46215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46216$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46217        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46218      fi
46219
46220      # Use eval to expand a potential ~
46221      eval path="$path"
46222      if test ! -f "$path" && test ! -d "$path"; then
46223        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46224      fi
46225
46226      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46227    fi
46228  fi
46229
46230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46231$as_echo_n "checking for $DLL_NAME... " >&6; }
46232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46233$as_echo "$MSVC_DLL" >&6; }
46234    else
46235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46236$as_echo "incorrect, ignoring" >&6; }
46237      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46238$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46239    fi
46240  fi
46241
46242    fi
46243  fi
46244
46245  if test "x$MSVC_DLL" = x; then
46246    # Probe: Check in the Boot JDK directory.
46247    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46248
46249  DLL_NAME="$DLL_NAME"
46250  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46251  METHOD="well-known location in Boot JDK"
46252  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46254$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46255
46256    # Need to check if the found msvcr is correct architecture
46257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46258$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46259    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46261      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46262      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46263      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46264        CORRECT_MSVCR_ARCH="PE32 executable"
46265      else
46266        CORRECT_MSVCR_ARCH="PE32+ executable"
46267      fi
46268    else
46269      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46270        CORRECT_MSVCR_ARCH=386
46271      else
46272        CORRECT_MSVCR_ARCH=x86-64
46273      fi
46274    fi
46275    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46277$as_echo "ok" >&6; }
46278      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46279
46280  # Only process if variable expands to non-empty
46281
46282  if test "x$MSVC_DLL" != x; then
46283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46284
46285  # Input might be given as Windows format, start by converting to
46286  # unix format.
46287  path="$MSVC_DLL"
46288  new_path=`$CYGPATH -u "$path"`
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 precense.
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    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46300$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46301    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46302  fi
46303
46304  # Call helper function which possibly converts this using DOS-style short mode.
46305  # If so, the updated path is stored in $new_path.
46306
46307  input_path="$new_path"
46308  # Check if we need to convert this using DOS-style short mode. If the path
46309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46310  # take no chances and rewrite it.
46311  # Note: m4 eats our [], so we need to use [ and ] instead.
46312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46313  if test "x$has_forbidden_chars" != x; then
46314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46318      # Going to short mode and back again did indeed matter. Since short mode is
46319      # case insensitive, let's make it lowercase to improve readability.
46320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46321      # Now convert it back to Unix-style (cygpath)
46322      input_path=`$CYGPATH -u "$shortmode_path"`
46323      new_path="$input_path"
46324    fi
46325  fi
46326
46327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46328  if test "x$test_cygdrive_prefix" = x; then
46329    # As a simple fix, exclude /usr/bin since it's not a real path.
46330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46332      # a path prefixed by /cygdrive for fixpath to work.
46333      new_path="$CYGWIN_ROOT_PATH$input_path"
46334    fi
46335  fi
46336
46337
46338  if test "x$path" != "x$new_path"; then
46339    MSVC_DLL="$new_path"
46340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46341$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46342  fi
46343
46344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46345
46346  path="$MSVC_DLL"
46347  has_colon=`$ECHO $path | $GREP ^.:`
46348  new_path="$path"
46349  if test "x$has_colon" = x; then
46350    # Not in mixed or Windows style, start by that.
46351    new_path=`cmd //c echo $path`
46352  fi
46353
46354
46355  input_path="$new_path"
46356  # Check if we need to convert this using DOS-style short mode. If the path
46357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46358  # take no chances and rewrite it.
46359  # Note: m4 eats our [], so we need to use [ and ] instead.
46360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46361  if test "x$has_forbidden_chars" != x; then
46362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46364  fi
46365
46366
46367  windows_path="$new_path"
46368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46369    unix_path=`$CYGPATH -u "$windows_path"`
46370    new_path="$unix_path"
46371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46373    new_path="$unix_path"
46374  fi
46375
46376  if test "x$path" != "x$new_path"; then
46377    MSVC_DLL="$new_path"
46378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46379$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46380  fi
46381
46382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46384
46385    else
46386      # We're on a unix platform. Hooray! :)
46387      path="$MSVC_DLL"
46388      has_space=`$ECHO "$path" | $GREP " "`
46389      if test "x$has_space" != x; then
46390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46391$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46393      fi
46394
46395      # Use eval to expand a potential ~
46396      eval path="$path"
46397      if test ! -f "$path" && test ! -d "$path"; then
46398        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46399      fi
46400
46401      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46402    fi
46403  fi
46404
46405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46406$as_echo_n "checking for $DLL_NAME... " >&6; }
46407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46408$as_echo "$MSVC_DLL" >&6; }
46409    else
46410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46411$as_echo "incorrect, ignoring" >&6; }
46412      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46413$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46414    fi
46415  fi
46416
46417  fi
46418
46419  if test "x$MSVC_DLL" = x; then
46420    # Probe: Look in the Windows system32 directory
46421    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46422
46423  windows_path="$CYGWIN_SYSTEMROOT"
46424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46425    unix_path=`$CYGPATH -u "$windows_path"`
46426    CYGWIN_SYSTEMROOT="$unix_path"
46427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46429    CYGWIN_SYSTEMROOT="$unix_path"
46430  fi
46431
46432    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46433
46434  DLL_NAME="$DLL_NAME"
46435  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46436  METHOD="well-known location in SYSTEMROOT"
46437  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46439$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46440
46441    # Need to check if the found msvcr is correct architecture
46442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46443$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46444    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46446      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46447      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46449        CORRECT_MSVCR_ARCH="PE32 executable"
46450      else
46451        CORRECT_MSVCR_ARCH="PE32+ executable"
46452      fi
46453    else
46454      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46455        CORRECT_MSVCR_ARCH=386
46456      else
46457        CORRECT_MSVCR_ARCH=x86-64
46458      fi
46459    fi
46460    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46462$as_echo "ok" >&6; }
46463      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46464
46465  # Only process if variable expands to non-empty
46466
46467  if test "x$MSVC_DLL" != x; then
46468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46469
46470  # Input might be given as Windows format, start by converting to
46471  # unix format.
46472  path="$MSVC_DLL"
46473  new_path=`$CYGPATH -u "$path"`
46474
46475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46478  # "foo.exe" is OK but "foo" is an error.
46479  #
46480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46481  # It is also a way to make sure we got the proper file name for the real test later on.
46482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46483  if test "x$test_shortpath" = x; then
46484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46485$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46486    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46487  fi
46488
46489  # Call helper function which possibly converts this using DOS-style short mode.
46490  # If so, the updated path is stored in $new_path.
46491
46492  input_path="$new_path"
46493  # Check if we need to convert this using DOS-style short mode. If the path
46494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46495  # take no chances and rewrite it.
46496  # Note: m4 eats our [], so we need to use [ and ] instead.
46497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46498  if test "x$has_forbidden_chars" != x; then
46499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46503      # Going to short mode and back again did indeed matter. Since short mode is
46504      # case insensitive, let's make it lowercase to improve readability.
46505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46506      # Now convert it back to Unix-style (cygpath)
46507      input_path=`$CYGPATH -u "$shortmode_path"`
46508      new_path="$input_path"
46509    fi
46510  fi
46511
46512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46513  if test "x$test_cygdrive_prefix" = x; then
46514    # As a simple fix, exclude /usr/bin since it's not a real path.
46515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46517      # a path prefixed by /cygdrive for fixpath to work.
46518      new_path="$CYGWIN_ROOT_PATH$input_path"
46519    fi
46520  fi
46521
46522
46523  if test "x$path" != "x$new_path"; then
46524    MSVC_DLL="$new_path"
46525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46526$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46527  fi
46528
46529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46530
46531  path="$MSVC_DLL"
46532  has_colon=`$ECHO $path | $GREP ^.:`
46533  new_path="$path"
46534  if test "x$has_colon" = x; then
46535    # Not in mixed or Windows style, start by that.
46536    new_path=`cmd //c echo $path`
46537  fi
46538
46539
46540  input_path="$new_path"
46541  # Check if we need to convert this using DOS-style short mode. If the path
46542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46543  # take no chances and rewrite it.
46544  # Note: m4 eats our [], so we need to use [ and ] instead.
46545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46546  if test "x$has_forbidden_chars" != x; then
46547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46549  fi
46550
46551
46552  windows_path="$new_path"
46553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46554    unix_path=`$CYGPATH -u "$windows_path"`
46555    new_path="$unix_path"
46556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46558    new_path="$unix_path"
46559  fi
46560
46561  if test "x$path" != "x$new_path"; then
46562    MSVC_DLL="$new_path"
46563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46564$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46565  fi
46566
46567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46569
46570    else
46571      # We're on a unix platform. Hooray! :)
46572      path="$MSVC_DLL"
46573      has_space=`$ECHO "$path" | $GREP " "`
46574      if test "x$has_space" != x; then
46575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46576$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46577        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46578      fi
46579
46580      # Use eval to expand a potential ~
46581      eval path="$path"
46582      if test ! -f "$path" && test ! -d "$path"; then
46583        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46584      fi
46585
46586      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46587    fi
46588  fi
46589
46590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46591$as_echo_n "checking for $DLL_NAME... " >&6; }
46592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46593$as_echo "$MSVC_DLL" >&6; }
46594    else
46595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46596$as_echo "incorrect, ignoring" >&6; }
46597      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46598$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46599    fi
46600  fi
46601
46602  fi
46603
46604  if test "x$MSVC_DLL" = x; then
46605    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46606    if test "x$VS100COMNTOOLS" != x; then
46607      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46608
46609  windows_path="$CYGWIN_VS_TOOLS_DIR"
46610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46611    unix_path=`$CYGPATH -u "$windows_path"`
46612    CYGWIN_VS_TOOLS_DIR="$unix_path"
46613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46615    CYGWIN_VS_TOOLS_DIR="$unix_path"
46616  fi
46617
46618      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46619        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46620	    | $GREP -i /x64/ | $HEAD --lines 1`
46621      else
46622        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46623	    | $GREP -i /x86/ | $HEAD --lines 1`
46624      fi
46625
46626  DLL_NAME="$DLL_NAME"
46627  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46628  METHOD="search of VS100COMNTOOLS"
46629  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46630    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46631$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46632
46633    # Need to check if the found msvcr is correct architecture
46634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46635$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46636    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46638      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46639      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46640      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46641        CORRECT_MSVCR_ARCH="PE32 executable"
46642      else
46643        CORRECT_MSVCR_ARCH="PE32+ executable"
46644      fi
46645    else
46646      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46647        CORRECT_MSVCR_ARCH=386
46648      else
46649        CORRECT_MSVCR_ARCH=x86-64
46650      fi
46651    fi
46652    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46654$as_echo "ok" >&6; }
46655      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46656
46657  # Only process if variable expands to non-empty
46658
46659  if test "x$MSVC_DLL" != x; then
46660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46661
46662  # Input might be given as Windows format, start by converting to
46663  # unix format.
46664  path="$MSVC_DLL"
46665  new_path=`$CYGPATH -u "$path"`
46666
46667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46670  # "foo.exe" is OK but "foo" is an error.
46671  #
46672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46673  # It is also a way to make sure we got the proper file name for the real test later on.
46674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46675  if test "x$test_shortpath" = x; then
46676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46677$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46678    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46679  fi
46680
46681  # Call helper function which possibly converts this using DOS-style short mode.
46682  # If so, the updated path is stored in $new_path.
46683
46684  input_path="$new_path"
46685  # Check if we need to convert this using DOS-style short mode. If the path
46686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46687  # take no chances and rewrite it.
46688  # Note: m4 eats our [], so we need to use [ and ] instead.
46689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46690  if test "x$has_forbidden_chars" != x; then
46691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46695      # Going to short mode and back again did indeed matter. Since short mode is
46696      # case insensitive, let's make it lowercase to improve readability.
46697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46698      # Now convert it back to Unix-style (cygpath)
46699      input_path=`$CYGPATH -u "$shortmode_path"`
46700      new_path="$input_path"
46701    fi
46702  fi
46703
46704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46705  if test "x$test_cygdrive_prefix" = x; then
46706    # As a simple fix, exclude /usr/bin since it's not a real path.
46707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46709      # a path prefixed by /cygdrive for fixpath to work.
46710      new_path="$CYGWIN_ROOT_PATH$input_path"
46711    fi
46712  fi
46713
46714
46715  if test "x$path" != "x$new_path"; then
46716    MSVC_DLL="$new_path"
46717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46718$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46719  fi
46720
46721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46722
46723  path="$MSVC_DLL"
46724  has_colon=`$ECHO $path | $GREP ^.:`
46725  new_path="$path"
46726  if test "x$has_colon" = x; then
46727    # Not in mixed or Windows style, start by that.
46728    new_path=`cmd //c echo $path`
46729  fi
46730
46731
46732  input_path="$new_path"
46733  # Check if we need to convert this using DOS-style short mode. If the path
46734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46735  # take no chances and rewrite it.
46736  # Note: m4 eats our [], so we need to use [ and ] instead.
46737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46738  if test "x$has_forbidden_chars" != x; then
46739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46741  fi
46742
46743
46744  windows_path="$new_path"
46745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46746    unix_path=`$CYGPATH -u "$windows_path"`
46747    new_path="$unix_path"
46748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46750    new_path="$unix_path"
46751  fi
46752
46753  if test "x$path" != "x$new_path"; then
46754    MSVC_DLL="$new_path"
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46756$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46757  fi
46758
46759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46761
46762    else
46763      # We're on a unix platform. Hooray! :)
46764      path="$MSVC_DLL"
46765      has_space=`$ECHO "$path" | $GREP " "`
46766      if test "x$has_space" != x; then
46767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46768$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46770      fi
46771
46772      # Use eval to expand a potential ~
46773      eval path="$path"
46774      if test ! -f "$path" && test ! -d "$path"; then
46775        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46776      fi
46777
46778      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46779    fi
46780  fi
46781
46782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46783$as_echo_n "checking for $DLL_NAME... " >&6; }
46784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46785$as_echo "$MSVC_DLL" >&6; }
46786    else
46787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46788$as_echo "incorrect, ignoring" >&6; }
46789      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46790$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46791    fi
46792  fi
46793
46794    fi
46795  fi
46796
46797  if test "x$MSVC_DLL" = x; then
46798    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46799    # (This was the original behaviour; kept since it might turn something up)
46800    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46801      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46802        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46803	    | $GREP x64 | $HEAD --lines 1`
46804      else
46805        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46806	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46807        if test "x$POSSIBLE_MSVC_DLL" = x; then
46808          # We're grasping at straws now...
46809          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46810	      | $HEAD --lines 1`
46811        fi
46812      fi
46813
46814
46815  DLL_NAME="$DLL_NAME"
46816  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46817  METHOD="search of VCINSTALLDIR"
46818  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46820$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46821
46822    # Need to check if the found msvcr is correct architecture
46823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46824$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46825    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46827      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46828      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46829      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46830        CORRECT_MSVCR_ARCH="PE32 executable"
46831      else
46832        CORRECT_MSVCR_ARCH="PE32+ executable"
46833      fi
46834    else
46835      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46836        CORRECT_MSVCR_ARCH=386
46837      else
46838        CORRECT_MSVCR_ARCH=x86-64
46839      fi
46840    fi
46841    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46843$as_echo "ok" >&6; }
46844      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46845
46846  # Only process if variable expands to non-empty
46847
46848  if test "x$MSVC_DLL" != x; then
46849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46850
46851  # Input might be given as Windows format, start by converting to
46852  # unix format.
46853  path="$MSVC_DLL"
46854  new_path=`$CYGPATH -u "$path"`
46855
46856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46859  # "foo.exe" is OK but "foo" is an error.
46860  #
46861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46862  # It is also a way to make sure we got the proper file name for the real test later on.
46863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46864  if test "x$test_shortpath" = x; then
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46866$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46867    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46868  fi
46869
46870  # Call helper function which possibly converts this using DOS-style short mode.
46871  # If so, the updated path is stored in $new_path.
46872
46873  input_path="$new_path"
46874  # Check if we need to convert this using DOS-style short mode. If the path
46875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46876  # take no chances and rewrite it.
46877  # Note: m4 eats our [], so we need to use [ and ] instead.
46878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46879  if test "x$has_forbidden_chars" != x; then
46880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46884      # Going to short mode and back again did indeed matter. Since short mode is
46885      # case insensitive, let's make it lowercase to improve readability.
46886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46887      # Now convert it back to Unix-style (cygpath)
46888      input_path=`$CYGPATH -u "$shortmode_path"`
46889      new_path="$input_path"
46890    fi
46891  fi
46892
46893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46894  if test "x$test_cygdrive_prefix" = x; then
46895    # As a simple fix, exclude /usr/bin since it's not a real path.
46896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46898      # a path prefixed by /cygdrive for fixpath to work.
46899      new_path="$CYGWIN_ROOT_PATH$input_path"
46900    fi
46901  fi
46902
46903
46904  if test "x$path" != "x$new_path"; then
46905    MSVC_DLL="$new_path"
46906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46907$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46908  fi
46909
46910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46911
46912  path="$MSVC_DLL"
46913  has_colon=`$ECHO $path | $GREP ^.:`
46914  new_path="$path"
46915  if test "x$has_colon" = x; then
46916    # Not in mixed or Windows style, start by that.
46917    new_path=`cmd //c echo $path`
46918  fi
46919
46920
46921  input_path="$new_path"
46922  # Check if we need to convert this using DOS-style short mode. If the path
46923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46924  # take no chances and rewrite it.
46925  # Note: m4 eats our [], so we need to use [ and ] instead.
46926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46927  if test "x$has_forbidden_chars" != x; then
46928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46930  fi
46931
46932
46933  windows_path="$new_path"
46934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46935    unix_path=`$CYGPATH -u "$windows_path"`
46936    new_path="$unix_path"
46937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46939    new_path="$unix_path"
46940  fi
46941
46942  if test "x$path" != "x$new_path"; then
46943    MSVC_DLL="$new_path"
46944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46945$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46946  fi
46947
46948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46950
46951    else
46952      # We're on a unix platform. Hooray! :)
46953      path="$MSVC_DLL"
46954      has_space=`$ECHO "$path" | $GREP " "`
46955      if test "x$has_space" != x; then
46956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46957$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46959      fi
46960
46961      # Use eval to expand a potential ~
46962      eval path="$path"
46963      if test ! -f "$path" && test ! -d "$path"; then
46964        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46965      fi
46966
46967      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46968    fi
46969  fi
46970
46971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46972$as_echo_n "checking for $DLL_NAME... " >&6; }
46973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46974$as_echo "$MSVC_DLL" >&6; }
46975    else
46976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46977$as_echo "incorrect, ignoring" >&6; }
46978      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46979$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46980    fi
46981  fi
46982
46983    fi
46984  fi
46985
46986  if test "x$MSVC_DLL" = x; then
46987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46988$as_echo_n "checking for $DLL_NAME... " >&6; }
46989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46990$as_echo "no" >&6; }
46991    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46992  fi
46993
46994    MSVCR_DLL="$MSVC_DLL"
46995  fi
46996
46997
46998
46999# Check whether --with-msvcp-dll was given.
47000if test "${with_msvcp_dll+set}" = set; then :
47001  withval=$with_msvcp_dll;
47002fi
47003
47004
47005  if test "x$MSVCP_NAME" != "x"; then
47006    if test "x$with_msvcp_dll" != x; then
47007      # If given explicitely by user, do not probe. If not present, fail directly.
47008
47009  DLL_NAME="$MSVCP_NAME"
47010  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47011  METHOD="--with-msvcp-dll"
47012  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47014$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47015
47016    # Need to check if the found msvcr is correct architecture
47017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47018$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47019    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47021      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47022      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47023      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47024        CORRECT_MSVCR_ARCH="PE32 executable"
47025      else
47026        CORRECT_MSVCR_ARCH="PE32+ executable"
47027      fi
47028    else
47029      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47030        CORRECT_MSVCR_ARCH=386
47031      else
47032        CORRECT_MSVCR_ARCH=x86-64
47033      fi
47034    fi
47035    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47037$as_echo "ok" >&6; }
47038      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47039
47040  # Only process if variable expands to non-empty
47041
47042  if test "x$MSVC_DLL" != x; then
47043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47044
47045  # Input might be given as Windows format, start by converting to
47046  # unix format.
47047  path="$MSVC_DLL"
47048  new_path=`$CYGPATH -u "$path"`
47049
47050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47053  # "foo.exe" is OK but "foo" is an error.
47054  #
47055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47056  # It is also a way to make sure we got the proper file name for the real test later on.
47057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47058  if test "x$test_shortpath" = x; then
47059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47060$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47061    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47062  fi
47063
47064  # Call helper function which possibly converts this using DOS-style short mode.
47065  # If so, the updated path is stored in $new_path.
47066
47067  input_path="$new_path"
47068  # Check if we need to convert this using DOS-style short mode. If the path
47069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47070  # take no chances and rewrite it.
47071  # Note: m4 eats our [], so we need to use [ and ] instead.
47072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47073  if test "x$has_forbidden_chars" != x; then
47074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47078      # Going to short mode and back again did indeed matter. Since short mode is
47079      # case insensitive, let's make it lowercase to improve readability.
47080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47081      # Now convert it back to Unix-style (cygpath)
47082      input_path=`$CYGPATH -u "$shortmode_path"`
47083      new_path="$input_path"
47084    fi
47085  fi
47086
47087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47088  if test "x$test_cygdrive_prefix" = x; then
47089    # As a simple fix, exclude /usr/bin since it's not a real path.
47090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47092      # a path prefixed by /cygdrive for fixpath to work.
47093      new_path="$CYGWIN_ROOT_PATH$input_path"
47094    fi
47095  fi
47096
47097
47098  if test "x$path" != "x$new_path"; then
47099    MSVC_DLL="$new_path"
47100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47101$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47102  fi
47103
47104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47105
47106  path="$MSVC_DLL"
47107  has_colon=`$ECHO $path | $GREP ^.:`
47108  new_path="$path"
47109  if test "x$has_colon" = x; then
47110    # Not in mixed or Windows style, start by that.
47111    new_path=`cmd //c echo $path`
47112  fi
47113
47114
47115  input_path="$new_path"
47116  # Check if we need to convert this using DOS-style short mode. If the path
47117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47118  # take no chances and rewrite it.
47119  # Note: m4 eats our [], so we need to use [ and ] instead.
47120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47121  if test "x$has_forbidden_chars" != x; then
47122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47124  fi
47125
47126
47127  windows_path="$new_path"
47128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47129    unix_path=`$CYGPATH -u "$windows_path"`
47130    new_path="$unix_path"
47131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47133    new_path="$unix_path"
47134  fi
47135
47136  if test "x$path" != "x$new_path"; then
47137    MSVC_DLL="$new_path"
47138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47139$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47140  fi
47141
47142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47144
47145    else
47146      # We're on a unix platform. Hooray! :)
47147      path="$MSVC_DLL"
47148      has_space=`$ECHO "$path" | $GREP " "`
47149      if test "x$has_space" != x; then
47150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47153      fi
47154
47155      # Use eval to expand a potential ~
47156      eval path="$path"
47157      if test ! -f "$path" && test ! -d "$path"; then
47158        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47159      fi
47160
47161      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47162    fi
47163  fi
47164
47165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47166$as_echo_n "checking for $DLL_NAME... " >&6; }
47167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47168$as_echo "$MSVC_DLL" >&6; }
47169    else
47170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47171$as_echo "incorrect, ignoring" >&6; }
47172      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47173$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47174    fi
47175  fi
47176
47177      if test "x$MSVC_DLL" = x; then
47178        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47179      fi
47180      MSVCP_DLL="$MSVC_DLL"
47181    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47182
47183  DLL_NAME="$MSVCP_NAME"
47184  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47185  METHOD="devkit"
47186  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47188$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47189
47190    # Need to check if the found msvcr is correct architecture
47191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47192$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47193    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47195      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47196      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47197      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47198        CORRECT_MSVCR_ARCH="PE32 executable"
47199      else
47200        CORRECT_MSVCR_ARCH="PE32+ executable"
47201      fi
47202    else
47203      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47204        CORRECT_MSVCR_ARCH=386
47205      else
47206        CORRECT_MSVCR_ARCH=x86-64
47207      fi
47208    fi
47209    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47211$as_echo "ok" >&6; }
47212      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47213
47214  # Only process if variable expands to non-empty
47215
47216  if test "x$MSVC_DLL" != x; then
47217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47218
47219  # Input might be given as Windows format, start by converting to
47220  # unix format.
47221  path="$MSVC_DLL"
47222  new_path=`$CYGPATH -u "$path"`
47223
47224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47227  # "foo.exe" is OK but "foo" is an error.
47228  #
47229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47230  # It is also a way to make sure we got the proper file name for the real test later on.
47231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47232  if test "x$test_shortpath" = x; then
47233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47234$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47235    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47236  fi
47237
47238  # Call helper function which possibly converts this using DOS-style short mode.
47239  # If so, the updated path is stored in $new_path.
47240
47241  input_path="$new_path"
47242  # Check if we need to convert this using DOS-style short mode. If the path
47243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47244  # take no chances and rewrite it.
47245  # Note: m4 eats our [], so we need to use [ and ] instead.
47246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47247  if test "x$has_forbidden_chars" != x; then
47248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47252      # Going to short mode and back again did indeed matter. Since short mode is
47253      # case insensitive, let's make it lowercase to improve readability.
47254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47255      # Now convert it back to Unix-style (cygpath)
47256      input_path=`$CYGPATH -u "$shortmode_path"`
47257      new_path="$input_path"
47258    fi
47259  fi
47260
47261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47262  if test "x$test_cygdrive_prefix" = x; then
47263    # As a simple fix, exclude /usr/bin since it's not a real path.
47264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47266      # a path prefixed by /cygdrive for fixpath to work.
47267      new_path="$CYGWIN_ROOT_PATH$input_path"
47268    fi
47269  fi
47270
47271
47272  if test "x$path" != "x$new_path"; then
47273    MSVC_DLL="$new_path"
47274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47275$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47276  fi
47277
47278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47279
47280  path="$MSVC_DLL"
47281  has_colon=`$ECHO $path | $GREP ^.:`
47282  new_path="$path"
47283  if test "x$has_colon" = x; then
47284    # Not in mixed or Windows style, start by that.
47285    new_path=`cmd //c echo $path`
47286  fi
47287
47288
47289  input_path="$new_path"
47290  # Check if we need to convert this using DOS-style short mode. If the path
47291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47292  # take no chances and rewrite it.
47293  # Note: m4 eats our [], so we need to use [ and ] instead.
47294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47295  if test "x$has_forbidden_chars" != x; then
47296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47298  fi
47299
47300
47301  windows_path="$new_path"
47302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47303    unix_path=`$CYGPATH -u "$windows_path"`
47304    new_path="$unix_path"
47305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47307    new_path="$unix_path"
47308  fi
47309
47310  if test "x$path" != "x$new_path"; then
47311    MSVC_DLL="$new_path"
47312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47313$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47314  fi
47315
47316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47318
47319    else
47320      # We're on a unix platform. Hooray! :)
47321      path="$MSVC_DLL"
47322      has_space=`$ECHO "$path" | $GREP " "`
47323      if test "x$has_space" != x; then
47324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47325$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47327      fi
47328
47329      # Use eval to expand a potential ~
47330      eval path="$path"
47331      if test ! -f "$path" && test ! -d "$path"; then
47332        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47333      fi
47334
47335      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47336    fi
47337  fi
47338
47339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47340$as_echo_n "checking for $DLL_NAME... " >&6; }
47341      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47342$as_echo "$MSVC_DLL" >&6; }
47343    else
47344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47345$as_echo "incorrect, ignoring" >&6; }
47346      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47347$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47348    fi
47349  fi
47350
47351      if test "x$MSVC_DLL" = x; then
47352        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47353      fi
47354      MSVCP_DLL="$MSVC_DLL"
47355    else
47356
47357  DLL_NAME="${MSVCP_NAME}"
47358  MSVC_DLL=
47359
47360  if test "x$MSVC_DLL" = x; then
47361    # Probe: Using well-known location from Visual Studio 10.0
47362    if test "x$VCINSTALLDIR" != x; then
47363      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47364
47365  windows_path="$CYGWIN_VC_INSTALL_DIR"
47366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47367    unix_path=`$CYGPATH -u "$windows_path"`
47368    CYGWIN_VC_INSTALL_DIR="$unix_path"
47369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47371    CYGWIN_VC_INSTALL_DIR="$unix_path"
47372  fi
47373
47374      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47375        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47376      else
47377        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47378      fi
47379      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47380
47381  DLL_NAME="$DLL_NAME"
47382  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47383  METHOD="well-known location in VCINSTALLDIR"
47384  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47385    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47386$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47387
47388    # Need to check if the found msvcr is correct architecture
47389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47390$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47391    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47393      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47394      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47395      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47396        CORRECT_MSVCR_ARCH="PE32 executable"
47397      else
47398        CORRECT_MSVCR_ARCH="PE32+ executable"
47399      fi
47400    else
47401      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47402        CORRECT_MSVCR_ARCH=386
47403      else
47404        CORRECT_MSVCR_ARCH=x86-64
47405      fi
47406    fi
47407    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47409$as_echo "ok" >&6; }
47410      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47411
47412  # Only process if variable expands to non-empty
47413
47414  if test "x$MSVC_DLL" != x; then
47415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47416
47417  # Input might be given as Windows format, start by converting to
47418  # unix format.
47419  path="$MSVC_DLL"
47420  new_path=`$CYGPATH -u "$path"`
47421
47422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47425  # "foo.exe" is OK but "foo" is an error.
47426  #
47427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47428  # It is also a way to make sure we got the proper file name for the real test later on.
47429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47430  if test "x$test_shortpath" = x; then
47431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47432$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47433    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47434  fi
47435
47436  # Call helper function which possibly converts this using DOS-style short mode.
47437  # If so, the updated path is stored in $new_path.
47438
47439  input_path="$new_path"
47440  # Check if we need to convert this using DOS-style short mode. If the path
47441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47442  # take no chances and rewrite it.
47443  # Note: m4 eats our [], so we need to use [ and ] instead.
47444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47445  if test "x$has_forbidden_chars" != x; then
47446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47450      # Going to short mode and back again did indeed matter. Since short mode is
47451      # case insensitive, let's make it lowercase to improve readability.
47452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47453      # Now convert it back to Unix-style (cygpath)
47454      input_path=`$CYGPATH -u "$shortmode_path"`
47455      new_path="$input_path"
47456    fi
47457  fi
47458
47459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47460  if test "x$test_cygdrive_prefix" = x; then
47461    # As a simple fix, exclude /usr/bin since it's not a real path.
47462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47464      # a path prefixed by /cygdrive for fixpath to work.
47465      new_path="$CYGWIN_ROOT_PATH$input_path"
47466    fi
47467  fi
47468
47469
47470  if test "x$path" != "x$new_path"; then
47471    MSVC_DLL="$new_path"
47472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47473$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47474  fi
47475
47476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47477
47478  path="$MSVC_DLL"
47479  has_colon=`$ECHO $path | $GREP ^.:`
47480  new_path="$path"
47481  if test "x$has_colon" = x; then
47482    # Not in mixed or Windows style, start by that.
47483    new_path=`cmd //c echo $path`
47484  fi
47485
47486
47487  input_path="$new_path"
47488  # Check if we need to convert this using DOS-style short mode. If the path
47489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47490  # take no chances and rewrite it.
47491  # Note: m4 eats our [], so we need to use [ and ] instead.
47492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47493  if test "x$has_forbidden_chars" != x; then
47494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47496  fi
47497
47498
47499  windows_path="$new_path"
47500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47501    unix_path=`$CYGPATH -u "$windows_path"`
47502    new_path="$unix_path"
47503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47505    new_path="$unix_path"
47506  fi
47507
47508  if test "x$path" != "x$new_path"; then
47509    MSVC_DLL="$new_path"
47510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47511$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47512  fi
47513
47514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47516
47517    else
47518      # We're on a unix platform. Hooray! :)
47519      path="$MSVC_DLL"
47520      has_space=`$ECHO "$path" | $GREP " "`
47521      if test "x$has_space" != x; then
47522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47523$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47525      fi
47526
47527      # Use eval to expand a potential ~
47528      eval path="$path"
47529      if test ! -f "$path" && test ! -d "$path"; then
47530        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47531      fi
47532
47533      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47534    fi
47535  fi
47536
47537      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47538$as_echo_n "checking for $DLL_NAME... " >&6; }
47539      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47540$as_echo "$MSVC_DLL" >&6; }
47541    else
47542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47543$as_echo "incorrect, ignoring" >&6; }
47544      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47545$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47546    fi
47547  fi
47548
47549    fi
47550  fi
47551
47552  if test "x$MSVC_DLL" = x; then
47553    # Probe: Check in the Boot JDK directory.
47554    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47555
47556  DLL_NAME="$DLL_NAME"
47557  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47558  METHOD="well-known location in Boot JDK"
47559  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47560    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47561$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47562
47563    # Need to check if the found msvcr is correct architecture
47564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47565$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47566    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47568      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47569      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47570      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47571        CORRECT_MSVCR_ARCH="PE32 executable"
47572      else
47573        CORRECT_MSVCR_ARCH="PE32+ executable"
47574      fi
47575    else
47576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47577        CORRECT_MSVCR_ARCH=386
47578      else
47579        CORRECT_MSVCR_ARCH=x86-64
47580      fi
47581    fi
47582    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47584$as_echo "ok" >&6; }
47585      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47586
47587  # Only process if variable expands to non-empty
47588
47589  if test "x$MSVC_DLL" != x; then
47590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47591
47592  # Input might be given as Windows format, start by converting to
47593  # unix format.
47594  path="$MSVC_DLL"
47595  new_path=`$CYGPATH -u "$path"`
47596
47597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47600  # "foo.exe" is OK but "foo" is an error.
47601  #
47602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47603  # It is also a way to make sure we got the proper file name for the real test later on.
47604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47605  if test "x$test_shortpath" = x; then
47606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47607$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47608    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47609  fi
47610
47611  # Call helper function which possibly converts this using DOS-style short mode.
47612  # If so, the updated path is stored in $new_path.
47613
47614  input_path="$new_path"
47615  # Check if we need to convert this using DOS-style short mode. If the path
47616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47617  # take no chances and rewrite it.
47618  # Note: m4 eats our [], so we need to use [ and ] instead.
47619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47620  if test "x$has_forbidden_chars" != x; then
47621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47625      # Going to short mode and back again did indeed matter. Since short mode is
47626      # case insensitive, let's make it lowercase to improve readability.
47627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47628      # Now convert it back to Unix-style (cygpath)
47629      input_path=`$CYGPATH -u "$shortmode_path"`
47630      new_path="$input_path"
47631    fi
47632  fi
47633
47634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47635  if test "x$test_cygdrive_prefix" = x; then
47636    # As a simple fix, exclude /usr/bin since it's not a real path.
47637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47639      # a path prefixed by /cygdrive for fixpath to work.
47640      new_path="$CYGWIN_ROOT_PATH$input_path"
47641    fi
47642  fi
47643
47644
47645  if test "x$path" != "x$new_path"; then
47646    MSVC_DLL="$new_path"
47647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47648$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47649  fi
47650
47651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47652
47653  path="$MSVC_DLL"
47654  has_colon=`$ECHO $path | $GREP ^.:`
47655  new_path="$path"
47656  if test "x$has_colon" = x; then
47657    # Not in mixed or Windows style, start by that.
47658    new_path=`cmd //c echo $path`
47659  fi
47660
47661
47662  input_path="$new_path"
47663  # Check if we need to convert this using DOS-style short mode. If the path
47664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47665  # take no chances and rewrite it.
47666  # Note: m4 eats our [], so we need to use [ and ] instead.
47667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47668  if test "x$has_forbidden_chars" != x; then
47669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47671  fi
47672
47673
47674  windows_path="$new_path"
47675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47676    unix_path=`$CYGPATH -u "$windows_path"`
47677    new_path="$unix_path"
47678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47680    new_path="$unix_path"
47681  fi
47682
47683  if test "x$path" != "x$new_path"; then
47684    MSVC_DLL="$new_path"
47685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47686$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47687  fi
47688
47689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47691
47692    else
47693      # We're on a unix platform. Hooray! :)
47694      path="$MSVC_DLL"
47695      has_space=`$ECHO "$path" | $GREP " "`
47696      if test "x$has_space" != x; then
47697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47698$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47700      fi
47701
47702      # Use eval to expand a potential ~
47703      eval path="$path"
47704      if test ! -f "$path" && test ! -d "$path"; then
47705        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47706      fi
47707
47708      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47709    fi
47710  fi
47711
47712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47713$as_echo_n "checking for $DLL_NAME... " >&6; }
47714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47715$as_echo "$MSVC_DLL" >&6; }
47716    else
47717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47718$as_echo "incorrect, ignoring" >&6; }
47719      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47720$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47721    fi
47722  fi
47723
47724  fi
47725
47726  if test "x$MSVC_DLL" = x; then
47727    # Probe: Look in the Windows system32 directory
47728    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47729
47730  windows_path="$CYGWIN_SYSTEMROOT"
47731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47732    unix_path=`$CYGPATH -u "$windows_path"`
47733    CYGWIN_SYSTEMROOT="$unix_path"
47734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47736    CYGWIN_SYSTEMROOT="$unix_path"
47737  fi
47738
47739    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47740
47741  DLL_NAME="$DLL_NAME"
47742  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47743  METHOD="well-known location in SYSTEMROOT"
47744  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47745    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47746$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47747
47748    # Need to check if the found msvcr is correct architecture
47749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47750$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47751    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47753      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47754      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47756        CORRECT_MSVCR_ARCH="PE32 executable"
47757      else
47758        CORRECT_MSVCR_ARCH="PE32+ executable"
47759      fi
47760    else
47761      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47762        CORRECT_MSVCR_ARCH=386
47763      else
47764        CORRECT_MSVCR_ARCH=x86-64
47765      fi
47766    fi
47767    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47769$as_echo "ok" >&6; }
47770      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47771
47772  # Only process if variable expands to non-empty
47773
47774  if test "x$MSVC_DLL" != x; then
47775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47776
47777  # Input might be given as Windows format, start by converting to
47778  # unix format.
47779  path="$MSVC_DLL"
47780  new_path=`$CYGPATH -u "$path"`
47781
47782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47785  # "foo.exe" is OK but "foo" is an error.
47786  #
47787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47788  # It is also a way to make sure we got the proper file name for the real test later on.
47789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47790  if test "x$test_shortpath" = x; then
47791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47792$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47793    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47794  fi
47795
47796  # Call helper function which possibly converts this using DOS-style short mode.
47797  # If so, the updated path is stored in $new_path.
47798
47799  input_path="$new_path"
47800  # Check if we need to convert this using DOS-style short mode. If the path
47801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47802  # take no chances and rewrite it.
47803  # Note: m4 eats our [], so we need to use [ and ] instead.
47804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47805  if test "x$has_forbidden_chars" != x; then
47806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47810      # Going to short mode and back again did indeed matter. Since short mode is
47811      # case insensitive, let's make it lowercase to improve readability.
47812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47813      # Now convert it back to Unix-style (cygpath)
47814      input_path=`$CYGPATH -u "$shortmode_path"`
47815      new_path="$input_path"
47816    fi
47817  fi
47818
47819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47820  if test "x$test_cygdrive_prefix" = x; then
47821    # As a simple fix, exclude /usr/bin since it's not a real path.
47822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47824      # a path prefixed by /cygdrive for fixpath to work.
47825      new_path="$CYGWIN_ROOT_PATH$input_path"
47826    fi
47827  fi
47828
47829
47830  if test "x$path" != "x$new_path"; then
47831    MSVC_DLL="$new_path"
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47833$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47834  fi
47835
47836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47837
47838  path="$MSVC_DLL"
47839  has_colon=`$ECHO $path | $GREP ^.:`
47840  new_path="$path"
47841  if test "x$has_colon" = x; then
47842    # Not in mixed or Windows style, start by that.
47843    new_path=`cmd //c echo $path`
47844  fi
47845
47846
47847  input_path="$new_path"
47848  # Check if we need to convert this using DOS-style short mode. If the path
47849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47850  # take no chances and rewrite it.
47851  # Note: m4 eats our [], so we need to use [ and ] instead.
47852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47853  if test "x$has_forbidden_chars" != x; then
47854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47856  fi
47857
47858
47859  windows_path="$new_path"
47860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47861    unix_path=`$CYGPATH -u "$windows_path"`
47862    new_path="$unix_path"
47863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47865    new_path="$unix_path"
47866  fi
47867
47868  if test "x$path" != "x$new_path"; then
47869    MSVC_DLL="$new_path"
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47871$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47872  fi
47873
47874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47876
47877    else
47878      # We're on a unix platform. Hooray! :)
47879      path="$MSVC_DLL"
47880      has_space=`$ECHO "$path" | $GREP " "`
47881      if test "x$has_space" != x; then
47882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47883$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47885      fi
47886
47887      # Use eval to expand a potential ~
47888      eval path="$path"
47889      if test ! -f "$path" && test ! -d "$path"; then
47890        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47891      fi
47892
47893      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47894    fi
47895  fi
47896
47897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47898$as_echo_n "checking for $DLL_NAME... " >&6; }
47899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47900$as_echo "$MSVC_DLL" >&6; }
47901    else
47902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47903$as_echo "incorrect, ignoring" >&6; }
47904      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47905$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47906    fi
47907  fi
47908
47909  fi
47910
47911  if test "x$MSVC_DLL" = x; then
47912    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47913    if test "x$VS100COMNTOOLS" != x; then
47914      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47915
47916  windows_path="$CYGWIN_VS_TOOLS_DIR"
47917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47918    unix_path=`$CYGPATH -u "$windows_path"`
47919    CYGWIN_VS_TOOLS_DIR="$unix_path"
47920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47922    CYGWIN_VS_TOOLS_DIR="$unix_path"
47923  fi
47924
47925      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47926        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47927	    | $GREP -i /x64/ | $HEAD --lines 1`
47928      else
47929        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47930	    | $GREP -i /x86/ | $HEAD --lines 1`
47931      fi
47932
47933  DLL_NAME="$DLL_NAME"
47934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47935  METHOD="search of VS100COMNTOOLS"
47936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47939
47940    # Need to check if the found msvcr is correct architecture
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47948        CORRECT_MSVCR_ARCH="PE32 executable"
47949      else
47950        CORRECT_MSVCR_ARCH="PE32+ executable"
47951      fi
47952    else
47953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47954        CORRECT_MSVCR_ARCH=386
47955      else
47956        CORRECT_MSVCR_ARCH=x86-64
47957      fi
47958    fi
47959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47961$as_echo "ok" >&6; }
47962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47963
47964  # Only process if variable expands to non-empty
47965
47966  if test "x$MSVC_DLL" != x; then
47967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47968
47969  # Input might be given as Windows format, start by converting to
47970  # unix format.
47971  path="$MSVC_DLL"
47972  new_path=`$CYGPATH -u "$path"`
47973
47974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47977  # "foo.exe" is OK but "foo" is an error.
47978  #
47979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47980  # It is also a way to make sure we got the proper file name for the real test later on.
47981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47982  if test "x$test_shortpath" = x; then
47983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47985    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47986  fi
47987
47988  # Call helper function which possibly converts this using DOS-style short mode.
47989  # If so, the updated path is stored in $new_path.
47990
47991  input_path="$new_path"
47992  # Check if we need to convert this using DOS-style short mode. If the path
47993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47994  # take no chances and rewrite it.
47995  # Note: m4 eats our [], so we need to use [ and ] instead.
47996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47997  if test "x$has_forbidden_chars" != x; then
47998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48002      # Going to short mode and back again did indeed matter. Since short mode is
48003      # case insensitive, let's make it lowercase to improve readability.
48004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48005      # Now convert it back to Unix-style (cygpath)
48006      input_path=`$CYGPATH -u "$shortmode_path"`
48007      new_path="$input_path"
48008    fi
48009  fi
48010
48011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48012  if test "x$test_cygdrive_prefix" = x; then
48013    # As a simple fix, exclude /usr/bin since it's not a real path.
48014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48016      # a path prefixed by /cygdrive for fixpath to work.
48017      new_path="$CYGWIN_ROOT_PATH$input_path"
48018    fi
48019  fi
48020
48021
48022  if test "x$path" != "x$new_path"; then
48023    MSVC_DLL="$new_path"
48024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48025$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48026  fi
48027
48028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48029
48030  path="$MSVC_DLL"
48031  has_colon=`$ECHO $path | $GREP ^.:`
48032  new_path="$path"
48033  if test "x$has_colon" = x; then
48034    # Not in mixed or Windows style, start by that.
48035    new_path=`cmd //c echo $path`
48036  fi
48037
48038
48039  input_path="$new_path"
48040  # Check if we need to convert this using DOS-style short mode. If the path
48041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48042  # take no chances and rewrite it.
48043  # Note: m4 eats our [], so we need to use [ and ] instead.
48044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48045  if test "x$has_forbidden_chars" != x; then
48046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48048  fi
48049
48050
48051  windows_path="$new_path"
48052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48053    unix_path=`$CYGPATH -u "$windows_path"`
48054    new_path="$unix_path"
48055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48057    new_path="$unix_path"
48058  fi
48059
48060  if test "x$path" != "x$new_path"; then
48061    MSVC_DLL="$new_path"
48062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48063$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48064  fi
48065
48066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48068
48069    else
48070      # We're on a unix platform. Hooray! :)
48071      path="$MSVC_DLL"
48072      has_space=`$ECHO "$path" | $GREP " "`
48073      if test "x$has_space" != x; then
48074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48077      fi
48078
48079      # Use eval to expand a potential ~
48080      eval path="$path"
48081      if test ! -f "$path" && test ! -d "$path"; then
48082        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48083      fi
48084
48085      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48086    fi
48087  fi
48088
48089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48090$as_echo_n "checking for $DLL_NAME... " >&6; }
48091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48092$as_echo "$MSVC_DLL" >&6; }
48093    else
48094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48095$as_echo "incorrect, ignoring" >&6; }
48096      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48097$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48098    fi
48099  fi
48100
48101    fi
48102  fi
48103
48104  if test "x$MSVC_DLL" = x; then
48105    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48106    # (This was the original behaviour; kept since it might turn something up)
48107    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48108      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48109        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48110	    | $GREP x64 | $HEAD --lines 1`
48111      else
48112        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48113	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48114        if test "x$POSSIBLE_MSVC_DLL" = x; then
48115          # We're grasping at straws now...
48116          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48117	      | $HEAD --lines 1`
48118        fi
48119      fi
48120
48121
48122  DLL_NAME="$DLL_NAME"
48123  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48124  METHOD="search of VCINSTALLDIR"
48125  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48127$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48128
48129    # Need to check if the found msvcr is correct architecture
48130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48131$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48132    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48134      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48135      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48137        CORRECT_MSVCR_ARCH="PE32 executable"
48138      else
48139        CORRECT_MSVCR_ARCH="PE32+ executable"
48140      fi
48141    else
48142      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48143        CORRECT_MSVCR_ARCH=386
48144      else
48145        CORRECT_MSVCR_ARCH=x86-64
48146      fi
48147    fi
48148    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48150$as_echo "ok" >&6; }
48151      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48152
48153  # Only process if variable expands to non-empty
48154
48155  if test "x$MSVC_DLL" != x; then
48156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48157
48158  # Input might be given as Windows format, start by converting to
48159  # unix format.
48160  path="$MSVC_DLL"
48161  new_path=`$CYGPATH -u "$path"`
48162
48163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48166  # "foo.exe" is OK but "foo" is an error.
48167  #
48168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48169  # It is also a way to make sure we got the proper file name for the real test later on.
48170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48171  if test "x$test_shortpath" = x; then
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48173$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48174    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48175  fi
48176
48177  # Call helper function which possibly converts this using DOS-style short mode.
48178  # If so, the updated path is stored in $new_path.
48179
48180  input_path="$new_path"
48181  # Check if we need to convert this using DOS-style short mode. If the path
48182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48183  # take no chances and rewrite it.
48184  # Note: m4 eats our [], so we need to use [ and ] instead.
48185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48186  if test "x$has_forbidden_chars" != x; then
48187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48191      # Going to short mode and back again did indeed matter. Since short mode is
48192      # case insensitive, let's make it lowercase to improve readability.
48193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48194      # Now convert it back to Unix-style (cygpath)
48195      input_path=`$CYGPATH -u "$shortmode_path"`
48196      new_path="$input_path"
48197    fi
48198  fi
48199
48200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48201  if test "x$test_cygdrive_prefix" = x; then
48202    # As a simple fix, exclude /usr/bin since it's not a real path.
48203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48205      # a path prefixed by /cygdrive for fixpath to work.
48206      new_path="$CYGWIN_ROOT_PATH$input_path"
48207    fi
48208  fi
48209
48210
48211  if test "x$path" != "x$new_path"; then
48212    MSVC_DLL="$new_path"
48213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48215  fi
48216
48217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48218
48219  path="$MSVC_DLL"
48220  has_colon=`$ECHO $path | $GREP ^.:`
48221  new_path="$path"
48222  if test "x$has_colon" = x; then
48223    # Not in mixed or Windows style, start by that.
48224    new_path=`cmd //c echo $path`
48225  fi
48226
48227
48228  input_path="$new_path"
48229  # Check if we need to convert this using DOS-style short mode. If the path
48230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48231  # take no chances and rewrite it.
48232  # Note: m4 eats our [], so we need to use [ and ] instead.
48233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48234  if test "x$has_forbidden_chars" != x; then
48235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48237  fi
48238
48239
48240  windows_path="$new_path"
48241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48242    unix_path=`$CYGPATH -u "$windows_path"`
48243    new_path="$unix_path"
48244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48246    new_path="$unix_path"
48247  fi
48248
48249  if test "x$path" != "x$new_path"; then
48250    MSVC_DLL="$new_path"
48251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48253  fi
48254
48255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48257
48258    else
48259      # We're on a unix platform. Hooray! :)
48260      path="$MSVC_DLL"
48261      has_space=`$ECHO "$path" | $GREP " "`
48262      if test "x$has_space" != x; then
48263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48264$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48266      fi
48267
48268      # Use eval to expand a potential ~
48269      eval path="$path"
48270      if test ! -f "$path" && test ! -d "$path"; then
48271        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48272      fi
48273
48274      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48275    fi
48276  fi
48277
48278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48279$as_echo_n "checking for $DLL_NAME... " >&6; }
48280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48281$as_echo "$MSVC_DLL" >&6; }
48282    else
48283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48284$as_echo "incorrect, ignoring" >&6; }
48285      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48286$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48287    fi
48288  fi
48289
48290    fi
48291  fi
48292
48293  if test "x$MSVC_DLL" = x; then
48294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48295$as_echo_n "checking for $DLL_NAME... " >&6; }
48296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48297$as_echo "no" >&6; }
48298    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48299  fi
48300
48301      MSVCP_DLL="$MSVC_DLL"
48302    fi
48303
48304  fi
48305
48306  fi
48307
48308
48309  if test "x$NEEDS_LIB_X11" = xfalse; then
48310    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48311      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48312$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48313    fi
48314    X_CFLAGS=
48315    X_LIBS=
48316  else
48317
48318    if test "x${with_x}" = xno; then
48319      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48320    fi
48321
48322    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48323      # The user has specified a X11 base directory. Use it for includes and
48324      # libraries, unless explicitely overridden.
48325      if test "x$x_includes" = xNONE; then
48326        x_includes="${with_x}/include"
48327      fi
48328      if test "x$x_libraries" = xNONE; then
48329        x_libraries="${with_x}/lib"
48330      fi
48331    else
48332      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48333      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48334      # --x-libraries for the sysroot, if that seems to be correct.
48335      if test "x$SYSROOT" != "x"; then
48336        if test "x$x_includes" = xNONE; then
48337          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48338            x_includes="$SYSROOT/usr/X11R6/include"
48339          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48340            x_includes="$SYSROOT/usr/include"
48341          fi
48342        fi
48343        if test "x$x_libraries" = xNONE; then
48344          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48345            x_libraries="$SYSROOT/usr/X11R6/lib"
48346          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48347            x_libraries="$SYSROOT/usr/lib64"
48348          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48349            x_libraries="$SYSROOT/usr/lib"
48350          fi
48351        fi
48352      fi
48353    fi
48354
48355    # Now let autoconf do it's magic
48356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48357$as_echo_n "checking for X... " >&6; }
48358
48359
48360# Check whether --with-x was given.
48361if test "${with_x+set}" = set; then :
48362  withval=$with_x;
48363fi
48364
48365# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48366if test "x$with_x" = xno; then
48367  # The user explicitly disabled X.
48368  have_x=disabled
48369else
48370  case $x_includes,$x_libraries in #(
48371    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48372    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48373  $as_echo_n "(cached) " >&6
48374else
48375  # One or both of the vars are not set, and there is no cached value.
48376ac_x_includes=no ac_x_libraries=no
48377rm -f -r conftest.dir
48378if mkdir conftest.dir; then
48379  cd conftest.dir
48380  cat >Imakefile <<'_ACEOF'
48381incroot:
48382	@echo incroot='${INCROOT}'
48383usrlibdir:
48384	@echo usrlibdir='${USRLIBDIR}'
48385libdir:
48386	@echo libdir='${LIBDIR}'
48387_ACEOF
48388  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48389    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48390    for ac_var in incroot usrlibdir libdir; do
48391      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48392    done
48393    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48394    for ac_extension in a so sl dylib la dll; do
48395      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48396	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48397	ac_im_usrlibdir=$ac_im_libdir; break
48398      fi
48399    done
48400    # Screen out bogus values from the imake configuration.  They are
48401    # bogus both because they are the default anyway, and because
48402    # using them would break gcc on systems where it needs fixed includes.
48403    case $ac_im_incroot in
48404	/usr/include) ac_x_includes= ;;
48405	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48406    esac
48407    case $ac_im_usrlibdir in
48408	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48409	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48410    esac
48411  fi
48412  cd ..
48413  rm -f -r conftest.dir
48414fi
48415
48416# Standard set of common directories for X headers.
48417# Check X11 before X11Rn because it is often a symlink to the current release.
48418ac_x_header_dirs='
48419/usr/X11/include
48420/usr/X11R7/include
48421/usr/X11R6/include
48422/usr/X11R5/include
48423/usr/X11R4/include
48424
48425/usr/include/X11
48426/usr/include/X11R7
48427/usr/include/X11R6
48428/usr/include/X11R5
48429/usr/include/X11R4
48430
48431/usr/local/X11/include
48432/usr/local/X11R7/include
48433/usr/local/X11R6/include
48434/usr/local/X11R5/include
48435/usr/local/X11R4/include
48436
48437/usr/local/include/X11
48438/usr/local/include/X11R7
48439/usr/local/include/X11R6
48440/usr/local/include/X11R5
48441/usr/local/include/X11R4
48442
48443/usr/X386/include
48444/usr/x386/include
48445/usr/XFree86/include/X11
48446
48447/usr/include
48448/usr/local/include
48449/usr/unsupported/include
48450/usr/athena/include
48451/usr/local/x11r5/include
48452/usr/lpp/Xamples/include
48453
48454/usr/openwin/include
48455/usr/openwin/share/include'
48456
48457if test "$ac_x_includes" = no; then
48458  # Guess where to find include files, by looking for Xlib.h.
48459  # First, try using that file with no special directory specified.
48460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48461/* end confdefs.h.  */
48462#include <X11/Xlib.h>
48463_ACEOF
48464if ac_fn_cxx_try_cpp "$LINENO"; then :
48465  # We can compile using X headers with no special include directory.
48466ac_x_includes=
48467else
48468  for ac_dir in $ac_x_header_dirs; do
48469  if test -r "$ac_dir/X11/Xlib.h"; then
48470    ac_x_includes=$ac_dir
48471    break
48472  fi
48473done
48474fi
48475rm -f conftest.err conftest.i conftest.$ac_ext
48476fi # $ac_x_includes = no
48477
48478if test "$ac_x_libraries" = no; then
48479  # Check for the libraries.
48480  # See if we find them without any special options.
48481  # Don't add to $LIBS permanently.
48482  ac_save_LIBS=$LIBS
48483  LIBS="-lX11 $LIBS"
48484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48485/* end confdefs.h.  */
48486#include <X11/Xlib.h>
48487int
48488main ()
48489{
48490XrmInitialize ()
48491  ;
48492  return 0;
48493}
48494_ACEOF
48495if ac_fn_cxx_try_link "$LINENO"; then :
48496  LIBS=$ac_save_LIBS
48497# We can link X programs with no special library path.
48498ac_x_libraries=
48499else
48500  LIBS=$ac_save_LIBS
48501for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48502do
48503  # Don't even attempt the hair of trying to link an X program!
48504  for ac_extension in a so sl dylib la dll; do
48505    if test -r "$ac_dir/libX11.$ac_extension"; then
48506      ac_x_libraries=$ac_dir
48507      break 2
48508    fi
48509  done
48510done
48511fi
48512rm -f core conftest.err conftest.$ac_objext \
48513    conftest$ac_exeext conftest.$ac_ext
48514fi # $ac_x_libraries = no
48515
48516case $ac_x_includes,$ac_x_libraries in #(
48517  no,* | *,no | *\'*)
48518    # Didn't find X, or a directory has "'" in its name.
48519    ac_cv_have_x="have_x=no";; #(
48520  *)
48521    # Record where we found X for the cache.
48522    ac_cv_have_x="have_x=yes\
48523	ac_x_includes='$ac_x_includes'\
48524	ac_x_libraries='$ac_x_libraries'"
48525esac
48526fi
48527;; #(
48528    *) have_x=yes;;
48529  esac
48530  eval "$ac_cv_have_x"
48531fi # $with_x != no
48532
48533if test "$have_x" != yes; then
48534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48535$as_echo "$have_x" >&6; }
48536  no_x=yes
48537else
48538  # If each of the values was on the command line, it overrides each guess.
48539  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48540  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48541  # Update the cache value to reflect the command line values.
48542  ac_cv_have_x="have_x=yes\
48543	ac_x_includes='$x_includes'\
48544	ac_x_libraries='$x_libraries'"
48545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48546$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48547fi
48548
48549    if test "$no_x" = yes; then
48550  # Not all programs may use this symbol, but it does not hurt to define it.
48551
48552$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48553
48554  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48555else
48556  if test -n "$x_includes"; then
48557    X_CFLAGS="$X_CFLAGS -I$x_includes"
48558  fi
48559
48560  # It would also be nice to do this for all -L options, not just this one.
48561  if test -n "$x_libraries"; then
48562    X_LIBS="$X_LIBS -L$x_libraries"
48563    # For Solaris; some versions of Sun CC require a space after -R and
48564    # others require no space.  Words are not sufficient . . . .
48565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48566$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48567    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48568    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48569    ac_cxx_werror_flag=yes
48570    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48571/* end confdefs.h.  */
48572
48573int
48574main ()
48575{
48576
48577  ;
48578  return 0;
48579}
48580_ACEOF
48581if ac_fn_cxx_try_link "$LINENO"; then :
48582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48583$as_echo "no" >&6; }
48584       X_LIBS="$X_LIBS -R$x_libraries"
48585else
48586  LIBS="$ac_xsave_LIBS -R $x_libraries"
48587       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48588/* end confdefs.h.  */
48589
48590int
48591main ()
48592{
48593
48594  ;
48595  return 0;
48596}
48597_ACEOF
48598if ac_fn_cxx_try_link "$LINENO"; then :
48599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48600$as_echo "yes" >&6; }
48601	  X_LIBS="$X_LIBS -R $x_libraries"
48602else
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48604$as_echo "neither works" >&6; }
48605fi
48606rm -f core conftest.err conftest.$ac_objext \
48607    conftest$ac_exeext conftest.$ac_ext
48608fi
48609rm -f core conftest.err conftest.$ac_objext \
48610    conftest$ac_exeext conftest.$ac_ext
48611    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48612    LIBS=$ac_xsave_LIBS
48613  fi
48614
48615  # Check for system-dependent libraries X programs must link with.
48616  # Do this before checking for the system-independent R6 libraries
48617  # (-lICE), since we may need -lsocket or whatever for X linking.
48618
48619  if test "$ISC" = yes; then
48620    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48621  else
48622    # Martyn Johnson says this is needed for Ultrix, if the X
48623    # libraries were built with DECnet support.  And Karl Berry says
48624    # the Alpha needs dnet_stub (dnet does not exist).
48625    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48626    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48627/* end confdefs.h.  */
48628
48629/* Override any GCC internal prototype to avoid an error.
48630   Use char because int might match the return type of a GCC
48631   builtin and then its argument prototype would still apply.  */
48632#ifdef __cplusplus
48633extern "C"
48634#endif
48635char XOpenDisplay ();
48636int
48637main ()
48638{
48639return XOpenDisplay ();
48640  ;
48641  return 0;
48642}
48643_ACEOF
48644if ac_fn_cxx_try_link "$LINENO"; then :
48645
48646else
48647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48648$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48649if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48650  $as_echo_n "(cached) " >&6
48651else
48652  ac_check_lib_save_LIBS=$LIBS
48653LIBS="-ldnet  $LIBS"
48654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48655/* end confdefs.h.  */
48656
48657/* Override any GCC internal prototype to avoid an error.
48658   Use char because int might match the return type of a GCC
48659   builtin and then its argument prototype would still apply.  */
48660#ifdef __cplusplus
48661extern "C"
48662#endif
48663char dnet_ntoa ();
48664int
48665main ()
48666{
48667return dnet_ntoa ();
48668  ;
48669  return 0;
48670}
48671_ACEOF
48672if ac_fn_cxx_try_link "$LINENO"; then :
48673  ac_cv_lib_dnet_dnet_ntoa=yes
48674else
48675  ac_cv_lib_dnet_dnet_ntoa=no
48676fi
48677rm -f core conftest.err conftest.$ac_objext \
48678    conftest$ac_exeext conftest.$ac_ext
48679LIBS=$ac_check_lib_save_LIBS
48680fi
48681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48682$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48683if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48684  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48685fi
48686
48687    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48689$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48690if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48691  $as_echo_n "(cached) " >&6
48692else
48693  ac_check_lib_save_LIBS=$LIBS
48694LIBS="-ldnet_stub  $LIBS"
48695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48696/* end confdefs.h.  */
48697
48698/* Override any GCC internal prototype to avoid an error.
48699   Use char because int might match the return type of a GCC
48700   builtin and then its argument prototype would still apply.  */
48701#ifdef __cplusplus
48702extern "C"
48703#endif
48704char dnet_ntoa ();
48705int
48706main ()
48707{
48708return dnet_ntoa ();
48709  ;
48710  return 0;
48711}
48712_ACEOF
48713if ac_fn_cxx_try_link "$LINENO"; then :
48714  ac_cv_lib_dnet_stub_dnet_ntoa=yes
48715else
48716  ac_cv_lib_dnet_stub_dnet_ntoa=no
48717fi
48718rm -f core conftest.err conftest.$ac_objext \
48719    conftest$ac_exeext conftest.$ac_ext
48720LIBS=$ac_check_lib_save_LIBS
48721fi
48722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48723$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48724if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48725  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48726fi
48727
48728    fi
48729fi
48730rm -f core conftest.err conftest.$ac_objext \
48731    conftest$ac_exeext conftest.$ac_ext
48732    LIBS="$ac_xsave_LIBS"
48733
48734    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48735    # to get the SysV transport functions.
48736    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48737    # needs -lnsl.
48738    # The nsl library prevents programs from opening the X display
48739    # on Irix 5.2, according to T.E. Dickey.
48740    # The functions gethostbyname, getservbyname, and inet_addr are
48741    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48742    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48743if test "x$ac_cv_func_gethostbyname" = xyes; then :
48744
48745fi
48746
48747    if test $ac_cv_func_gethostbyname = no; then
48748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48749$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48750if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48751  $as_echo_n "(cached) " >&6
48752else
48753  ac_check_lib_save_LIBS=$LIBS
48754LIBS="-lnsl  $LIBS"
48755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48756/* end confdefs.h.  */
48757
48758/* Override any GCC internal prototype to avoid an error.
48759   Use char because int might match the return type of a GCC
48760   builtin and then its argument prototype would still apply.  */
48761#ifdef __cplusplus
48762extern "C"
48763#endif
48764char gethostbyname ();
48765int
48766main ()
48767{
48768return gethostbyname ();
48769  ;
48770  return 0;
48771}
48772_ACEOF
48773if ac_fn_cxx_try_link "$LINENO"; then :
48774  ac_cv_lib_nsl_gethostbyname=yes
48775else
48776  ac_cv_lib_nsl_gethostbyname=no
48777fi
48778rm -f core conftest.err conftest.$ac_objext \
48779    conftest$ac_exeext conftest.$ac_ext
48780LIBS=$ac_check_lib_save_LIBS
48781fi
48782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48783$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48784if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48785  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48786fi
48787
48788      if test $ac_cv_lib_nsl_gethostbyname = no; then
48789	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48790$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48791if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48792  $as_echo_n "(cached) " >&6
48793else
48794  ac_check_lib_save_LIBS=$LIBS
48795LIBS="-lbsd  $LIBS"
48796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48797/* end confdefs.h.  */
48798
48799/* Override any GCC internal prototype to avoid an error.
48800   Use char because int might match the return type of a GCC
48801   builtin and then its argument prototype would still apply.  */
48802#ifdef __cplusplus
48803extern "C"
48804#endif
48805char gethostbyname ();
48806int
48807main ()
48808{
48809return gethostbyname ();
48810  ;
48811  return 0;
48812}
48813_ACEOF
48814if ac_fn_cxx_try_link "$LINENO"; then :
48815  ac_cv_lib_bsd_gethostbyname=yes
48816else
48817  ac_cv_lib_bsd_gethostbyname=no
48818fi
48819rm -f core conftest.err conftest.$ac_objext \
48820    conftest$ac_exeext conftest.$ac_ext
48821LIBS=$ac_check_lib_save_LIBS
48822fi
48823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48824$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48825if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48826  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48827fi
48828
48829      fi
48830    fi
48831
48832    # lieder@skyler.mavd.honeywell.com says without -lsocket,
48833    # socket/setsockopt and other routines are undefined under SCO ODT
48834    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48835    # on later versions), says Simon Leinen: it contains gethostby*
48836    # variants that don't use the name server (or something).  -lsocket
48837    # must be given before -lnsl if both are needed.  We assume that
48838    # if connect needs -lnsl, so does gethostbyname.
48839    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48840if test "x$ac_cv_func_connect" = xyes; then :
48841
48842fi
48843
48844    if test $ac_cv_func_connect = no; then
48845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48846$as_echo_n "checking for connect in -lsocket... " >&6; }
48847if ${ac_cv_lib_socket_connect+:} false; then :
48848  $as_echo_n "(cached) " >&6
48849else
48850  ac_check_lib_save_LIBS=$LIBS
48851LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
48852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48853/* end confdefs.h.  */
48854
48855/* Override any GCC internal prototype to avoid an error.
48856   Use char because int might match the return type of a GCC
48857   builtin and then its argument prototype would still apply.  */
48858#ifdef __cplusplus
48859extern "C"
48860#endif
48861char connect ();
48862int
48863main ()
48864{
48865return connect ();
48866  ;
48867  return 0;
48868}
48869_ACEOF
48870if ac_fn_cxx_try_link "$LINENO"; then :
48871  ac_cv_lib_socket_connect=yes
48872else
48873  ac_cv_lib_socket_connect=no
48874fi
48875rm -f core conftest.err conftest.$ac_objext \
48876    conftest$ac_exeext conftest.$ac_ext
48877LIBS=$ac_check_lib_save_LIBS
48878fi
48879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
48880$as_echo "$ac_cv_lib_socket_connect" >&6; }
48881if test "x$ac_cv_lib_socket_connect" = xyes; then :
48882  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
48883fi
48884
48885    fi
48886
48887    # Guillermo Gomez says -lposix is necessary on A/UX.
48888    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
48889if test "x$ac_cv_func_remove" = xyes; then :
48890
48891fi
48892
48893    if test $ac_cv_func_remove = no; then
48894      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
48895$as_echo_n "checking for remove in -lposix... " >&6; }
48896if ${ac_cv_lib_posix_remove+:} false; then :
48897  $as_echo_n "(cached) " >&6
48898else
48899  ac_check_lib_save_LIBS=$LIBS
48900LIBS="-lposix  $LIBS"
48901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48902/* end confdefs.h.  */
48903
48904/* Override any GCC internal prototype to avoid an error.
48905   Use char because int might match the return type of a GCC
48906   builtin and then its argument prototype would still apply.  */
48907#ifdef __cplusplus
48908extern "C"
48909#endif
48910char remove ();
48911int
48912main ()
48913{
48914return remove ();
48915  ;
48916  return 0;
48917}
48918_ACEOF
48919if ac_fn_cxx_try_link "$LINENO"; then :
48920  ac_cv_lib_posix_remove=yes
48921else
48922  ac_cv_lib_posix_remove=no
48923fi
48924rm -f core conftest.err conftest.$ac_objext \
48925    conftest$ac_exeext conftest.$ac_ext
48926LIBS=$ac_check_lib_save_LIBS
48927fi
48928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
48929$as_echo "$ac_cv_lib_posix_remove" >&6; }
48930if test "x$ac_cv_lib_posix_remove" = xyes; then :
48931  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
48932fi
48933
48934    fi
48935
48936    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
48937    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
48938if test "x$ac_cv_func_shmat" = xyes; then :
48939
48940fi
48941
48942    if test $ac_cv_func_shmat = no; then
48943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
48944$as_echo_n "checking for shmat in -lipc... " >&6; }
48945if ${ac_cv_lib_ipc_shmat+:} false; then :
48946  $as_echo_n "(cached) " >&6
48947else
48948  ac_check_lib_save_LIBS=$LIBS
48949LIBS="-lipc  $LIBS"
48950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48951/* end confdefs.h.  */
48952
48953/* Override any GCC internal prototype to avoid an error.
48954   Use char because int might match the return type of a GCC
48955   builtin and then its argument prototype would still apply.  */
48956#ifdef __cplusplus
48957extern "C"
48958#endif
48959char shmat ();
48960int
48961main ()
48962{
48963return shmat ();
48964  ;
48965  return 0;
48966}
48967_ACEOF
48968if ac_fn_cxx_try_link "$LINENO"; then :
48969  ac_cv_lib_ipc_shmat=yes
48970else
48971  ac_cv_lib_ipc_shmat=no
48972fi
48973rm -f core conftest.err conftest.$ac_objext \
48974    conftest$ac_exeext conftest.$ac_ext
48975LIBS=$ac_check_lib_save_LIBS
48976fi
48977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
48978$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
48979if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
48980  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
48981fi
48982
48983    fi
48984  fi
48985
48986  # Check for libraries that X11R6 Xt/Xaw programs need.
48987  ac_save_LDFLAGS=$LDFLAGS
48988  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
48989  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
48990  # check for ICE first), but we must link in the order -lSM -lICE or
48991  # we get undefined symbols.  So assume we have SM if we have ICE.
48992  # These have to be linked with before -lX11, unlike the other
48993  # libraries we check for below, so use a different variable.
48994  # John Interrante, Karl Berry
48995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
48996$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
48997if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
48998  $as_echo_n "(cached) " >&6
48999else
49000  ac_check_lib_save_LIBS=$LIBS
49001LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49003/* end confdefs.h.  */
49004
49005/* Override any GCC internal prototype to avoid an error.
49006   Use char because int might match the return type of a GCC
49007   builtin and then its argument prototype would still apply.  */
49008#ifdef __cplusplus
49009extern "C"
49010#endif
49011char IceConnectionNumber ();
49012int
49013main ()
49014{
49015return IceConnectionNumber ();
49016  ;
49017  return 0;
49018}
49019_ACEOF
49020if ac_fn_cxx_try_link "$LINENO"; then :
49021  ac_cv_lib_ICE_IceConnectionNumber=yes
49022else
49023  ac_cv_lib_ICE_IceConnectionNumber=no
49024fi
49025rm -f core conftest.err conftest.$ac_objext \
49026    conftest$ac_exeext conftest.$ac_ext
49027LIBS=$ac_check_lib_save_LIBS
49028fi
49029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49030$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49031if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49032  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49033fi
49034
49035  LDFLAGS=$ac_save_LDFLAGS
49036
49037fi
49038
49039
49040    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49041    # this doesn't make sense so we remove it.
49042    if test "x$COMPILE_TYPE" = xcross; then
49043      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49044    fi
49045
49046    if test "x$no_x" = xyes; then
49047
49048  # Print a helpful message on how to acquire the necessary build dependency.
49049  # x11 is the help tag: freetype, cups, alsa etc
49050  MISSING_DEPENDENCY=x11
49051
49052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49053    cygwin_help $MISSING_DEPENDENCY
49054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49055    msys_help $MISSING_DEPENDENCY
49056  else
49057    PKGHANDLER_COMMAND=
49058
49059    case $PKGHANDLER in
49060      apt-get)
49061        apt_help     $MISSING_DEPENDENCY ;;
49062      yum)
49063        yum_help     $MISSING_DEPENDENCY ;;
49064      port)
49065        port_help    $MISSING_DEPENDENCY ;;
49066      pkgutil)
49067        pkgutil_help $MISSING_DEPENDENCY ;;
49068      pkgadd)
49069        pkgadd_help  $MISSING_DEPENDENCY ;;
49070    esac
49071
49072    if test "x$PKGHANDLER_COMMAND" != x; then
49073      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49074    fi
49075  fi
49076
49077      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49078    fi
49079
49080    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49081      OPENWIN_HOME="/usr/openwin"
49082      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49083      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49084          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49085          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49086          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49087    fi
49088
49089    ac_ext=c
49090ac_cpp='$CPP $CPPFLAGS'
49091ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49092ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49093ac_compiler_gnu=$ac_cv_c_compiler_gnu
49094
49095    OLD_CFLAGS="$CFLAGS"
49096    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49097
49098    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49099    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49100do :
49101  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49102ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49103          # include <X11/Xlib.h>
49104          # include <X11/Xutil.h>
49105
49106
49107"
49108if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49109  cat >>confdefs.h <<_ACEOF
49110#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49111_ACEOF
49112 X11_HEADERS_OK=yes
49113else
49114  X11_HEADERS_OK=no; break
49115fi
49116
49117done
49118
49119
49120    if test "x$X11_HEADERS_OK" = xno; then
49121
49122  # Print a helpful message on how to acquire the necessary build dependency.
49123  # x11 is the help tag: freetype, cups, alsa etc
49124  MISSING_DEPENDENCY=x11
49125
49126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49127    cygwin_help $MISSING_DEPENDENCY
49128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49129    msys_help $MISSING_DEPENDENCY
49130  else
49131    PKGHANDLER_COMMAND=
49132
49133    case $PKGHANDLER in
49134      apt-get)
49135        apt_help     $MISSING_DEPENDENCY ;;
49136      yum)
49137        yum_help     $MISSING_DEPENDENCY ;;
49138      port)
49139        port_help    $MISSING_DEPENDENCY ;;
49140      pkgutil)
49141        pkgutil_help $MISSING_DEPENDENCY ;;
49142      pkgadd)
49143        pkgadd_help  $MISSING_DEPENDENCY ;;
49144    esac
49145
49146    if test "x$PKGHANDLER_COMMAND" != x; then
49147      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49148    fi
49149  fi
49150
49151      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49152    fi
49153
49154    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49155    # defined in libawt_xawt.
49156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49157$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49158    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49159/* end confdefs.h.  */
49160#include <X11/extensions/Xrender.h>
49161int
49162main ()
49163{
49164XLinearGradient x;
49165  ;
49166  return 0;
49167}
49168_ACEOF
49169if ac_fn_c_try_compile "$LINENO"; then :
49170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49171$as_echo "yes" >&6; }
49172else
49173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49174$as_echo "no" >&6; }
49175         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49176fi
49177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49178
49179    CFLAGS="$OLD_CFLAGS"
49180    ac_ext=cpp
49181ac_cpp='$CXXCPP $CPPFLAGS'
49182ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49183ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49184ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49185
49186  fi # NEEDS_LIB_X11
49187
49188
49189
49190
49191
49192
49193# Check whether --with-cups was given.
49194if test "${with_cups+set}" = set; then :
49195  withval=$with_cups;
49196fi
49197
49198
49199# Check whether --with-cups-include was given.
49200if test "${with_cups_include+set}" = set; then :
49201  withval=$with_cups_include;
49202fi
49203
49204
49205  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49206    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49207        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49208      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49209$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49210    fi
49211    CUPS_CFLAGS=
49212  else
49213    CUPS_FOUND=no
49214
49215    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49216      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49217    fi
49218
49219    if test "x${with_cups}" != x; then
49220      CUPS_CFLAGS="-I${with_cups}/include"
49221      CUPS_FOUND=yes
49222    fi
49223    if test "x${with_cups_include}" != x; then
49224      CUPS_CFLAGS="-I${with_cups_include}"
49225      CUPS_FOUND=yes
49226    fi
49227    if test "x$CUPS_FOUND" = xno; then
49228      # Are the cups headers installed in the default /usr/include location?
49229      for ac_header in cups/cups.h cups/ppd.h
49230do :
49231  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49232ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49233if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49234  cat >>confdefs.h <<_ACEOF
49235#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49236_ACEOF
49237
49238          CUPS_FOUND=yes
49239          CUPS_CFLAGS=
49240          DEFAULT_CUPS=yes
49241
49242fi
49243
49244done
49245
49246    fi
49247    if test "x$CUPS_FOUND" = xno; then
49248      # Getting nervous now? Lets poke around for standard Solaris third-party
49249      # package installation locations.
49250      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49251$as_echo_n "checking for cups headers... " >&6; }
49252      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49253        # An SFW package seems to be installed!
49254        CUPS_FOUND=yes
49255        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49256      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49257        # A CSW package seems to be installed!
49258        CUPS_FOUND=yes
49259        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49260      fi
49261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49262$as_echo "$CUPS_FOUND" >&6; }
49263    fi
49264    if test "x$CUPS_FOUND" = xno; then
49265
49266  # Print a helpful message on how to acquire the necessary build dependency.
49267  # cups is the help tag: freetype, cups, alsa etc
49268  MISSING_DEPENDENCY=cups
49269
49270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49271    cygwin_help $MISSING_DEPENDENCY
49272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49273    msys_help $MISSING_DEPENDENCY
49274  else
49275    PKGHANDLER_COMMAND=
49276
49277    case $PKGHANDLER in
49278      apt-get)
49279        apt_help     $MISSING_DEPENDENCY ;;
49280      yum)
49281        yum_help     $MISSING_DEPENDENCY ;;
49282      port)
49283        port_help    $MISSING_DEPENDENCY ;;
49284      pkgutil)
49285        pkgutil_help $MISSING_DEPENDENCY ;;
49286      pkgadd)
49287        pkgadd_help  $MISSING_DEPENDENCY ;;
49288    esac
49289
49290    if test "x$PKGHANDLER_COMMAND" != x; then
49291      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49292    fi
49293  fi
49294
49295      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49296    fi
49297  fi
49298
49299
49300
49301
49302
49303# Check whether --with-freetype was given.
49304if test "${with_freetype+set}" = set; then :
49305  withval=$with_freetype;
49306fi
49307
49308
49309# Check whether --with-freetype-include was given.
49310if test "${with_freetype_include+set}" = set; then :
49311  withval=$with_freetype_include;
49312fi
49313
49314
49315# Check whether --with-freetype-lib was given.
49316if test "${with_freetype_lib+set}" = set; then :
49317  withval=$with_freetype_lib;
49318fi
49319
49320
49321# Check whether --with-freetype-src was given.
49322if test "${with_freetype_src+set}" = set; then :
49323  withval=$with_freetype_src;
49324fi
49325
49326  # Check whether --enable-freetype-bundling was given.
49327if test "${enable_freetype_bundling+set}" = set; then :
49328  enableval=$enable_freetype_bundling;
49329fi
49330
49331
49332  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49333  FREETYPE_BASE_NAME=freetype
49334  FREETYPE_CFLAGS=
49335  FREETYPE_LIBS=
49336  FREETYPE_BUNDLE_LIB_PATH=
49337
49338  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49339    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49340        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49341        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49342        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49343      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49344$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49345    fi
49346    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49347      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49348$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49349    fi
49350  else
49351    # freetype is needed to build; go get it!
49352
49353    BUNDLE_FREETYPE="$enable_freetype_bundling"
49354
49355    if  test "x$with_freetype_src" != x; then
49356      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49357        # Try to build freetype if --with-freetype-src was given on Windows
49358
49359  FREETYPE_SRC_PATH="$with_freetype_src"
49360  BUILD_FREETYPE=yes
49361
49362  # Check if the freetype sources are acessible..
49363  if ! test -d $FREETYPE_SRC_PATH; then
49364    { $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
49365$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49366    BUILD_FREETYPE=no
49367  fi
49368  # ..and contain a vc2010 project file
49369  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49370  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49371    { $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
49372$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49373    BUILD_FREETYPE=no
49374  fi
49375  # Now check if configure found a version of 'msbuild.exe'
49376  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49377    { $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
49378$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;}
49379    BUILD_FREETYPE=no
49380  fi
49381
49382  # Ready to go..
49383  if test "x$BUILD_FREETYPE" = xyes; then
49384    # msbuild requires trailing slashes for output directories
49385    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49386    freetype_lib_path_unix="$freetype_lib_path"
49387    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49388
49389  unix_path="$vcxproj_path"
49390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49391    windows_path=`$CYGPATH -m "$unix_path"`
49392    vcxproj_path="$windows_path"
49393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49394    windows_path=`cmd //c echo $unix_path`
49395    vcxproj_path="$windows_path"
49396  fi
49397
49398
49399  unix_path="$freetype_lib_path"
49400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49401    windows_path=`$CYGPATH -m "$unix_path"`
49402    freetype_lib_path="$windows_path"
49403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49404    windows_path=`cmd //c echo $unix_path`
49405    freetype_lib_path="$windows_path"
49406  fi
49407
49408
49409  unix_path="$freetype_obj_path"
49410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49411    windows_path=`$CYGPATH -m "$unix_path"`
49412    freetype_obj_path="$windows_path"
49413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49414    windows_path=`cmd //c echo $unix_path`
49415    freetype_obj_path="$windows_path"
49416  fi
49417
49418    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49419      freetype_platform=x64
49420    else
49421      freetype_platform=win32
49422    fi
49423
49424    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49425    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49426    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49427    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49428    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49429$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49430
49431    # First we try to build the freetype.dll
49432    $ECHO -e "@echo off\n"\
49433        "$MSBUILD $vcxproj_path "\
49434        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49435        "/p:Configuration=\"Release Multithreaded\" "\
49436        "/p:Platform=$freetype_platform "\
49437        "/p:ConfigurationType=DynamicLibrary "\
49438        "/p:TargetName=freetype "\
49439        "/p:OutDir=\"$freetype_lib_path\" "\
49440        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49441    cmd /c freetype.bat
49442
49443    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49444      # If that succeeds we also build freetype.lib
49445      $ECHO -e "@echo off\n"\
49446          "$MSBUILD $vcxproj_path "\
49447          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49448          "/p:Configuration=\"Release Multithreaded\" "\
49449          "/p:Platform=$freetype_platform "\
49450          "/p:ConfigurationType=StaticLibrary "\
49451          "/p:TargetName=freetype "\
49452          "/p:OutDir=\"$freetype_lib_path\" "\
49453          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49454      cmd /c freetype.bat
49455
49456      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49457        # Once we build both, lib and dll, set freetype lib and include path appropriately
49458        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49459        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49460        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49461$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49462      else
49463        BUILD_FREETYPE=no
49464      fi
49465    else
49466      BUILD_FREETYPE=no
49467    fi
49468  fi
49469
49470        if test "x$BUILD_FREETYPE" = xyes; then
49471          # Okay, we built it. Check that it works.
49472
49473  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49474  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49475  METHOD="--with-freetype-src"
49476
49477  # Let's start with an optimistic view of the world :-)
49478  FOUND_FREETYPE=yes
49479
49480  # First look for the canonical freetype main include file ft2build.h.
49481  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49482    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49483    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49484    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49485      # Fail.
49486      FOUND_FREETYPE=no
49487    fi
49488  fi
49489
49490  if test "x$FOUND_FREETYPE" = xyes; then
49491    # Include file found, let's continue the sanity check.
49492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49493$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49494
49495    # Reset to default value
49496    FREETYPE_BASE_NAME=freetype
49497    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49498    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49499      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49501        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49502        # for the .6 version explicitly.
49503        FREETYPE_BASE_NAME=freetype.6
49504        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49505        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49506$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49507      else
49508        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49509$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49510        FOUND_FREETYPE=no
49511      fi
49512    else
49513      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49514        # On Windows, we will need both .lib and .dll file.
49515        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49516          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49518          FOUND_FREETYPE=no
49519        fi
49520      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49521          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49522        # Found lib in isa dir, use that instead.
49523        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49524        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49525$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49526      fi
49527    fi
49528  fi
49529
49530  if test "x$FOUND_FREETYPE" = xyes; then
49531
49532  # Only process if variable expands to non-empty
49533
49534  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49536
49537  # Input might be given as Windows format, start by converting to
49538  # unix format.
49539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49540  new_path=`$CYGPATH -u "$path"`
49541
49542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49545  # "foo.exe" is OK but "foo" is an error.
49546  #
49547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49548  # It is also a way to make sure we got the proper file name for the real test later on.
49549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49550  if test "x$test_shortpath" = x; then
49551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49553    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49554  fi
49555
49556  # Call helper function which possibly converts this using DOS-style short mode.
49557  # If so, the updated path is stored in $new_path.
49558
49559  input_path="$new_path"
49560  # Check if we need to convert this using DOS-style short mode. If the path
49561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49562  # take no chances and rewrite it.
49563  # Note: m4 eats our [], so we need to use [ and ] instead.
49564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49565  if test "x$has_forbidden_chars" != x; then
49566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49570      # Going to short mode and back again did indeed matter. Since short mode is
49571      # case insensitive, let's make it lowercase to improve readability.
49572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49573      # Now convert it back to Unix-style (cygpath)
49574      input_path=`$CYGPATH -u "$shortmode_path"`
49575      new_path="$input_path"
49576    fi
49577  fi
49578
49579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49580  if test "x$test_cygdrive_prefix" = x; then
49581    # As a simple fix, exclude /usr/bin since it's not a real path.
49582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49584      # a path prefixed by /cygdrive for fixpath to work.
49585      new_path="$CYGWIN_ROOT_PATH$input_path"
49586    fi
49587  fi
49588
49589
49590  if test "x$path" != "x$new_path"; then
49591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49594  fi
49595
49596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49597
49598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49599  has_colon=`$ECHO $path | $GREP ^.:`
49600  new_path="$path"
49601  if test "x$has_colon" = x; then
49602    # Not in mixed or Windows style, start by that.
49603    new_path=`cmd //c echo $path`
49604  fi
49605
49606
49607  input_path="$new_path"
49608  # Check if we need to convert this using DOS-style short mode. If the path
49609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49610  # take no chances and rewrite it.
49611  # Note: m4 eats our [], so we need to use [ and ] instead.
49612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49613  if test "x$has_forbidden_chars" != x; then
49614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49616  fi
49617
49618
49619  windows_path="$new_path"
49620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49621    unix_path=`$CYGPATH -u "$windows_path"`
49622    new_path="$unix_path"
49623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49625    new_path="$unix_path"
49626  fi
49627
49628  if test "x$path" != "x$new_path"; then
49629    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49632  fi
49633
49634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49636
49637    else
49638      # We're on a unix platform. Hooray! :)
49639      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49640      has_space=`$ECHO "$path" | $GREP " "`
49641      if test "x$has_space" != x; then
49642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49645      fi
49646
49647      # Use eval to expand a potential ~
49648      eval path="$path"
49649      if test ! -f "$path" && test ! -d "$path"; then
49650        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49651      fi
49652
49653      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49654    fi
49655  fi
49656
49657
49658  # Only process if variable expands to non-empty
49659
49660  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49662
49663  # Input might be given as Windows format, start by converting to
49664  # unix format.
49665  path="$POTENTIAL_FREETYPE_LIB_PATH"
49666  new_path=`$CYGPATH -u "$path"`
49667
49668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49671  # "foo.exe" is OK but "foo" is an error.
49672  #
49673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49674  # It is also a way to make sure we got the proper file name for the real test later on.
49675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49676  if test "x$test_shortpath" = x; then
49677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49680  fi
49681
49682  # Call helper function which possibly converts this using DOS-style short mode.
49683  # If so, the updated path is stored in $new_path.
49684
49685  input_path="$new_path"
49686  # Check if we need to convert this using DOS-style short mode. If the path
49687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49688  # take no chances and rewrite it.
49689  # Note: m4 eats our [], so we need to use [ and ] instead.
49690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49691  if test "x$has_forbidden_chars" != x; then
49692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49696      # Going to short mode and back again did indeed matter. Since short mode is
49697      # case insensitive, let's make it lowercase to improve readability.
49698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49699      # Now convert it back to Unix-style (cygpath)
49700      input_path=`$CYGPATH -u "$shortmode_path"`
49701      new_path="$input_path"
49702    fi
49703  fi
49704
49705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49706  if test "x$test_cygdrive_prefix" = x; then
49707    # As a simple fix, exclude /usr/bin since it's not a real path.
49708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49710      # a path prefixed by /cygdrive for fixpath to work.
49711      new_path="$CYGWIN_ROOT_PATH$input_path"
49712    fi
49713  fi
49714
49715
49716  if test "x$path" != "x$new_path"; then
49717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49720  fi
49721
49722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49723
49724  path="$POTENTIAL_FREETYPE_LIB_PATH"
49725  has_colon=`$ECHO $path | $GREP ^.:`
49726  new_path="$path"
49727  if test "x$has_colon" = x; then
49728    # Not in mixed or Windows style, start by that.
49729    new_path=`cmd //c echo $path`
49730  fi
49731
49732
49733  input_path="$new_path"
49734  # Check if we need to convert this using DOS-style short mode. If the path
49735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49736  # take no chances and rewrite it.
49737  # Note: m4 eats our [], so we need to use [ and ] instead.
49738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49739  if test "x$has_forbidden_chars" != x; then
49740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49742  fi
49743
49744
49745  windows_path="$new_path"
49746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49747    unix_path=`$CYGPATH -u "$windows_path"`
49748    new_path="$unix_path"
49749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49751    new_path="$unix_path"
49752  fi
49753
49754  if test "x$path" != "x$new_path"; then
49755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49758  fi
49759
49760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49762
49763    else
49764      # We're on a unix platform. Hooray! :)
49765      path="$POTENTIAL_FREETYPE_LIB_PATH"
49766      has_space=`$ECHO "$path" | $GREP " "`
49767      if test "x$has_space" != x; then
49768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49771      fi
49772
49773      # Use eval to expand a potential ~
49774      eval path="$path"
49775      if test ! -f "$path" && test ! -d "$path"; then
49776        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49777      fi
49778
49779      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49780    fi
49781  fi
49782
49783
49784    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49786$as_echo_n "checking for freetype includes... " >&6; }
49787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49788$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49789    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49791$as_echo_n "checking for freetype libraries... " >&6; }
49792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49793$as_echo "$FREETYPE_LIB_PATH" >&6; }
49794  fi
49795
49796          if test "x$FOUND_FREETYPE" != xyes; then
49797            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49798          fi
49799        else
49800          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49801$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49802          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49803        fi
49804      else
49805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49806$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49807      fi
49808    fi
49809
49810    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49811      # User has specified settings
49812
49813      if test "x$BUNDLE_FREETYPE" = x; then
49814        # If not specified, default is to bundle freetype
49815        BUNDLE_FREETYPE=yes
49816      fi
49817
49818      if test "x$with_freetype" != x; then
49819        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49820        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49821      fi
49822
49823      # Allow --with-freetype-lib and --with-freetype-include to override
49824      if test "x$with_freetype_include" != x; then
49825        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49826      fi
49827      if test "x$with_freetype_lib" != x; then
49828        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49829      fi
49830
49831      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49832        # Okay, we got it. Check that it works.
49833
49834  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49835  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49836  METHOD="--with-freetype"
49837
49838  # Let's start with an optimistic view of the world :-)
49839  FOUND_FREETYPE=yes
49840
49841  # First look for the canonical freetype main include file ft2build.h.
49842  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49843    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49844    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49845    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49846      # Fail.
49847      FOUND_FREETYPE=no
49848    fi
49849  fi
49850
49851  if test "x$FOUND_FREETYPE" = xyes; then
49852    # Include file found, let's continue the sanity check.
49853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49854$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49855
49856    # Reset to default value
49857    FREETYPE_BASE_NAME=freetype
49858    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49859    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49860      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49862        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49863        # for the .6 version explicitly.
49864        FREETYPE_BASE_NAME=freetype.6
49865        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49866        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49867$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49868      else
49869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49871        FOUND_FREETYPE=no
49872      fi
49873    else
49874      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49875        # On Windows, we will need both .lib and .dll file.
49876        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49877          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49878$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49879          FOUND_FREETYPE=no
49880        fi
49881      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49883        # Found lib in isa dir, use that instead.
49884        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49885        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49886$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49887      fi
49888    fi
49889  fi
49890
49891  if test "x$FOUND_FREETYPE" = xyes; then
49892
49893  # Only process if variable expands to non-empty
49894
49895  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49897
49898  # Input might be given as Windows format, start by converting to
49899  # unix format.
49900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49901  new_path=`$CYGPATH -u "$path"`
49902
49903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49906  # "foo.exe" is OK but "foo" is an error.
49907  #
49908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49909  # It is also a way to make sure we got the proper file name for the real test later on.
49910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49911  if test "x$test_shortpath" = x; then
49912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49915  fi
49916
49917  # Call helper function which possibly converts this using DOS-style short mode.
49918  # If so, the updated path is stored in $new_path.
49919
49920  input_path="$new_path"
49921  # Check if we need to convert this using DOS-style short mode. If the path
49922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49923  # take no chances and rewrite it.
49924  # Note: m4 eats our [], so we need to use [ and ] instead.
49925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49926  if test "x$has_forbidden_chars" != x; then
49927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49931      # Going to short mode and back again did indeed matter. Since short mode is
49932      # case insensitive, let's make it lowercase to improve readability.
49933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49934      # Now convert it back to Unix-style (cygpath)
49935      input_path=`$CYGPATH -u "$shortmode_path"`
49936      new_path="$input_path"
49937    fi
49938  fi
49939
49940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49941  if test "x$test_cygdrive_prefix" = x; then
49942    # As a simple fix, exclude /usr/bin since it's not a real path.
49943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49945      # a path prefixed by /cygdrive for fixpath to work.
49946      new_path="$CYGWIN_ROOT_PATH$input_path"
49947    fi
49948  fi
49949
49950
49951  if test "x$path" != "x$new_path"; then
49952    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49955  fi
49956
49957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958
49959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49960  has_colon=`$ECHO $path | $GREP ^.:`
49961  new_path="$path"
49962  if test "x$has_colon" = x; then
49963    # Not in mixed or Windows style, start by that.
49964    new_path=`cmd //c echo $path`
49965  fi
49966
49967
49968  input_path="$new_path"
49969  # Check if we need to convert this using DOS-style short mode. If the path
49970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49971  # take no chances and rewrite it.
49972  # Note: m4 eats our [], so we need to use [ and ] instead.
49973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49974  if test "x$has_forbidden_chars" != x; then
49975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49977  fi
49978
49979
49980  windows_path="$new_path"
49981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49982    unix_path=`$CYGPATH -u "$windows_path"`
49983    new_path="$unix_path"
49984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49986    new_path="$unix_path"
49987  fi
49988
49989  if test "x$path" != "x$new_path"; then
49990    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49993  fi
49994
49995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49997
49998    else
49999      # We're on a unix platform. Hooray! :)
50000      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50001      has_space=`$ECHO "$path" | $GREP " "`
50002      if test "x$has_space" != x; then
50003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50006      fi
50007
50008      # Use eval to expand a potential ~
50009      eval path="$path"
50010      if test ! -f "$path" && test ! -d "$path"; then
50011        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50012      fi
50013
50014      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50015    fi
50016  fi
50017
50018
50019  # Only process if variable expands to non-empty
50020
50021  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50023
50024  # Input might be given as Windows format, start by converting to
50025  # unix format.
50026  path="$POTENTIAL_FREETYPE_LIB_PATH"
50027  new_path=`$CYGPATH -u "$path"`
50028
50029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50032  # "foo.exe" is OK but "foo" is an error.
50033  #
50034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50035  # It is also a way to make sure we got the proper file name for the real test later on.
50036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50037  if test "x$test_shortpath" = x; then
50038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50039$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50040    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50041  fi
50042
50043  # Call helper function which possibly converts this using DOS-style short mode.
50044  # If so, the updated path is stored in $new_path.
50045
50046  input_path="$new_path"
50047  # Check if we need to convert this using DOS-style short mode. If the path
50048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50049  # take no chances and rewrite it.
50050  # Note: m4 eats our [], so we need to use [ and ] instead.
50051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50052  if test "x$has_forbidden_chars" != x; then
50053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50057      # Going to short mode and back again did indeed matter. Since short mode is
50058      # case insensitive, let's make it lowercase to improve readability.
50059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50060      # Now convert it back to Unix-style (cygpath)
50061      input_path=`$CYGPATH -u "$shortmode_path"`
50062      new_path="$input_path"
50063    fi
50064  fi
50065
50066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50067  if test "x$test_cygdrive_prefix" = x; then
50068    # As a simple fix, exclude /usr/bin since it's not a real path.
50069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50071      # a path prefixed by /cygdrive for fixpath to work.
50072      new_path="$CYGWIN_ROOT_PATH$input_path"
50073    fi
50074  fi
50075
50076
50077  if test "x$path" != "x$new_path"; then
50078    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50081  fi
50082
50083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50084
50085  path="$POTENTIAL_FREETYPE_LIB_PATH"
50086  has_colon=`$ECHO $path | $GREP ^.:`
50087  new_path="$path"
50088  if test "x$has_colon" = x; then
50089    # Not in mixed or Windows style, start by that.
50090    new_path=`cmd //c echo $path`
50091  fi
50092
50093
50094  input_path="$new_path"
50095  # Check if we need to convert this using DOS-style short mode. If the path
50096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50097  # take no chances and rewrite it.
50098  # Note: m4 eats our [], so we need to use [ and ] instead.
50099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50100  if test "x$has_forbidden_chars" != x; then
50101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50103  fi
50104
50105
50106  windows_path="$new_path"
50107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50108    unix_path=`$CYGPATH -u "$windows_path"`
50109    new_path="$unix_path"
50110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50112    new_path="$unix_path"
50113  fi
50114
50115  if test "x$path" != "x$new_path"; then
50116    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50118$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50119  fi
50120
50121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50123
50124    else
50125      # We're on a unix platform. Hooray! :)
50126      path="$POTENTIAL_FREETYPE_LIB_PATH"
50127      has_space=`$ECHO "$path" | $GREP " "`
50128      if test "x$has_space" != x; then
50129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50132      fi
50133
50134      # Use eval to expand a potential ~
50135      eval path="$path"
50136      if test ! -f "$path" && test ! -d "$path"; then
50137        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50138      fi
50139
50140      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50141    fi
50142  fi
50143
50144
50145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50147$as_echo_n "checking for freetype includes... " >&6; }
50148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50152$as_echo_n "checking for freetype libraries... " >&6; }
50153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50154$as_echo "$FREETYPE_LIB_PATH" >&6; }
50155  fi
50156
50157        if test "x$FOUND_FREETYPE" != xyes; then
50158          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50159        fi
50160      else
50161        # User specified only one of lib or include. This is an error.
50162        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50163          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50164$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50165          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50166        else
50167          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50168$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50169          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50170        fi
50171      fi
50172    else
50173      # User did not specify settings, but we need freetype. Try to locate it.
50174
50175      if test "x$BUNDLE_FREETYPE" = x; then
50176        # If not specified, default is to bundle freetype only on windows
50177        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50178          BUNDLE_FREETYPE=yes
50179        else
50180          BUNDLE_FREETYPE=no
50181        fi
50182      fi
50183
50184      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50185      if test "x$SYSROOT" = x; then
50186        if test "x$FOUND_FREETYPE" != xyes; then
50187          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50188          if test "x$PKG_CONFIG" != x; then
50189
50190pkg_failed=no
50191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50192$as_echo_n "checking for FREETYPE... " >&6; }
50193
50194if test -n "$FREETYPE_CFLAGS"; then
50195    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50196 elif test -n "$PKG_CONFIG"; then
50197    if test -n "$PKG_CONFIG" && \
50198    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50199  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50200  ac_status=$?
50201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50202  test $ac_status = 0; }; then
50203  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50204else
50205  pkg_failed=yes
50206fi
50207 else
50208    pkg_failed=untried
50209fi
50210if test -n "$FREETYPE_LIBS"; then
50211    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50212 elif test -n "$PKG_CONFIG"; then
50213    if test -n "$PKG_CONFIG" && \
50214    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50215  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50216  ac_status=$?
50217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50218  test $ac_status = 0; }; then
50219  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50220else
50221  pkg_failed=yes
50222fi
50223 else
50224    pkg_failed=untried
50225fi
50226
50227
50228
50229if test $pkg_failed = yes; then
50230
50231if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50232        _pkg_short_errors_supported=yes
50233else
50234        _pkg_short_errors_supported=no
50235fi
50236        if test $_pkg_short_errors_supported = yes; then
50237	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50238        else
50239	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50240        fi
50241	# Put the nasty error message in config.log where it belongs
50242	echo "$FREETYPE_PKG_ERRORS" >&5
50243
50244	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50245$as_echo "no" >&6; }
50246                FOUND_FREETYPE=no
50247elif test $pkg_failed = untried; then
50248	FOUND_FREETYPE=no
50249else
50250	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50251	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50253$as_echo "yes" >&6; }
50254	FOUND_FREETYPE=yes
50255fi
50256            if test "x$FOUND_FREETYPE" = xyes; then
50257              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50258              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50259              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50260              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50261                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50262              fi
50263              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50264              if test "x$BUNDLE_FREETYPE" = xyes; then
50265                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50266$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50267                FOUND_FREETYPE=no
50268              else
50269                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50270$as_echo_n "checking for freetype... " >&6; }
50271                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50272$as_echo "yes (using pkg-config)" >&6; }
50273              fi
50274            fi
50275          fi
50276        fi
50277      fi
50278
50279      if test "x$FOUND_FREETYPE" != xyes; then
50280        # Check in well-known locations
50281        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50282          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50283
50284  windows_path="$FREETYPE_BASE_DIR"
50285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50286    unix_path=`$CYGPATH -u "$windows_path"`
50287    FREETYPE_BASE_DIR="$unix_path"
50288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50290    FREETYPE_BASE_DIR="$unix_path"
50291  fi
50292
50293
50294  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50295  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50296  METHOD="well-known location"
50297
50298  # Let's start with an optimistic view of the world :-)
50299  FOUND_FREETYPE=yes
50300
50301  # First look for the canonical freetype main include file ft2build.h.
50302  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50303    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50304    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50305    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50306      # Fail.
50307      FOUND_FREETYPE=no
50308    fi
50309  fi
50310
50311  if test "x$FOUND_FREETYPE" = xyes; then
50312    # Include file found, let's continue the sanity check.
50313    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50314$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50315
50316    # Reset to default value
50317    FREETYPE_BASE_NAME=freetype
50318    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50319    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50320      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50321          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50322        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50323        # for the .6 version explicitly.
50324        FREETYPE_BASE_NAME=freetype.6
50325        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50326        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50327$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50328      else
50329        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50330$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50331        FOUND_FREETYPE=no
50332      fi
50333    else
50334      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50335        # On Windows, we will need both .lib and .dll file.
50336        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50337          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50338$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50339          FOUND_FREETYPE=no
50340        fi
50341      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50342          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50343        # Found lib in isa dir, use that instead.
50344        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50345        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50346$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50347      fi
50348    fi
50349  fi
50350
50351  if test "x$FOUND_FREETYPE" = xyes; then
50352
50353  # Only process if variable expands to non-empty
50354
50355  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50357
50358  # Input might be given as Windows format, start by converting to
50359  # unix format.
50360  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50361  new_path=`$CYGPATH -u "$path"`
50362
50363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50366  # "foo.exe" is OK but "foo" is an error.
50367  #
50368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50369  # It is also a way to make sure we got the proper file name for the real test later on.
50370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50371  if test "x$test_shortpath" = x; then
50372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50374    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50375  fi
50376
50377  # Call helper function which possibly converts this using DOS-style short mode.
50378  # If so, the updated path is stored in $new_path.
50379
50380  input_path="$new_path"
50381  # Check if we need to convert this using DOS-style short mode. If the path
50382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50383  # take no chances and rewrite it.
50384  # Note: m4 eats our [], so we need to use [ and ] instead.
50385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50386  if test "x$has_forbidden_chars" != x; then
50387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50391      # Going to short mode and back again did indeed matter. Since short mode is
50392      # case insensitive, let's make it lowercase to improve readability.
50393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50394      # Now convert it back to Unix-style (cygpath)
50395      input_path=`$CYGPATH -u "$shortmode_path"`
50396      new_path="$input_path"
50397    fi
50398  fi
50399
50400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50401  if test "x$test_cygdrive_prefix" = x; then
50402    # As a simple fix, exclude /usr/bin since it's not a real path.
50403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50405      # a path prefixed by /cygdrive for fixpath to work.
50406      new_path="$CYGWIN_ROOT_PATH$input_path"
50407    fi
50408  fi
50409
50410
50411  if test "x$path" != "x$new_path"; then
50412    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50414$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50415  fi
50416
50417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50418
50419  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50420  has_colon=`$ECHO $path | $GREP ^.:`
50421  new_path="$path"
50422  if test "x$has_colon" = x; then
50423    # Not in mixed or Windows style, start by that.
50424    new_path=`cmd //c echo $path`
50425  fi
50426
50427
50428  input_path="$new_path"
50429  # Check if we need to convert this using DOS-style short mode. If the path
50430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50431  # take no chances and rewrite it.
50432  # Note: m4 eats our [], so we need to use [ and ] instead.
50433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50434  if test "x$has_forbidden_chars" != x; then
50435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50437  fi
50438
50439
50440  windows_path="$new_path"
50441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50442    unix_path=`$CYGPATH -u "$windows_path"`
50443    new_path="$unix_path"
50444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50446    new_path="$unix_path"
50447  fi
50448
50449  if test "x$path" != "x$new_path"; then
50450    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50452$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50453  fi
50454
50455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50457
50458    else
50459      # We're on a unix platform. Hooray! :)
50460      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50461      has_space=`$ECHO "$path" | $GREP " "`
50462      if test "x$has_space" != x; then
50463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50465        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50466      fi
50467
50468      # Use eval to expand a potential ~
50469      eval path="$path"
50470      if test ! -f "$path" && test ! -d "$path"; then
50471        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50472      fi
50473
50474      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50475    fi
50476  fi
50477
50478
50479  # Only process if variable expands to non-empty
50480
50481  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50483
50484  # Input might be given as Windows format, start by converting to
50485  # unix format.
50486  path="$POTENTIAL_FREETYPE_LIB_PATH"
50487  new_path=`$CYGPATH -u "$path"`
50488
50489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50492  # "foo.exe" is OK but "foo" is an error.
50493  #
50494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50495  # It is also a way to make sure we got the proper file name for the real test later on.
50496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50497  if test "x$test_shortpath" = x; then
50498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50500    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50501  fi
50502
50503  # Call helper function which possibly converts this using DOS-style short mode.
50504  # If so, the updated path is stored in $new_path.
50505
50506  input_path="$new_path"
50507  # Check if we need to convert this using DOS-style short mode. If the path
50508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50509  # take no chances and rewrite it.
50510  # Note: m4 eats our [], so we need to use [ and ] instead.
50511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50512  if test "x$has_forbidden_chars" != x; then
50513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50517      # Going to short mode and back again did indeed matter. Since short mode is
50518      # case insensitive, let's make it lowercase to improve readability.
50519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50520      # Now convert it back to Unix-style (cygpath)
50521      input_path=`$CYGPATH -u "$shortmode_path"`
50522      new_path="$input_path"
50523    fi
50524  fi
50525
50526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50527  if test "x$test_cygdrive_prefix" = x; then
50528    # As a simple fix, exclude /usr/bin since it's not a real path.
50529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50531      # a path prefixed by /cygdrive for fixpath to work.
50532      new_path="$CYGWIN_ROOT_PATH$input_path"
50533    fi
50534  fi
50535
50536
50537  if test "x$path" != "x$new_path"; then
50538    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50541  fi
50542
50543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50544
50545  path="$POTENTIAL_FREETYPE_LIB_PATH"
50546  has_colon=`$ECHO $path | $GREP ^.:`
50547  new_path="$path"
50548  if test "x$has_colon" = x; then
50549    # Not in mixed or Windows style, start by that.
50550    new_path=`cmd //c echo $path`
50551  fi
50552
50553
50554  input_path="$new_path"
50555  # Check if we need to convert this using DOS-style short mode. If the path
50556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50557  # take no chances and rewrite it.
50558  # Note: m4 eats our [], so we need to use [ and ] instead.
50559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50560  if test "x$has_forbidden_chars" != x; then
50561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50563  fi
50564
50565
50566  windows_path="$new_path"
50567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50568    unix_path=`$CYGPATH -u "$windows_path"`
50569    new_path="$unix_path"
50570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50572    new_path="$unix_path"
50573  fi
50574
50575  if test "x$path" != "x$new_path"; then
50576    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50579  fi
50580
50581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50583
50584    else
50585      # We're on a unix platform. Hooray! :)
50586      path="$POTENTIAL_FREETYPE_LIB_PATH"
50587      has_space=`$ECHO "$path" | $GREP " "`
50588      if test "x$has_space" != x; then
50589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50590$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50592      fi
50593
50594      # Use eval to expand a potential ~
50595      eval path="$path"
50596      if test ! -f "$path" && test ! -d "$path"; then
50597        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50598      fi
50599
50600      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50601    fi
50602  fi
50603
50604
50605    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50607$as_echo_n "checking for freetype includes... " >&6; }
50608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50609$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50610    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50612$as_echo_n "checking for freetype libraries... " >&6; }
50613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50614$as_echo "$FREETYPE_LIB_PATH" >&6; }
50615  fi
50616
50617          if test "x$FOUND_FREETYPE" != xyes; then
50618            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50619
50620  windows_path="$FREETYPE_BASE_DIR"
50621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50622    unix_path=`$CYGPATH -u "$windows_path"`
50623    FREETYPE_BASE_DIR="$unix_path"
50624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50626    FREETYPE_BASE_DIR="$unix_path"
50627  fi
50628
50629
50630  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50631  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50632  METHOD="well-known location"
50633
50634  # Let's start with an optimistic view of the world :-)
50635  FOUND_FREETYPE=yes
50636
50637  # First look for the canonical freetype main include file ft2build.h.
50638  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50639    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50640    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50641    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50642      # Fail.
50643      FOUND_FREETYPE=no
50644    fi
50645  fi
50646
50647  if test "x$FOUND_FREETYPE" = xyes; then
50648    # Include file found, let's continue the sanity check.
50649    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50650$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50651
50652    # Reset to default value
50653    FREETYPE_BASE_NAME=freetype
50654    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50655    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50656      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50657          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50658        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50659        # for the .6 version explicitly.
50660        FREETYPE_BASE_NAME=freetype.6
50661        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50662        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50663$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50664      else
50665        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50666$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50667        FOUND_FREETYPE=no
50668      fi
50669    else
50670      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50671        # On Windows, we will need both .lib and .dll file.
50672        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50673          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50674$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50675          FOUND_FREETYPE=no
50676        fi
50677      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50678          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50679        # Found lib in isa dir, use that instead.
50680        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50681        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50682$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50683      fi
50684    fi
50685  fi
50686
50687  if test "x$FOUND_FREETYPE" = xyes; then
50688
50689  # Only process if variable expands to non-empty
50690
50691  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50693
50694  # Input might be given as Windows format, start by converting to
50695  # unix format.
50696  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50697  new_path=`$CYGPATH -u "$path"`
50698
50699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50702  # "foo.exe" is OK but "foo" is an error.
50703  #
50704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50705  # It is also a way to make sure we got the proper file name for the real test later on.
50706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50707  if test "x$test_shortpath" = x; then
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50710    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50711  fi
50712
50713  # Call helper function which possibly converts this using DOS-style short mode.
50714  # If so, the updated path is stored in $new_path.
50715
50716  input_path="$new_path"
50717  # Check if we need to convert this using DOS-style short mode. If the path
50718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50719  # take no chances and rewrite it.
50720  # Note: m4 eats our [], so we need to use [ and ] instead.
50721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50722  if test "x$has_forbidden_chars" != x; then
50723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50727      # Going to short mode and back again did indeed matter. Since short mode is
50728      # case insensitive, let's make it lowercase to improve readability.
50729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50730      # Now convert it back to Unix-style (cygpath)
50731      input_path=`$CYGPATH -u "$shortmode_path"`
50732      new_path="$input_path"
50733    fi
50734  fi
50735
50736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50737  if test "x$test_cygdrive_prefix" = x; then
50738    # As a simple fix, exclude /usr/bin since it's not a real path.
50739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50741      # a path prefixed by /cygdrive for fixpath to work.
50742      new_path="$CYGWIN_ROOT_PATH$input_path"
50743    fi
50744  fi
50745
50746
50747  if test "x$path" != "x$new_path"; then
50748    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50751  fi
50752
50753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50754
50755  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50756  has_colon=`$ECHO $path | $GREP ^.:`
50757  new_path="$path"
50758  if test "x$has_colon" = x; then
50759    # Not in mixed or Windows style, start by that.
50760    new_path=`cmd //c echo $path`
50761  fi
50762
50763
50764  input_path="$new_path"
50765  # Check if we need to convert this using DOS-style short mode. If the path
50766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50767  # take no chances and rewrite it.
50768  # Note: m4 eats our [], so we need to use [ and ] instead.
50769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50770  if test "x$has_forbidden_chars" != x; then
50771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50773  fi
50774
50775
50776  windows_path="$new_path"
50777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50778    unix_path=`$CYGPATH -u "$windows_path"`
50779    new_path="$unix_path"
50780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50782    new_path="$unix_path"
50783  fi
50784
50785  if test "x$path" != "x$new_path"; then
50786    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50788$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50789  fi
50790
50791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50793
50794    else
50795      # We're on a unix platform. Hooray! :)
50796      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50797      has_space=`$ECHO "$path" | $GREP " "`
50798      if test "x$has_space" != x; then
50799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50800$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50802      fi
50803
50804      # Use eval to expand a potential ~
50805      eval path="$path"
50806      if test ! -f "$path" && test ! -d "$path"; then
50807        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50808      fi
50809
50810      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50811    fi
50812  fi
50813
50814
50815  # Only process if variable expands to non-empty
50816
50817  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50819
50820  # Input might be given as Windows format, start by converting to
50821  # unix format.
50822  path="$POTENTIAL_FREETYPE_LIB_PATH"
50823  new_path=`$CYGPATH -u "$path"`
50824
50825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50828  # "foo.exe" is OK but "foo" is an error.
50829  #
50830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50831  # It is also a way to make sure we got the proper file name for the real test later on.
50832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50833  if test "x$test_shortpath" = x; then
50834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50837  fi
50838
50839  # Call helper function which possibly converts this using DOS-style short mode.
50840  # If so, the updated path is stored in $new_path.
50841
50842  input_path="$new_path"
50843  # Check if we need to convert this using DOS-style short mode. If the path
50844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50845  # take no chances and rewrite it.
50846  # Note: m4 eats our [], so we need to use [ and ] instead.
50847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50848  if test "x$has_forbidden_chars" != x; then
50849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50853      # Going to short mode and back again did indeed matter. Since short mode is
50854      # case insensitive, let's make it lowercase to improve readability.
50855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50856      # Now convert it back to Unix-style (cygpath)
50857      input_path=`$CYGPATH -u "$shortmode_path"`
50858      new_path="$input_path"
50859    fi
50860  fi
50861
50862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50863  if test "x$test_cygdrive_prefix" = x; then
50864    # As a simple fix, exclude /usr/bin since it's not a real path.
50865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50867      # a path prefixed by /cygdrive for fixpath to work.
50868      new_path="$CYGWIN_ROOT_PATH$input_path"
50869    fi
50870  fi
50871
50872
50873  if test "x$path" != "x$new_path"; then
50874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50877  fi
50878
50879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50880
50881  path="$POTENTIAL_FREETYPE_LIB_PATH"
50882  has_colon=`$ECHO $path | $GREP ^.:`
50883  new_path="$path"
50884  if test "x$has_colon" = x; then
50885    # Not in mixed or Windows style, start by that.
50886    new_path=`cmd //c echo $path`
50887  fi
50888
50889
50890  input_path="$new_path"
50891  # Check if we need to convert this using DOS-style short mode. If the path
50892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50893  # take no chances and rewrite it.
50894  # Note: m4 eats our [], so we need to use [ and ] instead.
50895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50896  if test "x$has_forbidden_chars" != x; then
50897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50899  fi
50900
50901
50902  windows_path="$new_path"
50903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50904    unix_path=`$CYGPATH -u "$windows_path"`
50905    new_path="$unix_path"
50906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50908    new_path="$unix_path"
50909  fi
50910
50911  if test "x$path" != "x$new_path"; then
50912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50915  fi
50916
50917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50919
50920    else
50921      # We're on a unix platform. Hooray! :)
50922      path="$POTENTIAL_FREETYPE_LIB_PATH"
50923      has_space=`$ECHO "$path" | $GREP " "`
50924      if test "x$has_space" != x; then
50925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50928      fi
50929
50930      # Use eval to expand a potential ~
50931      eval path="$path"
50932      if test ! -f "$path" && test ! -d "$path"; then
50933        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50934      fi
50935
50936      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50937    fi
50938  fi
50939
50940
50941    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50943$as_echo_n "checking for freetype includes... " >&6; }
50944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50945$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50946    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50948$as_echo_n "checking for freetype libraries... " >&6; }
50949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50950$as_echo "$FREETYPE_LIB_PATH" >&6; }
50951  fi
50952
50953          fi
50954        else
50955          FREETYPE_BASE_DIR="$SYSROOT/usr"
50956
50957  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50958  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50959  METHOD="well-known location"
50960
50961  # Let's start with an optimistic view of the world :-)
50962  FOUND_FREETYPE=yes
50963
50964  # First look for the canonical freetype main include file ft2build.h.
50965  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50966    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50967    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50968    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50969      # Fail.
50970      FOUND_FREETYPE=no
50971    fi
50972  fi
50973
50974  if test "x$FOUND_FREETYPE" = xyes; then
50975    # Include file found, let's continue the sanity check.
50976    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50977$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50978
50979    # Reset to default value
50980    FREETYPE_BASE_NAME=freetype
50981    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50982    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50983      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50984          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50985        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50986        # for the .6 version explicitly.
50987        FREETYPE_BASE_NAME=freetype.6
50988        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50989        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50990$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50991      else
50992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50993$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50994        FOUND_FREETYPE=no
50995      fi
50996    else
50997      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50998        # On Windows, we will need both .lib and .dll file.
50999        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51000          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51001$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51002          FOUND_FREETYPE=no
51003        fi
51004      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51005          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51006        # Found lib in isa dir, use that instead.
51007        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51008        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51009$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51010      fi
51011    fi
51012  fi
51013
51014  if test "x$FOUND_FREETYPE" = xyes; then
51015
51016  # Only process if variable expands to non-empty
51017
51018  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51020
51021  # Input might be given as Windows format, start by converting to
51022  # unix format.
51023  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51024  new_path=`$CYGPATH -u "$path"`
51025
51026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51029  # "foo.exe" is OK but "foo" is an error.
51030  #
51031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51032  # It is also a way to make sure we got the proper file name for the real test later on.
51033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51034  if test "x$test_shortpath" = x; then
51035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51036$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51037    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51038  fi
51039
51040  # Call helper function which possibly converts this using DOS-style short mode.
51041  # If so, the updated path is stored in $new_path.
51042
51043  input_path="$new_path"
51044  # Check if we need to convert this using DOS-style short mode. If the path
51045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51046  # take no chances and rewrite it.
51047  # Note: m4 eats our [], so we need to use [ and ] instead.
51048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51049  if test "x$has_forbidden_chars" != x; then
51050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51054      # Going to short mode and back again did indeed matter. Since short mode is
51055      # case insensitive, let's make it lowercase to improve readability.
51056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51057      # Now convert it back to Unix-style (cygpath)
51058      input_path=`$CYGPATH -u "$shortmode_path"`
51059      new_path="$input_path"
51060    fi
51061  fi
51062
51063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51064  if test "x$test_cygdrive_prefix" = x; then
51065    # As a simple fix, exclude /usr/bin since it's not a real path.
51066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51068      # a path prefixed by /cygdrive for fixpath to work.
51069      new_path="$CYGWIN_ROOT_PATH$input_path"
51070    fi
51071  fi
51072
51073
51074  if test "x$path" != "x$new_path"; then
51075    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51077$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51078  fi
51079
51080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51081
51082  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51083  has_colon=`$ECHO $path | $GREP ^.:`
51084  new_path="$path"
51085  if test "x$has_colon" = x; then
51086    # Not in mixed or Windows style, start by that.
51087    new_path=`cmd //c echo $path`
51088  fi
51089
51090
51091  input_path="$new_path"
51092  # Check if we need to convert this using DOS-style short mode. If the path
51093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51094  # take no chances and rewrite it.
51095  # Note: m4 eats our [], so we need to use [ and ] instead.
51096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51097  if test "x$has_forbidden_chars" != x; then
51098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51100  fi
51101
51102
51103  windows_path="$new_path"
51104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51105    unix_path=`$CYGPATH -u "$windows_path"`
51106    new_path="$unix_path"
51107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51109    new_path="$unix_path"
51110  fi
51111
51112  if test "x$path" != "x$new_path"; then
51113    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51115$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51116  fi
51117
51118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51120
51121    else
51122      # We're on a unix platform. Hooray! :)
51123      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51124      has_space=`$ECHO "$path" | $GREP " "`
51125      if test "x$has_space" != x; then
51126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51129      fi
51130
51131      # Use eval to expand a potential ~
51132      eval path="$path"
51133      if test ! -f "$path" && test ! -d "$path"; then
51134        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51135      fi
51136
51137      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51138    fi
51139  fi
51140
51141
51142  # Only process if variable expands to non-empty
51143
51144  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51145    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51146
51147  # Input might be given as Windows format, start by converting to
51148  # unix format.
51149  path="$POTENTIAL_FREETYPE_LIB_PATH"
51150  new_path=`$CYGPATH -u "$path"`
51151
51152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51155  # "foo.exe" is OK but "foo" is an error.
51156  #
51157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51158  # It is also a way to make sure we got the proper file name for the real test later on.
51159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51160  if test "x$test_shortpath" = x; then
51161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51163    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51164  fi
51165
51166  # Call helper function which possibly converts this using DOS-style short mode.
51167  # If so, the updated path is stored in $new_path.
51168
51169  input_path="$new_path"
51170  # Check if we need to convert this using DOS-style short mode. If the path
51171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51172  # take no chances and rewrite it.
51173  # Note: m4 eats our [], so we need to use [ and ] instead.
51174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51175  if test "x$has_forbidden_chars" != x; then
51176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51180      # Going to short mode and back again did indeed matter. Since short mode is
51181      # case insensitive, let's make it lowercase to improve readability.
51182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51183      # Now convert it back to Unix-style (cygpath)
51184      input_path=`$CYGPATH -u "$shortmode_path"`
51185      new_path="$input_path"
51186    fi
51187  fi
51188
51189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51190  if test "x$test_cygdrive_prefix" = x; then
51191    # As a simple fix, exclude /usr/bin since it's not a real path.
51192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51194      # a path prefixed by /cygdrive for fixpath to work.
51195      new_path="$CYGWIN_ROOT_PATH$input_path"
51196    fi
51197  fi
51198
51199
51200  if test "x$path" != "x$new_path"; then
51201    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51204  fi
51205
51206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51207
51208  path="$POTENTIAL_FREETYPE_LIB_PATH"
51209  has_colon=`$ECHO $path | $GREP ^.:`
51210  new_path="$path"
51211  if test "x$has_colon" = x; then
51212    # Not in mixed or Windows style, start by that.
51213    new_path=`cmd //c echo $path`
51214  fi
51215
51216
51217  input_path="$new_path"
51218  # Check if we need to convert this using DOS-style short mode. If the path
51219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51220  # take no chances and rewrite it.
51221  # Note: m4 eats our [], so we need to use [ and ] instead.
51222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51223  if test "x$has_forbidden_chars" != x; then
51224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51226  fi
51227
51228
51229  windows_path="$new_path"
51230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51231    unix_path=`$CYGPATH -u "$windows_path"`
51232    new_path="$unix_path"
51233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51235    new_path="$unix_path"
51236  fi
51237
51238  if test "x$path" != "x$new_path"; then
51239    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51242  fi
51243
51244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51246
51247    else
51248      # We're on a unix platform. Hooray! :)
51249      path="$POTENTIAL_FREETYPE_LIB_PATH"
51250      has_space=`$ECHO "$path" | $GREP " "`
51251      if test "x$has_space" != x; then
51252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51254        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51255      fi
51256
51257      # Use eval to expand a potential ~
51258      eval path="$path"
51259      if test ! -f "$path" && test ! -d "$path"; then
51260        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51261      fi
51262
51263      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51264    fi
51265  fi
51266
51267
51268    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51270$as_echo_n "checking for freetype includes... " >&6; }
51271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51272$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51273    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51275$as_echo_n "checking for freetype libraries... " >&6; }
51276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51277$as_echo "$FREETYPE_LIB_PATH" >&6; }
51278  fi
51279
51280
51281          if test "x$FOUND_FREETYPE" != xyes; then
51282            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51283
51284  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51285  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51286  METHOD="well-known location"
51287
51288  # Let's start with an optimistic view of the world :-)
51289  FOUND_FREETYPE=yes
51290
51291  # First look for the canonical freetype main include file ft2build.h.
51292  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51293    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51294    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51295    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51296      # Fail.
51297      FOUND_FREETYPE=no
51298    fi
51299  fi
51300
51301  if test "x$FOUND_FREETYPE" = xyes; then
51302    # Include file found, let's continue the sanity check.
51303    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51304$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51305
51306    # Reset to default value
51307    FREETYPE_BASE_NAME=freetype
51308    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51309    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51310      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51311          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51312        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51313        # for the .6 version explicitly.
51314        FREETYPE_BASE_NAME=freetype.6
51315        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51316        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51317$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51318      else
51319        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51320$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51321        FOUND_FREETYPE=no
51322      fi
51323    else
51324      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51325        # On Windows, we will need both .lib and .dll file.
51326        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51327          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51328$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51329          FOUND_FREETYPE=no
51330        fi
51331      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51332          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51333        # Found lib in isa dir, use that instead.
51334        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51335        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51336$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51337      fi
51338    fi
51339  fi
51340
51341  if test "x$FOUND_FREETYPE" = xyes; then
51342
51343  # Only process if variable expands to non-empty
51344
51345  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51347
51348  # Input might be given as Windows format, start by converting to
51349  # unix format.
51350  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51351  new_path=`$CYGPATH -u "$path"`
51352
51353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51356  # "foo.exe" is OK but "foo" is an error.
51357  #
51358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51359  # It is also a way to make sure we got the proper file name for the real test later on.
51360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51361  if test "x$test_shortpath" = x; then
51362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51363$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51364    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51365  fi
51366
51367  # Call helper function which possibly converts this using DOS-style short mode.
51368  # If so, the updated path is stored in $new_path.
51369
51370  input_path="$new_path"
51371  # Check if we need to convert this using DOS-style short mode. If the path
51372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51373  # take no chances and rewrite it.
51374  # Note: m4 eats our [], so we need to use [ and ] instead.
51375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51376  if test "x$has_forbidden_chars" != x; then
51377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51381      # Going to short mode and back again did indeed matter. Since short mode is
51382      # case insensitive, let's make it lowercase to improve readability.
51383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51384      # Now convert it back to Unix-style (cygpath)
51385      input_path=`$CYGPATH -u "$shortmode_path"`
51386      new_path="$input_path"
51387    fi
51388  fi
51389
51390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51391  if test "x$test_cygdrive_prefix" = x; then
51392    # As a simple fix, exclude /usr/bin since it's not a real path.
51393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51395      # a path prefixed by /cygdrive for fixpath to work.
51396      new_path="$CYGWIN_ROOT_PATH$input_path"
51397    fi
51398  fi
51399
51400
51401  if test "x$path" != "x$new_path"; then
51402    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51405  fi
51406
51407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51408
51409  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51410  has_colon=`$ECHO $path | $GREP ^.:`
51411  new_path="$path"
51412  if test "x$has_colon" = x; then
51413    # Not in mixed or Windows style, start by that.
51414    new_path=`cmd //c echo $path`
51415  fi
51416
51417
51418  input_path="$new_path"
51419  # Check if we need to convert this using DOS-style short mode. If the path
51420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51421  # take no chances and rewrite it.
51422  # Note: m4 eats our [], so we need to use [ and ] instead.
51423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51424  if test "x$has_forbidden_chars" != x; then
51425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51427  fi
51428
51429
51430  windows_path="$new_path"
51431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51432    unix_path=`$CYGPATH -u "$windows_path"`
51433    new_path="$unix_path"
51434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51436    new_path="$unix_path"
51437  fi
51438
51439  if test "x$path" != "x$new_path"; then
51440    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51442$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51443  fi
51444
51445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51447
51448    else
51449      # We're on a unix platform. Hooray! :)
51450      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51451      has_space=`$ECHO "$path" | $GREP " "`
51452      if test "x$has_space" != x; then
51453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51454$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51456      fi
51457
51458      # Use eval to expand a potential ~
51459      eval path="$path"
51460      if test ! -f "$path" && test ! -d "$path"; then
51461        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51462      fi
51463
51464      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51465    fi
51466  fi
51467
51468
51469  # Only process if variable expands to non-empty
51470
51471  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51473
51474  # Input might be given as Windows format, start by converting to
51475  # unix format.
51476  path="$POTENTIAL_FREETYPE_LIB_PATH"
51477  new_path=`$CYGPATH -u "$path"`
51478
51479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51482  # "foo.exe" is OK but "foo" is an error.
51483  #
51484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51485  # It is also a way to make sure we got the proper file name for the real test later on.
51486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51487  if test "x$test_shortpath" = x; then
51488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51490    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51491  fi
51492
51493  # Call helper function which possibly converts this using DOS-style short mode.
51494  # If so, the updated path is stored in $new_path.
51495
51496  input_path="$new_path"
51497  # Check if we need to convert this using DOS-style short mode. If the path
51498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51499  # take no chances and rewrite it.
51500  # Note: m4 eats our [], so we need to use [ and ] instead.
51501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51502  if test "x$has_forbidden_chars" != x; then
51503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51507      # Going to short mode and back again did indeed matter. Since short mode is
51508      # case insensitive, let's make it lowercase to improve readability.
51509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51510      # Now convert it back to Unix-style (cygpath)
51511      input_path=`$CYGPATH -u "$shortmode_path"`
51512      new_path="$input_path"
51513    fi
51514  fi
51515
51516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51517  if test "x$test_cygdrive_prefix" = x; then
51518    # As a simple fix, exclude /usr/bin since it's not a real path.
51519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51521      # a path prefixed by /cygdrive for fixpath to work.
51522      new_path="$CYGWIN_ROOT_PATH$input_path"
51523    fi
51524  fi
51525
51526
51527  if test "x$path" != "x$new_path"; then
51528    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51531  fi
51532
51533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51534
51535  path="$POTENTIAL_FREETYPE_LIB_PATH"
51536  has_colon=`$ECHO $path | $GREP ^.:`
51537  new_path="$path"
51538  if test "x$has_colon" = x; then
51539    # Not in mixed or Windows style, start by that.
51540    new_path=`cmd //c echo $path`
51541  fi
51542
51543
51544  input_path="$new_path"
51545  # Check if we need to convert this using DOS-style short mode. If the path
51546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51547  # take no chances and rewrite it.
51548  # Note: m4 eats our [], so we need to use [ and ] instead.
51549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51550  if test "x$has_forbidden_chars" != x; then
51551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51553  fi
51554
51555
51556  windows_path="$new_path"
51557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51558    unix_path=`$CYGPATH -u "$windows_path"`
51559    new_path="$unix_path"
51560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51562    new_path="$unix_path"
51563  fi
51564
51565  if test "x$path" != "x$new_path"; then
51566    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51569  fi
51570
51571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51573
51574    else
51575      # We're on a unix platform. Hooray! :)
51576      path="$POTENTIAL_FREETYPE_LIB_PATH"
51577      has_space=`$ECHO "$path" | $GREP " "`
51578      if test "x$has_space" != x; then
51579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51582      fi
51583
51584      # Use eval to expand a potential ~
51585      eval path="$path"
51586      if test ! -f "$path" && test ! -d "$path"; then
51587        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51588      fi
51589
51590      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51591    fi
51592  fi
51593
51594
51595    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51596    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51597$as_echo_n "checking for freetype includes... " >&6; }
51598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51599$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51600    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51602$as_echo_n "checking for freetype libraries... " >&6; }
51603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51604$as_echo "$FREETYPE_LIB_PATH" >&6; }
51605  fi
51606
51607          fi
51608
51609          if test "x$FOUND_FREETYPE" != xyes; then
51610            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51611
51612  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51613  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51614  METHOD="well-known location"
51615
51616  # Let's start with an optimistic view of the world :-)
51617  FOUND_FREETYPE=yes
51618
51619  # First look for the canonical freetype main include file ft2build.h.
51620  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51621    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51622    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51623    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51624      # Fail.
51625      FOUND_FREETYPE=no
51626    fi
51627  fi
51628
51629  if test "x$FOUND_FREETYPE" = xyes; then
51630    # Include file found, let's continue the sanity check.
51631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51632$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51633
51634    # Reset to default value
51635    FREETYPE_BASE_NAME=freetype
51636    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51637    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51638      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51639          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51640        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51641        # for the .6 version explicitly.
51642        FREETYPE_BASE_NAME=freetype.6
51643        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51644        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51645$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51646      else
51647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51648$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51649        FOUND_FREETYPE=no
51650      fi
51651    else
51652      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51653        # On Windows, we will need both .lib and .dll file.
51654        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51655          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51656$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51657          FOUND_FREETYPE=no
51658        fi
51659      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51660          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51661        # Found lib in isa dir, use that instead.
51662        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51663        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51664$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51665      fi
51666    fi
51667  fi
51668
51669  if test "x$FOUND_FREETYPE" = xyes; then
51670
51671  # Only process if variable expands to non-empty
51672
51673  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51675
51676  # Input might be given as Windows format, start by converting to
51677  # unix format.
51678  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51679  new_path=`$CYGPATH -u "$path"`
51680
51681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51684  # "foo.exe" is OK but "foo" is an error.
51685  #
51686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51687  # It is also a way to make sure we got the proper file name for the real test later on.
51688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51689  if test "x$test_shortpath" = x; then
51690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51691$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51692    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51693  fi
51694
51695  # Call helper function which possibly converts this using DOS-style short mode.
51696  # If so, the updated path is stored in $new_path.
51697
51698  input_path="$new_path"
51699  # Check if we need to convert this using DOS-style short mode. If the path
51700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51701  # take no chances and rewrite it.
51702  # Note: m4 eats our [], so we need to use [ and ] instead.
51703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51704  if test "x$has_forbidden_chars" != x; then
51705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51709      # Going to short mode and back again did indeed matter. Since short mode is
51710      # case insensitive, let's make it lowercase to improve readability.
51711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51712      # Now convert it back to Unix-style (cygpath)
51713      input_path=`$CYGPATH -u "$shortmode_path"`
51714      new_path="$input_path"
51715    fi
51716  fi
51717
51718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51719  if test "x$test_cygdrive_prefix" = x; then
51720    # As a simple fix, exclude /usr/bin since it's not a real path.
51721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51723      # a path prefixed by /cygdrive for fixpath to work.
51724      new_path="$CYGWIN_ROOT_PATH$input_path"
51725    fi
51726  fi
51727
51728
51729  if test "x$path" != "x$new_path"; then
51730    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51733  fi
51734
51735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51736
51737  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51738  has_colon=`$ECHO $path | $GREP ^.:`
51739  new_path="$path"
51740  if test "x$has_colon" = x; then
51741    # Not in mixed or Windows style, start by that.
51742    new_path=`cmd //c echo $path`
51743  fi
51744
51745
51746  input_path="$new_path"
51747  # Check if we need to convert this using DOS-style short mode. If the path
51748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51749  # take no chances and rewrite it.
51750  # Note: m4 eats our [], so we need to use [ and ] instead.
51751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51752  if test "x$has_forbidden_chars" != x; then
51753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51755  fi
51756
51757
51758  windows_path="$new_path"
51759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51760    unix_path=`$CYGPATH -u "$windows_path"`
51761    new_path="$unix_path"
51762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51764    new_path="$unix_path"
51765  fi
51766
51767  if test "x$path" != "x$new_path"; then
51768    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51771  fi
51772
51773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51775
51776    else
51777      # We're on a unix platform. Hooray! :)
51778      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51779      has_space=`$ECHO "$path" | $GREP " "`
51780      if test "x$has_space" != x; then
51781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51782$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51784      fi
51785
51786      # Use eval to expand a potential ~
51787      eval path="$path"
51788      if test ! -f "$path" && test ! -d "$path"; then
51789        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51790      fi
51791
51792      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51793    fi
51794  fi
51795
51796
51797  # Only process if variable expands to non-empty
51798
51799  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51801
51802  # Input might be given as Windows format, start by converting to
51803  # unix format.
51804  path="$POTENTIAL_FREETYPE_LIB_PATH"
51805  new_path=`$CYGPATH -u "$path"`
51806
51807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51810  # "foo.exe" is OK but "foo" is an error.
51811  #
51812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51813  # It is also a way to make sure we got the proper file name for the real test later on.
51814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51815  if test "x$test_shortpath" = x; then
51816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51818    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51819  fi
51820
51821  # Call helper function which possibly converts this using DOS-style short mode.
51822  # If so, the updated path is stored in $new_path.
51823
51824  input_path="$new_path"
51825  # Check if we need to convert this using DOS-style short mode. If the path
51826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51827  # take no chances and rewrite it.
51828  # Note: m4 eats our [], so we need to use [ and ] instead.
51829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51830  if test "x$has_forbidden_chars" != x; then
51831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51835      # Going to short mode and back again did indeed matter. Since short mode is
51836      # case insensitive, let's make it lowercase to improve readability.
51837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51838      # Now convert it back to Unix-style (cygpath)
51839      input_path=`$CYGPATH -u "$shortmode_path"`
51840      new_path="$input_path"
51841    fi
51842  fi
51843
51844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51845  if test "x$test_cygdrive_prefix" = x; then
51846    # As a simple fix, exclude /usr/bin since it's not a real path.
51847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51849      # a path prefixed by /cygdrive for fixpath to work.
51850      new_path="$CYGWIN_ROOT_PATH$input_path"
51851    fi
51852  fi
51853
51854
51855  if test "x$path" != "x$new_path"; then
51856    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51859  fi
51860
51861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51862
51863  path="$POTENTIAL_FREETYPE_LIB_PATH"
51864  has_colon=`$ECHO $path | $GREP ^.:`
51865  new_path="$path"
51866  if test "x$has_colon" = x; then
51867    # Not in mixed or Windows style, start by that.
51868    new_path=`cmd //c echo $path`
51869  fi
51870
51871
51872  input_path="$new_path"
51873  # Check if we need to convert this using DOS-style short mode. If the path
51874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51875  # take no chances and rewrite it.
51876  # Note: m4 eats our [], so we need to use [ and ] instead.
51877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51878  if test "x$has_forbidden_chars" != x; then
51879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51881  fi
51882
51883
51884  windows_path="$new_path"
51885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51886    unix_path=`$CYGPATH -u "$windows_path"`
51887    new_path="$unix_path"
51888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51890    new_path="$unix_path"
51891  fi
51892
51893  if test "x$path" != "x$new_path"; then
51894    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51897  fi
51898
51899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51901
51902    else
51903      # We're on a unix platform. Hooray! :)
51904      path="$POTENTIAL_FREETYPE_LIB_PATH"
51905      has_space=`$ECHO "$path" | $GREP " "`
51906      if test "x$has_space" != x; then
51907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51910      fi
51911
51912      # Use eval to expand a potential ~
51913      eval path="$path"
51914      if test ! -f "$path" && test ! -d "$path"; then
51915        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51916      fi
51917
51918      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51919    fi
51920  fi
51921
51922
51923    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51925$as_echo_n "checking for freetype includes... " >&6; }
51926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51927$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51928    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51930$as_echo_n "checking for freetype libraries... " >&6; }
51931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51932$as_echo "$FREETYPE_LIB_PATH" >&6; }
51933  fi
51934
51935          fi
51936
51937          if test "x$FOUND_FREETYPE" != xyes; then
51938            FREETYPE_BASE_DIR="$SYSROOT/usr"
51939            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51940
51941  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51942  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
51943  METHOD="well-known location"
51944
51945  # Let's start with an optimistic view of the world :-)
51946  FOUND_FREETYPE=yes
51947
51948  # First look for the canonical freetype main include file ft2build.h.
51949  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51950    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51951    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51952    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51953      # Fail.
51954      FOUND_FREETYPE=no
51955    fi
51956  fi
51957
51958  if test "x$FOUND_FREETYPE" = xyes; then
51959    # Include file found, let's continue the sanity check.
51960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51961$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51962
51963    # Reset to default value
51964    FREETYPE_BASE_NAME=freetype
51965    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51966    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51967      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51968          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51969        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51970        # for the .6 version explicitly.
51971        FREETYPE_BASE_NAME=freetype.6
51972        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51973        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51974$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51975      else
51976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51977$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51978        FOUND_FREETYPE=no
51979      fi
51980    else
51981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51982        # On Windows, we will need both .lib and .dll file.
51983        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51984          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51986          FOUND_FREETYPE=no
51987        fi
51988      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51990        # Found lib in isa dir, use that instead.
51991        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51992        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51993$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51994      fi
51995    fi
51996  fi
51997
51998  if test "x$FOUND_FREETYPE" = xyes; then
51999
52000  # Only process if variable expands to non-empty
52001
52002  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52004
52005  # Input might be given as Windows format, start by converting to
52006  # unix format.
52007  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52008  new_path=`$CYGPATH -u "$path"`
52009
52010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52013  # "foo.exe" is OK but "foo" is an error.
52014  #
52015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52016  # It is also a way to make sure we got the proper file name for the real test later on.
52017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52018  if test "x$test_shortpath" = x; then
52019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52022  fi
52023
52024  # Call helper function which possibly converts this using DOS-style short mode.
52025  # If so, the updated path is stored in $new_path.
52026
52027  input_path="$new_path"
52028  # Check if we need to convert this using DOS-style short mode. If the path
52029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52030  # take no chances and rewrite it.
52031  # Note: m4 eats our [], so we need to use [ and ] instead.
52032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52033  if test "x$has_forbidden_chars" != x; then
52034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52038      # Going to short mode and back again did indeed matter. Since short mode is
52039      # case insensitive, let's make it lowercase to improve readability.
52040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52041      # Now convert it back to Unix-style (cygpath)
52042      input_path=`$CYGPATH -u "$shortmode_path"`
52043      new_path="$input_path"
52044    fi
52045  fi
52046
52047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52048  if test "x$test_cygdrive_prefix" = x; then
52049    # As a simple fix, exclude /usr/bin since it's not a real path.
52050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52052      # a path prefixed by /cygdrive for fixpath to work.
52053      new_path="$CYGWIN_ROOT_PATH$input_path"
52054    fi
52055  fi
52056
52057
52058  if test "x$path" != "x$new_path"; then
52059    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52062  fi
52063
52064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52065
52066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52067  has_colon=`$ECHO $path | $GREP ^.:`
52068  new_path="$path"
52069  if test "x$has_colon" = x; then
52070    # Not in mixed or Windows style, start by that.
52071    new_path=`cmd //c echo $path`
52072  fi
52073
52074
52075  input_path="$new_path"
52076  # Check if we need to convert this using DOS-style short mode. If the path
52077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52078  # take no chances and rewrite it.
52079  # Note: m4 eats our [], so we need to use [ and ] instead.
52080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52081  if test "x$has_forbidden_chars" != x; then
52082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52084  fi
52085
52086
52087  windows_path="$new_path"
52088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52089    unix_path=`$CYGPATH -u "$windows_path"`
52090    new_path="$unix_path"
52091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52093    new_path="$unix_path"
52094  fi
52095
52096  if test "x$path" != "x$new_path"; then
52097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52100  fi
52101
52102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52104
52105    else
52106      # We're on a unix platform. Hooray! :)
52107      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52108      has_space=`$ECHO "$path" | $GREP " "`
52109      if test "x$has_space" != x; then
52110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52113      fi
52114
52115      # Use eval to expand a potential ~
52116      eval path="$path"
52117      if test ! -f "$path" && test ! -d "$path"; then
52118        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52119      fi
52120
52121      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52122    fi
52123  fi
52124
52125
52126  # Only process if variable expands to non-empty
52127
52128  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52130
52131  # Input might be given as Windows format, start by converting to
52132  # unix format.
52133  path="$POTENTIAL_FREETYPE_LIB_PATH"
52134  new_path=`$CYGPATH -u "$path"`
52135
52136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52139  # "foo.exe" is OK but "foo" is an error.
52140  #
52141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52142  # It is also a way to make sure we got the proper file name for the real test later on.
52143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52144  if test "x$test_shortpath" = x; then
52145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52146$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52147    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52148  fi
52149
52150  # Call helper function which possibly converts this using DOS-style short mode.
52151  # If so, the updated path is stored in $new_path.
52152
52153  input_path="$new_path"
52154  # Check if we need to convert this using DOS-style short mode. If the path
52155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52156  # take no chances and rewrite it.
52157  # Note: m4 eats our [], so we need to use [ and ] instead.
52158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52159  if test "x$has_forbidden_chars" != x; then
52160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52164      # Going to short mode and back again did indeed matter. Since short mode is
52165      # case insensitive, let's make it lowercase to improve readability.
52166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52167      # Now convert it back to Unix-style (cygpath)
52168      input_path=`$CYGPATH -u "$shortmode_path"`
52169      new_path="$input_path"
52170    fi
52171  fi
52172
52173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52174  if test "x$test_cygdrive_prefix" = x; then
52175    # As a simple fix, exclude /usr/bin since it's not a real path.
52176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52178      # a path prefixed by /cygdrive for fixpath to work.
52179      new_path="$CYGWIN_ROOT_PATH$input_path"
52180    fi
52181  fi
52182
52183
52184  if test "x$path" != "x$new_path"; then
52185    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52188  fi
52189
52190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52191
52192  path="$POTENTIAL_FREETYPE_LIB_PATH"
52193  has_colon=`$ECHO $path | $GREP ^.:`
52194  new_path="$path"
52195  if test "x$has_colon" = x; then
52196    # Not in mixed or Windows style, start by that.
52197    new_path=`cmd //c echo $path`
52198  fi
52199
52200
52201  input_path="$new_path"
52202  # Check if we need to convert this using DOS-style short mode. If the path
52203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52204  # take no chances and rewrite it.
52205  # Note: m4 eats our [], so we need to use [ and ] instead.
52206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52207  if test "x$has_forbidden_chars" != x; then
52208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52210  fi
52211
52212
52213  windows_path="$new_path"
52214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52215    unix_path=`$CYGPATH -u "$windows_path"`
52216    new_path="$unix_path"
52217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52219    new_path="$unix_path"
52220  fi
52221
52222  if test "x$path" != "x$new_path"; then
52223    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52225$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52226  fi
52227
52228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52230
52231    else
52232      # We're on a unix platform. Hooray! :)
52233      path="$POTENTIAL_FREETYPE_LIB_PATH"
52234      has_space=`$ECHO "$path" | $GREP " "`
52235      if test "x$has_space" != x; then
52236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52237$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52239      fi
52240
52241      # Use eval to expand a potential ~
52242      eval path="$path"
52243      if test ! -f "$path" && test ! -d "$path"; then
52244        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52245      fi
52246
52247      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52248    fi
52249  fi
52250
52251
52252    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52254$as_echo_n "checking for freetype includes... " >&6; }
52255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52256$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52257    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52259$as_echo_n "checking for freetype libraries... " >&6; }
52260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52261$as_echo "$FREETYPE_LIB_PATH" >&6; }
52262  fi
52263
52264            else
52265
52266  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52267  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52268  METHOD="well-known location"
52269
52270  # Let's start with an optimistic view of the world :-)
52271  FOUND_FREETYPE=yes
52272
52273  # First look for the canonical freetype main include file ft2build.h.
52274  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52275    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52276    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52277    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52278      # Fail.
52279      FOUND_FREETYPE=no
52280    fi
52281  fi
52282
52283  if test "x$FOUND_FREETYPE" = xyes; then
52284    # Include file found, let's continue the sanity check.
52285    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52286$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52287
52288    # Reset to default value
52289    FREETYPE_BASE_NAME=freetype
52290    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52291    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52292      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52294        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52295        # for the .6 version explicitly.
52296        FREETYPE_BASE_NAME=freetype.6
52297        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52298        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52299$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52300      else
52301        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52303        FOUND_FREETYPE=no
52304      fi
52305    else
52306      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52307        # On Windows, we will need both .lib and .dll file.
52308        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52309          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52311          FOUND_FREETYPE=no
52312        fi
52313      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52315        # Found lib in isa dir, use that instead.
52316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52317        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52318$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52319      fi
52320    fi
52321  fi
52322
52323  if test "x$FOUND_FREETYPE" = xyes; then
52324
52325  # Only process if variable expands to non-empty
52326
52327  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52329
52330  # Input might be given as Windows format, start by converting to
52331  # unix format.
52332  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52333  new_path=`$CYGPATH -u "$path"`
52334
52335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52338  # "foo.exe" is OK but "foo" is an error.
52339  #
52340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52341  # It is also a way to make sure we got the proper file name for the real test later on.
52342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52343  if test "x$test_shortpath" = x; then
52344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52347  fi
52348
52349  # Call helper function which possibly converts this using DOS-style short mode.
52350  # If so, the updated path is stored in $new_path.
52351
52352  input_path="$new_path"
52353  # Check if we need to convert this using DOS-style short mode. If the path
52354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52355  # take no chances and rewrite it.
52356  # Note: m4 eats our [], so we need to use [ and ] instead.
52357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52358  if test "x$has_forbidden_chars" != x; then
52359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52363      # Going to short mode and back again did indeed matter. Since short mode is
52364      # case insensitive, let's make it lowercase to improve readability.
52365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52366      # Now convert it back to Unix-style (cygpath)
52367      input_path=`$CYGPATH -u "$shortmode_path"`
52368      new_path="$input_path"
52369    fi
52370  fi
52371
52372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52373  if test "x$test_cygdrive_prefix" = x; then
52374    # As a simple fix, exclude /usr/bin since it's not a real path.
52375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52377      # a path prefixed by /cygdrive for fixpath to work.
52378      new_path="$CYGWIN_ROOT_PATH$input_path"
52379    fi
52380  fi
52381
52382
52383  if test "x$path" != "x$new_path"; then
52384    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52387  fi
52388
52389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52390
52391  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52392  has_colon=`$ECHO $path | $GREP ^.:`
52393  new_path="$path"
52394  if test "x$has_colon" = x; then
52395    # Not in mixed or Windows style, start by that.
52396    new_path=`cmd //c echo $path`
52397  fi
52398
52399
52400  input_path="$new_path"
52401  # Check if we need to convert this using DOS-style short mode. If the path
52402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52403  # take no chances and rewrite it.
52404  # Note: m4 eats our [], so we need to use [ and ] instead.
52405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52406  if test "x$has_forbidden_chars" != x; then
52407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52409  fi
52410
52411
52412  windows_path="$new_path"
52413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52414    unix_path=`$CYGPATH -u "$windows_path"`
52415    new_path="$unix_path"
52416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52418    new_path="$unix_path"
52419  fi
52420
52421  if test "x$path" != "x$new_path"; then
52422    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52425  fi
52426
52427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52429
52430    else
52431      # We're on a unix platform. Hooray! :)
52432      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52433      has_space=`$ECHO "$path" | $GREP " "`
52434      if test "x$has_space" != x; then
52435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52438      fi
52439
52440      # Use eval to expand a potential ~
52441      eval path="$path"
52442      if test ! -f "$path" && test ! -d "$path"; then
52443        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52444      fi
52445
52446      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52447    fi
52448  fi
52449
52450
52451  # Only process if variable expands to non-empty
52452
52453  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52455
52456  # Input might be given as Windows format, start by converting to
52457  # unix format.
52458  path="$POTENTIAL_FREETYPE_LIB_PATH"
52459  new_path=`$CYGPATH -u "$path"`
52460
52461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52464  # "foo.exe" is OK but "foo" is an error.
52465  #
52466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52467  # It is also a way to make sure we got the proper file name for the real test later on.
52468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52469  if test "x$test_shortpath" = x; then
52470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52473  fi
52474
52475  # Call helper function which possibly converts this using DOS-style short mode.
52476  # If so, the updated path is stored in $new_path.
52477
52478  input_path="$new_path"
52479  # Check if we need to convert this using DOS-style short mode. If the path
52480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52481  # take no chances and rewrite it.
52482  # Note: m4 eats our [], so we need to use [ and ] instead.
52483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52484  if test "x$has_forbidden_chars" != x; then
52485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52489      # Going to short mode and back again did indeed matter. Since short mode is
52490      # case insensitive, let's make it lowercase to improve readability.
52491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52492      # Now convert it back to Unix-style (cygpath)
52493      input_path=`$CYGPATH -u "$shortmode_path"`
52494      new_path="$input_path"
52495    fi
52496  fi
52497
52498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52499  if test "x$test_cygdrive_prefix" = x; then
52500    # As a simple fix, exclude /usr/bin since it's not a real path.
52501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52503      # a path prefixed by /cygdrive for fixpath to work.
52504      new_path="$CYGWIN_ROOT_PATH$input_path"
52505    fi
52506  fi
52507
52508
52509  if test "x$path" != "x$new_path"; then
52510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52513  fi
52514
52515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52516
52517  path="$POTENTIAL_FREETYPE_LIB_PATH"
52518  has_colon=`$ECHO $path | $GREP ^.:`
52519  new_path="$path"
52520  if test "x$has_colon" = x; then
52521    # Not in mixed or Windows style, start by that.
52522    new_path=`cmd //c echo $path`
52523  fi
52524
52525
52526  input_path="$new_path"
52527  # Check if we need to convert this using DOS-style short mode. If the path
52528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52529  # take no chances and rewrite it.
52530  # Note: m4 eats our [], so we need to use [ and ] instead.
52531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52532  if test "x$has_forbidden_chars" != x; then
52533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52535  fi
52536
52537
52538  windows_path="$new_path"
52539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52540    unix_path=`$CYGPATH -u "$windows_path"`
52541    new_path="$unix_path"
52542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52544    new_path="$unix_path"
52545  fi
52546
52547  if test "x$path" != "x$new_path"; then
52548    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52551  fi
52552
52553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52555
52556    else
52557      # We're on a unix platform. Hooray! :)
52558      path="$POTENTIAL_FREETYPE_LIB_PATH"
52559      has_space=`$ECHO "$path" | $GREP " "`
52560      if test "x$has_space" != x; then
52561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52564      fi
52565
52566      # Use eval to expand a potential ~
52567      eval path="$path"
52568      if test ! -f "$path" && test ! -d "$path"; then
52569        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52570      fi
52571
52572      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52573    fi
52574  fi
52575
52576
52577    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52579$as_echo_n "checking for freetype includes... " >&6; }
52580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52581$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52582    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52584$as_echo_n "checking for freetype libraries... " >&6; }
52585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52586$as_echo "$FREETYPE_LIB_PATH" >&6; }
52587  fi
52588
52589              if test "x$FOUND_FREETYPE" != xyes; then
52590
52591  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52592  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52593  METHOD="well-known location"
52594
52595  # Let's start with an optimistic view of the world :-)
52596  FOUND_FREETYPE=yes
52597
52598  # First look for the canonical freetype main include file ft2build.h.
52599  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52600    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52601    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52602    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52603      # Fail.
52604      FOUND_FREETYPE=no
52605    fi
52606  fi
52607
52608  if test "x$FOUND_FREETYPE" = xyes; then
52609    # Include file found, let's continue the sanity check.
52610    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52611$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52612
52613    # Reset to default value
52614    FREETYPE_BASE_NAME=freetype
52615    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52616    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52617      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52618          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52619        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52620        # for the .6 version explicitly.
52621        FREETYPE_BASE_NAME=freetype.6
52622        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52623        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52624$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52625      else
52626        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52627$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52628        FOUND_FREETYPE=no
52629      fi
52630    else
52631      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52632        # On Windows, we will need both .lib and .dll file.
52633        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52634          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52636          FOUND_FREETYPE=no
52637        fi
52638      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52639          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52640        # Found lib in isa dir, use that instead.
52641        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52642        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52643$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52644      fi
52645    fi
52646  fi
52647
52648  if test "x$FOUND_FREETYPE" = xyes; then
52649
52650  # Only process if variable expands to non-empty
52651
52652  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52654
52655  # Input might be given as Windows format, start by converting to
52656  # unix format.
52657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52658  new_path=`$CYGPATH -u "$path"`
52659
52660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52663  # "foo.exe" is OK but "foo" is an error.
52664  #
52665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52666  # It is also a way to make sure we got the proper file name for the real test later on.
52667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52668  if test "x$test_shortpath" = x; then
52669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52672  fi
52673
52674  # Call helper function which possibly converts this using DOS-style short mode.
52675  # If so, the updated path is stored in $new_path.
52676
52677  input_path="$new_path"
52678  # Check if we need to convert this using DOS-style short mode. If the path
52679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52680  # take no chances and rewrite it.
52681  # Note: m4 eats our [], so we need to use [ and ] instead.
52682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52683  if test "x$has_forbidden_chars" != x; then
52684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52688      # Going to short mode and back again did indeed matter. Since short mode is
52689      # case insensitive, let's make it lowercase to improve readability.
52690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52691      # Now convert it back to Unix-style (cygpath)
52692      input_path=`$CYGPATH -u "$shortmode_path"`
52693      new_path="$input_path"
52694    fi
52695  fi
52696
52697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52698  if test "x$test_cygdrive_prefix" = x; then
52699    # As a simple fix, exclude /usr/bin since it's not a real path.
52700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52702      # a path prefixed by /cygdrive for fixpath to work.
52703      new_path="$CYGWIN_ROOT_PATH$input_path"
52704    fi
52705  fi
52706
52707
52708  if test "x$path" != "x$new_path"; then
52709    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52712  fi
52713
52714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52715
52716  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52717  has_colon=`$ECHO $path | $GREP ^.:`
52718  new_path="$path"
52719  if test "x$has_colon" = x; then
52720    # Not in mixed or Windows style, start by that.
52721    new_path=`cmd //c echo $path`
52722  fi
52723
52724
52725  input_path="$new_path"
52726  # Check if we need to convert this using DOS-style short mode. If the path
52727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52728  # take no chances and rewrite it.
52729  # Note: m4 eats our [], so we need to use [ and ] instead.
52730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52731  if test "x$has_forbidden_chars" != x; then
52732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52734  fi
52735
52736
52737  windows_path="$new_path"
52738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52739    unix_path=`$CYGPATH -u "$windows_path"`
52740    new_path="$unix_path"
52741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52743    new_path="$unix_path"
52744  fi
52745
52746  if test "x$path" != "x$new_path"; then
52747    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52750  fi
52751
52752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52754
52755    else
52756      # We're on a unix platform. Hooray! :)
52757      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52758      has_space=`$ECHO "$path" | $GREP " "`
52759      if test "x$has_space" != x; then
52760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52763      fi
52764
52765      # Use eval to expand a potential ~
52766      eval path="$path"
52767      if test ! -f "$path" && test ! -d "$path"; then
52768        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52769      fi
52770
52771      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52772    fi
52773  fi
52774
52775
52776  # Only process if variable expands to non-empty
52777
52778  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52780
52781  # Input might be given as Windows format, start by converting to
52782  # unix format.
52783  path="$POTENTIAL_FREETYPE_LIB_PATH"
52784  new_path=`$CYGPATH -u "$path"`
52785
52786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52789  # "foo.exe" is OK but "foo" is an error.
52790  #
52791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52792  # It is also a way to make sure we got the proper file name for the real test later on.
52793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52794  if test "x$test_shortpath" = x; then
52795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52797    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52798  fi
52799
52800  # Call helper function which possibly converts this using DOS-style short mode.
52801  # If so, the updated path is stored in $new_path.
52802
52803  input_path="$new_path"
52804  # Check if we need to convert this using DOS-style short mode. If the path
52805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52806  # take no chances and rewrite it.
52807  # Note: m4 eats our [], so we need to use [ and ] instead.
52808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52809  if test "x$has_forbidden_chars" != x; then
52810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52814      # Going to short mode and back again did indeed matter. Since short mode is
52815      # case insensitive, let's make it lowercase to improve readability.
52816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52817      # Now convert it back to Unix-style (cygpath)
52818      input_path=`$CYGPATH -u "$shortmode_path"`
52819      new_path="$input_path"
52820    fi
52821  fi
52822
52823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52824  if test "x$test_cygdrive_prefix" = x; then
52825    # As a simple fix, exclude /usr/bin since it's not a real path.
52826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52828      # a path prefixed by /cygdrive for fixpath to work.
52829      new_path="$CYGWIN_ROOT_PATH$input_path"
52830    fi
52831  fi
52832
52833
52834  if test "x$path" != "x$new_path"; then
52835    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52838  fi
52839
52840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52841
52842  path="$POTENTIAL_FREETYPE_LIB_PATH"
52843  has_colon=`$ECHO $path | $GREP ^.:`
52844  new_path="$path"
52845  if test "x$has_colon" = x; then
52846    # Not in mixed or Windows style, start by that.
52847    new_path=`cmd //c echo $path`
52848  fi
52849
52850
52851  input_path="$new_path"
52852  # Check if we need to convert this using DOS-style short mode. If the path
52853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52854  # take no chances and rewrite it.
52855  # Note: m4 eats our [], so we need to use [ and ] instead.
52856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52857  if test "x$has_forbidden_chars" != x; then
52858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52860  fi
52861
52862
52863  windows_path="$new_path"
52864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52865    unix_path=`$CYGPATH -u "$windows_path"`
52866    new_path="$unix_path"
52867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52869    new_path="$unix_path"
52870  fi
52871
52872  if test "x$path" != "x$new_path"; then
52873    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52876  fi
52877
52878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52880
52881    else
52882      # We're on a unix platform. Hooray! :)
52883      path="$POTENTIAL_FREETYPE_LIB_PATH"
52884      has_space=`$ECHO "$path" | $GREP " "`
52885      if test "x$has_space" != x; then
52886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52889      fi
52890
52891      # Use eval to expand a potential ~
52892      eval path="$path"
52893      if test ! -f "$path" && test ! -d "$path"; then
52894        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52895      fi
52896
52897      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52898    fi
52899  fi
52900
52901
52902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52904$as_echo_n "checking for freetype includes... " >&6; }
52905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52909$as_echo_n "checking for freetype libraries... " >&6; }
52910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52911$as_echo "$FREETYPE_LIB_PATH" >&6; }
52912  fi
52913
52914              fi
52915            fi
52916          fi
52917        fi
52918      fi # end check in well-known locations
52919
52920      if test "x$FOUND_FREETYPE" != xyes; then
52921
52922  # Print a helpful message on how to acquire the necessary build dependency.
52923  # freetype is the help tag: freetype, cups, alsa etc
52924  MISSING_DEPENDENCY=freetype
52925
52926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52927    cygwin_help $MISSING_DEPENDENCY
52928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52929    msys_help $MISSING_DEPENDENCY
52930  else
52931    PKGHANDLER_COMMAND=
52932
52933    case $PKGHANDLER in
52934      apt-get)
52935        apt_help     $MISSING_DEPENDENCY ;;
52936      yum)
52937        yum_help     $MISSING_DEPENDENCY ;;
52938      port)
52939        port_help    $MISSING_DEPENDENCY ;;
52940      pkgutil)
52941        pkgutil_help $MISSING_DEPENDENCY ;;
52942      pkgadd)
52943        pkgadd_help  $MISSING_DEPENDENCY ;;
52944    esac
52945
52946    if test "x$PKGHANDLER_COMMAND" != x; then
52947      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52948    fi
52949  fi
52950
52951        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
52952      fi
52953    fi # end user specified settings
52954
52955    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
52956    if test "x$FREETYPE_CFLAGS" = x; then
52957
52958  # Only process if variable expands to non-empty
52959
52960  if test "x$FREETYPE_INCLUDE_PATH" != x; then
52961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52962
52963  # Input might be given as Windows format, start by converting to
52964  # unix format.
52965  path="$FREETYPE_INCLUDE_PATH"
52966  new_path=`$CYGPATH -u "$path"`
52967
52968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52971  # "foo.exe" is OK but "foo" is an error.
52972  #
52973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52974  # It is also a way to make sure we got the proper file name for the real test later on.
52975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52976  if test "x$test_shortpath" = x; then
52977    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52978$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52979    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
52980  fi
52981
52982  # Call helper function which possibly converts this using DOS-style short mode.
52983  # If so, the updated path is stored in $new_path.
52984
52985  input_path="$new_path"
52986  # Check if we need to convert this using DOS-style short mode. If the path
52987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52988  # take no chances and rewrite it.
52989  # Note: m4 eats our [], so we need to use [ and ] instead.
52990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52991  if test "x$has_forbidden_chars" != x; then
52992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52996      # Going to short mode and back again did indeed matter. Since short mode is
52997      # case insensitive, let's make it lowercase to improve readability.
52998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52999      # Now convert it back to Unix-style (cygpath)
53000      input_path=`$CYGPATH -u "$shortmode_path"`
53001      new_path="$input_path"
53002    fi
53003  fi
53004
53005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53006  if test "x$test_cygdrive_prefix" = x; then
53007    # As a simple fix, exclude /usr/bin since it's not a real path.
53008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53010      # a path prefixed by /cygdrive for fixpath to work.
53011      new_path="$CYGWIN_ROOT_PATH$input_path"
53012    fi
53013  fi
53014
53015
53016  if test "x$path" != "x$new_path"; then
53017    FREETYPE_INCLUDE_PATH="$new_path"
53018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53019$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53020  fi
53021
53022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53023
53024  path="$FREETYPE_INCLUDE_PATH"
53025  has_colon=`$ECHO $path | $GREP ^.:`
53026  new_path="$path"
53027  if test "x$has_colon" = x; then
53028    # Not in mixed or Windows style, start by that.
53029    new_path=`cmd //c echo $path`
53030  fi
53031
53032
53033  input_path="$new_path"
53034  # Check if we need to convert this using DOS-style short mode. If the path
53035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53036  # take no chances and rewrite it.
53037  # Note: m4 eats our [], so we need to use [ and ] instead.
53038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53039  if test "x$has_forbidden_chars" != x; then
53040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53042  fi
53043
53044
53045  windows_path="$new_path"
53046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53047    unix_path=`$CYGPATH -u "$windows_path"`
53048    new_path="$unix_path"
53049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53051    new_path="$unix_path"
53052  fi
53053
53054  if test "x$path" != "x$new_path"; then
53055    FREETYPE_INCLUDE_PATH="$new_path"
53056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53057$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53058  fi
53059
53060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53062
53063    else
53064      # We're on a unix platform. Hooray! :)
53065      path="$FREETYPE_INCLUDE_PATH"
53066      has_space=`$ECHO "$path" | $GREP " "`
53067      if test "x$has_space" != x; then
53068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53069$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53070        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53071      fi
53072
53073      # Use eval to expand a potential ~
53074      eval path="$path"
53075      if test ! -f "$path" && test ! -d "$path"; then
53076        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53077      fi
53078
53079      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53080    fi
53081  fi
53082
53083      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53084        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53085      else
53086        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53087      fi
53088    fi
53089
53090    if test "x$FREETYPE_LIBS" = x; then
53091
53092  # Only process if variable expands to non-empty
53093
53094  if test "x$FREETYPE_LIB_PATH" != x; then
53095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53096
53097  # Input might be given as Windows format, start by converting to
53098  # unix format.
53099  path="$FREETYPE_LIB_PATH"
53100  new_path=`$CYGPATH -u "$path"`
53101
53102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53105  # "foo.exe" is OK but "foo" is an error.
53106  #
53107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53108  # It is also a way to make sure we got the proper file name for the real test later on.
53109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53110  if test "x$test_shortpath" = x; then
53111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53112$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53113    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53114  fi
53115
53116  # Call helper function which possibly converts this using DOS-style short mode.
53117  # If so, the updated path is stored in $new_path.
53118
53119  input_path="$new_path"
53120  # Check if we need to convert this using DOS-style short mode. If the path
53121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53122  # take no chances and rewrite it.
53123  # Note: m4 eats our [], so we need to use [ and ] instead.
53124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53125  if test "x$has_forbidden_chars" != x; then
53126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53130      # Going to short mode and back again did indeed matter. Since short mode is
53131      # case insensitive, let's make it lowercase to improve readability.
53132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53133      # Now convert it back to Unix-style (cygpath)
53134      input_path=`$CYGPATH -u "$shortmode_path"`
53135      new_path="$input_path"
53136    fi
53137  fi
53138
53139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53140  if test "x$test_cygdrive_prefix" = x; then
53141    # As a simple fix, exclude /usr/bin since it's not a real path.
53142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53144      # a path prefixed by /cygdrive for fixpath to work.
53145      new_path="$CYGWIN_ROOT_PATH$input_path"
53146    fi
53147  fi
53148
53149
53150  if test "x$path" != "x$new_path"; then
53151    FREETYPE_LIB_PATH="$new_path"
53152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53153$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53154  fi
53155
53156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53157
53158  path="$FREETYPE_LIB_PATH"
53159  has_colon=`$ECHO $path | $GREP ^.:`
53160  new_path="$path"
53161  if test "x$has_colon" = x; then
53162    # Not in mixed or Windows style, start by that.
53163    new_path=`cmd //c echo $path`
53164  fi
53165
53166
53167  input_path="$new_path"
53168  # Check if we need to convert this using DOS-style short mode. If the path
53169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53170  # take no chances and rewrite it.
53171  # Note: m4 eats our [], so we need to use [ and ] instead.
53172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53173  if test "x$has_forbidden_chars" != x; then
53174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53176  fi
53177
53178
53179  windows_path="$new_path"
53180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53181    unix_path=`$CYGPATH -u "$windows_path"`
53182    new_path="$unix_path"
53183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53185    new_path="$unix_path"
53186  fi
53187
53188  if test "x$path" != "x$new_path"; then
53189    FREETYPE_LIB_PATH="$new_path"
53190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53191$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53192  fi
53193
53194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53196
53197    else
53198      # We're on a unix platform. Hooray! :)
53199      path="$FREETYPE_LIB_PATH"
53200      has_space=`$ECHO "$path" | $GREP " "`
53201      if test "x$has_space" != x; then
53202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53203$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53205      fi
53206
53207      # Use eval to expand a potential ~
53208      eval path="$path"
53209      if test ! -f "$path" && test ! -d "$path"; then
53210        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53211      fi
53212
53213      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53214    fi
53215  fi
53216
53217      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53218        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53219      else
53220        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53221      fi
53222    fi
53223
53224    # Try to compile it
53225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53226$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53227    ac_ext=cpp
53228ac_cpp='$CXXCPP $CPPFLAGS'
53229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53232
53233    PREV_CXXCFLAGS="$CXXFLAGS"
53234    PREV_LIBS="$LIBS"
53235    PREV_CXX="$CXX"
53236    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53237    LIBS="$LIBS $FREETYPE_LIBS"
53238    CXX="$FIXPATH $CXX"
53239    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53240/* end confdefs.h.  */
53241
53242          #include<ft2build.h>
53243          #include FT_FREETYPE_H
53244          int main () {
53245            FT_Init_FreeType(NULL);
53246            return 0;
53247          }
53248
53249_ACEOF
53250if ac_fn_cxx_try_link "$LINENO"; then :
53251
53252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53253$as_echo "yes" >&6; }
53254
53255else
53256
53257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53258$as_echo "no" >&6; }
53259          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53260$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53261          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53262$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53263
53264
53265  # Print a helpful message on how to acquire the necessary build dependency.
53266  # freetype is the help tag: freetype, cups, alsa etc
53267  MISSING_DEPENDENCY=freetype
53268
53269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53270    cygwin_help $MISSING_DEPENDENCY
53271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53272    msys_help $MISSING_DEPENDENCY
53273  else
53274    PKGHANDLER_COMMAND=
53275
53276    case $PKGHANDLER in
53277      apt-get)
53278        apt_help     $MISSING_DEPENDENCY ;;
53279      yum)
53280        yum_help     $MISSING_DEPENDENCY ;;
53281      port)
53282        port_help    $MISSING_DEPENDENCY ;;
53283      pkgutil)
53284        pkgutil_help $MISSING_DEPENDENCY ;;
53285      pkgadd)
53286        pkgadd_help  $MISSING_DEPENDENCY ;;
53287    esac
53288
53289    if test "x$PKGHANDLER_COMMAND" != x; then
53290      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53291    fi
53292  fi
53293
53294
53295          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53296
53297
53298fi
53299rm -f core conftest.err conftest.$ac_objext \
53300    conftest$ac_exeext conftest.$ac_ext
53301    CXXCFLAGS="$PREV_CXXFLAGS"
53302    LIBS="$PREV_LIBS"
53303    CXX="$PREV_CXX"
53304    ac_ext=cpp
53305ac_cpp='$CXXCPP $CPPFLAGS'
53306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53309
53310
53311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53312$as_echo_n "checking if we should bundle freetype... " >&6; }
53313    if test "x$BUNDLE_FREETYPE" = xyes; then
53314      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53315    fi
53316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53317$as_echo "$BUNDLE_FREETYPE" >&6; }
53318
53319  fi # end freetype needed
53320
53321
53322
53323
53324
53325
53326
53327# Check whether --with-alsa was given.
53328if test "${with_alsa+set}" = set; then :
53329  withval=$with_alsa;
53330fi
53331
53332
53333# Check whether --with-alsa-include was given.
53334if test "${with_alsa_include+set}" = set; then :
53335  withval=$with_alsa_include;
53336fi
53337
53338
53339# Check whether --with-alsa-lib was given.
53340if test "${with_alsa_lib+set}" = set; then :
53341  withval=$with_alsa_lib;
53342fi
53343
53344
53345  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53346    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53347        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53348        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53349      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53350$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53351    fi
53352    ALSA_CFLAGS=
53353    ALSA_LIBS=
53354  else
53355    ALSA_FOUND=no
53356
53357    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53358      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53359    fi
53360
53361    if test "x${with_alsa}" != x; then
53362      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53363      ALSA_CFLAGS="-I${with_alsa}/include"
53364      ALSA_FOUND=yes
53365    fi
53366    if test "x${with_alsa_include}" != x; then
53367      ALSA_CFLAGS="-I${with_alsa_include}"
53368      ALSA_FOUND=yes
53369    fi
53370    if test "x${with_alsa_lib}" != x; then
53371      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53372      ALSA_FOUND=yes
53373    fi
53374    # Do not try pkg-config if we have a sysroot set.
53375    if test "x$SYSROOT" = x; then
53376      if test "x$ALSA_FOUND" = xno; then
53377
53378pkg_failed=no
53379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53380$as_echo_n "checking for ALSA... " >&6; }
53381
53382if test -n "$ALSA_CFLAGS"; then
53383    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53384 elif test -n "$PKG_CONFIG"; then
53385    if test -n "$PKG_CONFIG" && \
53386    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53387  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53388  ac_status=$?
53389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53390  test $ac_status = 0; }; then
53391  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53392else
53393  pkg_failed=yes
53394fi
53395 else
53396    pkg_failed=untried
53397fi
53398if test -n "$ALSA_LIBS"; then
53399    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53400 elif test -n "$PKG_CONFIG"; then
53401    if test -n "$PKG_CONFIG" && \
53402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53403  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53404  ac_status=$?
53405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53406  test $ac_status = 0; }; then
53407  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53408else
53409  pkg_failed=yes
53410fi
53411 else
53412    pkg_failed=untried
53413fi
53414
53415
53416
53417if test $pkg_failed = yes; then
53418
53419if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53420        _pkg_short_errors_supported=yes
53421else
53422        _pkg_short_errors_supported=no
53423fi
53424        if test $_pkg_short_errors_supported = yes; then
53425	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53426        else
53427	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53428        fi
53429	# Put the nasty error message in config.log where it belongs
53430	echo "$ALSA_PKG_ERRORS" >&5
53431
53432	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53433$as_echo "no" >&6; }
53434                ALSA_FOUND=no
53435elif test $pkg_failed = untried; then
53436	ALSA_FOUND=no
53437else
53438	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53439	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53441$as_echo "yes" >&6; }
53442	ALSA_FOUND=yes
53443fi
53444      fi
53445    fi
53446    if test "x$ALSA_FOUND" = xno; then
53447      for ac_header in alsa/asoundlib.h
53448do :
53449  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53450if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53451  cat >>confdefs.h <<_ACEOF
53452#define HAVE_ALSA_ASOUNDLIB_H 1
53453_ACEOF
53454
53455            ALSA_FOUND=yes
53456            ALSA_CFLAGS=-Iignoreme
53457            ALSA_LIBS=-lasound
53458            DEFAULT_ALSA=yes
53459
53460else
53461  ALSA_FOUND=no
53462
53463fi
53464
53465done
53466
53467    fi
53468    if test "x$ALSA_FOUND" = xno; then
53469
53470  # Print a helpful message on how to acquire the necessary build dependency.
53471  # alsa is the help tag: freetype, cups, alsa etc
53472  MISSING_DEPENDENCY=alsa
53473
53474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53475    cygwin_help $MISSING_DEPENDENCY
53476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53477    msys_help $MISSING_DEPENDENCY
53478  else
53479    PKGHANDLER_COMMAND=
53480
53481    case $PKGHANDLER in
53482      apt-get)
53483        apt_help     $MISSING_DEPENDENCY ;;
53484      yum)
53485        yum_help     $MISSING_DEPENDENCY ;;
53486      port)
53487        port_help    $MISSING_DEPENDENCY ;;
53488      pkgutil)
53489        pkgutil_help $MISSING_DEPENDENCY ;;
53490      pkgadd)
53491        pkgadd_help  $MISSING_DEPENDENCY ;;
53492    esac
53493
53494    if test "x$PKGHANDLER_COMMAND" != x; then
53495      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53496    fi
53497  fi
53498
53499      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53500    fi
53501  fi
53502
53503
53504
53505
53506
53507
53508# Check whether --with-libffi was given.
53509if test "${with_libffi+set}" = set; then :
53510  withval=$with_libffi;
53511fi
53512
53513
53514# Check whether --with-libffi-include was given.
53515if test "${with_libffi_include+set}" = set; then :
53516  withval=$with_libffi_include;
53517fi
53518
53519
53520# Check whether --with-libffi-lib was given.
53521if test "${with_libffi_lib+set}" = set; then :
53522  withval=$with_libffi_lib;
53523fi
53524
53525
53526  if test "x$NEEDS_LIB_FFI" = xfalse; then
53527    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53528        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53529        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53530      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53531$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53532    fi
53533    LIBFFI_CFLAGS=
53534    LIBFFI_LIBS=
53535  else
53536    LIBFFI_FOUND=no
53537
53538    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53539      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53540    fi
53541
53542    if test "x${with_libffi}" != x; then
53543      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53544      LIBFFI_CFLAGS="-I${with_libffi}/include"
53545      LIBFFI_FOUND=yes
53546    fi
53547    if test "x${with_libffi_include}" != x; then
53548      LIBFFI_CFLAGS="-I${with_libffi_include}"
53549      LIBFFI_FOUND=yes
53550    fi
53551    if test "x${with_libffi_lib}" != x; then
53552      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53553      LIBFFI_FOUND=yes
53554    fi
53555    # Do not try pkg-config if we have a sysroot set.
53556    if test "x$SYSROOT" = x; then
53557      if test "x$LIBFFI_FOUND" = xno; then
53558        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53559
53560pkg_failed=no
53561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53562$as_echo_n "checking for LIBFFI... " >&6; }
53563
53564if test -n "$LIBFFI_CFLAGS"; then
53565    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53566 elif test -n "$PKG_CONFIG"; then
53567    if test -n "$PKG_CONFIG" && \
53568    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53569  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53570  ac_status=$?
53571  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53572  test $ac_status = 0; }; then
53573  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53574else
53575  pkg_failed=yes
53576fi
53577 else
53578    pkg_failed=untried
53579fi
53580if test -n "$LIBFFI_LIBS"; then
53581    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53582 elif test -n "$PKG_CONFIG"; then
53583    if test -n "$PKG_CONFIG" && \
53584    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53585  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53586  ac_status=$?
53587  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53588  test $ac_status = 0; }; then
53589  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53590else
53591  pkg_failed=yes
53592fi
53593 else
53594    pkg_failed=untried
53595fi
53596
53597
53598
53599if test $pkg_failed = yes; then
53600
53601if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53602        _pkg_short_errors_supported=yes
53603else
53604        _pkg_short_errors_supported=no
53605fi
53606        if test $_pkg_short_errors_supported = yes; then
53607	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53608        else
53609	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53610        fi
53611	# Put the nasty error message in config.log where it belongs
53612	echo "$LIBFFI_PKG_ERRORS" >&5
53613
53614	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53615$as_echo "no" >&6; }
53616                LIBFFI_FOUND=no
53617elif test $pkg_failed = untried; then
53618	LIBFFI_FOUND=no
53619else
53620	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53621	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53623$as_echo "yes" >&6; }
53624	LIBFFI_FOUND=yes
53625fi
53626      fi
53627    fi
53628    if test "x$LIBFFI_FOUND" = xno; then
53629      for ac_header in ffi.h
53630do :
53631  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53632if test "x$ac_cv_header_ffi_h" = xyes; then :
53633  cat >>confdefs.h <<_ACEOF
53634#define HAVE_FFI_H 1
53635_ACEOF
53636
53637            LIBFFI_FOUND=yes
53638            LIBFFI_CFLAGS=
53639            LIBFFI_LIBS=-lffi
53640
53641else
53642  LIBFFI_FOUND=no
53643
53644fi
53645
53646done
53647
53648    fi
53649    if test "x$LIBFFI_FOUND" = xno; then
53650
53651  # Print a helpful message on how to acquire the necessary build dependency.
53652  # ffi is the help tag: freetype, cups, alsa etc
53653  MISSING_DEPENDENCY=ffi
53654
53655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53656    cygwin_help $MISSING_DEPENDENCY
53657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53658    msys_help $MISSING_DEPENDENCY
53659  else
53660    PKGHANDLER_COMMAND=
53661
53662    case $PKGHANDLER in
53663      apt-get)
53664        apt_help     $MISSING_DEPENDENCY ;;
53665      yum)
53666        yum_help     $MISSING_DEPENDENCY ;;
53667      port)
53668        port_help    $MISSING_DEPENDENCY ;;
53669      pkgutil)
53670        pkgutil_help $MISSING_DEPENDENCY ;;
53671      pkgadd)
53672        pkgadd_help  $MISSING_DEPENDENCY ;;
53673    esac
53674
53675    if test "x$PKGHANDLER_COMMAND" != x; then
53676      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53677    fi
53678  fi
53679
53680      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53681    fi
53682
53683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53684$as_echo_n "checking if libffi works... " >&6; }
53685    ac_ext=c
53686ac_cpp='$CPP $CPPFLAGS'
53687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53689ac_compiler_gnu=$ac_cv_c_compiler_gnu
53690
53691    OLD_CFLAGS="$CFLAGS"
53692    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53693    OLD_LIBS="$LIBS"
53694    LIBS="$LIBS $LIBFFI_LIBS"
53695    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53696/* end confdefs.h.  */
53697#include <ffi.h>
53698int
53699main ()
53700{
53701
53702          ffi_call(NULL, NULL, NULL, NULL);
53703          return 0;
53704
53705  ;
53706  return 0;
53707}
53708_ACEOF
53709if ac_fn_c_try_link "$LINENO"; then :
53710  LIBFFI_WORKS=yes
53711else
53712  LIBFFI_WORKS=no
53713
53714fi
53715rm -f core conftest.err conftest.$ac_objext \
53716    conftest$ac_exeext conftest.$ac_ext
53717    CFLAGS="$OLD_CFLAGS"
53718    LIBS="$OLD_LIBS"
53719    ac_ext=cpp
53720ac_cpp='$CXXCPP $CPPFLAGS'
53721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53724
53725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53726$as_echo "$LIBFFI_WORKS" >&6; }
53727
53728    if test "x$LIBFFI_WORKS" = xno; then
53729
53730  # Print a helpful message on how to acquire the necessary build dependency.
53731  # ffi is the help tag: freetype, cups, alsa etc
53732  MISSING_DEPENDENCY=ffi
53733
53734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53735    cygwin_help $MISSING_DEPENDENCY
53736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53737    msys_help $MISSING_DEPENDENCY
53738  else
53739    PKGHANDLER_COMMAND=
53740
53741    case $PKGHANDLER in
53742      apt-get)
53743        apt_help     $MISSING_DEPENDENCY ;;
53744      yum)
53745        yum_help     $MISSING_DEPENDENCY ;;
53746      port)
53747        port_help    $MISSING_DEPENDENCY ;;
53748      pkgutil)
53749        pkgutil_help $MISSING_DEPENDENCY ;;
53750      pkgadd)
53751        pkgadd_help  $MISSING_DEPENDENCY ;;
53752    esac
53753
53754    if test "x$PKGHANDLER_COMMAND" != x; then
53755      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53756    fi
53757  fi
53758
53759      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53760    fi
53761  fi
53762
53763
53764
53765
53766
53767  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53768    # Extract the first word of "llvm-config", so it can be a program name with args.
53769set dummy llvm-config; ac_word=$2
53770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53771$as_echo_n "checking for $ac_word... " >&6; }
53772if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53773  $as_echo_n "(cached) " >&6
53774else
53775  if test -n "$LLVM_CONFIG"; then
53776  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53777else
53778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53779for as_dir in $PATH
53780do
53781  IFS=$as_save_IFS
53782  test -z "$as_dir" && as_dir=.
53783    for ac_exec_ext in '' $ac_executable_extensions; do
53784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53785    ac_cv_prog_LLVM_CONFIG="llvm-config"
53786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53787    break 2
53788  fi
53789done
53790  done
53791IFS=$as_save_IFS
53792
53793fi
53794fi
53795LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53796if test -n "$LLVM_CONFIG"; then
53797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53798$as_echo "$LLVM_CONFIG" >&6; }
53799else
53800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53801$as_echo "no" >&6; }
53802fi
53803
53804
53805
53806    if test "x$LLVM_CONFIG" != xllvm-config; then
53807      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53808    fi
53809
53810    llvm_components="jit mcjit engine nativecodegen native"
53811    unset LLVM_CFLAGS
53812    for flag in $("$LLVM_CONFIG" --cxxflags); do
53813      if echo "${flag}" | grep -q '^-[ID]'; then
53814        if test "${flag}" != "-D_DEBUG" ; then
53815          if test "${LLVM_CFLAGS}" != "" ; then
53816            LLVM_CFLAGS="${LLVM_CFLAGS} "
53817          fi
53818          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53819        fi
53820      fi
53821    done
53822    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53823    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53824
53825    unset LLVM_LDFLAGS
53826    for flag in $("${LLVM_CONFIG}" --ldflags); do
53827      if echo "${flag}" | grep -q '^-L'; then
53828        if test "${LLVM_LDFLAGS}" != ""; then
53829          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53830        fi
53831        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53832      fi
53833    done
53834
53835    unset LLVM_LIBS
53836    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53837      if echo "${flag}" | grep -q '^-l'; then
53838        if test "${LLVM_LIBS}" != ""; then
53839          LLVM_LIBS="${LLVM_LIBS} "
53840        fi
53841        LLVM_LIBS="${LLVM_LIBS}${flag}"
53842      fi
53843    done
53844
53845
53846
53847
53848  fi
53849
53850
53851
53852# Check whether --with-libjpeg was given.
53853if test "${with_libjpeg+set}" = set; then :
53854  withval=$with_libjpeg;
53855fi
53856
53857
53858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
53859$as_echo_n "checking for which libjpeg to use... " >&6; }
53860  # default is bundled
53861  DEFAULT_LIBJPEG=bundled
53862  # if user didn't specify, use DEFAULT_LIBJPEG
53863  if test "x${with_libjpeg}" = "x"; then
53864    with_libjpeg=${DEFAULT_LIBJPEG}
53865  fi
53866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
53867$as_echo "${with_libjpeg}" >&6; }
53868
53869  if test "x${with_libjpeg}" = "xbundled"; then
53870    USE_EXTERNAL_LIBJPEG=false
53871  elif test "x${with_libjpeg}" = "xsystem"; then
53872    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
53873if test "x$ac_cv_header_jpeglib_h" = xyes; then :
53874
53875else
53876   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
53877fi
53878
53879
53880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
53881$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
53882if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
53883  $as_echo_n "(cached) " >&6
53884else
53885  ac_check_lib_save_LIBS=$LIBS
53886LIBS="-ljpeg  $LIBS"
53887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53888/* end confdefs.h.  */
53889
53890/* Override any GCC internal prototype to avoid an error.
53891   Use char because int might match the return type of a GCC
53892   builtin and then its argument prototype would still apply.  */
53893#ifdef __cplusplus
53894extern "C"
53895#endif
53896char jpeg_CreateDecompress ();
53897int
53898main ()
53899{
53900return jpeg_CreateDecompress ();
53901  ;
53902  return 0;
53903}
53904_ACEOF
53905if ac_fn_cxx_try_link "$LINENO"; then :
53906  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
53907else
53908  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
53909fi
53910rm -f core conftest.err conftest.$ac_objext \
53911    conftest$ac_exeext conftest.$ac_ext
53912LIBS=$ac_check_lib_save_LIBS
53913fi
53914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
53915$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
53916if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
53917  cat >>confdefs.h <<_ACEOF
53918#define HAVE_LIBJPEG 1
53919_ACEOF
53920
53921  LIBS="-ljpeg $LIBS"
53922
53923else
53924   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
53925fi
53926
53927
53928    USE_EXTERNAL_LIBJPEG=true
53929  else
53930    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
53931  fi
53932
53933
53934
53935
53936
53937# Check whether --with-giflib was given.
53938if test "${with_giflib+set}" = set; then :
53939  withval=$with_giflib;
53940fi
53941
53942
53943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
53944$as_echo_n "checking for which giflib to use... " >&6; }
53945  # default is bundled
53946  DEFAULT_GIFLIB=bundled
53947  # if user didn't specify, use DEFAULT_GIFLIB
53948  if test "x${with_giflib}" = "x"; then
53949    with_giflib=${DEFAULT_GIFLIB}
53950  fi
53951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
53952$as_echo "${with_giflib}" >&6; }
53953
53954  if test "x${with_giflib}" = "xbundled"; then
53955    USE_EXTERNAL_LIBGIF=false
53956  elif test "x${with_giflib}" = "xsystem"; then
53957    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
53958if test "x$ac_cv_header_gif_lib_h" = xyes; then :
53959
53960else
53961   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
53962fi
53963
53964
53965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
53966$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
53967if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
53968  $as_echo_n "(cached) " >&6
53969else
53970  ac_check_lib_save_LIBS=$LIBS
53971LIBS="-lgif  $LIBS"
53972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53973/* end confdefs.h.  */
53974
53975/* Override any GCC internal prototype to avoid an error.
53976   Use char because int might match the return type of a GCC
53977   builtin and then its argument prototype would still apply.  */
53978#ifdef __cplusplus
53979extern "C"
53980#endif
53981char DGifGetCode ();
53982int
53983main ()
53984{
53985return DGifGetCode ();
53986  ;
53987  return 0;
53988}
53989_ACEOF
53990if ac_fn_cxx_try_link "$LINENO"; then :
53991  ac_cv_lib_gif_DGifGetCode=yes
53992else
53993  ac_cv_lib_gif_DGifGetCode=no
53994fi
53995rm -f core conftest.err conftest.$ac_objext \
53996    conftest$ac_exeext conftest.$ac_ext
53997LIBS=$ac_check_lib_save_LIBS
53998fi
53999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54000$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54001if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54002  cat >>confdefs.h <<_ACEOF
54003#define HAVE_LIBGIF 1
54004_ACEOF
54005
54006  LIBS="-lgif $LIBS"
54007
54008else
54009   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54010fi
54011
54012
54013    USE_EXTERNAL_LIBGIF=true
54014  else
54015    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54016  fi
54017
54018
54019
54020
54021
54022# Check whether --with-libpng was given.
54023if test "${with_libpng+set}" = set; then :
54024  withval=$with_libpng;
54025fi
54026
54027
54028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54029$as_echo_n "checking for which libpng to use... " >&6; }
54030
54031  # default is bundled
54032  DEFAULT_LIBPNG=bundled
54033  # if user didn't specify, use DEFAULT_LIBPNG
54034  if test "x${with_libpng}" = "x"; then
54035      with_libpng=${DEFAULT_LIBPNG}
54036  fi
54037
54038  if test "x${with_libpng}" = "xbundled"; then
54039      USE_EXTERNAL_LIBPNG=false
54040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54041$as_echo "bundled" >&6; }
54042  elif test "x${with_libpng}" = "xsystem"; then
54043
54044pkg_failed=no
54045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54046$as_echo_n "checking for PNG... " >&6; }
54047
54048if test -n "$PNG_CFLAGS"; then
54049    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54050 elif test -n "$PKG_CONFIG"; then
54051    if test -n "$PKG_CONFIG" && \
54052    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54053  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54054  ac_status=$?
54055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54056  test $ac_status = 0; }; then
54057  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54058else
54059  pkg_failed=yes
54060fi
54061 else
54062    pkg_failed=untried
54063fi
54064if test -n "$PNG_LIBS"; then
54065    pkg_cv_PNG_LIBS="$PNG_LIBS"
54066 elif test -n "$PKG_CONFIG"; then
54067    if test -n "$PKG_CONFIG" && \
54068    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54069  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54070  ac_status=$?
54071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54072  test $ac_status = 0; }; then
54073  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54074else
54075  pkg_failed=yes
54076fi
54077 else
54078    pkg_failed=untried
54079fi
54080
54081
54082
54083if test $pkg_failed = yes; then
54084
54085if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54086        _pkg_short_errors_supported=yes
54087else
54088        _pkg_short_errors_supported=no
54089fi
54090        if test $_pkg_short_errors_supported = yes; then
54091	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54092        else
54093	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54094        fi
54095	# Put the nasty error message in config.log where it belongs
54096	echo "$PNG_PKG_ERRORS" >&5
54097
54098	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54099$as_echo "no" >&6; }
54100                 LIBPNG_FOUND=no
54101elif test $pkg_failed = untried; then
54102	 LIBPNG_FOUND=no
54103else
54104	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54105	PNG_LIBS=$pkg_cv_PNG_LIBS
54106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54107$as_echo "yes" >&6; }
54108	 LIBPNG_FOUND=yes
54109fi
54110      if test "x${LIBPNG_FOUND}" = "xyes"; then
54111          USE_EXTERNAL_LIBPNG=true
54112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54113$as_echo "system" >&6; }
54114      else
54115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54116$as_echo "system not found" >&6; }
54117          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54118      fi
54119  else
54120      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54121  fi
54122
54123
54124
54125
54126
54127# Check whether --with-zlib was given.
54128if test "${with_zlib+set}" = set; then :
54129  withval=$with_zlib;
54130fi
54131
54132
54133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54134$as_echo_n "checking for compress in -lz... " >&6; }
54135if ${ac_cv_lib_z_compress+:} false; then :
54136  $as_echo_n "(cached) " >&6
54137else
54138  ac_check_lib_save_LIBS=$LIBS
54139LIBS="-lz  $LIBS"
54140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54141/* end confdefs.h.  */
54142
54143/* Override any GCC internal prototype to avoid an error.
54144   Use char because int might match the return type of a GCC
54145   builtin and then its argument prototype would still apply.  */
54146#ifdef __cplusplus
54147extern "C"
54148#endif
54149char compress ();
54150int
54151main ()
54152{
54153return compress ();
54154  ;
54155  return 0;
54156}
54157_ACEOF
54158if ac_fn_cxx_try_link "$LINENO"; then :
54159  ac_cv_lib_z_compress=yes
54160else
54161  ac_cv_lib_z_compress=no
54162fi
54163rm -f core conftest.err conftest.$ac_objext \
54164    conftest$ac_exeext conftest.$ac_ext
54165LIBS=$ac_check_lib_save_LIBS
54166fi
54167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54168$as_echo "$ac_cv_lib_z_compress" >&6; }
54169if test "x$ac_cv_lib_z_compress" = xyes; then :
54170   ZLIB_FOUND=yes
54171else
54172   ZLIB_FOUND=no
54173fi
54174
54175
54176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54177$as_echo_n "checking for which zlib to use... " >&6; }
54178
54179  DEFAULT_ZLIB=bundled
54180  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54181    # On macosx default is system...on others default is bundled
54182    DEFAULT_ZLIB=system
54183  fi
54184
54185  if test "x${ZLIB_FOUND}" != "xyes"; then
54186    # If we don't find any system...set default to bundled
54187    DEFAULT_ZLIB=bundled
54188  fi
54189
54190  # If user didn't specify, use DEFAULT_ZLIB
54191  if test "x${with_zlib}" = "x"; then
54192    with_zlib=${DEFAULT_ZLIB}
54193  fi
54194
54195  if test "x${with_zlib}" = "xbundled"; then
54196    USE_EXTERNAL_LIBZ=false
54197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54198$as_echo "bundled" >&6; }
54199  elif test "x${with_zlib}" = "xsystem"; then
54200    if test "x${ZLIB_FOUND}" = "xyes"; then
54201      USE_EXTERNAL_LIBZ=true
54202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54203$as_echo "system" >&6; }
54204    else
54205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54206$as_echo "system not found" >&6; }
54207      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54208    fi
54209  else
54210    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54211  fi
54212
54213
54214
54215
54216
54217# Check whether --with-lcms was given.
54218if test "${with_lcms+set}" = set; then :
54219  withval=$with_lcms;
54220fi
54221
54222
54223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54224$as_echo_n "checking for which lcms to use... " >&6; }
54225
54226  DEFAULT_LCMS=bundled
54227  # If user didn't specify, use DEFAULT_LCMS
54228  if test "x${with_lcms}" = "x"; then
54229      with_lcms=${DEFAULT_LCMS}
54230  fi
54231
54232  if test "x${with_lcms}" = "xbundled"; then
54233    USE_EXTERNAL_LCMS=false
54234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54235$as_echo "bundled" >&6; }
54236  elif test "x${with_lcms}" = "xsystem"; then
54237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54238$as_echo "system" >&6; }
54239
54240pkg_failed=no
54241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54242$as_echo_n "checking for LCMS... " >&6; }
54243
54244if test -n "$LCMS_CFLAGS"; then
54245    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54246 elif test -n "$PKG_CONFIG"; then
54247    if test -n "$PKG_CONFIG" && \
54248    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54249  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54250  ac_status=$?
54251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54252  test $ac_status = 0; }; then
54253  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54254else
54255  pkg_failed=yes
54256fi
54257 else
54258    pkg_failed=untried
54259fi
54260if test -n "$LCMS_LIBS"; then
54261    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54262 elif test -n "$PKG_CONFIG"; then
54263    if test -n "$PKG_CONFIG" && \
54264    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54265  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54266  ac_status=$?
54267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54268  test $ac_status = 0; }; then
54269  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54270else
54271  pkg_failed=yes
54272fi
54273 else
54274    pkg_failed=untried
54275fi
54276
54277
54278
54279if test $pkg_failed = yes; then
54280
54281if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54282        _pkg_short_errors_supported=yes
54283else
54284        _pkg_short_errors_supported=no
54285fi
54286        if test $_pkg_short_errors_supported = yes; then
54287	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54288        else
54289	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54290        fi
54291	# Put the nasty error message in config.log where it belongs
54292	echo "$LCMS_PKG_ERRORS" >&5
54293
54294	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54295$as_echo "no" >&6; }
54296                LCMS_FOUND=no
54297elif test $pkg_failed = untried; then
54298	LCMS_FOUND=no
54299else
54300	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54301	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54303$as_echo "yes" >&6; }
54304	LCMS_FOUND=yes
54305fi
54306    if test "x${LCMS_FOUND}" = "xyes"; then
54307      USE_EXTERNAL_LCMS=true
54308    else
54309      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54310    fi
54311  else
54312    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54313  fi
54314
54315
54316
54317
54318
54319
54320
54321
54322
54323
54324
54325  # Setup libm (the maths library)
54326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54327$as_echo_n "checking for cos in -lm... " >&6; }
54328if ${ac_cv_lib_m_cos+:} false; then :
54329  $as_echo_n "(cached) " >&6
54330else
54331  ac_check_lib_save_LIBS=$LIBS
54332LIBS="-lm  $LIBS"
54333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54334/* end confdefs.h.  */
54335
54336/* Override any GCC internal prototype to avoid an error.
54337   Use char because int might match the return type of a GCC
54338   builtin and then its argument prototype would still apply.  */
54339#ifdef __cplusplus
54340extern "C"
54341#endif
54342char cos ();
54343int
54344main ()
54345{
54346return cos ();
54347  ;
54348  return 0;
54349}
54350_ACEOF
54351if ac_fn_cxx_try_link "$LINENO"; then :
54352  ac_cv_lib_m_cos=yes
54353else
54354  ac_cv_lib_m_cos=no
54355fi
54356rm -f core conftest.err conftest.$ac_objext \
54357    conftest$ac_exeext conftest.$ac_ext
54358LIBS=$ac_check_lib_save_LIBS
54359fi
54360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54361$as_echo "$ac_cv_lib_m_cos" >&6; }
54362if test "x$ac_cv_lib_m_cos" = xyes; then :
54363  cat >>confdefs.h <<_ACEOF
54364#define HAVE_LIBM 1
54365_ACEOF
54366
54367  LIBS="-lm $LIBS"
54368
54369else
54370
54371      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54372$as_echo "$as_me: Maths library was not found" >&6;}
54373
54374fi
54375
54376  LIBM=-lm
54377
54378
54379  # Setup libdl (for dynamic library loading)
54380  save_LIBS="$LIBS"
54381  LIBS=""
54382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54383$as_echo_n "checking for dlopen in -ldl... " >&6; }
54384if ${ac_cv_lib_dl_dlopen+:} false; then :
54385  $as_echo_n "(cached) " >&6
54386else
54387  ac_check_lib_save_LIBS=$LIBS
54388LIBS="-ldl  $LIBS"
54389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54390/* end confdefs.h.  */
54391
54392/* Override any GCC internal prototype to avoid an error.
54393   Use char because int might match the return type of a GCC
54394   builtin and then its argument prototype would still apply.  */
54395#ifdef __cplusplus
54396extern "C"
54397#endif
54398char dlopen ();
54399int
54400main ()
54401{
54402return dlopen ();
54403  ;
54404  return 0;
54405}
54406_ACEOF
54407if ac_fn_cxx_try_link "$LINENO"; then :
54408  ac_cv_lib_dl_dlopen=yes
54409else
54410  ac_cv_lib_dl_dlopen=no
54411fi
54412rm -f core conftest.err conftest.$ac_objext \
54413    conftest$ac_exeext conftest.$ac_ext
54414LIBS=$ac_check_lib_save_LIBS
54415fi
54416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54417$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54418if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54419  cat >>confdefs.h <<_ACEOF
54420#define HAVE_LIBDL 1
54421_ACEOF
54422
54423  LIBS="-ldl $LIBS"
54424
54425fi
54426
54427  LIBDL="$LIBS"
54428
54429  LIBS="$save_LIBS"
54430
54431  # Deprecated libraries, keep the flags for backwards compatibility
54432  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54433
54434
54435# Check whether --with-dxsdk was given.
54436if test "${with_dxsdk+set}" = set; then :
54437  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54438$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54439fi
54440
54441
54442
54443
54444# Check whether --with-dxsdk-lib was given.
54445if test "${with_dxsdk_lib+set}" = set; then :
54446  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54447$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54448fi
54449
54450
54451
54452
54453# Check whether --with-dxsdk-include was given.
54454if test "${with_dxsdk_include+set}" = set; then :
54455  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54456$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54457fi
54458
54459
54460  fi
54461
54462  # Control if libzip can use mmap. Available for purposes of overriding.
54463  LIBZIP_CAN_USE_MMAP=true
54464
54465
54466
54467
54468
54469
54470
54471
54472
54473
54474
54475
54476
54477
54478###############################################################################
54479#
54480# We need to do some final tweaking, when everything else is done.
54481#
54482###############################################################################
54483
54484
54485  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54486
54487
54488  # The name of the Service Agent jar.
54489  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54490  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54491    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54492  fi
54493
54494
54495
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54497$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54498
54499    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54500      ENABLE_INTREE_EC=yes
54501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54502$as_echo "yes" >&6; }
54503    else
54504      ENABLE_INTREE_EC=no
54505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54506$as_echo "no" >&6; }
54507    fi
54508
54509
54510
54511
54512###############################################################################
54513#
54514# Configure parts of the build that only affect the build performance,
54515# not the result.
54516#
54517###############################################################################
54518
54519
54520  # How many cores do we have on this build system?
54521
54522# Check whether --with-num-cores was given.
54523if test "${with_num_cores+set}" = set; then :
54524  withval=$with_num_cores;
54525fi
54526
54527  if test "x$with_num_cores" = x; then
54528    # The number of cores were not specified, try to probe them.
54529
54530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54531$as_echo_n "checking for number of cores... " >&6; }
54532  NUM_CORES=1
54533  FOUND_CORES=no
54534
54535  if test -f /proc/cpuinfo; then
54536    # Looks like a Linux (or cygwin) system
54537    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54538    FOUND_CORES=yes
54539  elif test -x /usr/sbin/psrinfo; then
54540    # Looks like a Solaris system
54541    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54542    FOUND_CORES=yes
54543  elif test -x /usr/sbin/system_profiler; then
54544    # Looks like a MacOSX system
54545    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54546    FOUND_CORES=yes
54547  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54548    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54549    FOUND_CORES=yes
54550  elif test -n "$NUMBER_OF_PROCESSORS"; then
54551    # On windows, look in the env
54552    NUM_CORES=$NUMBER_OF_PROCESSORS
54553    FOUND_CORES=yes
54554  fi
54555
54556  if test "x$FOUND_CORES" = xyes; then
54557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54558$as_echo "$NUM_CORES" >&6; }
54559  else
54560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54561$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54562    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54563$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54564  fi
54565
54566  else
54567    NUM_CORES=$with_num_cores
54568  fi
54569
54570
54571
54572  # How much memory do we have on this build system?
54573
54574# Check whether --with-memory-size was given.
54575if test "${with_memory_size+set}" = set; then :
54576  withval=$with_memory_size;
54577fi
54578
54579  if test "x$with_memory_size" = x; then
54580    # The memory size was not specified, try to probe it.
54581
54582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54583$as_echo_n "checking for memory size... " >&6; }
54584  # Default to 1024 MB
54585  MEMORY_SIZE=1024
54586  FOUND_MEM=no
54587
54588  if test -f /proc/meminfo; then
54589    # Looks like a Linux (or cygwin) system
54590    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54591    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54592    FOUND_MEM=yes
54593  elif test -x /usr/sbin/prtconf; then
54594    # Looks like a Solaris or AIX system
54595    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54596    FOUND_MEM=yes
54597  elif test -x /usr/sbin/system_profiler; then
54598    # Looks like a MacOSX system
54599    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54600    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54601    FOUND_MEM=yes
54602  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54603    # Windows, but without cygwin
54604    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54605    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54606    FOUND_MEM=yes
54607  fi
54608
54609  if test "x$FOUND_MEM" = xyes; then
54610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54611$as_echo "$MEMORY_SIZE MB" >&6; }
54612  else
54613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54614$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54616$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54617  fi
54618
54619  else
54620    MEMORY_SIZE=$with_memory_size
54621  fi
54622
54623
54624
54625  # Provide a decent default number of parallel jobs for make depending on
54626  # number of cores, amount of memory and machine architecture.
54627
54628# Check whether --with-jobs was given.
54629if test "${with_jobs+set}" = set; then :
54630  withval=$with_jobs;
54631fi
54632
54633  if test "x$with_jobs" = x; then
54634    # Number of jobs was not specified, calculate.
54635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54636$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54637    # Approximate memory in GB.
54638    memory_gb=`expr $MEMORY_SIZE / 1024`
54639    # Pick the lowest of memory in gb and number of cores.
54640    if test "$memory_gb" -lt "$NUM_CORES"; then
54641      JOBS="$memory_gb"
54642    else
54643      JOBS="$NUM_CORES"
54644      # On bigger machines, leave some room for other processes to run
54645      if test "$JOBS" -gt "4"; then
54646        JOBS=`expr $JOBS '*' 90 / 100`
54647      fi
54648    fi
54649    # Cap number of jobs to 16
54650    if test "$JOBS" -gt "16"; then
54651      JOBS=16
54652    fi
54653    if test "$JOBS" -eq "0"; then
54654      JOBS=1
54655    fi
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54657$as_echo "$JOBS" >&6; }
54658  else
54659    JOBS=$with_jobs
54660  fi
54661
54662
54663
54664# Setup arguments for the boot jdk (after cores and memory have been setup)
54665
54666  ##############################################################################
54667  #
54668  # Specify jvm options for anything that is run with the Boot JDK.
54669  # Not all JVM:s accept the same arguments on the command line.
54670  #
54671
54672# Check whether --with-boot-jdk-jvmargs was given.
54673if test "${with_boot_jdk_jvmargs+set}" = set; then :
54674  withval=$with_boot_jdk_jvmargs;
54675fi
54676
54677
54678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54679$as_echo_n "checking flags for boot jdk java command ... " >&6; }
54680
54681  # Disable special log output when a debug build is used as Boot JDK...
54682
54683  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54684  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54685  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54686  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54687  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54688  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54689    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54690    JVM_ARG_OK=true
54691  else
54692    $ECHO "Arg failed:" >&5
54693    $ECHO "$OUTPUT" >&5
54694    JVM_ARG_OK=false
54695  fi
54696
54697
54698  # Apply user provided options.
54699
54700  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54701  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54702  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54703  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54704  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54705  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54706    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54707    JVM_ARG_OK=true
54708  else
54709    $ECHO "Arg failed:" >&5
54710    $ECHO "$OUTPUT" >&5
54711    JVM_ARG_OK=false
54712  fi
54713
54714
54715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54716$as_echo "$boot_jdk_jvmargs" >&6; }
54717
54718  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54719  JAVA_FLAGS=$boot_jdk_jvmargs
54720
54721
54722
54723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54724$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54725
54726  # Starting amount of heap memory.
54727
54728  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54729  $ECHO "Command: $JAVA -Xms64M -version" >&5
54730  OUTPUT=`$JAVA -Xms64M -version 2>&1`
54731  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54732  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54733  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54734    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54735    JVM_ARG_OK=true
54736  else
54737    $ECHO "Arg failed:" >&5
54738    $ECHO "$OUTPUT" >&5
54739    JVM_ARG_OK=false
54740  fi
54741
54742
54743  # Maximum amount of heap memory.
54744  # Maximum stack size.
54745  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54746  if test "x$BOOT_JDK_BITS" = "x32"; then
54747    if test "$JVM_MAX_HEAP" -gt "1100"; then
54748      JVM_MAX_HEAP=1100
54749    elif test "$JVM_MAX_HEAP" -lt "512"; then
54750      JVM_MAX_HEAP=512
54751    fi
54752    STACK_SIZE=768
54753  else
54754    # Running a 64 bit JVM allows for and requires a bigger heap
54755    if test "$JVM_MAX_HEAP" -gt "1600"; then
54756      JVM_MAX_HEAP=1600
54757    elif test "$JVM_MAX_HEAP" -lt "512"; then
54758      JVM_MAX_HEAP=512
54759    fi
54760    STACK_SIZE=1536
54761  fi
54762
54763  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54764  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54765  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54766  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54767  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54768  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54769    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54770    JVM_ARG_OK=true
54771  else
54772    $ECHO "Arg failed:" >&5
54773    $ECHO "$OUTPUT" >&5
54774    JVM_ARG_OK=false
54775  fi
54776
54777
54778  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54779  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54780  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54781  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54782  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54783  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54784    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54785    JVM_ARG_OK=true
54786  else
54787    $ECHO "Arg failed:" >&5
54788    $ECHO "$OUTPUT" >&5
54789    JVM_ARG_OK=false
54790  fi
54791
54792
54793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54794$as_echo "$boot_jdk_jvmargs_big" >&6; }
54795
54796  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54797
54798
54799  # By default, the main javac compilations use big
54800  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
54801
54802
54803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54804$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54805
54806  # Use serial gc for small short lived tools if possible
54807
54808  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54809  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54810  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54811  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54812  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54813  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54814    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54815    JVM_ARG_OK=true
54816  else
54817    $ECHO "Arg failed:" >&5
54818    $ECHO "$OUTPUT" >&5
54819    JVM_ARG_OK=false
54820  fi
54821
54822
54823  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54824  $ECHO "Command: $JAVA -Xms32M -version" >&5
54825  OUTPUT=`$JAVA -Xms32M -version 2>&1`
54826  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54827  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54828  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54829    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54830    JVM_ARG_OK=true
54831  else
54832    $ECHO "Arg failed:" >&5
54833    $ECHO "$OUTPUT" >&5
54834    JVM_ARG_OK=false
54835  fi
54836
54837
54838  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54839  $ECHO "Command: $JAVA -Xmx512M -version" >&5
54840  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
54841  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54842  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54843  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54844    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
54845    JVM_ARG_OK=true
54846  else
54847    $ECHO "Arg failed:" >&5
54848    $ECHO "$OUTPUT" >&5
54849    JVM_ARG_OK=false
54850  fi
54851
54852
54853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
54854$as_echo "$boot_jdk_jvmargs_small" >&6; }
54855
54856  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
54857
54858
54859  JAVA_TOOL_FLAGS_SMALL=""
54860  for f in $JAVA_FLAGS_SMALL; do
54861    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
54862  done
54863
54864
54865
54866# Setup smart javac (after cores and memory have been setup)
54867
54868
54869# Check whether --with-sjavac-server-java was given.
54870if test "${with_sjavac_server_java+set}" = set; then :
54871  withval=$with_sjavac_server_java;
54872fi
54873
54874
54875  if test "x$with_sjavac_server_java" != x; then
54876    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
54877    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
54878    if test "x$FOUND_VERSION" = x; then
54879      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
54880    fi
54881  else
54882    SJAVAC_SERVER_JAVA="$JAVA"
54883  fi
54884
54885
54886  if test "$MEMORY_SIZE" -gt "3000"; then
54887
54888  $ECHO "Check if jvm arg is ok: -d64" >&5
54889  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
54890  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
54891  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54892  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54893  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54894    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
54895    JVM_ARG_OK=true
54896  else
54897    $ECHO "Arg failed:" >&5
54898    $ECHO "$OUTPUT" >&5
54899    JVM_ARG_OK=false
54900  fi
54901
54902    if test "$JVM_ARG_OK" = true; then
54903      JVM_64BIT=true
54904      JVM_ARG_OK=false
54905    fi
54906  fi
54907
54908  MX_VALUE=`expr $MEMORY_SIZE / 2`
54909  if test "$JVM_64BIT" = true; then
54910    # Set ms lower than mx since more than one instance of the server might
54911    # get launched at the same time before they figure out which instance won.
54912    MS_VALUE=512
54913    if test "$MX_VALUE" -gt "2048"; then
54914      MX_VALUE=2048
54915    fi
54916  else
54917    MS_VALUE=256
54918    if test "$MX_VALUE" -gt "1500"; then
54919      MX_VALUE=1500
54920    fi
54921  fi
54922  if test "$MX_VALUE" -lt "512"; then
54923    MX_VALUE=512
54924  fi
54925
54926  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
54927  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
54928  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
54929  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54930  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54931  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54932    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
54933    JVM_ARG_OK=true
54934  else
54935    $ECHO "Arg failed:" >&5
54936    $ECHO "$OUTPUT" >&5
54937    JVM_ARG_OK=false
54938  fi
54939
54940
54941
54942  # Check whether --enable-sjavac was given.
54943if test "${enable_sjavac+set}" = set; then :
54944  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
54945else
54946  ENABLE_SJAVAC="no"
54947fi
54948
54949  if test "x$JVM_ARG_OK" = "xfalse"; then
54950    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
54951$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
54952    ENABLE_SJAVAC="no"
54953  fi
54954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
54955$as_echo_n "checking whether to use sjavac... " >&6; }
54956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
54957$as_echo "$ENABLE_SJAVAC" >&6; }
54958
54959
54960  # Check whether --enable-javac-server was given.
54961if test "${enable_javac_server+set}" = set; then :
54962  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
54963else
54964  ENABLE_JAVAC_SERVER="no"
54965fi
54966
54967  if test "x$JVM_ARG_OK" = "xfalse"; then
54968    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
54969$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
54970    ENABLE_JAVAC_SERVER="no"
54971  fi
54972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
54973$as_echo_n "checking whether to use javac server... " >&6; }
54974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
54975$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
54976
54977
54978  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
54979    # When using a server javac, the small client instances do not need much
54980    # resources.
54981    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
54982  fi
54983
54984
54985# Can the C/C++ compiler use precompiled headers?
54986
54987
54988  ###############################################################################
54989  #
54990  # Can the C/C++ compiler use precompiled headers?
54991  #
54992  # Check whether --enable-precompiled-headers was given.
54993if test "${enable_precompiled_headers+set}" = set; then :
54994  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
54995else
54996  ENABLE_PRECOMPH=yes
54997fi
54998
54999
55000  USE_PRECOMPILED_HEADER=1
55001  if test "x$ENABLE_PRECOMPH" = xno; then
55002    USE_PRECOMPILED_HEADER=0
55003  fi
55004
55005  if test "x$ENABLE_PRECOMPH" = xyes; then
55006    # Check that the compiler actually supports precomp headers.
55007    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55009$as_echo_n "checking that precompiled headers work... " >&6; }
55010      echo "int alfa();" > conftest.h
55011      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55012      if test ! -f conftest.hpp.gch; then
55013        USE_PRECOMPILED_HEADER=0
55014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55015$as_echo "no" >&6; }
55016      else
55017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55018$as_echo "yes" >&6; }
55019      fi
55020      rm -f conftest.h conftest.hpp.gch
55021    fi
55022  fi
55023
55024
55025
55026
55027# Setup use of ccache, if available
55028
55029  # Check whether --enable-ccache was given.
55030if test "${enable_ccache+set}" = set; then :
55031  enableval=$enable_ccache;
55032fi
55033
55034
55035  CCACHE=
55036  CCACHE_STATUS=
55037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55038$as_echo_n "checking is ccache enabled... " >&6; }
55039  if test "x$enable_ccache" = xyes; then
55040    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55042$as_echo "yes" >&6; }
55043      OLD_PATH="$PATH"
55044      if test "x$TOOLCHAIN_PATH" != x; then
55045        PATH=$TOOLCHAIN_PATH:$PATH
55046      fi
55047
55048
55049
55050  # Publish this variable in the help.
55051
55052
55053  if [ -z "${CCACHE+x}" ]; then
55054    # The variable is not set by user, try to locate tool using the code snippet
55055    for ac_prog in ccache
55056do
55057  # Extract the first word of "$ac_prog", so it can be a program name with args.
55058set dummy $ac_prog; ac_word=$2
55059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55060$as_echo_n "checking for $ac_word... " >&6; }
55061if ${ac_cv_path_CCACHE+:} false; then :
55062  $as_echo_n "(cached) " >&6
55063else
55064  case $CCACHE in
55065  [\\/]* | ?:[\\/]*)
55066  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55067  ;;
55068  *)
55069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55070for as_dir in $PATH
55071do
55072  IFS=$as_save_IFS
55073  test -z "$as_dir" && as_dir=.
55074    for ac_exec_ext in '' $ac_executable_extensions; do
55075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55076    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55078    break 2
55079  fi
55080done
55081  done
55082IFS=$as_save_IFS
55083
55084  ;;
55085esac
55086fi
55087CCACHE=$ac_cv_path_CCACHE
55088if test -n "$CCACHE"; then
55089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55090$as_echo "$CCACHE" >&6; }
55091else
55092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55093$as_echo "no" >&6; }
55094fi
55095
55096
55097  test -n "$CCACHE" && break
55098done
55099
55100  else
55101    # The variable is set, but is it from the command line or the environment?
55102
55103    # Try to remove the string !CCACHE! from our list.
55104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55106      # If it failed, the variable was not from the command line. Ignore it,
55107      # but warn the user (except for BASH, which is always set by the calling BASH).
55108      if test "xCCACHE" != xBASH; then
55109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55110$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55111      fi
55112      # Try to locate tool using the code snippet
55113      for ac_prog in ccache
55114do
55115  # Extract the first word of "$ac_prog", so it can be a program name with args.
55116set dummy $ac_prog; ac_word=$2
55117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55118$as_echo_n "checking for $ac_word... " >&6; }
55119if ${ac_cv_path_CCACHE+:} false; then :
55120  $as_echo_n "(cached) " >&6
55121else
55122  case $CCACHE in
55123  [\\/]* | ?:[\\/]*)
55124  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55125  ;;
55126  *)
55127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55128for as_dir in $PATH
55129do
55130  IFS=$as_save_IFS
55131  test -z "$as_dir" && as_dir=.
55132    for ac_exec_ext in '' $ac_executable_extensions; do
55133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55134    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55136    break 2
55137  fi
55138done
55139  done
55140IFS=$as_save_IFS
55141
55142  ;;
55143esac
55144fi
55145CCACHE=$ac_cv_path_CCACHE
55146if test -n "$CCACHE"; then
55147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55148$as_echo "$CCACHE" >&6; }
55149else
55150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55151$as_echo "no" >&6; }
55152fi
55153
55154
55155  test -n "$CCACHE" && break
55156done
55157
55158    else
55159      # If it succeeded, then it was overridden by the user. We will use it
55160      # for the tool.
55161
55162      # First remove it from the list of overridden variables, so we can test
55163      # for unknown variables in the end.
55164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55165
55166      # Check if we try to supply an empty value
55167      if test "x$CCACHE" = x; then
55168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55169$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55171$as_echo_n "checking for CCACHE... " >&6; }
55172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55173$as_echo "disabled" >&6; }
55174      else
55175        # Check if the provided tool contains a complete path.
55176        tool_specified="$CCACHE"
55177        tool_basename="${tool_specified##*/}"
55178        if test "x$tool_basename" = "x$tool_specified"; then
55179          # A command without a complete path is provided, search $PATH.
55180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55181$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55182          # Extract the first word of "$tool_basename", so it can be a program name with args.
55183set dummy $tool_basename; ac_word=$2
55184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55185$as_echo_n "checking for $ac_word... " >&6; }
55186if ${ac_cv_path_CCACHE+:} false; then :
55187  $as_echo_n "(cached) " >&6
55188else
55189  case $CCACHE in
55190  [\\/]* | ?:[\\/]*)
55191  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55192  ;;
55193  *)
55194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55195for as_dir in $PATH
55196do
55197  IFS=$as_save_IFS
55198  test -z "$as_dir" && as_dir=.
55199    for ac_exec_ext in '' $ac_executable_extensions; do
55200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55201    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55203    break 2
55204  fi
55205done
55206  done
55207IFS=$as_save_IFS
55208
55209  ;;
55210esac
55211fi
55212CCACHE=$ac_cv_path_CCACHE
55213if test -n "$CCACHE"; then
55214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55215$as_echo "$CCACHE" >&6; }
55216else
55217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55218$as_echo "no" >&6; }
55219fi
55220
55221
55222          if test "x$CCACHE" = x; then
55223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55224          fi
55225        else
55226          # Otherwise we believe it is a complete path. Use it as it is.
55227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55228$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55230$as_echo_n "checking for CCACHE... " >&6; }
55231          if test ! -x "$tool_specified"; then
55232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55233$as_echo "not found" >&6; }
55234            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55235          fi
55236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55237$as_echo "$tool_specified" >&6; }
55238        fi
55239      fi
55240    fi
55241
55242  fi
55243
55244
55245
55246  if test "x$CCACHE" = x; then
55247    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55248  fi
55249
55250
55251      PATH="$OLD_PATH"
55252      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55253      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55254    else
55255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55256$as_echo "no" >&6; }
55257      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55258$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55259    fi
55260  elif test "x$enable_ccache" = xno; then
55261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55262$as_echo "no, explicitly disabled" >&6; }
55263    CCACHE_STATUS="Disabled"
55264  elif test "x$enable_ccache" = x; then
55265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55266$as_echo "no" >&6; }
55267  else
55268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55269$as_echo "unknown" >&6; }
55270    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55271  fi
55272
55273
55274
55275# Check whether --with-ccache-dir was given.
55276if test "${with_ccache_dir+set}" = set; then :
55277  withval=$with_ccache_dir;
55278fi
55279
55280
55281  if test "x$with_ccache_dir" != x; then
55282    # When using a non home ccache directory, assume the use is to share ccache files
55283    # with other users. Thus change the umask.
55284    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55285    if test "x$CCACHE" = x; then
55286      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55287$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55288    fi
55289  fi
55290
55291  if test "x$CCACHE" != x; then
55292
55293  if test "x$CCACHE" != x; then
55294    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55295      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55296          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55297      if test "x$HAS_BAD_CCACHE" != "x"; then
55298        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55299      fi
55300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55301$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55302      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55303      PUSHED_FLAGS="$CXXFLAGS"
55304      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55305      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55306/* end confdefs.h.  */
55307
55308int
55309main ()
55310{
55311
55312  ;
55313  return 0;
55314}
55315_ACEOF
55316if ac_fn_cxx_try_compile "$LINENO"; then :
55317  CC_KNOWS_CCACHE_TRICK=yes
55318else
55319  CC_KNOWS_CCACHE_TRICK=no
55320fi
55321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55322      CXXFLAGS="$PUSHED_FLAGS"
55323      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55325$as_echo "yes" >&6; }
55326        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55327
55328        CCACHE_SLOPPINESS=pch_defines,time_macros
55329      else
55330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55331$as_echo "no" >&6; }
55332        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55333      fi
55334    fi
55335
55336    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55337        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55338
55339    if test "x$SET_CCACHE_DIR" != x; then
55340      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55341      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55342    fi
55343  fi
55344
55345  fi
55346
55347
55348###############################################################################
55349#
55350# And now the finish...
55351#
55352###############################################################################
55353
55354# Check for some common pitfalls
55355
55356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55357    file_to_test="$SRC_ROOT/LICENSE"
55358    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55359      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
55360    fi
55361  fi
55362
55363
55364  # Did user specify any unknown variables?
55365
55366  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55367    # Replace the separating ! with spaces before presenting for end user.
55368    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55370$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55371  fi
55372
55373
55374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55375$as_echo_n "checking if build directory is on local disk... " >&6; }
55376
55377  # df -l lists only local disks; if the given directory is not found then
55378  # a non-zero exit code is given
55379  if test "x$DF" = x; then
55380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55381      # msys does not have df; use Windows "net use" instead.
55382      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55383      if test "x$IS_NETWORK_DISK" = x; then
55384        OUTPUT_DIR_IS_LOCAL="yes"
55385      else
55386        OUTPUT_DIR_IS_LOCAL="no"
55387      fi
55388    else
55389      # No df here, say it's local
55390      OUTPUT_DIR_IS_LOCAL="yes"
55391    fi
55392  else
55393    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55394      OUTPUT_DIR_IS_LOCAL="yes"
55395    else
55396      OUTPUT_DIR_IS_LOCAL="no"
55397    fi
55398  fi
55399
55400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55401$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55402
55403
55404
55405  # Check if the user has any old-style ALT_ variables set.
55406  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55407
55408  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55409  # Since we can't properly handle the dependencies for this, warn the user about the situation
55410  if test -e $OUTPUT_ROOT/spec.gmk; then
55411    IS_RECONFIGURE=yes
55412  else
55413    IS_RECONFIGURE=no
55414  fi
55415
55416
55417# At the end, call the custom hook. (Dummy macro if no custom sources available)
55418
55419
55420# We're messing a bit with internal autoconf variables to put the config.status
55421# in the output directory instead of the current directory.
55422CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55423
55424# Create the actual output files. Now the main work of configure is done.
55425cat >confcache <<\_ACEOF
55426# This file is a shell script that caches the results of configure
55427# tests run on this system so they can be shared between configure
55428# scripts and configure runs, see configure's option --config-cache.
55429# It is not useful on other systems.  If it contains results you don't
55430# want to keep, you may remove or edit it.
55431#
55432# config.status only pays attention to the cache file if you give it
55433# the --recheck option to rerun configure.
55434#
55435# `ac_cv_env_foo' variables (set or unset) will be overridden when
55436# loading this file, other *unset* `ac_cv_foo' will be assigned the
55437# following values.
55438
55439_ACEOF
55440
55441# The following way of writing the cache mishandles newlines in values,
55442# but we know of no workaround that is simple, portable, and efficient.
55443# So, we kill variables containing newlines.
55444# Ultrix sh set writes to stderr and can't be redirected directly,
55445# and sets the high bit in the cache file unless we assign to the vars.
55446(
55447  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55448    eval ac_val=\$$ac_var
55449    case $ac_val in #(
55450    *${as_nl}*)
55451      case $ac_var in #(
55452      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55453$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55454      esac
55455      case $ac_var in #(
55456      _ | IFS | as_nl) ;; #(
55457      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55458      *) { eval $ac_var=; unset $ac_var;} ;;
55459      esac ;;
55460    esac
55461  done
55462
55463  (set) 2>&1 |
55464    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55465    *${as_nl}ac_space=\ *)
55466      # `set' does not quote correctly, so add quotes: double-quote
55467      # substitution turns \\\\ into \\, and sed turns \\ into \.
55468      sed -n \
55469	"s/'/'\\\\''/g;
55470	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55471      ;; #(
55472    *)
55473      # `set' quotes correctly as required by POSIX, so do not add quotes.
55474      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55475      ;;
55476    esac |
55477    sort
55478) |
55479  sed '
55480     /^ac_cv_env_/b end
55481     t clear
55482     :clear
55483     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55484     t end
55485     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55486     :end' >>confcache
55487if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55488  if test -w "$cache_file"; then
55489    if test "x$cache_file" != "x/dev/null"; then
55490      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55491$as_echo "$as_me: updating cache $cache_file" >&6;}
55492      if test ! -f "$cache_file" || test -h "$cache_file"; then
55493	cat confcache >"$cache_file"
55494      else
55495        case $cache_file in #(
55496        */* | ?:*)
55497	  mv -f confcache "$cache_file"$$ &&
55498	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55499        *)
55500	  mv -f confcache "$cache_file" ;;
55501	esac
55502      fi
55503    fi
55504  else
55505    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55506$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55507  fi
55508fi
55509rm -f confcache
55510
55511test "x$prefix" = xNONE && prefix=$ac_default_prefix
55512# Let make expand exec_prefix.
55513test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55514
55515# Transform confdefs.h into DEFS.
55516# Protect against shell expansion while executing Makefile rules.
55517# Protect against Makefile macro expansion.
55518#
55519# If the first sed substitution is executed (which looks for macros that
55520# take arguments), then branch to the quote section.  Otherwise,
55521# look for a macro that doesn't take arguments.
55522ac_script='
55523:mline
55524/\\$/{
55525 N
55526 s,\\\n,,
55527 b mline
55528}
55529t clear
55530:clear
55531s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55532t quote
55533s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55534t quote
55535b any
55536:quote
55537s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55538s/\[/\\&/g
55539s/\]/\\&/g
55540s/\$/$$/g
55541H
55542:any
55543${
55544	g
55545	s/^\n//
55546	s/\n/ /g
55547	p
55548}
55549'
55550DEFS=`sed -n "$ac_script" confdefs.h`
55551
55552
55553ac_libobjs=
55554ac_ltlibobjs=
55555U=
55556for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55557  # 1. Remove the extension, and $U if already installed.
55558  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55559  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55560  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55561  #    will be set to the directory where LIBOBJS objects are built.
55562  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55563  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55564done
55565LIBOBJS=$ac_libobjs
55566
55567LTLIBOBJS=$ac_ltlibobjs
55568
55569
55570
55571: "${CONFIG_STATUS=./config.status}"
55572ac_write_fail=0
55573ac_clean_files_save=$ac_clean_files
55574ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55575{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55576$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55577as_write_fail=0
55578cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55579#! $SHELL
55580# Generated by $as_me.
55581# Run this file to recreate the current configuration.
55582# Compiler output produced by configure, useful for debugging
55583# configure, is in config.log if it exists.
55584
55585debug=false
55586ac_cs_recheck=false
55587ac_cs_silent=false
55588
55589SHELL=\${CONFIG_SHELL-$SHELL}
55590export SHELL
55591_ASEOF
55592cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55593## -------------------- ##
55594## M4sh Initialization. ##
55595## -------------------- ##
55596
55597# Be more Bourne compatible
55598DUALCASE=1; export DUALCASE # for MKS sh
55599if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55600  emulate sh
55601  NULLCMD=:
55602  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55603  # is contrary to our usage.  Disable this feature.
55604  alias -g '${1+"$@"}'='"$@"'
55605  setopt NO_GLOB_SUBST
55606else
55607  case `(set -o) 2>/dev/null` in #(
55608  *posix*) :
55609    set -o posix ;; #(
55610  *) :
55611     ;;
55612esac
55613fi
55614
55615
55616as_nl='
55617'
55618export as_nl
55619# Printing a long string crashes Solaris 7 /usr/bin/printf.
55620as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55621as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55622as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55623# Prefer a ksh shell builtin over an external printf program on Solaris,
55624# but without wasting forks for bash or zsh.
55625if test -z "$BASH_VERSION$ZSH_VERSION" \
55626    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55627  as_echo='print -r --'
55628  as_echo_n='print -rn --'
55629elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55630  as_echo='printf %s\n'
55631  as_echo_n='printf %s'
55632else
55633  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55634    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55635    as_echo_n='/usr/ucb/echo -n'
55636  else
55637    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55638    as_echo_n_body='eval
55639      arg=$1;
55640      case $arg in #(
55641      *"$as_nl"*)
55642	expr "X$arg" : "X\\(.*\\)$as_nl";
55643	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55644      esac;
55645      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55646    '
55647    export as_echo_n_body
55648    as_echo_n='sh -c $as_echo_n_body as_echo'
55649  fi
55650  export as_echo_body
55651  as_echo='sh -c $as_echo_body as_echo'
55652fi
55653
55654# The user is always right.
55655if test "${PATH_SEPARATOR+set}" != set; then
55656  PATH_SEPARATOR=:
55657  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55658    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55659      PATH_SEPARATOR=';'
55660  }
55661fi
55662
55663
55664# IFS
55665# We need space, tab and new line, in precisely that order.  Quoting is
55666# there to prevent editors from complaining about space-tab.
55667# (If _AS_PATH_WALK were called with IFS unset, it would disable word
55668# splitting by setting IFS to empty value.)
55669IFS=" ""	$as_nl"
55670
55671# Find who we are.  Look in the path if we contain no directory separator.
55672as_myself=
55673case $0 in #((
55674  *[\\/]* ) as_myself=$0 ;;
55675  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55676for as_dir in $PATH
55677do
55678  IFS=$as_save_IFS
55679  test -z "$as_dir" && as_dir=.
55680    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55681  done
55682IFS=$as_save_IFS
55683
55684     ;;
55685esac
55686# We did not find ourselves, most probably we were run as `sh COMMAND'
55687# in which case we are not to be found in the path.
55688if test "x$as_myself" = x; then
55689  as_myself=$0
55690fi
55691if test ! -f "$as_myself"; then
55692  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55693  exit 1
55694fi
55695
55696# Unset variables that we do not need and which cause bugs (e.g. in
55697# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55698# suppresses any "Segmentation fault" message there.  '((' could
55699# trigger a bug in pdksh 5.2.14.
55700for as_var in BASH_ENV ENV MAIL MAILPATH
55701do eval test x\${$as_var+set} = xset \
55702  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55703done
55704PS1='$ '
55705PS2='> '
55706PS4='+ '
55707
55708# NLS nuisances.
55709LC_ALL=C
55710export LC_ALL
55711LANGUAGE=C
55712export LANGUAGE
55713
55714# CDPATH.
55715(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55716
55717
55718# as_fn_error STATUS ERROR [LINENO LOG_FD]
55719# ----------------------------------------
55720# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55721# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55722# script with STATUS, using 1 if that was 0.
55723as_fn_error ()
55724{
55725  as_status=$1; test $as_status -eq 0 && as_status=1
55726  if test "$4"; then
55727    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55728    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55729  fi
55730  $as_echo "$as_me: error: $2" >&2
55731  as_fn_exit $as_status
55732} # as_fn_error
55733
55734
55735# as_fn_set_status STATUS
55736# -----------------------
55737# Set $? to STATUS, without forking.
55738as_fn_set_status ()
55739{
55740  return $1
55741} # as_fn_set_status
55742
55743# as_fn_exit STATUS
55744# -----------------
55745# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55746as_fn_exit ()
55747{
55748  set +e
55749  as_fn_set_status $1
55750  exit $1
55751} # as_fn_exit
55752
55753# as_fn_unset VAR
55754# ---------------
55755# Portably unset VAR.
55756as_fn_unset ()
55757{
55758  { eval $1=; unset $1;}
55759}
55760as_unset=as_fn_unset
55761# as_fn_append VAR VALUE
55762# ----------------------
55763# Append the text in VALUE to the end of the definition contained in VAR. Take
55764# advantage of any shell optimizations that allow amortized linear growth over
55765# repeated appends, instead of the typical quadratic growth present in naive
55766# implementations.
55767if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55768  eval 'as_fn_append ()
55769  {
55770    eval $1+=\$2
55771  }'
55772else
55773  as_fn_append ()
55774  {
55775    eval $1=\$$1\$2
55776  }
55777fi # as_fn_append
55778
55779# as_fn_arith ARG...
55780# ------------------
55781# Perform arithmetic evaluation on the ARGs, and store the result in the
55782# global $as_val. Take advantage of shells that can avoid forks. The arguments
55783# must be portable across $(()) and expr.
55784if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55785  eval 'as_fn_arith ()
55786  {
55787    as_val=$(( $* ))
55788  }'
55789else
55790  as_fn_arith ()
55791  {
55792    as_val=`expr "$@" || test $? -eq 1`
55793  }
55794fi # as_fn_arith
55795
55796
55797if expr a : '\(a\)' >/dev/null 2>&1 &&
55798   test "X`expr 00001 : '.*\(...\)'`" = X001; then
55799  as_expr=expr
55800else
55801  as_expr=false
55802fi
55803
55804if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55805  as_basename=basename
55806else
55807  as_basename=false
55808fi
55809
55810if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55811  as_dirname=dirname
55812else
55813  as_dirname=false
55814fi
55815
55816as_me=`$as_basename -- "$0" ||
55817$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55818	 X"$0" : 'X\(//\)$' \| \
55819	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55820$as_echo X/"$0" |
55821    sed '/^.*\/\([^/][^/]*\)\/*$/{
55822	    s//\1/
55823	    q
55824	  }
55825	  /^X\/\(\/\/\)$/{
55826	    s//\1/
55827	    q
55828	  }
55829	  /^X\/\(\/\).*/{
55830	    s//\1/
55831	    q
55832	  }
55833	  s/.*/./; q'`
55834
55835# Avoid depending upon Character Ranges.
55836as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55837as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55838as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55839as_cr_digits='0123456789'
55840as_cr_alnum=$as_cr_Letters$as_cr_digits
55841
55842ECHO_C= ECHO_N= ECHO_T=
55843case `echo -n x` in #(((((
55844-n*)
55845  case `echo 'xy\c'` in
55846  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
55847  xy)  ECHO_C='\c';;
55848  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55849       ECHO_T='	';;
55850  esac;;
55851*)
55852  ECHO_N='-n';;
55853esac
55854
55855rm -f conf$$ conf$$.exe conf$$.file
55856if test -d conf$$.dir; then
55857  rm -f conf$$.dir/conf$$.file
55858else
55859  rm -f conf$$.dir
55860  mkdir conf$$.dir 2>/dev/null
55861fi
55862if (echo >conf$$.file) 2>/dev/null; then
55863  if ln -s conf$$.file conf$$ 2>/dev/null; then
55864    as_ln_s='ln -s'
55865    # ... but there are two gotchas:
55866    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
55867    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
55868    # In both cases, we have to default to `cp -pR'.
55869    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
55870      as_ln_s='cp -pR'
55871  elif ln conf$$.file conf$$ 2>/dev/null; then
55872    as_ln_s=ln
55873  else
55874    as_ln_s='cp -pR'
55875  fi
55876else
55877  as_ln_s='cp -pR'
55878fi
55879rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
55880rmdir conf$$.dir 2>/dev/null
55881
55882
55883# as_fn_mkdir_p
55884# -------------
55885# Create "$as_dir" as a directory, including parents if necessary.
55886as_fn_mkdir_p ()
55887{
55888
55889  case $as_dir in #(
55890  -*) as_dir=./$as_dir;;
55891  esac
55892  test -d "$as_dir" || eval $as_mkdir_p || {
55893    as_dirs=
55894    while :; do
55895      case $as_dir in #(
55896      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
55897      *) as_qdir=$as_dir;;
55898      esac
55899      as_dirs="'$as_qdir' $as_dirs"
55900      as_dir=`$as_dirname -- "$as_dir" ||
55901$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55902	 X"$as_dir" : 'X\(//\)[^/]' \| \
55903	 X"$as_dir" : 'X\(//\)$' \| \
55904	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
55905$as_echo X"$as_dir" |
55906    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55907	    s//\1/
55908	    q
55909	  }
55910	  /^X\(\/\/\)[^/].*/{
55911	    s//\1/
55912	    q
55913	  }
55914	  /^X\(\/\/\)$/{
55915	    s//\1/
55916	    q
55917	  }
55918	  /^X\(\/\).*/{
55919	    s//\1/
55920	    q
55921	  }
55922	  s/.*/./; q'`
55923      test -d "$as_dir" && break
55924    done
55925    test -z "$as_dirs" || eval "mkdir $as_dirs"
55926  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
55927
55928
55929} # as_fn_mkdir_p
55930if mkdir -p . 2>/dev/null; then
55931  as_mkdir_p='mkdir -p "$as_dir"'
55932else
55933  test -d ./-p && rmdir ./-p
55934  as_mkdir_p=false
55935fi
55936
55937
55938# as_fn_executable_p FILE
55939# -----------------------
55940# Test if FILE is an executable regular file.
55941as_fn_executable_p ()
55942{
55943  test -f "$1" && test -x "$1"
55944} # as_fn_executable_p
55945as_test_x='test -x'
55946as_executable_p=as_fn_executable_p
55947
55948# Sed expression to map a string onto a valid CPP name.
55949as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
55950
55951# Sed expression to map a string onto a valid variable name.
55952as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
55953
55954
55955exec 6>&1
55956## ----------------------------------- ##
55957## Main body of $CONFIG_STATUS script. ##
55958## ----------------------------------- ##
55959_ASEOF
55960test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
55961
55962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55963# Save the log message, to keep $0 and so on meaningful, and to
55964# report actual input values of CONFIG_FILES etc. instead of their
55965# values after options handling.
55966ac_log="
55967This file was extended by OpenJDK $as_me jdk9, which was
55968generated by GNU Autoconf 2.69.  Invocation command line was
55969
55970  CONFIG_FILES    = $CONFIG_FILES
55971  CONFIG_HEADERS  = $CONFIG_HEADERS
55972  CONFIG_LINKS    = $CONFIG_LINKS
55973  CONFIG_COMMANDS = $CONFIG_COMMANDS
55974  $ $0 $@
55975
55976on `(hostname || uname -n) 2>/dev/null | sed 1q`
55977"
55978
55979_ACEOF
55980
55981case $ac_config_files in *"
55982"*) set x $ac_config_files; shift; ac_config_files=$*;;
55983esac
55984
55985
55986
55987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55988# Files that config.status was made for.
55989config_files="$ac_config_files"
55990
55991_ACEOF
55992
55993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55994ac_cs_usage="\
55995\`$as_me' instantiates files and other configuration actions
55996from templates according to the current configuration.  Unless the files
55997and actions are specified as TAGs, all are instantiated by default.
55998
55999Usage: $0 [OPTION]... [TAG]...
56000
56001  -h, --help       print this help, then exit
56002  -V, --version    print version number and configuration settings, then exit
56003      --config     print configuration, then exit
56004  -q, --quiet, --silent
56005                   do not print progress messages
56006  -d, --debug      don't remove temporary files
56007      --recheck    update $as_me by reconfiguring in the same conditions
56008      --file=FILE[:TEMPLATE]
56009                   instantiate the configuration file FILE
56010
56011Configuration files:
56012$config_files
56013
56014Report bugs to <build-dev@openjdk.java.net>.
56015OpenJDK home page: <http://openjdk.java.net>."
56016
56017_ACEOF
56018cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56019ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56020ac_cs_version="\\
56021OpenJDK config.status jdk9
56022configured by $0, generated by GNU Autoconf 2.69,
56023  with options \\"\$ac_cs_config\\"
56024
56025Copyright (C) 2012 Free Software Foundation, Inc.
56026This config.status script is free software; the Free Software Foundation
56027gives unlimited permission to copy, distribute and modify it."
56028
56029ac_pwd='$ac_pwd'
56030srcdir='$srcdir'
56031AWK='$AWK'
56032test -n "\$AWK" || AWK=awk
56033_ACEOF
56034
56035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56036# The default lists apply if the user does not specify any file.
56037ac_need_defaults=:
56038while test $# != 0
56039do
56040  case $1 in
56041  --*=?*)
56042    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56043    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56044    ac_shift=:
56045    ;;
56046  --*=)
56047    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56048    ac_optarg=
56049    ac_shift=:
56050    ;;
56051  *)
56052    ac_option=$1
56053    ac_optarg=$2
56054    ac_shift=shift
56055    ;;
56056  esac
56057
56058  case $ac_option in
56059  # Handling of the options.
56060  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56061    ac_cs_recheck=: ;;
56062  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56063    $as_echo "$ac_cs_version"; exit ;;
56064  --config | --confi | --conf | --con | --co | --c )
56065    $as_echo "$ac_cs_config"; exit ;;
56066  --debug | --debu | --deb | --de | --d | -d )
56067    debug=: ;;
56068  --file | --fil | --fi | --f )
56069    $ac_shift
56070    case $ac_optarg in
56071    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56072    '') as_fn_error $? "missing file argument" ;;
56073    esac
56074    as_fn_append CONFIG_FILES " '$ac_optarg'"
56075    ac_need_defaults=false;;
56076  --he | --h |  --help | --hel | -h )
56077    $as_echo "$ac_cs_usage"; exit ;;
56078  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56079  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56080    ac_cs_silent=: ;;
56081
56082  # This is an error.
56083  -*) as_fn_error $? "unrecognized option: \`$1'
56084Try \`$0 --help' for more information." ;;
56085
56086  *) as_fn_append ac_config_targets " $1"
56087     ac_need_defaults=false ;;
56088
56089  esac
56090  shift
56091done
56092
56093ac_configure_extra_args=
56094
56095if $ac_cs_silent; then
56096  exec 6>/dev/null
56097  ac_configure_extra_args="$ac_configure_extra_args --silent"
56098fi
56099
56100_ACEOF
56101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56102if \$ac_cs_recheck; then
56103  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56104  shift
56105  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56106  CONFIG_SHELL='$SHELL'
56107  export CONFIG_SHELL
56108  exec "\$@"
56109fi
56110
56111_ACEOF
56112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56113exec 5>>config.log
56114{
56115  echo
56116  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56117## Running $as_me. ##
56118_ASBOX
56119  $as_echo "$ac_log"
56120} >&5
56121
56122_ACEOF
56123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56124_ACEOF
56125
56126cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56127
56128# Handling of arguments.
56129for ac_config_target in $ac_config_targets
56130do
56131  case $ac_config_target in
56132    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56133    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56134    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56135    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56136    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56137
56138  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56139  esac
56140done
56141
56142
56143# If the user did not use the arguments to specify the items to instantiate,
56144# then the envvar interface is used.  Set only those that are not.
56145# We use the long form for the default assignment because of an extremely
56146# bizarre bug on SunOS 4.1.3.
56147if $ac_need_defaults; then
56148  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56149fi
56150
56151# Have a temporary directory for convenience.  Make it in the build tree
56152# simply because there is no reason against having it here, and in addition,
56153# creating and moving files from /tmp can sometimes cause problems.
56154# Hook for its removal unless debugging.
56155# Note that there is a small window in which the directory will not be cleaned:
56156# after its creation but before its name has been assigned to `$tmp'.
56157$debug ||
56158{
56159  tmp= ac_tmp=
56160  trap 'exit_status=$?
56161  : "${ac_tmp:=$tmp}"
56162  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56163' 0
56164  trap 'as_fn_exit 1' 1 2 13 15
56165}
56166# Create a (secure) tmp directory for tmp files.
56167
56168{
56169  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56170  test -d "$tmp"
56171}  ||
56172{
56173  tmp=./conf$$-$RANDOM
56174  (umask 077 && mkdir "$tmp")
56175} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56176ac_tmp=$tmp
56177
56178# Set up the scripts for CONFIG_FILES section.
56179# No need to generate them if there are no CONFIG_FILES.
56180# This happens for instance with `./config.status config.h'.
56181if test -n "$CONFIG_FILES"; then
56182
56183
56184ac_cr=`echo X | tr X '\015'`
56185# On cygwin, bash can eat \r inside `` if the user requested igncr.
56186# But we know of no other shell where ac_cr would be empty at this
56187# point, so we can use a bashism as a fallback.
56188if test "x$ac_cr" = x; then
56189  eval ac_cr=\$\'\\r\'
56190fi
56191ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56192if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56193  ac_cs_awk_cr='\\r'
56194else
56195  ac_cs_awk_cr=$ac_cr
56196fi
56197
56198echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56199_ACEOF
56200
56201
56202{
56203  echo "cat >conf$$subs.awk <<_ACEOF" &&
56204  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56205  echo "_ACEOF"
56206} >conf$$subs.sh ||
56207  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56208ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56209ac_delim='%!_!# '
56210for ac_last_try in false false false false false :; do
56211  . ./conf$$subs.sh ||
56212    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56213
56214  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56215  if test $ac_delim_n = $ac_delim_num; then
56216    break
56217  elif $ac_last_try; then
56218    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56219  else
56220    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56221  fi
56222done
56223rm -f conf$$subs.sh
56224
56225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56226cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56227_ACEOF
56228sed -n '
56229h
56230s/^/S["/; s/!.*/"]=/
56231p
56232g
56233s/^[^!]*!//
56234:repl
56235t repl
56236s/'"$ac_delim"'$//
56237t delim
56238:nl
56239h
56240s/\(.\{148\}\)..*/\1/
56241t more1
56242s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56243p
56244n
56245b repl
56246:more1
56247s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56248p
56249g
56250s/.\{148\}//
56251t nl
56252:delim
56253h
56254s/\(.\{148\}\)..*/\1/
56255t more2
56256s/["\\]/\\&/g; s/^/"/; s/$/"/
56257p
56258b
56259:more2
56260s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56261p
56262g
56263s/.\{148\}//
56264t delim
56265' <conf$$subs.awk | sed '
56266/^[^""]/{
56267  N
56268  s/\n//
56269}
56270' >>$CONFIG_STATUS || ac_write_fail=1
56271rm -f conf$$subs.awk
56272cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56273_ACAWK
56274cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56275  for (key in S) S_is_set[key] = 1
56276  FS = ""
56277
56278}
56279{
56280  line = $ 0
56281  nfields = split(line, field, "@")
56282  substed = 0
56283  len = length(field[1])
56284  for (i = 2; i < nfields; i++) {
56285    key = field[i]
56286    keylen = length(key)
56287    if (S_is_set[key]) {
56288      value = S[key]
56289      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56290      len += length(value) + length(field[++i])
56291      substed = 1
56292    } else
56293      len += 1 + keylen
56294  }
56295
56296  print line
56297}
56298
56299_ACAWK
56300_ACEOF
56301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56302if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56303  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56304else
56305  cat
56306fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56307  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56308_ACEOF
56309
56310# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56311# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56312# trailing colons and then remove the whole line if VPATH becomes empty
56313# (actually we leave an empty line to preserve line numbers).
56314if test "x$srcdir" = x.; then
56315  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56316h
56317s///
56318s/^/:/
56319s/[	 ]*$/:/
56320s/:\$(srcdir):/:/g
56321s/:\${srcdir}:/:/g
56322s/:@srcdir@:/:/g
56323s/^:*//
56324s/:*$//
56325x
56326s/\(=[	 ]*\).*/\1/
56327G
56328s/\n//
56329s/^[^=]*=[	 ]*$//
56330}'
56331fi
56332
56333cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56334fi # test -n "$CONFIG_FILES"
56335
56336
56337eval set X "  :F $CONFIG_FILES      "
56338shift
56339for ac_tag
56340do
56341  case $ac_tag in
56342  :[FHLC]) ac_mode=$ac_tag; continue;;
56343  esac
56344  case $ac_mode$ac_tag in
56345  :[FHL]*:*);;
56346  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56347  :[FH]-) ac_tag=-:-;;
56348  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56349  esac
56350  ac_save_IFS=$IFS
56351  IFS=:
56352  set x $ac_tag
56353  IFS=$ac_save_IFS
56354  shift
56355  ac_file=$1
56356  shift
56357
56358  case $ac_mode in
56359  :L) ac_source=$1;;
56360  :[FH])
56361    ac_file_inputs=
56362    for ac_f
56363    do
56364      case $ac_f in
56365      -) ac_f="$ac_tmp/stdin";;
56366      *) # Look for the file first in the build tree, then in the source tree
56367	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56368	 # because $ac_f cannot contain `:'.
56369	 test -f "$ac_f" ||
56370	   case $ac_f in
56371	   [\\/$]*) false;;
56372	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56373	   esac ||
56374	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56375      esac
56376      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56377      as_fn_append ac_file_inputs " '$ac_f'"
56378    done
56379
56380    # Let's still pretend it is `configure' which instantiates (i.e., don't
56381    # use $as_me), people would be surprised to read:
56382    #    /* config.h.  Generated by config.status.  */
56383    configure_input='Generated from '`
56384	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56385	`' by configure.'
56386    if test x"$ac_file" != x-; then
56387      configure_input="$ac_file.  $configure_input"
56388      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56389$as_echo "$as_me: creating $ac_file" >&6;}
56390    fi
56391    # Neutralize special characters interpreted by sed in replacement strings.
56392    case $configure_input in #(
56393    *\&* | *\|* | *\\* )
56394       ac_sed_conf_input=`$as_echo "$configure_input" |
56395       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56396    *) ac_sed_conf_input=$configure_input;;
56397    esac
56398
56399    case $ac_tag in
56400    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56401      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56402    esac
56403    ;;
56404  esac
56405
56406  ac_dir=`$as_dirname -- "$ac_file" ||
56407$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56408	 X"$ac_file" : 'X\(//\)[^/]' \| \
56409	 X"$ac_file" : 'X\(//\)$' \| \
56410	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56411$as_echo X"$ac_file" |
56412    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56413	    s//\1/
56414	    q
56415	  }
56416	  /^X\(\/\/\)[^/].*/{
56417	    s//\1/
56418	    q
56419	  }
56420	  /^X\(\/\/\)$/{
56421	    s//\1/
56422	    q
56423	  }
56424	  /^X\(\/\).*/{
56425	    s//\1/
56426	    q
56427	  }
56428	  s/.*/./; q'`
56429  as_dir="$ac_dir"; as_fn_mkdir_p
56430  ac_builddir=.
56431
56432case "$ac_dir" in
56433.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56434*)
56435  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56436  # A ".." for each directory in $ac_dir_suffix.
56437  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56438  case $ac_top_builddir_sub in
56439  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56440  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56441  esac ;;
56442esac
56443ac_abs_top_builddir=$ac_pwd
56444ac_abs_builddir=$ac_pwd$ac_dir_suffix
56445# for backward compatibility:
56446ac_top_builddir=$ac_top_build_prefix
56447
56448case $srcdir in
56449  .)  # We are building in place.
56450    ac_srcdir=.
56451    ac_top_srcdir=$ac_top_builddir_sub
56452    ac_abs_top_srcdir=$ac_pwd ;;
56453  [\\/]* | ?:[\\/]* )  # Absolute name.
56454    ac_srcdir=$srcdir$ac_dir_suffix;
56455    ac_top_srcdir=$srcdir
56456    ac_abs_top_srcdir=$srcdir ;;
56457  *) # Relative name.
56458    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56459    ac_top_srcdir=$ac_top_build_prefix$srcdir
56460    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56461esac
56462ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56463
56464
56465  case $ac_mode in
56466  :F)
56467  #
56468  # CONFIG_FILE
56469  #
56470
56471_ACEOF
56472
56473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56474# If the template does not know about datarootdir, expand it.
56475# FIXME: This hack should be removed a few years after 2.60.
56476ac_datarootdir_hack=; ac_datarootdir_seen=
56477ac_sed_dataroot='
56478/datarootdir/ {
56479  p
56480  q
56481}
56482/@datadir@/p
56483/@docdir@/p
56484/@infodir@/p
56485/@localedir@/p
56486/@mandir@/p'
56487case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56488*datarootdir*) ac_datarootdir_seen=yes;;
56489*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56490  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56491$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56492_ACEOF
56493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56494  ac_datarootdir_hack='
56495  s&@datadir@&$datadir&g
56496  s&@docdir@&$docdir&g
56497  s&@infodir@&$infodir&g
56498  s&@localedir@&$localedir&g
56499  s&@mandir@&$mandir&g
56500  s&\\\${datarootdir}&$datarootdir&g' ;;
56501esac
56502_ACEOF
56503
56504# Neutralize VPATH when `$srcdir' = `.'.
56505# Shell code in configure.ac might set extrasub.
56506# FIXME: do we really want to maintain this feature?
56507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56508ac_sed_extra="$ac_vpsub
56509$extrasub
56510_ACEOF
56511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56512:t
56513/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56514s|@configure_input@|$ac_sed_conf_input|;t t
56515s&@top_builddir@&$ac_top_builddir_sub&;t t
56516s&@top_build_prefix@&$ac_top_build_prefix&;t t
56517s&@srcdir@&$ac_srcdir&;t t
56518s&@abs_srcdir@&$ac_abs_srcdir&;t t
56519s&@top_srcdir@&$ac_top_srcdir&;t t
56520s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56521s&@builddir@&$ac_builddir&;t t
56522s&@abs_builddir@&$ac_abs_builddir&;t t
56523s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56524$ac_datarootdir_hack
56525"
56526eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56527  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56528
56529test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56530  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56531  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56532      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56533  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56534which seems to be undefined.  Please make sure it is defined" >&5
56535$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56536which seems to be undefined.  Please make sure it is defined" >&2;}
56537
56538  rm -f "$ac_tmp/stdin"
56539  case $ac_file in
56540  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56541  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56542  esac \
56543  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56544 ;;
56545
56546
56547
56548  esac
56549
56550done # for ac_tag
56551
56552
56553as_fn_exit 0
56554_ACEOF
56555ac_clean_files=$ac_clean_files_save
56556
56557test $ac_write_fail = 0 ||
56558  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56559
56560
56561# configure is writing to config.log, and then calls config.status.
56562# config.status does its own redirection, appending to config.log.
56563# Unfortunately, on DOS this fails, as config.log is still kept open
56564# by configure, so config.status won't be able to write to it; its
56565# output is simply discarded.  So we exec the FD to /dev/null,
56566# effectively closing config.log, so it can be properly (re)opened and
56567# appended to by config.status.  When coming back to configure, we
56568# need to make the FD available again.
56569if test "$no_create" != yes; then
56570  ac_cs_success=:
56571  ac_config_status_args=
56572  test "$silent" = yes &&
56573    ac_config_status_args="$ac_config_status_args --quiet"
56574  exec 5>/dev/null
56575  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56576  exec 5>>config.log
56577  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56578  # would make configure fail if this is the last instruction.
56579  $ac_cs_success || as_fn_exit 1
56580fi
56581if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56582  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56583$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56584fi
56585
56586
56587# After AC_OUTPUT, we need to do final work
56588
56589
56590  # Try to move config.log (generated by autoconf) to the configure-support directory.
56591  if test -e ./config.log; then
56592    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56593  fi
56594
56595  # Rotate our log file (configure.log)
56596  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56597    $RM -f "$OUTPUT_ROOT/configure.log.old"
56598  fi
56599  if test -e "$OUTPUT_ROOT/configure.log"; then
56600    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56601  fi
56602
56603  # Move configure.log from current directory to the build output root
56604  if test -e ./configure.log; then
56605    echo found it
56606    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56607  fi
56608
56609  # Make the compare script executable
56610  $CHMOD +x $OUTPUT_ROOT/compare.sh
56611
56612
56613# Finally output some useful information to the user
56614
56615  # Finally output some useful information to the user
56616
56617  printf "\n"
56618  printf "====================================================\n"
56619  if test "x$no_create" != "xyes"; then
56620    if test "x$IS_RECONFIGURE" != "xyes"; then
56621      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56622    else
56623      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56624    fi
56625  else
56626    if test "x$IS_RECONFIGURE" != "xyes"; then
56627      printf "A configuration has been successfully checked but not created\n"
56628    else
56629      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56630    fi
56631  fi
56632  if test "x$CONFIGURE_COMMAND_LINE" != x; then
56633    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56634  else
56635    printf "using default settings.\n"
56636  fi
56637
56638  printf "\n"
56639  printf "Configuration summary:\n"
56640  printf "* Debug level:    $DEBUG_LEVEL\n"
56641  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56642  printf "* JDK variant:    $JDK_VARIANT\n"
56643  printf "* JVM variants:   $with_jvm_variants\n"
56644  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56645
56646  printf "\n"
56647  printf "Tools summary:\n"
56648  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56649    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56650  fi
56651  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56652  if test "x$TOOLCHAIN_VERSION" != "x"; then
56653    print_version=" $TOOLCHAIN_VERSION"
56654  fi
56655  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56656  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56657  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56658
56659  printf "\n"
56660  printf "Build performance summary:\n"
56661  printf "* Cores to use:   $JOBS\n"
56662  printf "* Memory limit:   $MEMORY_SIZE MB\n"
56663  if test "x$CCACHE_STATUS" != "x"; then
56664    printf "* ccache status:  $CCACHE_STATUS\n"
56665  fi
56666  printf "\n"
56667
56668  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56669    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56670    printf "will result in longer build times.\n"
56671    printf "\n"
56672  fi
56673
56674  if test "x$FOUND_ALT_VARIABLES" != "x"; then
56675    printf "WARNING: You have old-style ALT_ environment variables set.\n"
56676    printf "These are not respected, and will be ignored. It is recommended\n"
56677    printf "that you clean your environment. The following variables are set:\n"
56678    printf "$FOUND_ALT_VARIABLES\n"
56679    printf "\n"
56680  fi
56681
56682  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56683    printf "WARNING: Your build output directory is not on a local disk.\n"
56684    printf "This will severely degrade build performance!\n"
56685    printf "It is recommended that you create an output directory on a local disk,\n"
56686    printf "and run the configure script again from that directory.\n"
56687    printf "\n"
56688  fi
56689
56690  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56691    printf "WARNING: The result of this configuration has overridden an older\n"
56692    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56693    printf "proper build. Failure to do so might result in strange build problems.\n"
56694    printf "\n"
56695  fi
56696
56697  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56698    printf "WARNING: The result of this configuration was not saved.\n"
56699    printf "You should run without '--no-create | -n' to create the configuration.\n"
56700    printf "\n"
56701  fi
56702
56703
56704
56705  # Locate config.log.
56706  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56707    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56708  elif test -e "./config.log"; then
56709    CONFIG_LOG_PATH="."
56710  fi
56711
56712  if test -e "$CONFIG_LOG_PATH/config.log"; then
56713    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56714    if test $? -eq 0; then
56715      printf "The following warnings were produced. Repeated here for convenience:\n"
56716      # We must quote sed expression (using []) to stop m4 from eating the [].
56717      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56718      printf "\n"
56719    fi
56720  fi
56721
56722